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.

examplescreate-settings-command.md

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

Create Plugin Settings

This command helps users create a .claude/my-plugin.local.md settings file.

Steps

Step 1: Ask User for Preferences

Use AskUserQuestion to gather configuration:

{
  "questions": [
    {
      "question": "Enable plugin for this project?",
      "header": "Enable Plugin",
      "multiSelect": false,
      "options": [
        {
          "label": "Yes",
          "description": "Plugin will be active"
        },
        {
          "label": "No",
          "description": "Plugin will be disabled"
        }
      ]
    },
    {
      "question": "Validation mode?",
      "header": "Mode",
      "multiSelect": false,
      "options": [
        {
          "label": "Strict",
          "description": "Maximum validation and security checks"
        },
        {
          "label": "Standard",
          "description": "Balanced validation (recommended)"
        },
        {
          "label": "Lenient",
          "description": "Minimal validation only"
        }
      ]
    }
  ]
}

Step 2: Parse Answers

Extract answers from AskUserQuestion result:

  • answers["0"]: enabled (Yes/No)
  • answers["1"]: mode (Strict/Standard/Lenient)

Step 3: Create Settings File

Use Write tool to create .claude/my-plugin.local.md:

---
enabled: <true if Yes, false if No>
validation_mode: <strict, standard, or lenient>
max_file_size: 1000000
notify_on_errors: true
---

# Plugin Configuration

Your plugin is configured with <mode> validation mode.

To modify settings, edit this file and restart Claude Code.

Step 4: Inform User

Tell the user:

  • Settings file created at .claude/my-plugin.local.md
  • Current configuration summary
  • How to edit manually if needed
  • Reminder: Restart Claude Code for changes to take effect
  • Settings file is gitignored (won't be committed)

Implementation Notes

Always validate user input before writing:

  • Check mode is valid
  • Validate numeric fields are numbers
  • Ensure paths don't have traversal attempts
  • Sanitize any free-text fields

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.