All skills
anthropics avatar

/plugin-settings

@2438937

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.

Use this Skill: https://skilld.dev/gh/anthropics/claude-plugins-official/plugin-settings

This session only. Nothing lands on disk.

examplesexample-settings.md

≈733 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Example Plugin Settings File

Template: Basic Configuration

.claude/my-plugin.local.md:

---
enabled: true
mode: standard
---

# My Plugin Configuration

Plugin is active in standard mode.

Template: Advanced Configuration

.claude/my-plugin.local.md:

---
enabled: true
strict_mode: false
max_file_size: 1000000
allowed_extensions: [".js", ".ts", ".tsx"]
enable_logging: true
notification_level: info
retry_attempts: 3
timeout_seconds: 60
custom_path: "/path/to/data"
---

# My Plugin Advanced Configuration

This project uses custom plugin configuration with:
- Standard validation mode
- 1MB file size limit
- JavaScript/TypeScript files allowed
- Info-level logging
- 3 retry attempts

## Additional Notes

Contact @team-lead with questions about this configuration.

Template: Agent State File

.claude/multi-agent-swarm.local.md:

---
agent_name: database-implementation
task_number: 4.2
pr_number: 5678
coordinator_session: team-leader
enabled: true
dependencies: ["Task 3.5", "Task 4.1"]
additional_instructions: "Use PostgreSQL, not MySQL"
---

# Task Assignment: Database Schema Implementation

Implement the database schema for the new features module.

## Requirements

- Create migration files
- Add indexes for performance
- Write tests for constraints
- Document schema in README

## Success Criteria

- Migrations run successfully
- All tests pass
- PR created with CI green
- Schema documented

## Coordination

Depends on:
- Task 3.5: API endpoint definitions
- Task 4.1: Data model design

Report status to coordinator session 'team-leader'.

Template: Feature Flag Pattern

.claude/experimental-features.local.md:

---
enabled: true
features:
  - ai_suggestions
  - auto_formatting
  - advanced_refactoring
experimental_mode: false
---

# Experimental Features Configuration

Current enabled features:
- AI-powered code suggestions
- Automatic code formatting
- Advanced refactoring tools

Experimental mode is OFF (stable features only).

Usage in Hooks

These templates can be read by hooks:

# Check if plugin is configured
if [[ ! -f ".claude/my-plugin.local.md" ]]; then
  exit 0  # Not configured, skip hook
fi

# Read settings
FRONTMATTER=$(sed -n '/^---$/,/^---$/{ /^---$/d; p; }' ".claude/my-plugin.local.md")
ENABLED=$(echo "$FRONTMATTER" | grep '^enabled:' | sed 's/enabled: *//')

# Apply settings
if [[ "$ENABLED" == "true" ]]; then
  # Hook is active
  # ...
fi

Gitignore

Always add to project .gitignore:

# Plugin settings (user-local, not committed)
.claude/*.local.md
.claude/*.local.json

Editing Settings

Users can edit settings files manually:

# Edit settings
vim .claude/my-plugin.local.md

# Changes take effect after restart
exit  # Exit Claude Code
claude  # Restart

Changes require Claude Code restart - hooks can't be hot-swapped.

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill acts as a design pattern reference and architectural guide for Claude Code plugin developers. It provides standard templates and educational shell scripting instructions to manage user-configurable state files (.local.md) using YAML frontmatter and markdown. The contents consist solely of static documentation, example configuration templates, and benign script examples with standard shell parsing structures.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    8/8 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 2438937. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 8 months ago
version
0.1.0
  • plugin-settings
  • yaml
  • frontmatter
  • configuration
  • hooks
  • state-management
  • markdown
  • bash
  • claude-code

README badge

README badge for anthropics/claude-plugins-official/plugin-settings

Stores per-project plugin configuration in `.claude/plugin-name.local.md` files using YAML frontmatter and markdown body. Enables hooks, commands, and agents to read settings and adapt behavior without code changes or restart (though hook changes require restart). Useful for toggling plugin features, storing state like agent task assignments, or configuring validation levels per project.

Generated from the current SKILL.md.

Where do I store plugin settings?
Store settings in `.claude/plugin-name.local.md` in your project root, using YAML frontmatter for structured configuration and markdown body for additional context or prompts.
Do I need to restart Claude Code after changing settings?
Yes. Changes to `.claude/plugin-name.local.md` require restarting Claude Code for hooks to recognize the new settings.
How do I prevent settings files from being committed to git?
Add `.claude/*.local.md` to your `.gitignore` file. Settings files are user-specific and should not be version-controlled.
Can I use settings files to enable or disable hooks without editing hooks.json?
Yes. Use the `enabled` field in the YAML frontmatter and check it in your hook script to control activation without requiring a restart of the hooks system.
What format should I use for different data types in settings?
Use standard YAML: boolean values like `enabled: true`, numbers like `max_retries: 3`, strings like `mode: standard`, and arrays like `allowed_extensions: [".js", ".ts"]`.

Generated from the current SKILL.md. These answers refresh after source changes.