
Plugin Settings
Implement per-project Claude Code plugin configuration using `.claude/plugin-name.local.md` with YAML frontmatter and a markdown body hooks can read.
Overview
Plugin Settings is an agent skill for the Build phase that documents the Claude Code `.claude/plugin-name.local.md` pattern for per-project plugin YAML and markdown configuration.
Install
npx skills add https://github.com/anthropics/claude-code --skill plugin-settingsWhat is this skill?
- Documents `.claude/plugin-name.local.md` at project root for per-project plugin config
- YAML frontmatter for structured fields plus markdown body for prompts and extra context
- Intended for hooks, commands, and agents to read—not committed user-local state
- Supports enabled flags, numeric settings, and list-valued configuration in frontmatter
- Lifecycle: user-managed files that belong in `.gitignore`
Adoption & trust: 8.8k installs on skills.sh; 131k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Claude Code plugin needs per-repo toggles and prompts but you lack a standard, git-safe place to store them.
Who is it for?
Indie developers building Claude Code plugins that must respect per-project enablement, lists, and custom instruction bodies.
Skip if: Global Claude Desktop config, committed team defaults in git, or plugins with no filesystem access.
When should I use this skill?
User asks about plugin settings, storing plugin configuration, user-configurable plugins, `.local.md` files, plugin state files, reading YAML frontmatter, or per-project plugin settings.
What do I get? / Deliverables
You adopt a consistent local settings file shape that hooks and commands can read, with frontmatter for structure and markdown for agent-facing context.
- `.claude/plugin-name.local.md` file following the documented template
- Plugin read logic wired to frontmatter and markdown body fields
Recommended Skills
Journey fit
Plugin-local settings are authored while building Claude Code extensions—Build is where agent-tooling artifacts live in the repo. Agent-tooling subphase covers Claude Code plugins, hooks, and commands that need structured, project-scoped state.
How it compares
Convention doc for plugin state files—not an MCP server and not a hosted settings API.
Common Questions / FAQ
Who is plugin settings for?
Claude Code plugin authors who want documented, per-project configuration files their hooks and commands can load.
When should I use plugin settings?
During Build agent-tooling when implementing or explaining user-configurable plugin behavior, `.local.md` files, or YAML frontmatter reads.
Is plugin settings safe to install?
The pattern encourages gitignored local files—avoid committing secrets and review the Security Audits panel on this Prism page for the skill package.
SKILL.md
READMESKILL.md - Plugin Settings
# Plugin Settings Pattern for Claude Code Plugins ## Overview 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:** - File location: `.claude/plugin-name.local.md` in project root - Structure: YAML frontmatter + markdown body - Purpose: Per-project plugin configuration and state - Usage: Read from hooks, commands, and agents - Lifecycle: User-managed (not in git, should be in `.gitignore`) ## File Structure ### Basic Template ```markdown --- enabled: true setting1: value1 setting2: value2 numeric_setting: 42 list_setting: ["item1", "item2"] --- # Additional Context This markdown body can contain: - Task descriptions - Additional instructions - Prompts to feed back to Claude - Documentation or notes ``` ### Example: Plugin State File **.claude/my-plugin.local.md:** ```markdown --- enabled: true strict_mode: false max_retries: 3 notification_level: info coordinator_session: team-leader --- # Plugin Configuration This plugin is configured for standard validation mode. Contact @team-lead with questions. ``` ## Reading Settings Files ### From Hooks (Bash Scripts) **Pattern: Check existence and parse frontmatter** ```bash #!/bin/bash set -euo pipefail # Define state file path STATE_FILE=".claude/my-plugin.local.md" # Quick exit if file doesn't exist if [[ ! -f "$STATE_FILE" ]]; then exit 0 # Plugin not configured, skip fi # Parse YAML frontmatter (between --- markers) FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$STATE_FILE") # Extract individual fields ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//' | sed 's/^"\(.*\)"$/\1/') STRICT_MODE=$(echo "$FRONTMATTER" | grep '^strict_mode:' | sed 's/strict_mode: *//' | sed 's/^"\(.*\)"$/\1/') # Check if enabled if [[ "$ENABLED" != "true" ]]; then exit 0 # Disabled fi # Use configuration in hook logic if [[ "$STRICT_MODE" == "true" ]]; then # Apply strict validation # ... fi ``` See `examples/read-settings-hook.sh` for complete working example. ### From Commands Commands can read settings files to customize behavior: ```markdown --- description: Process data with plugin allowed-tools: ["Read", "Bash"] --- # Process Command Steps: 1. Check if settings exist at `.claude/my-plugin.local.md` 2. Read configuration using Read tool 3. Parse YAML frontmatter to extract settings 4. Apply settings to processing logic 5. Execute with configured behavior ``` ### From Agents Agents can reference settings in their instructions: ```markdown --- name: configured-agent description: Agent that adapts to project settings --- Check for plugin settings at `.claude/my-plugin.local.md`. If present, parse YAML frontmatter and adapt behavior according to: - enabled: Whether plugin is active - mode: Processing mode (strict, standard, lenient) - Additional configuration fields ``` ## Parsing Techniques ### Extract Frontmatter ```bash # Extract everything between --- markers FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$FILE") ``` ### Read Individual Fields **String fields:** ```bash VALUE=$(echo "$FRONTMATTER" | grep '^field_name:' | sed 's/field_name: *//' | sed 's/^"\(.*\)"$/\1/') ``` **Boolean fields:** ```bash ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//') # Compare: if [[ "$ENABLED" == "true" ]]; then ``` **Numeric fields:**