[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C7NAM6KNC9NT147RJ41V2N":3,"skill-same:01M6C7NAM6KNC9NT147RJ41V2N":101},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":13,"ownerHtmlUrl":53,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":54,"install":55,"resources":68},"01M6C7NAM6KNC9NT147RJ41V2N","plugin-settings","插件配置与状态管理","This skill should be used when the user asks about \"plugin settings\", \"store plugin configuration\", \"user-configurable plugin\", \".local.md files\", \"plugin state files\", \"read YAML frontmatter\", \"per-project plugin settings\", or wants to make plugin behavior configurable. Documents the .claude\u002Fplugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.","当用户询问“插件设置”、“存储插件配置”、“用户可配置插件”、“.local.md 文件”、“插件状态文件”、“读取 YAML frontmatter”、“按项目划分的插件设置”，或希望让插件行为可配置时，应使用本技能。本技能介绍 .claude\u002Fplugin-name.local.md 模式，用于通过 YAML frontmatter 和 markdown 内容存储插件专属配置。","xiaoyuge886\u002Faigc","xiaoyuge886","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12636900?v=4","01M6C7J3YT6CQHYHZ29SF3VNBC",null,"01M6C7J42B85WJJ9BQGRDED804",200,"MIT","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41],"plugin","Plugin Settings","settings","documents","state","content","yaml","markdown","markdown content","read","behavior","user","2026-11-10 10:12:30",false,"---\nname: plugin-settings\ndescription: This skill should be used when the user asks about \"plugin settings\", \"store plugin configuration\", \"user-configurable plugin\", \".local.md files\", \"plugin state files\", \"read YAML frontmatter\", \"per-project plugin settings\", or wants to make plugin behavior configurable. Documents the .claude\u002Fplugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.\nversion: 0.1.0\n---\n\n# Plugin Settings Pattern for Claude Code Plugins\n\n## Overview\n\nPlugins can store user-configurable settings and state in `.claude\u002Fplugin-name.local.md` files within the project directory. This pattern uses YAML frontmatter for structured configuration and markdown content for prompts or additional context.\n\n**Key characteristics:**\n- File location: `.claude\u002Fplugin-name.local.md` in project root\n- Structure: YAML frontmatter + markdown body\n- Purpose: Per-project plugin configuration and state\n- Usage: Read from hooks, commands, and agents\n- Lifecycle: User-managed (not in git, should be in `.gitignore`)\n\n## File Structure\n\n### Basic Template\n\n```markdown\n---\nenabled: true\nsetting1: value1\nsetting2: value2\nnumeric_setting: 42\nlist_setting: [\"item1\", \"item2\"]\n---\n\n# Additional Context\n\nThis markdown body can contain:\n- Task descriptions\n- Additional instructions\n- Prompts to feed back to Claude\n- Documentation or notes\n```\n\n### Example: Plugin State File\n\n**.claude\u002Fmy-plugin.local.md:**\n```markdown\n---\nenabled: true\nstrict_mode: false\nmax_retries: 3\nnotification_level: info\ncoordinator_session: team-leader\n---\n\n# Plugin Configuration\n\nThis plugin is configured for standard validation mode.\nContact @team-lead with questions.\n```\n\n## Reading Settings Files\n\n### From Hooks (Bash Scripts)\n\n**Pattern: Check existence and parse frontmatter**\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\n# Define state file path\nSTATE_FILE=\".claude\u002Fmy-plugin.local.md\"\n\n# Quick exit if file doesn't exist\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  exit 0  # Plugin not configured, skip\nfi\n\n# Parse YAML frontmatter (between --- markers)\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$STATE_FILE\")\n\n# Extract individual fields\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\nSTRICT_MODE=$(echo \"$FRONTMATTER\" | grep '^strict_mode:' | sed 's\u002Fstrict_mode: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n\n# Check if enabled\nif [[ \"$ENABLED\" != \"true\" ]]; then\n  exit 0  # Disabled\nfi\n\n# Use configuration in hook logic\nif [[ \"$STRICT_MODE\" == \"true\" ]]; then\n  # Apply strict validation\n  # ...\nfi\n```\n\nSee `examples\u002Fread-settings-hook.sh` for complete working example.\n\n### From Commands\n\nCommands can read settings files to customize behavior:\n\n```markdown\n---\ndescription: Process data with plugin\nallowed-tools: [\"Read\", \"Bash\"]\n---\n\n# Process Command\n\nSteps:\n1. Check if settings exist at `.claude\u002Fmy-plugin.local.md`\n2. Read configuration using Read tool\n3. Parse YAML frontmatter to extract settings\n4. Apply settings to processing logic\n5. Execute with configured behavior\n```\n\n### From Agents\n\nAgents can reference settings in their instructions:\n\n```markdown\n---\nname: configured-agent\ndescription: Agent that adapts to project settings\n---\n\nCheck for plugin settings at `.claude\u002Fmy-plugin.local.md`.\nIf present, parse YAML frontmatter and adapt behavior according to:\n- enabled: Whether plugin is active\n- mode: Processing mode (strict, standard, lenient)\n- Additional configuration fields\n```\n\n## Parsing Techniques\n\n### Extract Frontmatter\n\n```bash\n# Extract everything between --- markers\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$FILE\")\n```\n\n### Read Individual Fields\n\n**String fields:**\n```bash\nVALUE=$(echo \"$FRONTMATTER\" | grep '^field_name:' | sed 's\u002Ffield_name: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n```\n\n**Boolean fields:**\n```bash\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F')\n# Compare: if [[ \"$ENABLED\" == \"true\" ]]; then\n```\n\n**Numeric fields:**\n```bash\nMAX=$(echo \"$FRONTMATTER\" | grep '^max_value:' | sed 's\u002Fmax_value: *\u002F\u002F')\n# Use: if [[ $MAX -gt 100 ]]; then\n```\n\n### Read Markdown Body\n\nExtract content after second `---`:\n\n```bash\n# Get everything after closing ---\nBODY=$(awk '\u002F^---$\u002F{i++; next} i>=2' \"$FILE\")\n```\n\n## Common Patterns\n\n### Pattern 1: Temporarily Active Hooks\n\nUse settings file to control hook activation:\n\n```bash\n#!\u002Fbin\u002Fbash\nSTATE_FILE=\".claude\u002Fsecurity-scan.local.md\"\n\n# Quick exit if not configured\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  exit 0\nfi\n\n# Read enabled flag\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$STATE_FILE\")\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F')\n\nif [[ \"$ENABLED\" != \"true\" ]]; then\n  exit 0  # Disabled\nfi\n\n# Run hook logic\n# ...\n```\n\n**Use case:** Enable\u002Fdisable hooks without editing hooks.json (requires restart).\n\n### Pattern 2: Agent State Management\n\nStore agent-specific state and configuration:\n\n**.claude\u002Fmulti-agent-swarm.local.md:**\n```markdown\n---\nagent_name: auth-agent\ntask_number: 3.5\npr_number: 1234\ncoordinator_session: team-leader\nenabled: true\ndependencies: [\"Task 3.4\"]\n---\n\n# Task Assignment\n\nImplement JWT authentication for the API.\n\n**Success Criteria:**\n- Authentication endpoints created\n- Tests passing\n- PR created and CI green\n```\n\nRead from hooks to coordinate agents:\n\n```bash\nAGENT_NAME=$(echo \"$FRONTMATTER\" | grep '^agent_name:' | sed 's\u002Fagent_name: *\u002F\u002F')\nCOORDINATOR=$(echo \"$FRONTMATTER\" | grep '^coordinator_session:' | sed 's\u002Fcoordinator_session: *\u002F\u002F')\n\n# Send notification to coordinator\ntmux send-keys -t \"$COORDINATOR\" \"Agent $AGENT_NAME completed task\" Enter\n```\n\n### Pattern 3: Configuration-Driven Behavior\n\n**.claude\u002Fmy-plugin.local.md:**\n```markdown\n---\nvalidation_level: strict\nmax_file_size: 1000000\nallowed_extensions: [\".js\", \".ts\", \".tsx\"]\nenable_logging: true\n---\n\n# Validation Configuration\n\nStrict mode enabled for this project.\nAll writes validated against security policies.\n```\n\nUse in hooks or commands:\n\n```bash\nLEVEL=$(echo \"$FRONTMATTER\" | grep '^validation_level:' | sed 's\u002Fvalidation_level: *\u002F\u002F')\n\ncase \"$LEVEL\" in\n  strict)\n    # Apply strict validation\n    ;;\n  standard)\n    # Apply standard validation\n    ;;\n  lenient)\n    # Apply lenient validation\n    ;;\nesac\n```\n\n## Creating Settings Files\n\n### From Commands\n\nCommands can create settings files:\n\n```markdown\n# Setup Command\n\nSteps:\n1. Ask user for configuration preferences\n2. Create `.claude\u002Fmy-plugin.local.md` with YAML frontmatter\n3. Set appropriate values based on user input\n4. Inform user that settings are saved\n5. Remind user to restart Claude Code for hooks to recognize changes\n```\n\n### Template Generation\n\nProvide template in plugin README:\n\n```markdown\n## Configuration\n\nCreate `.claude\u002Fmy-plugin.local.md` in your project:\n\n\\`\\`\\`markdown\n---\nenabled: true\nmode: standard\nmax_retries: 3\n---\n\n# Plugin Configuration\n\nYour settings are active.\n\\`\\`\\`\n\nAfter creating or editing, restart Claude Code for changes to take effect.\n```\n\n## Best Practices\n\n### File Naming\n\n✅ **DO:**\n- Use `.claude\u002Fplugin-name.local.md` format\n- Match plugin name exactly\n- Use `.local.md` suffix for user-local files\n\n❌ **DON'T:**\n- Use different directory (not `.claude\u002F`)\n- Use inconsistent naming\n- Use `.md` without `.local` (might be committed)\n\n### Gitignore\n\nAlways add to `.gitignore`:\n\n```gitignore\n.claude\u002F*.local.md\n.claude\u002F*.local.json\n```\n\nDocument this in plugin README.\n\n### Defaults\n\nProvide sensible defaults when settings file doesn't exist:\n\n```bash\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  # Use defaults\n  ENABLED=true\n  MODE=standard\nelse\n  # Read from file\n  # ...\nfi\n```\n\n### Validation\n\nValidate settings values:\n\n```bash\nMAX=$(echo \"$FRONTMATTER\" | grep '^max_value:' | sed 's\u002Fmax_value: *\u002F\u002F')\n\n# Validate numeric range\nif ! [[ \"$MAX\" =~ ^[0-9]+$ ]] || [[ $MAX -lt 1 ]] || [[ $MAX -gt 100 ]]; then\n  echo \"⚠️  Invalid max_value in settings (must be 1-100)\" >&2\n  MAX=10  # Use default\nfi\n```\n\n### Restart Requirement\n\n**Important:** Settings changes require Claude Code restart.\n\nDocument in your README:\n\n```markdown\n## Changing Settings\n\nAfter editing `.claude\u002Fmy-plugin.local.md`:\n1. Save the file\n2. Exit Claude Code\n3. Restart: `claude` or `cc`\n4. New settings will be loaded\n```\n\nHooks cannot be hot-swapped within a session.\n\n## Security Considerations\n\n### Sanitize User Input\n\nWhen writing settings files from user input:\n\n```bash\n# Escape quotes in user input\nSAFE_VALUE=$(echo \"$USER_INPUT\" | sed 's\u002F\"\u002F\\\\\"\u002Fg')\n\n# Write to file\ncat > \"$STATE_FILE\" \u003C\u003CEOF\n---\nuser_setting: \"$SAFE_VALUE\"\n---\nEOF\n```\n\n### Validate File Paths\n\nIf settings contain file paths:\n\n```bash\nFILE_PATH=$(echo \"$FRONTMATTER\" | grep '^data_file:' | sed 's\u002Fdata_file: *\u002F\u002F')\n\n# Check for path traversal\nif [[ \"$FILE_PATH\" == *\"..\"* ]]; then\n  echo \"⚠️  Invalid path in settings (path traversal)\" >&2\n  exit 2\nfi\n```\n\n### Permissions\n\nSettings files should be:\n- Readable by user only (`chmod 600`)\n- Not committed to git\n- Not shared between users\n\n## Real-World Examples\n\n### multi-agent-swarm Plugin\n\n**.claude\u002Fmulti-agent-swarm.local.md:**\n```markdown\n---\nagent_name: auth-implementation\ntask_number: 3.5\npr_number: 1234\ncoordinator_session: team-leader\nenabled: true\ndependencies: [\"Task 3.4\"]\nadditional_instructions: Use JWT tokens, not sessions\n---\n\n# Task: Implement Authentication\n\nBuild JWT-based authentication for the REST API.\nCoordinate with auth-agent on shared types.\n```\n\n**Hook usage (agent-stop-notification.sh):**\n- Checks if file exists (line 15-18: quick exit if not)\n- Parses frontmatter to get coordinator_session, agent_name, enabled\n- Sends notifications to coordinator if enabled\n- Allows quick activation\u002Fdeactivation via `enabled: true\u002Ffalse`\n\n### ralph-loop Plugin\n\n**.claude\u002Fralph-loop.local.md:**\n```markdown\n---\niteration: 1\nmax_iterations: 10\ncompletion_promise: \"All tests passing and build successful\"\n---\n\nFix all the linting errors in the project.\nMake sure tests pass after each fix.\n```\n\n**Hook usage (stop-hook.sh):**\n- Checks if file exists (line 15-18: quick exit if not active)\n- Reads iteration count and max_iterations\n- Extracts completion_promise for loop termination\n- Reads body as the prompt to feed back\n- Updates iteration count on each loop\n\n## Quick Reference\n\n### File Location\n\n```\nproject-root\u002F\n└── .claude\u002F\n    └── plugin-name.local.md\n```\n\n### Frontmatter Parsing\n\n```bash\n# Extract frontmatter\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$FILE\")\n\n# Read field\nVALUE=$(echo \"$FRONTMATTER\" | grep '^field:' | sed 's\u002Ffield: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n```\n\n### Body Parsing\n\n```bash\n# Extract body (after second ---)\nBODY=$(awk '\u002F^---$\u002F{i++; next} i>=2' \"$FILE\")\n```\n\n### Quick Exit Pattern\n\n```bash\nif [[ ! -f \".claude\u002Fmy-plugin.local.md\" ]]; then\n  exit 0  # Not configured\nfi\n```\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed implementation patterns:\n\n- **`references\u002Fparsing-techniques.md`** - Complete guide to parsing YAML frontmatter and markdown bodies\n- **`references\u002Freal-world-examples.md`** - Deep dive into multi-agent-swarm and ralph-loop implementations\n\n### Example Files\n\nWorking examples in `examples\u002F`:\n\n- **`read-settings-hook.sh`** - Hook that reads and uses settings\n- **`create-settings-command.md`** - Command that creates settings file\n- **`example-settings.md`** - Template settings file\n\n### Utility Scripts\n\nDevelopment tools in `scripts\u002F`:\n\n- **`validate-settings.sh`** - Validate settings file structure\n- **`parse-frontmatter.sh`** - Extract frontmatter fields\n\n## Implementation Workflow\n\nTo add settings to a plugin:\n\n1. Design settings schema (which fields, types, defaults)\n2. Create template file in plugin documentation\n3. Add gitignore entry for `.claude\u002F*.local.md`\n4. Implement settings parsing in hooks\u002Fcommands\n5. Use quick-exit pattern (check file exists, check enabled field)\n6. Document settings in plugin README with template\n7. Remind users that changes require Claude Code restart\n\nFocus on keeping settings simple and providing good defaults when settings file doesn't exist.\n","# Plugin Settings Pattern for Claude Code Plugins\n\n## Overview\n\nPlugins can store user-configurable settings and state in `.claude\u002Fplugin-name.local.md` files within the project directory. This pattern uses YAML frontmatter for structured configuration and markdown content for prompts or additional context.\n\n**Key characteristics:**\n- File location: `.claude\u002Fplugin-name.local.md` in project root\n- Structure: YAML frontmatter + markdown body\n- Purpose: Per-project plugin configuration and state\n- Usage: Read from hooks, commands, and agents\n- Lifecycle: User-managed (not in git, should be in `.gitignore`)\n\n## File Structure\n\n### Basic Template\n\n```markdown\n---\nenabled: true\nsetting1: value1\nsetting2: value2\nnumeric_setting: 42\nlist_setting: [\"item1\", \"item2\"]\n---\n\n# Additional Context\n\nThis markdown body can contain:\n- Task descriptions\n- Additional instructions\n- Prompts to feed back to Claude\n- Documentation or notes\n```\n\n### Example: Plugin State File\n\n**.claude\u002Fmy-plugin.local.md:**\n```markdown\n---\nenabled: true\nstrict_mode: false\nmax_retries: 3\nnotification_level: info\ncoordinator_session: team-leader\n---\n\n# Plugin Configuration\n\nThis plugin is configured for standard validation mode.\nContact @team-lead with questions.\n```\n\n## Reading Settings Files\n\n### From Hooks (Bash Scripts)\n\n**Pattern: Check existence and parse frontmatter**\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\n# Define state file path\nSTATE_FILE=\".claude\u002Fmy-plugin.local.md\"\n\n# Quick exit if file doesn't exist\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  exit 0  # Plugin not configured, skip\nfi\n\n# Parse YAML frontmatter (between --- markers)\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$STATE_FILE\")\n\n# Extract individual fields\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\nSTRICT_MODE=$(echo \"$FRONTMATTER\" | grep '^strict_mode:' | sed 's\u002Fstrict_mode: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n\n# Check if enabled\nif [[ \"$ENABLED\" != \"true\" ]]; then\n  exit 0  # Disabled\nfi\n\n# Use configuration in hook logic\nif [[ \"$STRICT_MODE\" == \"true\" ]]; then\n  # Apply strict validation\n  # ...\nfi\n```\n\nSee `examples\u002Fread-settings-hook.sh` for complete working example.\n\n### From Commands\n\nCommands can read settings files to customize behavior:\n\n```markdown\n---\ndescription: Process data with plugin\nallowed-tools: [\"Read\", \"Bash\"]\n---\n\n# Process Command\n\nSteps:\n1. Check if settings exist at `.claude\u002Fmy-plugin.local.md`\n2. Read configuration using Read tool\n3. Parse YAML frontmatter to extract settings\n4. Apply settings to processing logic\n5. Execute with configured behavior\n```\n\n### From Agents\n\nAgents can reference settings in their instructions:\n\n```markdown\n---\nname: configured-agent\ndescription: Agent that adapts to project settings\n---\n\nCheck for plugin settings at `.claude\u002Fmy-plugin.local.md`.\nIf present, parse YAML frontmatter and adapt behavior according to:\n- enabled: Whether plugin is active\n- mode: Processing mode (strict, standard, lenient)\n- Additional configuration fields\n```\n\n## Parsing Techniques\n\n### Extract Frontmatter\n\n```bash\n# Extract everything between --- markers\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$FILE\")\n```\n\n### Read Individual Fields\n\n**String fields:**\n```bash\nVALUE=$(echo \"$FRONTMATTER\" | grep '^field_name:' | sed 's\u002Ffield_name: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n```\n\n**Boolean fields:**\n```bash\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F')\n# Compare: if [[ \"$ENABLED\" == \"true\" ]]; then\n```\n\n**Numeric fields:**\n```bash\nMAX=$(echo \"$FRONTMATTER\" | grep '^max_value:' | sed 's\u002Fmax_value: *\u002F\u002F')\n# Use: if [[ $MAX -gt 100 ]]; then\n```\n\n### Read Markdown Body\n\nExtract content after second `---`:\n\n```bash\n# Get everything after closing ---\nBODY=$(awk '\u002F^---$\u002F{i++; next} i>=2' \"$FILE\")\n```\n\n## Common Patterns\n\n### Pattern 1: Temporarily Active Hooks\n\nUse settings file to control hook activation:\n\n```bash\n#!\u002Fbin\u002Fbash\nSTATE_FILE=\".claude\u002Fsecurity-scan.local.md\"\n\n# Quick exit if not configured\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  exit 0\nfi\n\n# Read enabled flag\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$STATE_FILE\")\nENABLED=$(echo \"$FRONTMATTER\" | grep '^enabled:' | sed 's\u002Fenabled: *\u002F\u002F')\n\nif [[ \"$ENABLED\" != \"true\" ]]; then\n  exit 0  # Disabled\nfi\n\n# Run hook logic\n# ...\n```\n\n**Use case:** Enable\u002Fdisable hooks without editing hooks.json (requires restart).\n\n### Pattern 2: Agent State Management\n\nStore agent-specific state and configuration:\n\n**.claude\u002Fmulti-agent-swarm.local.md:**\n```markdown\n---\nagent_name: auth-agent\ntask_number: 3.5\npr_number: 1234\ncoordinator_session: team-leader\nenabled: true\ndependencies: [\"Task 3.4\"]\n---\n\n# Task Assignment\n\nImplement JWT authentication for the API.\n\n**Success Criteria:**\n- Authentication endpoints created\n- Tests passing\n- PR created and CI green\n```\n\nRead from hooks to coordinate agents:\n\n```bash\nAGENT_NAME=$(echo \"$FRONTMATTER\" | grep '^agent_name:' | sed 's\u002Fagent_name: *\u002F\u002F')\nCOORDINATOR=$(echo \"$FRONTMATTER\" | grep '^coordinator_session:' | sed 's\u002Fcoordinator_session: *\u002F\u002F')\n\n# Send notification to coordinator\ntmux send-keys -t \"$COORDINATOR\" \"Agent $AGENT_NAME completed task\" Enter\n```\n\n### Pattern 3: Configuration-Driven Behavior\n\n**.claude\u002Fmy-plugin.local.md:**\n```markdown\n---\nvalidation_level: strict\nmax_file_size: 1000000\nallowed_extensions: [\".js\", \".ts\", \".tsx\"]\nenable_logging: true\n---\n\n# Validation Configuration\n\nStrict mode enabled for this project.\nAll writes validated against security policies.\n```\n\nUse in hooks or commands:\n\n```bash\nLEVEL=$(echo \"$FRONTMATTER\" | grep '^validation_level:' | sed 's\u002Fvalidation_level: *\u002F\u002F')\n\ncase \"$LEVEL\" in\n  strict)\n    # Apply strict validation\n    ;;\n  standard)\n    # Apply standard validation\n    ;;\n  lenient)\n    # Apply lenient validation\n    ;;\nesac\n```\n\n## Creating Settings Files\n\n### From Commands\n\nCommands can create settings files:\n\n```markdown\n# Setup Command\n\nSteps:\n1. Ask user for configuration preferences\n2. Create `.claude\u002Fmy-plugin.local.md` with YAML frontmatter\n3. Set appropriate values based on user input\n4. Inform user that settings are saved\n5. Remind user to restart Claude Code for hooks to recognize changes\n```\n\n### Template Generation\n\nProvide template in plugin README:\n\n```markdown\n## Configuration\n\nCreate `.claude\u002Fmy-plugin.local.md` in your project:\n\n\\`\\`\\`markdown\n---\nenabled: true\nmode: standard\nmax_retries: 3\n---\n\n# Plugin Configuration\n\nYour settings are active.\n\\`\\`\\`\n\nAfter creating or editing, restart Claude Code for changes to take effect.\n```\n\n## Best Practices\n\n### File Naming\n\n✅ **DO:**\n- Use `.claude\u002Fplugin-name.local.md` format\n- Match plugin name exactly\n- Use `.local.md` suffix for user-local files\n\n❌ **DON'T:**\n- Use different directory (not `.claude\u002F`)\n- Use inconsistent naming\n- Use `.md` without `.local` (might be committed)\n\n### Gitignore\n\nAlways add to `.gitignore`:\n\n```gitignore\n.claude\u002F*.local.md\n.claude\u002F*.local.json\n```\n\nDocument this in plugin README.\n\n### Defaults\n\nProvide sensible defaults when settings file doesn't exist:\n\n```bash\nif [[ ! -f \"$STATE_FILE\" ]]; then\n  # Use defaults\n  ENABLED=true\n  MODE=standard\nelse\n  # Read from file\n  # ...\nfi\n```\n\n### Validation\n\nValidate settings values:\n\n```bash\nMAX=$(echo \"$FRONTMATTER\" | grep '^max_value:' | sed 's\u002Fmax_value: *\u002F\u002F')\n\n# Validate numeric range\nif ! [[ \"$MAX\" =~ ^[0-9]+$ ]] || [[ $MAX -lt 1 ]] || [[ $MAX -gt 100 ]]; then\n  echo \"⚠️  Invalid max_value in settings (must be 1-100)\" >&2\n  MAX=10  # Use default\nfi\n```\n\n### Restart Requirement\n\n**Important:** Settings changes require Claude Code restart.\n\nDocument in your README:\n\n```markdown\n## Changing Settings\n\nAfter editing `.claude\u002Fmy-plugin.local.md`:\n1. Save the file\n2. Exit Claude Code\n3. Restart: `claude` or `cc`\n4. New settings will be loaded\n```\n\nHooks cannot be hot-swapped within a session.\n\n## Security Considerations\n\n### Sanitize User Input\n\nWhen writing settings files from user input:\n\n```bash\n# Escape quotes in user input\nSAFE_VALUE=$(echo \"$USER_INPUT\" | sed 's\u002F\"\u002F\\\\\"\u002Fg')\n\n# Write to file\ncat > \"$STATE_FILE\" \u003C\u003CEOF\n---\nuser_setting: \"$SAFE_VALUE\"\n---\nEOF\n```\n\n### Validate File Paths\n\nIf settings contain file paths:\n\n```bash\nFILE_PATH=$(echo \"$FRONTMATTER\" | grep '^data_file:' | sed 's\u002Fdata_file: *\u002F\u002F')\n\n# Check for path traversal\nif [[ \"$FILE_PATH\" == *\"..\"* ]]; then\n  echo \"⚠️  Invalid path in settings (path traversal)\" >&2\n  exit 2\nfi\n```\n\n### Permissions\n\nSettings files should be:\n- Readable by user only (`chmod 600`)\n- Not committed to git\n- Not shared between users\n\n## Real-World Examples\n\n### multi-agent-swarm Plugin\n\n**.claude\u002Fmulti-agent-swarm.local.md:**\n```markdown\n---\nagent_name: auth-implementation\ntask_number: 3.5\npr_number: 1234\ncoordinator_session: team-leader\nenabled: true\ndependencies: [\"Task 3.4\"]\nadditional_instructions: Use JWT tokens, not sessions\n---\n\n# Task: Implement Authentication\n\nBuild JWT-based authentication for the REST API.\nCoordinate with auth-agent on shared types.\n```\n\n**Hook usage (agent-stop-notification.sh):**\n- Checks if file exists (line 15-18: quick exit if not)\n- Parses frontmatter to get coordinator_session, agent_name, enabled\n- Sends notifications to coordinator if enabled\n- Allows quick activation\u002Fdeactivation via `enabled: true\u002Ffalse`\n\n### ralph-loop Plugin\n\n**.claude\u002Fralph-loop.local.md:**\n```markdown\n---\niteration: 1\nmax_iterations: 10\ncompletion_promise: \"All tests passing and build successful\"\n---\n\nFix all the linting errors in the project.\nMake sure tests pass after each fix.\n```\n\n**Hook usage (stop-hook.sh):**\n- Checks if file exists (line 15-18: quick exit if not active)\n- Reads iteration count and max_iterations\n- Extracts completion_promise for loop termination\n- Reads body as the prompt to feed back\n- Updates iteration count on each loop\n\n## Quick Reference\n\n### File Location\n\n```\nproject-root\u002F\n└── .claude\u002F\n    └── plugin-name.local.md\n```\n\n### Frontmatter Parsing\n\n```bash\n# Extract frontmatter\nFRONTMATTER=$(sed -n '\u002F^---$\u002F,\u002F^---$\u002F{ \u002F^---$\u002Fd; p; }' \"$FILE\")\n\n# Read field\nVALUE=$(echo \"$FRONTMATTER\" | grep '^field:' | sed 's\u002Ffield: *\u002F\u002F' | sed 's\u002F^\"\\(.*\\)\"$\u002F\\1\u002F')\n```\n\n### Body Parsing\n\n```bash\n# Extract body (after second ---)\nBODY=$(awk '\u002F^---$\u002F{i++; next} i>=2' \"$FILE\")\n```\n\n### Quick Exit Pattern\n\n```bash\nif [[ ! -f \".claude\u002Fmy-plugin.local.md\" ]]; then\n  exit 0  # Not configured\nfi\n```\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed implementation patterns:\n\n- **`references\u002Fparsing-techniques.md`** - Complete guide to parsing YAML frontmatter and markdown bodies\n- **`references\u002Freal-world-examples.md`** - Deep dive into multi-agent-swarm and ralph-loop implementations\n\n### Example Files\n\nWorking examples in `examples\u002F`:\n\n- **`read-settings-hook.sh`** - Hook that reads and uses settings\n- **`create-settings-command.md`** - Command that creates settings file\n- **`example-settings.md`** - Template settings file\n\n### Utility Scripts\n\nDevelopment tools in `scripts\u002F`:\n\n- **`validate-settings.sh`** - Validate settings file structure\n- **`parse-frontmatter.sh`** - Extract frontmatter fields\n\n## Implementation Workflow\n\nTo add settings to a plugin:\n\n1. Design settings schema (which fields, types, defaults)\n2. Create template file in plugin documentation\n3. Add gitignore entry for `.claude\u002F*.local.md`\n4. Implement settings parsing in hooks\u002Fcommands\n5. Use quick-exit pattern (check file exists, check enabled field)\n6. Document settings in plugin README with template\n7. Remind users that changes require Claude Code restart\n\nFocus on keeping settings simple and providing good defaults when settings file doesn't exist.\n",{"name":5,"version":47,"description":7},"0.1.0","main","e970014d895eae2572d8c434d79f2c6acea22417","plugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings",20,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886","2026-07-14 17:19:42",{"source":9,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add xiaoyuge886\u002Faigc --skill plugin-settings",{"tool":61,"command":62},"bunx","bunx skills add xiaoyuge886\u002Faigc --skill plugin-settings",{"tool":64,"command":65},"pnpm","pnpm dlx skills add xiaoyuge886\u002Faigc --skill plugin-settings","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002FSKILL.md",true,[69,75,79,85,89,93,97],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"examples\u002Fcreate-settings-command.md","REFERENCE","参考文档",2177,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Fexamples\u002Fcreate-settings-command.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"examples\u002Fexample-settings.md",2930,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Fexamples\u002Fexample-settings.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"examples\u002Fread-settings-hook.sh","SCRIPT","脚本",2205,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Fexamples\u002Fread-settings-hook.sh",{"path":86,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fparsing-techniques.md",11513,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Freferences\u002Fparsing-techniques.md",{"path":90,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Freal-world-examples.md",9492,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Freferences\u002Freal-world-examples.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Fparse-frontmatter.sh",1269,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Fscripts\u002Fparse-frontmatter.sh",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"scripts\u002Fvalidate-settings.sh",2712,"https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-settings\u002Fscripts\u002Fvalidate-settings.sh",[102,128,146,165,191,216],{"skillNo":103,"name":104,"nameZh":105,"description":106,"descriptionZh":107,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":108,"categories":109,"keywords":114,"publishedAt":42},"01M6C7NPNK167QMPERW14AY55J","skill-creator","技能创建与优化","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","创建新技能、修改和改进现有技能，并衡量技能性能。当用户想要从零开始创建技能、更新或优化现有技能、运行评估（evals）来测试技能、通过方差分析对技能性能进行基准测试，或优化技能描述以提高触发准确性时使用。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fskill-creator\u002Fskills\u002Fskill-creator\u002FSKILL.md",[110,111],{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},{"categoryNo":112,"categoryName":113,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[115,116,117,118,119,120,121,122,123,124,125,126,127],"skill creator","test","evals","use","improve","analysis","benchmark","update","run","create","variance analysis","run evals","performance",{"skillNo":129,"name":130,"nameZh":131,"description":132,"descriptionZh":132,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":133,"categories":134,"keywords":141,"publishedAt":42},"01M6C7NKXRM77AMYXSQCX8S15A","investment-due-diligence-report","投资尽调报告生成","投资尽调报告专业生成工具。当用户需要撰写投资尽调报告、尽职调查报告、投资分析报告时使用此skill。支持处理Excel财务数据、PDF文档等多种格式数据源，自动生成包含执行摘要、业务分析、财务分析、风险提示、投资建议等核心章节的专业报告。无论用户明确要求\"写报告\"还是提到\"分析投资标的\"、\"评估项目\"、\"做DD\"等相关需求时，都应使用此skill。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fskill-creator\u002Fskills\u002Finvestment-due-diligence-report\u002FSKILL.md",[135,138],{"categoryNo":136,"categoryName":137,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BTV4QBQYRS1HWEVGR64N4J","金融投资分析",{"categoryNo":139,"categoryName":140,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BTV4RBGF5SFPS4M35EM7YQ","金融分析师",[142,143,144,145],"investment due diligence report","report","生成","文档",{"skillNo":147,"name":148,"nameZh":149,"description":150,"descriptionZh":151,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":152,"categories":153,"keywords":156,"publishedAt":42},"01M6C7NGS2K1NZQ3PR3GM7VMWT","skill-development","Claude 技能开发与创建","This skill should be used when the user wants to \"create a skill\", \"add a skill to plugin\", \"write a new skill\", \"improve skill description\", \"organize skill content\", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.","当用户想要\"创建技能\"、\"向插件添加技能\"、\"编写新技能\"、\"改进技能描述\"、\"组织技能内容\"，或需要有关技能结构、渐进式披露或 Claude Code 插件技能开发最佳实践的指导时，应使用此技能。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fskill-development\u002FSKILL.md",[154,155],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[157,158,35,159,160,124,161,30,119,162,163,41,164],"development","skill development","best practices","code","plugins","improve skill","claude code plugins","write",{"skillNo":166,"name":167,"nameZh":168,"description":169,"descriptionZh":170,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":171,"categories":172,"keywords":175,"publishedAt":42},"01M6C7NDRYM015B9B6T4YHY3NF","plugin-structure","Claude 插件结构搭建","This skill should be used when the user asks to \"create a plugin\", \"scaffold a plugin\", \"understand plugin structure\", \"organize plugin components\", \"set up plugin.json\", \"use ${CLAUDE_PLUGIN_ROOT}\", \"add commands\u002Fagents\u002Fskills\u002Fhooks\", \"configure auto-discovery\", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.","当用户要求\"创建插件\"、\"搭建插件框架\"、\"理解插件结构\"、\"组织插件组件\"、\"设置 plugin.json\"、\"使用 ${CLAUDE_PLUGIN_ROOT}\"、\"添加命令\u002F智能体\u002F技能\u002F钩子\"、\"配置自动发现\"，或需要有关插件目录布局、清单配置、组件组织、文件命名规范或 Claude Code 插件架构最佳实践的指导时，应使用此技能。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fplugin-structure\u002FSKILL.md",[173,174],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[30,176,177,178,179,118,180,181,182,183,184,185,124,159,160,186,187,188,189,190],"Plugin Structure","hooks","up","auto","file naming conventions","plugin architecture","configure","discovery","manifest","SET","architecture","component","components","claude code plugin","file",{"skillNo":192,"name":193,"nameZh":194,"description":195,"descriptionZh":196,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":197,"categories":198,"keywords":201,"publishedAt":42},"01M6C7N79Y8P14GGCJRCM706EK","mcp-integration","MCP 服务器集成配置","This skill should be used when the user asks to \"add MCP server\", \"integrate MCP\", \"configure MCP in plugin\", \"use .mcp.json\", \"set up Model Context Protocol\", \"connect external service\", mentions \"${CLAUDE_PLUGIN_ROOT} with MCP\", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.","当用户要求“添加 MCP 服务器”、“集成 MCP”、“在插件中配置 MCP”、“使用 .mcp.json”、“设置 Model Context Protocol”、“连接外部服务”，提及“在 MCP 中使用 ${CLAUDE_PLUGIN_ROOT}”，或讨论 MCP 服务器类型（SSE、stdio、HTTP、WebSocket）时，应使用本技能。本技能提供将 Model Context Protocol 服务器集成到 Claude Code 插件中的全面指导，以实现外部工具和服务集成。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fmcp-integration\u002FSKILL.md",[199,200],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[202,203,204,205,206,207,208,160,118,178,209,163,210,211,212,213,182,214,185,215],"MCP Integration","MCP","integration","connect","http","model context protocol","mcp server","integrate","context","add mcp","model","tool","websocket","server",{"skillNo":217,"name":218,"nameZh":219,"description":220,"descriptionZh":221,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":222,"categories":223,"keywords":226,"publishedAt":42},"01M6C7N3WX29W85598HRNT5XYZ","hook-development","Claude插件钩子开发","This skill should be used when the user asks to \"create a hook\", \"add a PreToolUse\u002FPostToolUse\u002FStop hook\", \"validate tool use\", \"implement prompt-based hooks\", \"use ${CLAUDE_PLUGIN_ROOT}\", \"set up event-driven automation\", \"block dangerous commands\", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.","当用户要求“创建钩子”、“添加 PreToolUse\u002FPostToolUse\u002FStop 钩子”、“验证工具使用”、“实现基于提示词的钩子”、“使用 ${CLAUDE_PLUGIN_ROOT}”、“设置事件驱动自动化”、“阻止危险命令”，或提及钩子事件（PreToolUse、PostToolUse、Stop、SubagentStop、SessionStart、SessionEnd、UserPromptSubmit、PreCompact、Notification）时，应使用此技能。提供关于创建和实现 Claude Code 插件钩子的全面指导，重点介绍高级的基于提示词的 hooks API。","https:\u002F\u002Fgithub.com\u002Fxiaoyuge886\u002Faigc\u002Fblob\u002Fmain\u002Fplugins\u002Fclaude-plugins-official-main\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002FSKILL.md",[224,225],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},[227,157,213,228,177,178,118,41,229,230,185,231,160,124,30,232,233,234,189],"Hook Development","stop","prompt","api","tool use","validate","automation","implement"]