Skip to content

Claude Code Plugin System: Complete Research & Documentation #70

Description

@terrylica

Claude Code Plugin System: Complete Research & Documentation

🎯 Summary

Comprehensive research and documentation of Claude Code's plugin/marketplace system, covering architecture, file structure, distribution mechanisms, and best practices. Created 5 complete reference documents (3,447 lines, 120KB) based on official documentation.


📚 Documentation Created

All documentation located in /docs/research/claude-code-plugins/:

1. README.md - Navigation Hub

Quick navigation to all plugin system documentation with reading order recommendations.

Link: https://github.com/terrylica/claude-code-skills-github-issues/blob/main/docs/research/claude-code-plugins/README.md

2. COMPLETE_REFERENCE.md - Full Technical Reference (950 lines)

Complete technical specification covering:

  • Plugin system architecture (3-tier distribution model)
  • File structure requirements
  • plugin.json & marketplace.json schemas
  • All 5 component types (Commands, Agents, Skills, Hooks, MCP)
  • Distribution mechanisms (GitHub, Git URLs, Local paths)
  • Skills system with allowed-tools restrictions
  • Best practices and debugging guide

Link: https://github.com/terrylica/claude-code-skills-github-issues/blob/main/docs/research/claude-code-plugins/COMPLETE_REFERENCE.md

3. CONCEPTS.md - Plugin vs Marketplace vs Skills (1,061 lines)

Clarifies core concepts with:

  • Quick definitions (Marketplace = Catalog, Plugin = Container, Skill = Component)
  • Complete comparison tables across 11 aspects
  • Hierarchical relationships visualization
  • Common confusion points explained

Link: https://github.com/terrylica/claude-code-skills-github-issues/blob/main/docs/research/claude-code-plugins/CONCEPTS.md

4. ARCHITECTURE.md - System Architecture Diagrams (671 lines)

Visual documentation with 10+ diagrams:

  • System overview (Marketplace → Plugin → Component layers)
  • Plugin file structure visualization
  • Component activation models
  • Skills discovery & activation process
  • Team distribution workflow
  • Security model

Link: https://github.com/terrylica/claude-code-skills-github-issues/blob/main/docs/research/claude-code-plugins/ARCHITECTURE.md

5. QUICK_REFERENCE.md - Command Cheat Sheet (343 lines)

Fast lookup reference with:

  • Essential file structures
  • Minimal plugin.json/marketplace.json examples
  • Common commands
  • SKILL.md template
  • Troubleshooting guide

Link: https://github.com/terrylica/claude-code-skills-github-issues/blob/main/docs/research/claude-code-plugins/QUICK_REFERENCE.md


🔍 Key Findings

Our Plugin Structure Validated

This repository uses the "self-hosted marketplace" pattern:

  • ✅ Both marketplace.json AND plugin.json in .claude-plugin/
  • ✅ Acts as BOTH a marketplace AND a plugin simultaneously
  • ✅ marketplace.json lists 1 plugin: github-issues-operations
  • ✅ plugin.json defines 6 skills for GitHub Issues management
  • ✅ Version synchronized (4.1.2 across all files)

Pattern validated by:

  • Industry examples (lackeyjb/playwright-skill uses same pattern)
  • Official documentation support
  • Active Claude Code plugin ecosystem (652+ extensions researched)

Critical Understanding

┌────────────────────────────────────────────────┐
│  This Repository's Dual Nature                │
├────────────────────────────────────────────────┤
│                                                │
│  AS MARKETPLACE (marketplace.json):            │
│  • Name: "github-issues-skills"                │
│  • Hosts: 1 plugin                             │
│  • Source: "./" (points to itself)             │
│                                                │
│  AS PLUGIN (plugin.json):                      │
│  • Name: "github-issues-operations"            │
│  • Contains: 6 skills                          │
│  • Version: 4.1.2                              │
│                                                │
└────────────────────────────────────────────────┘

Installation Flow

/plugin marketplace add terrylica/claude-code-skills-github-issues

What happens:

  1. Fetches marketplace.json from GitHub
  2. Discovers plugin "github-issues-operations" at ./
  3. Fetches plugin.json from same repo
  4. Loads all 6 skills
  5. Installs to ~/.claude/plugins/

System Architecture

3-Tier Model:

Marketplace (JSON catalog)
    ↓
Plugin (Container with plugin.json)
    ↓
Components (Skills, Commands, Agents, Hooks, MCP)

Our Implementation:

Marketplace: "github-issues-skills"
    └─ Plugin: "github-issues-operations" (v4.1.2)
         ├─ Skill: searching-issues
         ├─ Skill: managing-lifecycle
         ├─ Skill: creating-knowledge-entries
         ├─ Skill: ai-assisted-operations
         ├─ Skill: file-searching
         └─ Skill: label-management

💡 Key Insights

1. Skills vs Commands

Skills = Model-invoked (Claude decides when to use)
Commands = User-invoked (explicit /command)

2. Three Skill Storage Locations

  • Personal: ~/.claude/skills/ - Individual use
  • Project: .claude/skills/ - Team shared (git committed)
  • Plugin: Via marketplace → Professional distribution

3. Critical File Structure Rule

"Directories exist at the plugin root, not inside .claude-plugin/"

Correct:

my-plugin/
├── .claude-plugin/plugin.json
├── skills/                    ← At root
└── commands/                  ← At root

4. allowed-tools Feature

Skills can restrict tool access:

---
name: read-only-analysis
allowed-tools:
  - Read
  - Grep
---

Enables:

  • Read-only skills (prevent modifications)
  • Security-sensitive workflows
  • Compliance requirements

5. Team Distribution

Auto-install via .claude/settings.json:

{
  "extraKnownMarketplaces": ["company/plugins"],
  "enabledPlugins": ["plugin@marketplace"]
}

📖 Official Sources

All findings sourced from official Claude Code documentation (October 2025):


🎯 Recommendations

For This Repository

  1. Current structure is correct - No changes needed
  2. Version synchronization working - marketplace.json and plugin.json both at 4.1.2
  3. All 6 skills have proper YAML frontmatter - Required since v4.1.0
  4. Using strict mode - Quality enforcement enabled

For Future Development

Can expand in two ways:

Option 1: Add more skills to current plugin

{
  "skills": [
    "./skills/github-issues/...",
    "./skills/github-actions/...",  // NEW
    "./skills/github-prs/..."       // NEW
  ]
}

Option 2: Add more plugins to marketplace

{
  "plugins": [
    {"name": "github-issues-operations", "source": "./"},
    {"name": "ci-cd-operations", "source": "./plugins/ci-cd/"}  // NEW
  ]
}

📊 Research Impact

Documentation created:

  • 5 complete reference documents
  • 3,447 total lines
  • ~120KB of documentation
  • 10+ architecture diagrams
  • Direct quotes from official docs

Knowledge captured:

  • Plugin system architecture
  • Distribution mechanisms
  • Security model
  • Team workflows
  • Industry patterns (652+ extensions researched)
  • Best practices from official guides

Repository improvements:

  • Clear separation of concerns (plugin vs GitHub CLI docs)
  • Navigation hubs (README.md auto-displays on GitHub)
  • Scalable structure for future expansion

🔗 Related

GitHub CLI Research:

  • github-cli/ - Extensions, search capabilities, AI assistance POC

Operational Guide:

Installation:

  • INSTALLATION.md - 4 installation methods (global, project-local, team, dev)

📅 Research Timeline

Date: 2025-10-25
Method: 3 parallel research agents

  • Agent 1: Official documentation fetch & analysis
  • Agent 2: Current repository structure analysis
  • Agent 3: Industry pattern research (GitHub examples)

Duration: ~2 hours of comprehensive research
Output: Production-ready, comprehensive documentation


Labels: claude-code, reference, documentation
Category: Plugin System Research
Status: Complete ✅

Metadata

Metadata

Assignees

No one assigned

    Labels

    claude-codeClaude Code tips and tricksdocumentationImprovements or additions to documentationreferenceReference documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions