[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2XVB207RHG0ANRXM6JEN7":3,"skill-same:01M6C2XVB207RHG0ANRXM6JEN7":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":21,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":28,"frontMatter":29,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M6C2XVB207RHG0ANRXM6JEN7","claude-code-settings-maintenance",null,"jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX","01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002Flegacy-pre-2026-08-27\u002Fpackages\u002Fclaude-code-settings-maintenance\u002FSKILL.md",[16],{"categoryNo":17,"categoryName":18,"taxonomyType":19,"taxonomyTypeDesc":20},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[22,23,24,25],"code","settings","claude code settings maintenance","maintenance","2026-11-10 10:12:30",false,"# Claude Code Settings & Configuration Maintenance\n\n**Purpose**: Best practices for maintaining Claude Code settings.json and agent files to avoid validation errors and ensure proper configuration.\n\n## ? Critical: Always Consult Official Documentation\n\n**MANDATORY PROTOCOL**: When uncertain about configuration format, ALWAYS web search official Claude Code documentation first.\n\n### Documentation Search Strategy\n\n1. **Use WebFetch tool** to retrieve latest official docs\n2. **Primary documentation URLs**:\n   - `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002F` - Main documentation hub\n   - `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks` - Hooks documentation\n   - `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagents` - Agents documentation\n   - `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings` - Settings reference\n\n3. **Search pattern**:\n   ```\n   WebFetch(url=\"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks\",\n            prompt=\"What is the correct format for hook matchers?\")\n   ```\n\n## ? Hooks Configuration Format\n\n### ✅ Correct Format (String Matchers)\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"*\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'Running pre-tool hook'\",\n            \"description\": \"Example hook\"\n          }\n        ]\n      },\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'Before write operation'\",\n            \"description\": \"Pre-write hook\"\n          }\n        ]\n      }\n    ],\n    \"PostToolUse\": [\n      {\n        \"matcher\": \"Bash\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'After bash command'\",\n            \"description\": \"Post-bash hook\"\n          }\n        ]\n      }\n    ],\n    \"UserPromptSubmit\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'User submitted prompt'\",\n            \"description\": \"Prompt submission hook\"\n          }\n        ]\n      }\n    ],\n    \"Stop\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'Session stopping'\",\n            \"description\": \"Stop hook\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n### ❌ Incorrect Format (Object Matchers - OLD FORMAT)\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": {\"tools\": [\"*\"]},  \u002F\u002F ❌ WRONG - Object format\n        \"hooks\": [...]\n      },\n      {\n        \"matcher\": {\"tools\": [\"Write\"]},  \u002F\u002F ❌ WRONG - Object format\n        \"hooks\": [...]\n      }\n    ]\n  }\n}\n```\n\n### Matcher Types\n\n| Matcher Pattern | Description | Example |\n|----------------|-------------|---------|\n| `\"*\"` | Match all tools | `\"matcher\": \"*\"` |\n| `\"Write\"` | Match specific tool | `\"matcher\": \"Write\"` |\n| `\"Edit|Write\"` | Match multiple tools (regex) | `\"matcher\": \"Edit|Write\"` |\n| `\"Bash(git:*)\"` | Match specific bash commands | `\"matcher\": \"Bash(git:*)\"` |\n| `\"\"` | Empty matcher (for non-tool hooks) | `\"matcher\": \"\"` |\n\n> **Note:** Matcher patterns accept raw regular expressions. Use the pipe (`|`) for alternation without escaping (e.g., `\"Edit|Write\"`).\n\n### Hook Event Types\n\n- **PreToolUse**: Runs before tool execution (requires matcher)\n- **PostToolUse**: Runs after tool execution (requires matcher)\n- **UserPromptSubmit**: Runs when user submits prompt (use empty matcher `\"\"`)\n- **SessionStart**: Runs at session start (use empty matcher `\"\"`)\n- **Stop**: Runs when session stops (use empty matcher `\"\"`)\n\n## ? Agent File Frontmatter Format\n\n### ✅ Correct Format (Unquoted Values)\n\n```yaml\n---\nname: my-agent\ndescription: A specialized agent for specific tasks with detailed expertise\n---\n\n# Agent Content\nYour agent instructions here...\n```\n\n### ❌ Incorrect Format (Quoted Values)\n\n```yaml\n---\nname: \"my-agent\"  # ❌ WRONG - Quoted\ndescription: \"A specialized agent...\"  # ❌ WRONG - Quoted\n---\n```\n\n### Required Frontmatter Fields\n\n| Field | Required | Format | Example |\n|-------|----------|--------|---------|\n| `name` | ✅ Yes | Unquoted string | `name: code-review` |\n| `description` | ✅ Yes | Unquoted string | `description: Expert code reviewer` |\n\n### Agent Naming Best Practices\n\n- **Use kebab-case**: `code-review`, `test-runner`, `security-audit`\n- **Be descriptive**: Name should indicate agent's purpose\n- **Avoid generic names**: Prefer `python-test-runner` over `tester`\n- **No quotes**: YAML values should be unquoted\n\n## ? Validation Protocol\n\n### 1. Use \u002Fdoctor Command\n\n**ALWAYS run `\u002Fdoctor` after configuration changes**:\n\n```bash\n\u002Fdoctor\n```\n\nExpected clean output:\n```\n✅ Diagnostics\n └ Currently running: npm-global (2.0.43)\n └ Settings: Valid\n └ Agents: All parsed successfully\n └ Hooks: All registered correctly\n```\n\n### 2. Common Validation Errors\n\n| Error | Cause | Fix |\n|-------|-------|-----|\n| `matcher: Expected string, but received object` | Using `{\"tools\": [...]}` format | Change to string: `\"*\"` or `\"Write\"` |\n| `Missing required \"description\" field` | Agent frontmatter missing description | Add `description: ...` to frontmatter |\n| `Missing required \"name\" field` | Agent frontmatter missing name | Add `name: ...` to frontmatter |\n| `Invalid frontmatter` | Quoted values in YAML | Remove quotes from name\u002Fdescription |\n\n### 3. Pre-Commit Checklist\n\nBefore committing settings changes:\n\n- [ ] Run `\u002Fdoctor` to validate configuration\n- [ ] Check hooks section uses string matchers\n- [ ] Verify all agent files have required frontmatter\n- [ ] Ensure agent frontmatter uses unquoted values\n- [ ] Test hooks execute correctly (if applicable)\n\n## ?️ Troubleshooting Workflow\n\n### Issue: Hooks Not Working\n\n1. **Check matcher format**: Ensure using string matchers, not objects\n2. **Verify hook syntax**: Confirm JSON structure is valid\n3. **Test command**: Run hook command manually to ensure it works\n4. **Check permissions**: Ensure hook script files are executable\n\n### Issue: Agent Parse Errors\n\n1. **Check frontmatter**: Verify both `name` and `description` fields present\n2. **Remove quotes**: Ensure values are unquoted (YAML format)\n3. **Validate YAML**: Ensure frontmatter block starts\u002Fends with `---`\n4. **Check indentation**: YAML is indent-sensitive (use spaces, not tabs)\n\n### Issue: Settings Not Loading\n\n1. **Validate JSON**: Use `jq` or JSON validator to check syntax\n2. **Check file location**: Ensure settings.json is in correct directory\n   - Global: `~\u002F.claude\u002Fsettings.json`\n   - Project: `\u003Cproject>\u002F.claude\u002Fsettings.json`\n3. **Restart Claude Code**: Configuration changes may require restart\n\n## ? Documentation Reference Quick Links\n\n| Topic | URL |\n|-------|-----|\n| Hooks | `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks` |\n| Agents | `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fagents` |\n| Settings | `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings` |\n| MCP Servers | `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmcp` |\n| Permissions | `https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions` |\n\n## ? Best Practices Summary\n\n1. **Always consult official docs** when uncertain about format\n2. **Use string matchers** for hooks (not object format)\n3. **Use unquoted values** in agent frontmatter\n4. **Run \u002Fdoctor** after every configuration change\n5. **Test hooks manually** before committing\n6. **Keep settings.json valid** - use JSON validator\n7. **Document custom configurations** in project README\n8. **Version control** all .claude\u002F directory files\n9. **Use descriptive names** for agents and hooks\n10. **Follow principle of least privilege** for permissions\n\n## ⚠️ Common Pitfalls to Avoid\n\n| Pitfall | Impact | Prevention |\n|---------|--------|------------|\n| Using old object matcher format | Hooks fail validation | Always use string matchers |\n| Quoting agent frontmatter values | Agent parse errors | Use unquoted YAML values |\n| Missing description field | Agent not loaded | Always include name + description |\n| Invalid JSON syntax | Settings not loaded | Validate JSON before commit |\n| Not running \u002Fdoctor | Deploy with broken config | Run \u002Fdoctor before every commit |\n\n## ? Migration Guide: Old to New Hook Format\n\n### Step 1: Identify Old Format\n\nSearch for object matchers:\n```bash\ngrep -n '\"matcher\": {' .claude\u002Fsettings.json\n```\n\n### Step 2: Convert to String Format\n\n**Old**:\n```json\n\"matcher\": {\"tools\": [\"*\"]}\n\"matcher\": {\"tools\": [\"Write\"]}\n\"matcher\": {\"tools\": [\"Bash(git:*)\"]}\n```\n\n**New**:\n```json\n\"matcher\": \"*\"\n\"matcher\": \"Write\"\n\"matcher\": \"Bash(git:*)\"\n```\n\n### Step 3: Handle Non-Tool Hooks\n\nFor `UserPromptSubmit`, `Stop`, `SessionStart`:\n```json\n{\n  \"UserPromptSubmit\": [\n    {\n      \"matcher\": \"\",  \u002F\u002F Empty string for non-tool hooks\n      \"hooks\": [...]\n    }\n  ]\n}\n```\n\n### Step 4: Validate\n\n```bash\n\u002Fdoctor\n```\n\n## ? Example: Complete Valid Configuration\n\n```json\n{\n  \"env\": {\n    \"BASH_MAX_OUTPUT_LENGTH\": \"5000\"\n  },\n  \"permissions\": {\n    \"allow\": [\"Bash(git:*)\"]\n  },\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"*\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'Pre-tool execution'\",\n            \"description\": \"Log before tool use\"\n          }\n        ]\n      }\n    ],\n    \"PostToolUse\": [\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'File written'\",\n            \"description\": \"Log file writes\"\n          }\n        ]\n      }\n    ],\n    \"UserPromptSubmit\": [\n      {\n        \"matcher\": \"\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"echo 'Prompt submitted'\",\n            \"description\": \"Log prompt submission\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n## ? When to Web Search Official Docs\n\n**ALWAYS search official docs when**:\n- Unsure about configuration format\n- Encountering validation errors\n- Implementing new features\n- Migrating from old formats\n- Debugging hook execution issues\n- Adding new agent types\n- Configuring MCP servers\n- Setting up permissions\n\n**Search Example**:\n```javascript\nWebFetch({\n  url: \"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fhooks\",\n  prompt: \"What is the correct format for hook matchers? Show examples.\"\n})\n```\n\n## ✅ Success Criteria\n\nConfiguration is correct when:\n- [ ] `\u002Fdoctor` shows no errors\n- [ ] All hooks execute as expected\n- [ ] All agents parse successfully\n- [ ] Settings.json is valid JSON\n- [ ] Agent frontmatter is valid YAML\n- [ ] Matchers use string format (not objects)\n- [ ] Frontmatter values are unquoted\n\n---\n\n**Last Updated**: 2025-11-17\n**Applies To**: Claude Code 2.0+\n**Official Docs**: https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002F\n",{},"main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf",".claude\u002Fskills_archive\u002Flegacy-pre-2026-08-27\u002Fpackages\u002Fclaude-code-settings-maintenance",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 03:18:13",{"source":7,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill claude-code-settings-maintenance",{"tool":43,"command":44},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill claude-code-settings-maintenance",{"tool":46,"command":47},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill claude-code-settings-maintenance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002Flegacy-pre-2026-08-27\u002Fpackages\u002Fclaude-code-settings-maintenance\u002FSKILL.md",true,[],[52,70,90,104,118,134],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":26},"01M716Y5MTJ6GYJZ2ATXCJK8G4","instinct","Use when the user invokes \u002Finstinct or \u002Fin, or asks to \"message Instinct\", \"ask Instinct\", \"tell Instinct\", \"check Instinct\", or read replies from the configured peer assistant. iMessage first, WhatsApp Web as fallback.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Finstinct\u002FSKILL.md",[],[54,59,60,61,62,63,64,65,66,67,68,69],"user","when","replies","check","use","identity","whatsapp","gmail","read","message","ask",{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":79,"publishedAt":26},"01M716Y4HF7FVVMJSA2CCVN5VF","hr","Compatibility alias for history-resume; produce the same fresh-state, provenance-aware resume briefing.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhr\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":19,"taxonomyTypeDesc":20},"01JBSEEDCAT000000000000038","人力资源",[72,80,81,82,83,84,85,86,87,88,89],"resume","compatibility","provenance","for","history","produce","alias","briefing","state","fresh",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":97,"publishedAt":26},"01M716Y1FFNFKFJYYKF8HQA6T8","history-resume","Resume briefing for the current repository branch or worktree using fresh state and admitted history sources.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhistory-resume\u002FSKILL.md",[96],{"categoryNo":77,"categoryName":78,"taxonomyType":19,"taxonomyTypeDesc":20},[84,80,98,99,59,100,87,101,83,102,103,88,89],"history resume","branch","analysis","repository","worktree","sources",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":26},"01M716XWXJ8EPHK4RH9T14TR85","grok","Alias for the canonical grokbot browser conversation workflow; \u002Fgrok talks to the Grok bot the same way \u002Fdot talks to Dot.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgrok\u002FSKILL.md",[],[106,111,112,113,83,114,86,115,116,117],"dot","bot","workflow","canonical","conversation","browser","grokbot",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":26},"01M70N9Q07DTE0EW5KFXMMMSJ0","codexa-bench","Compare `codexa` and normal `codex` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcodexa-bench\u002FSKILL.md",[],[125,126,127,63,128,83,129,130,131,132,133],"codexa bench","work","split","default","duplicate","task","compare","normal","codex",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":138,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":153,"publishedAt":26},"01M6C24S2X60SP8BBFGAEKPEGW","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FSKILL.md",[142,147,150],{"categoryNo":143,"categoryName":144,"taxonomyType":145,"taxonomyTypeDesc":146},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":148,"categoryName":149,"taxonomyType":145,"taxonomyTypeDesc":146},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":151,"categoryName":152,"taxonomyType":19,"taxonomyTypeDesc":20},"01JBSEEDCAT000000000000032","设计师",[154,155,156,63,157,158,159,59,160,161,22,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,60,177],"frontend","design","frontend design","generic","ui design","react","html","components","artifacts","ui","aesthetics","Production","web components","landing","applications","quality","web","css","create","examples","with","react components","web ui","pages"]