Building Claude Code Plugins Guide | Generated by AI

Home 2026.03

Question: How to make a plugin for Claude Code, and what APIs can we use to integrate with Claude Code?

Answer:

Claude Code is Anthropic’s agentic coding tool (terminal-based, with VS Code / JetBrains extensions) that lets Claude read/edit files, run commands, and handle development workflows.

Plugins extend it with custom slash commands (/something), skills, agents, hooks, and sometimes MCP (multi-step process) servers or LSP integrations.

How to Create a Claude Code Plugin (2026 Current Approach)

Plugins are mostly file-based (Markdown + JSON) — no heavy compilation is needed in most cases.

Basic Steps to Create a Simple Plugin

  1. Create the directory structure
    mkdir my-awesome-plugin
    cd my-awesome-plugin
    mkdir -p .claude-plugin
    
  2. Create the manifest file
    This is required — place it at .claude-plugin/plugin.json

    Minimal example:

    {
      "name": "my-awesome-plugin",
      "version": "1.0.0",
      "description": "Adds /greet and a session summary skill",
      "author": "Your Name",
      "repository": "https://github.com/yourname/my-awesome-plugin"
    }
    
  3. Add functionality (choose what you need)

    • Slash commands — put Markdown files in commands/ Example: commands/greet/COMMAND.md
      ---
      description: Prints a friendly greeting
      ---
      
      Greet the user warmly and ask how their coding is going today.
      
    • Skills — put in skills/skill-name/SKILL.md Skills are reusable prompt templates/behaviors.

    • Hooks (run on events like session-start) — in hooks/

    • More advanced: agents, MCP servers, LSP servers (see docs for those)
  4. Test locally Start Claude Code with your plugin folder:
    claude --plugin-dir ./my-awesome-plugin
    

    Or add it as a local marketplace for easier testing.

  5. Share / distribute
    • Push to GitHub
    • Others install via:
      /plugin marketplace add https://github.com/yourname/my-awesome-plugin
      /plugin install my-awesome-plugin
      
    • Or create a marketplace (a repo containing multiple plugins) with marketplace.json

Many people start with standalone skills/commands in ~/.claude/ and later convert them to plugins.

What APIs Can You Use to Integrate with / Extend Claude Code?

Claude Code itself does not expose a traditional public REST API for plugins (most extensions are declarative Markdown + JSON).

However, several integration points exist:

For most plugin authors in 2026, you don’t need to write API servers — you just write good Markdown prompts/commands/skills.
If you want deep programmatic integration (calling external APIs, persistent state, etc.), combine tool use + your own backend.

Official starting point
→ https://code.claude.com/docs/en/plugins

Examples & inspiration
Search GitHub for “claude-code-plugin” or visit community marketplaces like buildwithclaude.com

References:


Back Donate