[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2KMGH3DEATJEEBQX94TSM":3,"skill-same:01M6C2KMGH3DEATJEEBQX94TSM":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":7,"ownerHtmlUrl":42,"ownerBlogUrl":7,"ownerDescription":7,"updatedAt":43,"install":44,"resources":57},"01M6C2KMGH3DEATJEEBQX94TSM","claude-code-settings-maintenance","Claude Code 配置维护",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\u002F2026-08-27-historical-zero-use\u002Fclaude-code-settings-maintenance\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[29,30,31,32],"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\u002F2026-08-27-historical-zero-use\u002Fclaude-code-settings-maintenance",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill claude-code-settings-maintenance",{"tool":50,"command":51},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill claude-code-settings-maintenance",{"tool":53,"command":54},"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\u002F2026-08-27-historical-zero-use\u002Fclaude-code-settings-maintenance\u002FSKILL.md",true,[],[59,67,74,82,90,99],{"skillNo":60,"name":61,"nameZh":7,"description":62,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":68,"name":69,"nameZh":7,"description":70,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":66},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` 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\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":7,"description":77,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7622KQJ32AV4K5BXEMVSSEB","pr","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":83,"name":84,"nameZh":7,"description":85,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":89},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":91,"name":92,"nameZh":7,"description":93,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":89},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":7,"description":102,"descriptionZh":7,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":7,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":7,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":89},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]