### Set Up Development Environment Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-code-setup/skills/claude-automation-recommender/references/skills-reference.md The `setup-dev` skill guides new developers through setting up the development environment. It includes steps for checking prerequisites, installing dependencies, configuring environment variables, and setting up the database. ```yaml --- name: setup-dev description: Set up development environment for new contributors disable-model-invocation: true --- Set up development environment: 1. Check prerequisites: `bash scripts/check-prerequisites.sh` 2. Install dependencies: `npm install` 3. Copy environment template: `cp .env.example .env` 4. Set up database: `npm run db:setup` 5. Verify setup: `npm test` Report any issues encountered. ``` ```bash # scripts/check-prerequisites.sh # Example script to check prerequisites ``` -------------------------------- ### README: Basic Command Installation Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/documentation-patterns.md Provide a clear installation command within the README's 'Installation' section. This guides users on how to add the plugin containing the command. ```bash /plugin install plugin-name ``` -------------------------------- ### Design Setup Type Question Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/interactive-commands.md Use AskUserQuestion to present different setup options to the user, such as 'Quick', 'Custom', or 'Guided'. This allows for progressive disclosure of configuration details. ```markdown # Start Simple, Get Detailed as Needed ## Question 1: Setup Type Use AskUserQuestion: Question: "How would you like to set up?" Header: "Setup type" Options: - Quick (Use recommended defaults) - Custom (Configure all options) - Guided (Step-by-step with explanations) If "Quick": Apply defaults, minimal questions If "Custom": Ask all available configuration questions If "Guided": Ask questions with extra explanation Provide recommendations along the way ``` -------------------------------- ### Quick Start Ralph Loop Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/ralph-loop/README.md An example of how to start a Ralph loop to build a REST API for todos, including requirements for CRUD operations, input validation, and tests, with a specified completion promise. ```bash /ralph-loop "Build a REST API for todos. Requirements: CRUD operations, input validation, tests. Output COMPLETE when done." --completion-promise "COMPLETE" --max-iterations 50 ``` -------------------------------- ### Example Command Usage Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/example-plugin/commands/example-command.md Illustrates how to invoke the example command with different argument combinations. ```bash /example-command my-argument ``` ```bash /example-command arg1 arg2 ``` -------------------------------- ### Plugin Installation via Marketplace Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pr-review-toolkit/README.md Instructions for installing the PR Review Toolkit plugin from a personal marketplace. ```bash /plugins # Find "pr-review-toolkit" # Install ``` -------------------------------- ### Install, List, and Info Plugin Commands Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-code-setup/skills/claude-automation-recommender/references/plugins-reference.md Use these bash commands to manage plugins. Install a plugin by name, list all installed plugins, or view details about a specific plugin. ```bash # Install a plugin /plugin install # List installed plugins /plugin list # View plugin details /plugin info ``` -------------------------------- ### Markdown for Environment Variables and Setup Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/claude-md-management/skills/claude-md-improver/references/templates.md Detail required environment variables and setup steps for the project. ```markdown ## Environment Required: - `` - - `` - Setup: - ``` -------------------------------- ### Basic Command Frontmatter Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/frontmatter-reference.md This is an example of the basic YAML frontmatter structure at the start of a command file. Fields like description, allowed-tools, and model can be defined here. ```yaml --- description: Brief description allowed-tools: Read, Write model: sonnet argument-hint: [arg1] [arg2] --- Command prompt content here... ``` -------------------------------- ### Install csharp-lsp via .NET Tool Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/csharp-lsp/README.md Use this command to install the csharp-lsp globally using the .NET CLI. This is the recommended installation method. ```bash dotnet tool install --global csharp-ls ``` -------------------------------- ### Bash Pattern Examples Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/hookify/commands/hookify.md Examples of bash patterns for hookify rules, including matching dangerous commands and specific package manager installations. ```regex rm\s+-rf|chmod\s+777|dd\s+if= ``` ```regex npm\s+install\s+|pip\s+install ``` -------------------------------- ### Install lua-lsp via Snap (Ubuntu/Debian) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/lua-lsp/README.md Install the lua-language-server on Ubuntu or Debian-based systems using snap. ```bash sudo snap install lua-language-server --classic ``` -------------------------------- ### Install a Plugin Source: https://github.com/anthropics/claude-plugins-official/blob/main/README.md Use this command to install a plugin directly from the marketplace. Replace {plugin-name} with the desired plugin's name. ```bash /plugin install {plugin-name}@claude-plugins-official ``` -------------------------------- ### Valid Relative Path Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-structure/references/manifest-reference.md Demonstrates a correctly formatted relative path for component definitions, starting with './'. ```json { "commands": "./commands" } ``` -------------------------------- ### Explain Code Command Usage Examples Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/examples/simple-commands.md Examples demonstrating how to invoke the '/explain' command with a file path or function name. ```bash > /explain src/utils/cache.ts ``` ```bash > /explain AuthService.login ``` -------------------------------- ### Install Pyright with pip Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pyright-lsp/README.md Install Pyright using pip, the Python package installer. ```bash pip install pyright ``` -------------------------------- ### Install Ruby LSP via Gem Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/ruby-lsp/README.md Use this command to install the ruby-lsp gem directly. This is the recommended installation method. ```bash gem install ruby-lsp ``` -------------------------------- ### Install iMessage Plugin Source: https://github.com/anthropics/claude-plugins-official/blob/main/external_plugins/imessage/README.md Run this command to install the iMessage plugin. No environment variables are required for basic installation. ```bash /plugin install imessage@claude-plugins-official ``` -------------------------------- ### Quick Fix Command Usage Examples Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/examples/simple-commands.md Examples demonstrating how to invoke the '/quick-fix' command with different issue descriptions. ```bash > /quick-fix button not responding to clicks ``` ```bash > /quick-fix typo in error message ``` -------------------------------- ### Install security-guidance Plugin Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/security-guidance/README.md Install the security-guidance plugin using the provided command. This plugin is enabled by default in Claude Code. ```bash /plugin install security-guidance@claude-plugins-official ``` -------------------------------- ### Install lua-lsp via DNF (Fedora) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/lua-lsp/README.md Install the lua-language-server on Fedora using the dnf package manager. ```bash sudo dnf install lua-language-server ``` -------------------------------- ### Install Kotlin LSP CLI Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/kotlin-lsp/README.md Use Homebrew to install the Kotlin LSP CLI. This command is used for setting up the language server. ```bash brew install JetBrains/utils/kotlin-lsp ``` -------------------------------- ### Install lua-lsp via Pacman (Arch Linux) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/lua-lsp/README.md Install the lua-language-server on Arch Linux using the pacman package manager. ```bash sudo pacman -S lua-language-server ``` -------------------------------- ### No Hookify Rules Configured Message Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/hookify/commands/list.md Displayed when no hookify rules are found in the project. It guides the user on how to get started with creating rules, either through the `/hookify` command or by manual file creation. ```markdown ## No Hookify Rules Configured You haven't created any hookify rules yet. To get started: 1. Use `/hookify` to analyze conversation and create rules 2. Or manually create `.claude/hookify.my-rule.local.md` files 3. See `/hookify:help` for documentation Example: ``` /hookify Warn me when I use console.log ``` Check `${CLAUDE_PLUGIN_ROOT}/examples/` for example rule files. ``` -------------------------------- ### Setup with Validation Loop Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/interactive-commands.md Implement an interactive setup process that includes validation. If validation fails, use AskUserQuestion to prompt the user on how to proceed (Fix, Override, or Cancel). ```markdown --- description: Interactive with validation allowed-tools: AskUserQuestion, Bash --- # Setup with Validation ## Gather Configuration Use AskUserQuestion to collect settings. ## Validate Configuration Check if configuration is valid: - Required dependencies available? - Settings compatible with each other? - No conflicts detected? If validation fails: Show validation errors Use AskUserQuestion to ask: Question: "Configuration has issues. What would you like to do?" Header: "Next step" Options: - Fix (Adjust settings to resolve issues) - Override (Proceed despite warnings) - Cancel (Abort setup) Based on answer, retry or proceed or exit. ``` -------------------------------- ### Create New SDK App with /new-sdk-app Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/agent-sdk-dev/README.md Use the `/new-sdk-app` command to interactively create a new Claude Agent SDK application. It guides you through project setup, SDK installation, and initial verification. ```bash /new-sdk-app my-project-name ``` ```bash /new-sdk-app ``` ```bash /new-sdk-app code-reviewer-agent # → Creates a new Agent SDK project for a customer support agent # → Sets up TypeScript or Python environment # → Installs latest SDK version # → Verifies the setup automatically ``` -------------------------------- ### README: Configuration File Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/documentation-patterns.md Present an example of a local configuration file in Markdown format within the README. This shows users how to customize command behavior. ```yaml --- default_arg: value enable_feature: true --- ``` -------------------------------- ### Install GitHub CLI Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-review/README.md Install the GitHub CLI using Homebrew on macOS or follow the official installation guide. This is necessary for `gh` commands to function. ```bash brew install gh ``` -------------------------------- ### Command Onboarding and Initialization Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/marketplace-considerations.md Implements a first-run experience for a command by checking for an initialization marker file. If not found, it displays a welcome message, explains the command's purpose, provides quick start instructions, and creates the marker file. ```Bash --- description: Command with onboarding allowed-tools: Read, Write --- # First Run Check if [ ! -f ".claude/command-initialized" ]; then **Welcome to Command Name!** This appears to be your first time using this command. WHAT THIS COMMAND DOES: [Brief explanation of purpose and benefits] QUICK START: 1. Basic usage: /command [arg] 2. For help: /command help 3. Examples: /command examples SETUP: No additional setup required. You're ready to go! ✓ Initialization complete [Create initialization marker] Ready to proceed with your request... fi [Normal command execution...] ``` -------------------------------- ### Initialize and Connect App Instance Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md Instantiate the App class with application info and capabilities, set event handlers, and then establish a connection to the host. Ensure handlers are set before connecting. ```javascript const { App } = globalThis.ExtApps; const app = new App({ name: "ContactPicker", version: "1.0.0" }, {}); // Set handlers BEFORE connecting app.ontoolresult = ({ content }) => { const contacts = JSON.parse(content[0].text); render(contacts); }; await app.connect(); ``` -------------------------------- ### Install Hookify Plugin Manually Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/hookify/README.md For manual testing or specific setups, you can point the 'cc' command to the plugin directory. ```bash cc --plugin-dir /path/to/hookify ``` -------------------------------- ### Create .env Example File Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/agent-sdk-dev/commands/new-sdk-app.md Creates an example environment file to store sensitive information like API keys. This file should not be committed to version control. ```bash touch .env.example # Add ANTHROPIC_API_KEY=your_api_key_here to the file touch .gitignore # Add .env to .gitignore ``` -------------------------------- ### Authenticate GitHub CLI Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-review/README.md Authenticate your GitHub CLI installation to interact with repositories. This command will guide you through the login process. ```bash gh auth login ``` -------------------------------- ### Invalid Absolute Path Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-structure/references/manifest-reference.md Illustrates an invalid absolute path for component definitions. The fix is to use a relative path starting with './'. ```json { "commands": "/Users/name/commands" // → Absolute path } ``` -------------------------------- ### Agent Example for Adapting to Settings Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-settings/SKILL.md Shows how an agent's instructions can reference and adapt to settings found in a local plugin configuration file. ```markdown --- name: configured-agent description: Agent that adapts to project settings --- Check for plugin settings at `.claude/my-plugin.local.md`. If present, parse YAML frontmatter and adapt behavior according to: - enabled: Whether plugin is active - mode: Processing mode (strict, standard, lenient) - Additional configuration fields ``` -------------------------------- ### Create Docker MCP Tunnel Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-tunnels/README.md Drives the MCP tunnels quickstart end to end on your machine using Docker Compose. It automates preflight checks, tunnel creation, certificate generation, and upstream setup. ```bash /create-docker-mcp-tunnel /create-docker-mcp-tunnel ~/work/my-tunnel ``` -------------------------------- ### Prompt Writing: Escape Hatches with Max Iterations Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/ralph-loop/README.md Example of using the `--max-iterations` option as a safety net to prevent infinite loops, along with prompt instructions for documenting progress and suggesting alternatives if the task gets stuck. ```bash # Recommended: Always set a reasonable iteration limit /ralph-loop "Try to implement feature X" --max-iterations 20 # In your prompt, include what to do if stuck: # "After 15 iterations, if not complete: # - Document what's blocking progress # - List what was attempted # - Suggest alternative approaches" ``` -------------------------------- ### README: Basic Command Usage Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/documentation-patterns.md Illustrate the fundamental way to invoke the command in the README's 'Usage' section. Include placeholders for arguments. ```bash /command-name [arg1] [arg2] ``` -------------------------------- ### Command Example for Reading Settings Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-settings/SKILL.md Illustrates how a command can be configured to read plugin settings from a local markdown file. ```markdown --- description: Process data with plugin allowed-tools: ["Read", "Bash"] --- # Process Command Steps: 1. Check if settings exist at `.claude/my-plugin.local.md` 2. Read configuration using Read tool 3. Parse YAML frontmatter to extract settings 4. Apply settings to processing logic 5. Execute with configured behavior ``` -------------------------------- ### Install csharp-lsp via Homebrew (macOS) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/csharp-lsp/README.md For macOS users, csharp-lsp can be installed using Homebrew. Ensure Homebrew is installed on your system. ```bash brew install csharp-ls ``` -------------------------------- ### Create .env Credentials File Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-tunnels/commands/create-docker-mcp-tunnel.md Sets up the .env file with TUNNEL_DOMAIN and TUNNEL_TOKEN. The TUNNEL_DOMAIN should be set to the domain from step 1, and TUNNEL_TOKEN should be a placeholder for the user to fill in. ```bash TUNNEL_DOMAIN= TUNNEL_TOKEN=PASTE_TUNNEL_TOKEN_HERE ``` -------------------------------- ### Example Plugin State File Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-settings/SKILL.md An example of a .claude/my-plugin.local.md file demonstrating specific settings like strict mode and max retries. ```markdown --- enabled: true strict_mode: false max_retries: 3 notification_level: info coordinator_session: team-leader --- # Plugin Configuration This plugin is configured for standard validation mode. Contact @team-lead with questions. ``` -------------------------------- ### README: Example 1 Basic Usage Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/documentation-patterns.md Show a concrete example of basic command invocation in the README. This helps users quickly understand how to use the command. ```bash /command-name value1 value2 ``` -------------------------------- ### Install jdtls via Package Manager (Linux) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/jdtls-lsp/README.md Install the jdtls package on Arch Linux using yay. Manual installation is required for other distributions. ```bash # Arch Linux (AUR) yay -S jdtls # Other distros: manual installation required ``` -------------------------------- ### Install Pyright with pipx Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pyright-lsp/README.md Install Pyright using pipx, a tool for installing and running Python applications in isolated environments. This is the recommended method for CLI tools. ```bash pipx install pyright ``` -------------------------------- ### App Class Initialization and Event Handling Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md Demonstrates how to initialize the App class and set up event handlers for receiving tool results and sending user messages. ```APIDOC ## App Class Initialization and Event Handling ### Description Initialize the `App` class with your widget's name and version, and set up event handlers before connecting to the host. The `ontoolresult` handler processes results from tools, and `sendMessage` is used to send user actions back to the host. ### Method `new App(info, caps, options)` ### Parameters - **info** (object) - Required - Information about the app, e.g., `{ name: "ContactPicker", version: "1.0.0" }` - **caps** (object) - Optional - Capabilities of the app. - **options** (object) - Optional - Configuration options, e.g., `{ autoResize: true }` ### Event Handlers - **app.ontoolresult = fn** (Host → widget) - Receive the tool's return value. - **app.ontoolinput = fn** (Host → widget) - Receive the tool's input arguments. ### Methods - **app.connect()** - Establishes the connection to the host. - **app.sendMessage(message)** (Widget → host) - Inject a message into the conversation. - **message** (object) - Required - The message to send, e.g., `{ role: "user", content: [{ type: "text", text: "Selected contact: ..." }] }` ### Request Example ```html ``` ``` -------------------------------- ### Install TypeScript Language Server with yarn Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/typescript-lsp/README.md Install the TypeScript language server globally using yarn. This command also installs the 'typescript' package, which is a peer dependency. ```bash yarn global add typescript-language-server typescript ``` -------------------------------- ### Install TypeScript Language Server with npm Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/typescript-lsp/README.md Install the TypeScript language server globally using npm. This command also installs the 'typescript' package, which is a peer dependency. ```bash npm install -g typescript-language-server typescript ``` -------------------------------- ### Quick Commit Workflow Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/commit-commands/README.md Demonstrates a streamlined development process where code is written and then committed using the /commit command, allowing for continued development without manual git commands. ```bash # Write code /commit # Continue development ``` -------------------------------- ### Install Claude Agent SDK for Python Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/agent-sdk-dev/commands/new-sdk-app.md Installs the Claude Agent SDK for Python using pip. Pip typically installs the latest stable version by default. ```bash pip install claude-agent-sdk ``` -------------------------------- ### Deploy using Plugin Configuration Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/SKILL.md Use this pattern to deploy using predefined plugin configurations. Specify the environment as an argument. ```markdown --- description: Deploy using plugin configuration argument-hint: [environment] allowed-tools: Read, Bash(*) --- Load configuration: @${CLAUDE_PLUGIN_ROOT}/config/$1-deploy.json Deploy to $1 using configuration settings. Monitor deployment and report status. ``` -------------------------------- ### Get Transition Duration Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/assets/topology-viewer.html Gets the duration of the transition for the selected element. ```javascript function qn(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?ua:sa)(e,t)):S(this.node(),e).duration} ``` -------------------------------- ### Get Transition Delay Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/assets/topology-viewer.html Gets the delay of the transition for the selected element. ```javascript function Dn(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?oa:aa)(e,t)):S(this.node(),e).delay} ``` -------------------------------- ### Multi-Script Workflow for Release Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/examples/plugin-commands.md This example demonstrates orchestrating a complete release workflow involving multiple sequential script executions. It's ideal for build, test, and deploy processes. ```markdown --- description: Execute complete release workflow argument-hint: [version] allowed-tools: Bash(*), Read --- Executing release workflow for version $1: **Step 1 - Pre-release validation:** !`bash ${CLAUDE_PLUGIN_ROOT}/scripts/pre-release-check.sh $1` **Step 2 - Build artifacts:** !`bash ${CLAUDE_PLUGIN_ROOT}/scripts/build-release.sh $1` **Step 3 - Run test suite:** !`bash ${CLAUDE_PLUGIN_ROOT}/scripts/run-tests.sh` **Step 4 - Package release:** !`bash ${CLAUDE_PLUGIN_ROOT}/scripts/package.sh $1` Review all step outputs and report: 1. Any failures or warnings 2. Build artifacts location 3. Test results summary 4. Next steps for deployment 5. Rollback plan if needed ``` -------------------------------- ### Execute Ralph Loop Setup Script Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/ralph-loop/commands/ralph-loop.md Run this command to initialize the Ralph loop. It executes the setup script with provided arguments. The loop continues until genuine completion, and false promises to exit are not permitted. ```bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS ``` -------------------------------- ### Install cwc-makers Plugin Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/cwc-makers/README.md Use this command to install the cwc-makers plugin from the claude-plugins-official repository. ```bash /plugin install cwc-makers@claude-plugins-official ``` -------------------------------- ### Inject System Prompt Instructions (TypeScript) Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-server/references/server-capabilities.md Use the `instructions` option during server initialization to inject a one-line hint directly into Claude's system prompt. This is useful for guiding tool usage when it doesn't fit within individual tool descriptions. ```typescript const server = new McpServer( { name: "my-server", version: "1.0.0" }, { instructions: "Always call search_items before get_item — IDs aren't guessable." }, ); ``` -------------------------------- ### Install MCP SDK and Dependencies Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md Install the ModelContextProtocol SDK, extension apps, Zod for schema validation, and Express for the server. This command should be run in your project's root directory. ```bash npm install @modelcontextprotocol/sdk @modelcontextprotocol/ext-apps zod express ``` -------------------------------- ### Get Transition Easing Function Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/assets/topology-viewer.html Gets the easing function of the transition for the selected element. ```javascript function Hn(t){var e=this._id;return arguments.length?this.each(fa(e,t)):S(this.node(),e).ease} ``` -------------------------------- ### Multi-Question Configuration Setup Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/references/interactive-commands.md Gather multiple configuration details from the user in a single interaction using a series of questions. ```markdown --- description: Multi-question configuration allowed-tools: AskUserQuestion, Write --- # Project Configuration Setup Gather configuration through multiple questions. Use AskUserQuestion with multiple questions in one call: **Question 1:** - question: "Which programming language?" - header: "Language" - options: Python, TypeScript, Go, Rust **Question 2:** - question: "Which test framework?" - header: "Testing" - options: Jest, PyTest, Go Test, Cargo Test (Adapt based on language from Q1) **Question 3:** - question: "Which CI/CD platform?" - header: "CI/CD" - options: GitHub Actions, GitLab CI, CircleCI **Question 4:** - question: "Which features do you need?" - header: "Features" - multiSelect: true - options: Linting, Type checking, Code coverage, Security scanning Process all answers together to generate cohesive configuration. ``` -------------------------------- ### Install Latest Claude Agent SDK for TypeScript Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/agent-sdk-dev/commands/new-sdk-app.md Installs the latest version of the Claude Agent SDK for TypeScript using npm. It's recommended to check npm for the absolute latest version before installing. ```bash npm install @anthropic-ai/claude-agent-sdk@latest ``` -------------------------------- ### System Boot-up and Initialization Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/assets/topology-viewer.html Initializes the system title, calculates and displays statistics about modules, data stores, edges, and entry points. Also sets the initial zoom transform for the topology view. ```javascript document.getElementById("title").textContent = DATA.system || DATA.root.name || "System topology"; { const leaves = nodes.filter(n => !n.container); const stores = leaves.filter(n => n.kind === "datastore").length; document.getElementById("stats").textContent = `${leaves.length - stores} modules` + (stores ? ` · ${stores} data stores` : "") + ` · ${edges.length} edges` + (entrySet.size ? ` · ${entrySet.size} entry points` : ""); } { const vw = innerWidth, vh = innerHeight; const k = Math.min(vw, vh) / (WORLD * 1.05); sel.call(zoomB.transform, d3.zoomIdentity.translate(vw / 2 - WORLD / 2 * k, vh / 2 - WORLD / 2 * k).scale(k)); } requestDraw(); ``` -------------------------------- ### Install Pyright Globally with npm Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pyright-lsp/README.md Install Pyright globally using npm for command-line usage. ```bash npm install -g pyright ``` -------------------------------- ### Install Code Modernization Plugin Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/code-modernization/README.md Use this command to install the code-modernization plugin from the claude-plugins-official repository. ```bash /plugin install code-modernization@claude-plugins-official ``` -------------------------------- ### Command with Arguments Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/command-development/README.md Create a command that accepts arguments, such as environment and version, for deployment tasks. Use 'argument-hint' to specify expected arguments. ```markdown --- description: Deploy to environment argument-hint: [environment] [version] --- Deploy to $1 environment using version $2 ``` -------------------------------- ### Install Plugin-Dev Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/README.md Install the plugin-dev package from the Claude Code marketplace or use it directly for development. ```bash /plugin install plugin-dev@claude-code-marketplace ``` ```bash cc --plugin-dir /path/to/plugin-dev ``` -------------------------------- ### Install lua-lsp via Homebrew Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/lua-lsp/README.md Use this command to install the lua-language-server on macOS using Homebrew. ```bash brew install lua-language-server ``` -------------------------------- ### Default Provisioning Command Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/cwc-makers/skills/m5-onboard/SKILL.md Use this command to perform a default provisioning of a fresh Cardputer-Adv and install the buddy bundle. ```bash python3 scripts/onboard.py --apps buddy ``` -------------------------------- ### Creating Settings Files via Commands Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/plugin-settings/SKILL.md Outlines the steps for a command to create a plugin settings file with YAML frontmatter based on user input. ```markdown # Setup Command Steps: 1. Ask user for configuration preferences 2. Create `.claude/my-plugin.local.md` with YAML frontmatter 3. Set appropriate values based on user input 4. Inform user that settings are saved 5. Remind user to restart Claude Code for hooks to recognize changes ``` -------------------------------- ### Dynamic Headers Example Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/mcp-integration/references/authentication.md Example of dynamic headers that can be used for time-based authentication or short-lived tokens. ```json { "Authorization": "Bearer $TOKEN", "X-Timestamp": "$(date -Iseconds)" } ``` -------------------------------- ### Migrate from Hardcoded to Environment Variables Source: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/plugin-dev/skills/mcp-integration/references/authentication.md Example JSON configuration showing the transition from a hardcoded token to using an environment variable. ```json { "headers": { "Authorization": "Bearer sk-hardcoded-token" } } ``` ```json { "headers": { "Authorization": "Bearer ${API_TOKEN}" } } ```