Guide for implementing user-configurable plugin settings with .local.md files. Use when the user asks about ".local.md", "plugin settings", "configuration file", "temporarily active hooks", or "user configuration".
From claude-plugin-devnpx claudepluginhub nthplusio/functional-claude --plugin claude-plugin-devThis skill uses the workspace's default tool permissions.
references/cache.mdExecutes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
User-configurable plugin settings use .local.md files that combine YAML frontmatter with markdown documentation.
my-plugin/
├── .local.md # User's local config (gitignored)
├── .local.example.md # Template for users to copy
└── ...
---
api_key: ${MY_API_KEY}
theme: dark
auto_format: true
excluded_paths:
- node_modules
- dist
---
# My Plugin Settings
Custom notes or documentation (for human reference only).
Parse the YAML frontmatter from .local.md. Locate the file using CLAUDE_PLUGIN_ROOT:
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || __dirname.replace('/hooks', '');
const configPath = path.join(pluginRoot, '.local.md');
Environment variable substitution: replace ${VAR} patterns with process.env[name].
Read the user's configuration from `.local.md` in the plugin root
to determine their preferences before proceeding.
Configuration can enable/disable hooks dynamically:
---
hooks:
format_on_save: true
lint_on_commit: false
---
// In hook script — check if enabled
const config = parseLocalMd(configPath);
if (!config.hooks?.format_on_save) {
process.exit(0); // Skip hook
}
Provide a template users copy to .local.md:
---
# Copy this file to .local.md and customize
# API Configuration
api_key: ${MY_API_KEY} # Set MY_API_KEY environment variable
# Behavior Settings
auto_format: true # Format files on save
verbose: false # Enable debug output
---
# Configuration Guide
1. Copy this file to `.local.md`
2. Set required environment variables
3. Customize settings as needed
Always gitignore user config files:
# User configuration (may contain secrets)
.local.md
Validate configuration in a SessionStart hook — warn on missing required fields but don't block (process.exit(0)).