npx skills add ...
npx skills add sanity-io/claude-plugins-official --skill 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/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.
npx skills add sanity-io/claude-plugins-official --skill plugin-settings
Plugins can store user-configurable settings and state in .claude/plugin-name.local.md files within the project directory. This pattern uses YAML frontmatter for structured configuration and markdown content for prompts or additional context.
Key characteristics:
.claude/plugin-name.local.md in project root.gitignore).claude/my-plugin.local.md:
Pattern: Check existence and parse frontmatter
See examples/read-settings-hook.sh for complete working example.
Commands can read settings files to customize behavior:
Agents can reference settings in their instructions:
String fields:
Boolean fields:
Numeric fields:
Extract content after second ---:
Use settings file to control hook activation:
Use case: Enable/disable hooks without editing hooks.json (requires restart).
Store agent-specific state and configuration:
.claude/multi-agent-swarm.local.md:
Read from hooks to coordinate agents:
.claude/my-plugin.local.md:
Use in hooks or commands:
Commands can create settings files:
Provide template in plugin README:
✅ DO:
.claude/plugin-name.local.md format.local.md suffix for user-local files❌ DON'T:
.claude/).md without .local (might be committed)Always add to .gitignore:
Document this in plugin README.
Provide sensible defaults when settings file doesn't exist:
Validate settings values:
Important: Settings changes require Claude Code restart.
Document in your README:
Hooks cannot be hot-swapped within a session.
When writing settings files from user input:
If settings contain file paths:
Settings files should be:
chmod 600).claude/multi-agent-swarm.local.md:
Hook usage (agent-stop-notification.sh):
enabled: true/false.claude/ralph-loop.local.md:
Hook usage (stop-hook.sh):
For detailed implementation patterns:
references/parsing-techniques.md - Complete guide to parsing YAML frontmatter and markdown bodiesreferences/real-world-examples.md - Deep dive into multi-agent-swarm and ralph-wiggum implementationsWorking examples in examples/:
read-settings-hook.sh - Hook that reads and uses settingscreate-settings-command.md - Command that creates settings fileexample-settings.md - Template settings fileDevelopment tools in scripts/:
validate-settings.sh - Validate settings file structureparse-frontmatter.sh - Extract frontmatter fieldsTo add settings to a plugin:
.claude/*.local.mdFocus on keeping settings simple and providing good defaults when settings file doesn't exist.