Scaffold a new Claude Code plugin from scratch.
When you want to create a new plugin that extends Claude Code with skills, commands, and agents. This generates the correct directory structure and wires up MCP tools.
mcp__plugin_ruflo-core_ruflo__transfer_plugin-search to ensure the name isn't taken```
plugins/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ └──
│ └── SKILL.md
├── commands/
│ └──
├── agents/
│ └──
├── docs/
│ └── adrs/
│ └── 0001-
├── scripts/
│ └── smoke.sh # Structural contract (≥8 checks)
└── README.md # Compatibility + Namespace coordination + Verification + ADR sections
```
skills, commands, or agents arrays — Claude Code auto-discovers these from directory structure)```yaml
name: skill-name
description: What this skill does
allowed-tools: mcp__pluginruflo-coreruflotool1 mcppluginruflo-coreruflo__tool2 Bash
```
model: sonnet@claude-flow/cli v3.6 major+minor<plugin-stem>-<intent> namespace; defer to ruflo-agentdb ADR-0001 §"Namespace convention"bash plugins/<name>/scripts/smoke.shdocs/adrs/0001-<name>-contract.md documenting: pinning, namespace coordination, MCP-tool surface count if applicable, smoke contract scope. Status: Proposed.Proposed; no wildcard tools in skills.Several plugins shipped with subtle MCP bugs the loop has been finding. Don't replicate them:
embeddings_embed does not exist. Real tool is embeddings_generate. Don't reference embeddings_embed in any allowed-tools line.agentdb_hierarchical-* does NOT route by namespace. It routes by tier (working|episodic|semantic). Pass tier, not namespace. For namespaced reads/writes, use memory_* instead.agentdb_pattern-* does NOT route by namespace. It routes through ReasoningBank. Don't pass a namespace arg — fallback writes to the reserved pattern namespace via memory-store-fallback.pattern (singular) and patterns (plural) are different namespaces. ReasoningBank fallback writes to pattern; hooks_pretrain writes to patterns. Don't conflate them.Required fields (the repo gate scripts/audit-plugin-manifest.mjs fails without them):
name — plugin identifier (kebab-case, must equal the directory name)description — what the plugin doesversion — semver (X.Y.Z, optional pre-release suffix); bump it on every change, because marketplace users only receive a plugin when its version changeskeywords — non-empty array of stringsrepository — the repo URL the plugin ships from (https://github.com/ruvnet/ruflo for plugins in this repo), as a string or an object's urlRecommended fields:
author — { "name": "...", "url": "..." }homepage, licenseOptional fields:
graph_adapter — ADR-130 graph intelligence contract (commented out by default in generated output):```json
// "graph_adapter": {
// "edgeRelations": ["my-relation-type"],
// "nodeTypes": ["entity"],
// "autoRegister": true
// }
```
When autoRegister: true, the plugin's edges are automatically included in graph_edges writes
by the core graph layer. Declare edgeRelations — the relation types this plugin produces.
Do NOT include skills, commands, or agents arrays in plugin.json — these are auto-discovered from the directory structure by Claude Code and will cause validation errors if present.
Browse available tools: mcp__plugin_ruflo-core_ruflo__transfer_plugin-info
Common tool categories:
memory_* — storage, search, retrievalagentdb_* — 20 controller-bridge tools (the count grows) (do NOT pass namespace arg — they route by tier or ReasoningBank); call agentdb_controllers at runtime for the canonical listneural_* — neural training and predictionhooks_* — lifecycle hooks and intelligencebrowser_* — browser automationworkflow_* — workflow managementaidefence_* — safety scanningembeddings_* — 10 vector-embedding tools (use embeddings_generate, NOT embeddings_embed which does not exist)