.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/claude-code/plugin-settings
home/skills/anthropics/claude-code/plugin-settings
anthropics avatar

plugin-settings

byanthropics· 237 skills

Installs

11k

Stars

139k

Forks

22k

Category

Productivity & Workflow

View on GitHub

TL;DR

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.

How to install plugin-settings?

anthropics/claude-code/plugin-settings
$npx -y skills add anthropics/claude-code --skill plugin-settings

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Use this skill

Run `npx skills use "https://github.com/anthropics/claude-code" --skill "anthropics/claude-code/plugin-settings"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.

Use the whole pack

Use the skills in "https://github.com/anthropics/claude-code" that are relevant to the current task. Run `npx skills add "https://github.com/anthropics/claude-code"` and select the relevant skills, then follow their instructions.

Files · 1

View on GitHub
SKILL.md
1# Plugin Settings Pattern for Claude Code Plugins
2 
3## Overview
4 
5Plugins 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.
6 
7**Key characteristics:**
8- File location: `.claude/plugin-name.local.md` in project root
9- Structure: YAML frontmatter + markdown body
10- Purpose: Per-project plugin configuration and state
11- Usage: Read from hooks, commands, and agents
12- Lifecycle: User-managed (not in git, should be in `.gitignore`)
13 
14## File Structure
15 
16### Basic Template
17 
18```markdown
19---
20enabled: true
21setting1: value1
22setting2: value2
23numeric_setting: 42
24list_setting: ["item1", "item2"]
25---
26 
27# Additional Context
28 
29This markdown body can contain:
30- Task descriptions
31- Additional instructions
32- Prompts to feed back to Claude
33- Documentation or notes
34```
35 
36### Example: Plugin State File
37 
38**.claude/my-plugin.local.md:**
39```markdown
40---
41enabled: true
42strict_mode: false
43max_retries: 3
44notification_level: info
45coordinator_session: team-leader
46---
47 
48# Plugin Configuration
49 
50This plugin is configured for standard validation mode.
51Contact @team-lead with questions.
52```
53 
54## Reading Settings Files
55 
56### From Hooks (Bash Scripts)
57 
58**Pattern: Check existence and parse frontmatter**
59 
60```bash
61#!/bin/bash
62set -euo pipefail
63 
64# Define state file path
65STATE_FILE=".claude/my-plugin.local.md"
66 
67# Quick exit if file doesn't exist
68if [[ ! -f "$STATE_FILE" ]]; then
69 exit 0 # Plugin not configured, skip
70fi
71 
72# Parse YAML frontmatter (between --- markers)
73FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$STATE_FILE")
74 
75# Extract individual fields
76ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//' | sed 's/^"\(.*\)"$/\1/')
77STRICT_MODE=$(echo "$FRONTMATTER" | grep '^strict_mode:' | sed 's/strict_mode: *//' | sed 's/^"\(.*\)"$/\1/')
78 
79# Check if enabled
80if [[ "$ENABLED" != "true" ]]; then
81 exit 0 # Disabled
82fi
83 
84# Use configuration in hook logic
85if [[ "$STRICT_MODE" == "true" ]]; then
86 # Apply strict validation
87 # ...
88fi
89```
90 
91See `examples/read-settings-hook.sh` for complete working example.
92 
93### From Commands
94 
95Commands can read settings files to customize behavior:
96 
97```markdown
98---
99description: Process data with plugin
100allowed-tools: ["Read", "Bash"]
101---
102 
103# Process Command
104 
105Steps:
1061. Check if settings exist at `.claude/my-plugin.local.md`
1072. Read configuration using Read tool
1083. Parse YAML frontmatter to extract settings
1094. Apply settings to processing logic
1105. Execute with configured behavior
111```
112 
113### From Agents
114 
115Agents can reference settings in their instructions:
116 
117```markdown
118---
119name: configured-agent
120description: Agent that adapts to project settings
121---
122 
123Check for plugin settings at `.claude/my-plugin.local.md`.
124If present, parse YAML frontmatter and adapt behavior according to:
125- enabled: Whether plugin is active
126- mode: Processing mode (strict, standard, lenient)
127- Additional configuration fields
128```
129 
130## Parsing Techniques
131 
132### Extract Frontmatter
133 
134```bash
135# Extract everything between --- markers
136FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$FILE")
137```
138 
139### Read Individual Fields
140 
141**String fields:**
142```bash
143VALUE=$(echo "$FRONTMATTER" | grep '^field_name:' | sed 's/field_name: *//' | sed 's/^"\(.*\)"$/\1/')
144```
145 
146**Boolean fields:**
147```bash
148ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//')
149# Compare: if [[ "$ENABLED" == "true" ]]; then
150```
151 
152**Numeric fields:**
153```bash
154MAX=$(echo "$FRONTMATTER" | grep '^max_value:' | sed 's/max_value: *//')
155# Use: if [[ $MAX -gt 100 ]]; then
156```
157 
158### Read Markdown Body
159 
160Extract content after second `---`:
161 
162```bash
163# Get everything after closing ---
164BODY=$(awk '/^---$/{i++; next} i>=2' "$FILE")
165```
166 
167## Common Patterns
168 
169### Pattern 1: Temporarily Active Hooks
170 
171Use settings file to control hook activation:
172 
173```bash
174#!/bin/bash
175STATE_FILE=".claude/security-scan.local.md"
176 
177# Quick exit if not configured
178if [[ ! -f "$STATE_FILE" ]]; then
179 exit 0
180fi
181 
182# Read enabled flag
183FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$STATE_FILE")
184ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//')
185 
186if [[ "$ENABLED" != "true" ]]; then
187 exit 0 # Disabled
188fi
189 
190# Run hook logic
191# ...
192```
193 
194**Use case:** Enable/disable hooks without editing hooks.json (requires restart).
195 
196### Pattern 2: Agent State Management
197 
198Store agent-specific state and configuration:
199 
200**.claude/multi-agent-swarm.local.md:**
201```markdown
202---
203agent_name: auth-agent
204task_number: 3.5
205pr_number: 1234
206coordinator_session: team-leader
207enabled: true
208dependencies: ["Task 3.4"]
209---
210 
211# Task Assignment
212 
213Implement JWT authentication for the API.
214 
215**Success Criteria:**
216- Authentication endpoints created
217- Tests passing
218- PR created and CI green
219```
220 
221Read from hooks to coordinate agents:
222 
223```bash
224AGENT_NAME=$(echo "$FRONTMATTER" | grep '^agent_name:' | sed 's/agent_name: *//')
225COORDINATOR=$(echo "$FRONTMATTER" | grep '^coordinator_session:' | sed 's/coordinator_session: *//')
226 
227# Send notification to coordinator
228tmux send-keys -t "$COORDINATOR" "Agent $AGENT_NAME completed task" Enter
229```
230 
231### Pattern 3: Configuration-Driven Behavior
232 
233**.claude/my-plugin.local.md:**
234```markdown
235---
236validation_level: strict
237max_file_size: 1000000
238allowed_extensions: [".js", ".ts", ".tsx"]
239enable_logging: true
240---
241 
242# Validation Configuration
243 
244Strict mode enabled for this project.
245All writes validated against security policies.
246```
247 
248Use in hooks or commands:
249 
250```bash
251LEVEL=$(echo "$FRONTMATTER" | grep '^validation_level:' | sed 's/validation_level: *//')
252 
253case "$LEVEL" in
254 strict)
255 # Apply strict validation
256 ;;
257 standard)
258 # Apply standard validation
259 ;;
260 lenient)
261 # Apply lenient validation
262 ;;
263esac
264```
265 
266## Creating Settings Files
267 
268### From Commands
269 
270Commands can create settings files:
271 
272```markdown
273# Setup Command
274 
275Steps:
2761. Ask user for configuration preferences
2772. Create `.claude/my-plugin.local.md` with YAML frontmatter
2783. Set appropriate values based on user input
2794. Inform user that settings are saved
2805. Remind user to restart Claude Code for hooks to recognize changes
281```
282 
283### Template Generation
284 
285Provide template in plugin README:
286 
287```markdown
288## Configuration
289 
290Create `.claude/my-plugin.local.md` in your project:
291 
292\`\`\`markdown
293---
294enabled: true
295mode: standard
296max_retries: 3
297---
298 
299# Plugin Configuration
300 
301Your settings are active.
302\`\`\`
303 
304After creating or editing, restart Claude Code for changes to take effect.
305```
306 
307## Best Practices
308 
309### File Naming
310 
311✅ **DO:**
312- Use `.claude/plugin-name.local.md` format
313- Match plugin name exactly
314- Use `.local.md` suffix for user-local files
315 
316❌ **DON'T:**
317- Use different directory (not `.claude/`)
318- Use inconsistent naming
319- Use `.md` without `.local` (might be committed)
320 
321### Gitignore
322 
323Always add to `.gitignore`:
324 
325```gitignore
326.claude/*.local.md
327.claude/*.local.json
328```
329 
330Document this in plugin README.
331 
332### Defaults
333 
334Provide sensible defaults when settings file doesn't exist:
335 
336```bash
337if [[ ! -f "$STATE_FILE" ]]; then
338 # Use defaults
339 ENABLED=true
340 MODE=standard
341else
342 # Read from file
343 # ...
344fi
345```
346 
347### Validation
348 
349Validate settings values:
350 
351```bash
352MAX=$(echo "$FRONTMATTER" | grep '^max_value:' | sed 's/max_value: *//')
353 
354# Validate numeric range
355if ! [[ "$MAX" =~ ^[0-9]+$ ]] || [[ $MAX -lt 1 ]] || [[ $MAX -gt 100 ]]; then
356 echo "⚠️ Invalid max_value in settings (must be 1-100)" >&2
357 MAX=10 # Use default
358fi
359```
360 
361### Restart Requirement
362 
363**Important:** Settings changes require Claude Code restart.
364 
365Document in your README:
366 
367```markdown
368## Changing Settings
369 
370After editing `.claude/my-plugin.local.md`:
3711. Save the file
3722. Exit Claude Code
3733. Restart: `claude` or `cc`
3744. New settings will be loaded
375```
376 
377Hooks cannot be hot-swapped within a session.
378 
379## Security Considerations
380 
381### Sanitize User Input
382 
383When writing settings files from user input:
384 
385```bash
386# Escape quotes in user input
387SAFE_VALUE=$(echo "$USER_INPUT" | sed 's/"/\\"/g')
388 
389# Write to file
390cat > "$STATE_FILE" <<EOF
391---
392user_setting: "$SAFE_VALUE"
393---
394EOF
395```
396 
397### Validate File Paths
398 
399If settings contain file paths:
400 
401```bash
402FILE_PATH=$(echo "$FRONTMATTER" | grep '^data_file:' | sed 's/data_file: *//')
403 
404# Check for path traversal
405if [[ "$FILE_PATH" == *".."* ]]; then
406 echo "⚠️ Invalid path in settings (path traversal)" >&2
407 exit 2
408fi
409```
410 
411### Permissions
412 
413Settings files should be:
414- Readable by user only (`chmod 600`)
415- Not committed to git
416- Not shared between users
417 
418## Real-World Examples
419 
420### multi-agent-swarm Plugin
421 
422**.claude/multi-agent-swarm.local.md:**
423```markdown
424---
425agent_name: auth-implementation
426task_number: 3.5
427pr_number: 1234
428coordinator_session: team-leader
429enabled: true
430dependencies: ["Task 3.4"]
431additional_instructions: Use JWT tokens, not sessions
432---
433 
434# Task: Implement Authentication
435 
436Build JWT-based authentication for the REST API.
437Coordinate with auth-agent on shared types.
438```
439 
440**Hook usage (agent-stop-notification.sh):**
441- Checks if file exists (line 15-18: quick exit if not)
442- Parses frontmatter to get coordinator_session, agent_name, enabled
443- Sends notifications to coordinator if enabled
444- Allows quick activation/deactivation via `enabled: true/false`
445 
446### ralph-wiggum Plugin
447 
448**.claude/ralph-loop.local.md:**
449```markdown
450---
451iteration: 1
452max_iterations: 10
453completion_promise: "All tests passing and build successful"
454---
455 
456Fix all the linting errors in the project.
457Make sure tests pass after each fix.
458```
459 
460**Hook usage (stop-hook.sh):**
461- Checks if file exists (line 15-18: quick exit if not active)
462- Reads iteration count and max_iterations
463- Extracts completion_promise for loop termination
464- Reads body as the prompt to feed back
465- Updates iteration count on each loop
466 
467## Quick Reference
468 
469### File Location
470 
471```
472project-root/
473└── .claude/
474 └── plugin-name.local.md
475```
476 
477### Frontmatter Parsing
478 
479```bash
480# Extract frontmatter
481FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' "$FILE")
482 
483# Read field
484VALUE=$(echo "$FRONTMATTER" | grep '^field:' | sed 's/field: *//' | sed 's/^"\(.*\)"$/\1/')
485```
486 
487### Body Parsing
488 
489```bash
490# Extract body (after second ---)
491BODY=$(awk '/^---$/{i++; next} i>=2' "$FILE")
492```
493 
494### Quick Exit Pattern
495 
496```bash
497if [[ ! -f ".claude/my-plugin.local.md" ]]; then
498 exit 0 # Not configured
499fi
500```
501 
502## Additional Resources
503 
504### Reference Files
505 
506For detailed implementation patterns:
507 
508- **`references/parsing-techniques.md`** - Complete guide to parsing YAML frontmatter and markdown bodies
509- **`references/real-world-examples.md`** - Deep dive into multi-agent-swarm and ralph-wiggum implementations
510 
511### Example Files
512 
513Working examples in `examples/`:
514 
515- **`read-settings-hook.sh`** - Hook that reads and uses settings
516- **`create-settings-command.md`** - Command that creates settings file
517- **`example-settings.md`** - Template settings file
518 
519### Utility Scripts
520 
521Development tools in `scripts/`:
522 
523- **`validate-settings.sh`** - Validate settings file structure
524- **`parse-frontmatter.sh`** - Extract frontmatter fields
525 
526## Implementation Workflow
527 
528To add settings to a plugin:
529 
5301. Design settings schema (which fields, types, defaults)
5312. Create template file in plugin documentation
5323. Add gitignore entry for `.claude/*.local.md`
5334. Implement settings parsing in hooks/commands
5345. Use quick-exit pattern (check file exists, check enabled field)
5356. Document settings in plugin README with template
5367. Remind users that changes require Claude Code restart
537 
538Focus on keeping settings simple and providing good defaults when settings file doesn't exist.

Security

Flagged

  • Gen Agent Trust Hubpass
  • Socketpass
  • Snykpass
  • Runlayerfail
  • ZeroLeakspass

Preview

anthropics/claude-codeanthropics/claude-code

$ npx -y skills add anthropics/claude-code --skill plugin-settings

▸ installing to .claude/skills…

✓ plugin-settings ready

Repoanthropics/claude-code
TypeSkills
CategoryProductivity & Workflow
ForDeveloper
UpdatedJul 2026
License—
First seenJul 26, 2026

Tags

Skill

Related

6 picks
Type
  1. juliusbrussee avatarcavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy.SkillsJul 2026391k93k
  2. larksuite avatarlark-im飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件(支持大文件分片下载)、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive…SkillsJul 2026390k16k
  3. larksuite avatarlark-calendar飞书日历:管理日历日程和会议室。查看/搜索日程、创建/更新日程、管理参会人、查询忙闲和推荐时段、预定会议室。当用户需要查看日程安排、创建/修改会议、查询/预定会议室时使用。不负责:查询过去的视频会议记录(走 lark-vc)、待办任务(走 lark-task)。SkillsJul 2026388k16k
  4. larksuite avatarlark-contact飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名。当用户提到某人姓名要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生…SkillsJul 2026387k16k
  5. larksuite avatarlark-workflow-meeting-summary会议纪要整理工作流:汇总指定时间范围内的会议纪要并生成结构化报告。当用户需要整理会议纪要、生成会议周报、回顾一段时间内的会议内容时使用。SkillsJul 2026386k16k
  6. larksuite avatarlark-workflow-standup-report日程待办摘要:编排 calendar +agenda 和 task +get-my-tasks,生成指定日期的日程与未完成任务摘要。适用于了解今天/明天/本周的安排。SkillsJul 2026386k16k