All skills
anthropics avatar

/plugin-settings

@387dc35
by Anthropicanthropics/claude-code149k stars
25,117

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-code/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 alert5mo5 checks · Risk SAFE
  • Gen Agent Trust Hub7mo

    The skill establishes a pattern for persistent agent configuration and state management using local Markdown files. It features several security-positive practices like path validation and atomic file writes, but it also creates surfaces for indirect prompt injection and employs powerful system tools for cross-session communication in its examples.

  • Socket6mo

    No alerts

  • Snyk7mo

    Risk: LOW · No issues

  • Runlayer7mo

    4/8 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub yesterday.

Activeupdated 11 months ago
version
0.1.0

README badge

README badge for anthropics/claude-code/plugin-settings