用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mkusaka/ccskills --skill update-claude-code-config命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | update-claude-code-config |
| description | Skill for modifying Claude Code configuration file (settings.json) |
| metadata | {"originalName":"Skill: Update Claude Code Config","ccVersion":"2.1.118","sourceUrl":"https://github.com/Piebald-AI/claude-code-system-prompts/blob/main/system-prompts/skill-update-claude-code-config.md","source":{"owner":"Piebald-AI","repo":"claude-code-system-prompts","ref":"main","path":"system-prompts/skill-update-claude-code-config.md"},"variables":["SETTINGS_FILE_LOCATION_PROMPT","HOOKS_CONFIGURATION_PROMPT","CONSTRUCTING_HOOK_PROMPT"]} |
Modify Claude Code configuration by updating settings.json files.
If the user wants something to happen automatically in response to an EVENT, they need a hook configured in settings.json. Memory/preferences cannot trigger automated actions.
These require hooks:
Hook events: PreToolUse, PostToolUse, PreCompact, PostCompact, Stop, Notification, SessionStart
Always read the existing settings file before making changes. Merge new settings with existing ones - never replace the entire file.
When the user's request is ambiguous, use AskUserQuestion to clarify:
Suggest the /config slash command for these simple settings:
theme, editorMode, verbose, modellanguage, alwaysThinkingEnabledpermissions.defaultModeEdit settings.json directly for:
When adding to permission arrays or hook arrays, merge with existing, don't replace:
WRONG (replaces existing permissions):
{ "permissions": { "allow": ["Bash(npm *)"] } }
RIGHT (preserves existing + adds new):
{
"permissions": {
"allow": [
"Bash(git *)", // existing
"Edit(.claude)", // existing
"Bash(npm *)" // new
]
}
}
${SETTINGS_FILE_LOCATION_PROMPT}
${HOOKS_CONFIGURATION_PROMPT}
${CONSTRUCTING_HOOK_PROMPT}
User: "Format my code after Claude writes it"
.claude/settings.json (or create if missing){
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_response.filePath // .tool_input.file_path' | { read -r f; prettier --write \"$f\"; } 2>/dev/null || true"
}]
}]
}
}
User: "Allow npm commands without prompting"
Bash(npm *) to allow arrayUser: "Set DEBUG=true"
{ "env": { "DEBUG": "true" } }
If a hook isn't running:
claude --debug to see hook execution logs