devstudio
Plugin Dev Studio workflow for hot-reload development, interactive testing, dependency visualization, and validation of Claude Code plugins. Covers the full plugin development lifecycle from scaffold to publish.
What this skill does
# Plugin Dev Studio Workflow
Comprehensive development environment for building, testing, and validating Claude Code plugins with hot-reload support.
## When to Use This Skill
Activate this skill when:
- Developing a new plugin and need rapid iteration with live validation
- Debugging plugin manifest or resource file issues
- Visualizing plugin dependency graphs for architecture review
- Building regression test suites for plugin commands
- Preparing a plugin for publication to a registry
## Architecture Overview
The Dev Studio consists of four core subsystems:
```
+------------------+ +---------------+ +-------------------+
| FileWatcher | --> | HotReloader | --> | Resource Registry |
| (FNV-1a hashing) | | (Validation) | | (Live state) |
+------------------+ +---------------+ +-------------------+
|
v
+--------------------+
| Console Reporter |
| (file:line errors) |
+--------------------+
+-------------------+ +---------------------------+
| PluginPlayground | | DependencyGraphRenderer |
| (Record/Replay) | | (ASCII + Mermaid output) |
+-------------------+ +---------------------------+
```
### FileWatcher
Monitors a plugin directory for file changes using filesystem watchers with content-hash-based change detection.
**Key design decisions:**
- Uses FNV-1a (32-bit) hashing for speed — non-cryptographic, but extremely fast for small files
- Only triggers reload when file content actually changed (ignores timestamp-only updates)
- Debounces rapid changes with a 100ms window to batch editor save operations
- Classifies files by resource type (command, skill, agent, config, source)
### HotReloader
Processes file changes and maintains a live resource registry.
**On each change:**
1. If manifest changed: re-read, re-validate JSON structure and required fields
2. If markdown resource changed: re-lint frontmatter (YAML validity, required fields)
3. Update resource registry: add new resources, update modified ones, remove deleted ones
4. Report validation results with `file:line` references for inline error display
### PluginPlayground
Isolated execution context for testing plugin commands.
**Record-replay workflow:**
1. Register mock capabilities for external dependencies
2. Execute commands and record full input/output pairs as fixtures
3. Save fixtures to `tests/fixtures/` as JSON
4. Replay fixtures in CI to detect regressions
### DependencyGraphRenderer
Builds and renders plugin dependency graphs.
**Two output formats:**
- **ASCII tree**: Uses Unicode box-drawing characters for terminal display
- **Mermaid diagram**: Pasteable into GitHub markdown, Notion, or Mermaid Live Editor
## Development Workflow
### Phase 1: Scaffold and Configure
```bash
# Create plugin structure
mkdir -p my-plugin/{commands,skills,agents,config,src,tests/fixtures}
mkdir -p my-plugin/.claude-plugin
# Create minimal manifest
cat > my-plugin/.claude-plugin/plugin.json << 'EOF'
{
"name": "my-plugin",
"version": "0.1.0",
"description": "My new plugin",
"contextEntry": "CONTEXT.md",
"capabilities": {
"provides": ["my-capability"],
"requires": []
}
}
EOF
```
```bash
# Create required operator runbook
cat > my-plugin/CLAUDE.md << 'EOF'
# My Plugin Guide
## Purpose
- Brief description of plugin intent.
## Supported Commands
- command-name (commands/command-name.md)
## Prohibited Actions
- List destructive or out-of-scope operations.
## Required Validation Checks
- npm run check:plugin-context
- npm run check:plugin-schema
## Context Budget
1. CONTEXT_SUMMARY.md
2. commands/index (or commands/)
3. README.md and only task-relevant deep docs
## Escalation Path
- Describe who reviews risky or blocking changes.
EOF
```
```bash
# Create operator context entrypoint (keep concise)
cat > my-plugin/CONTEXT.md << 'EOF'
# my-plugin Context
## Purpose
One-paragraph operator summary.
## Key Commands
- /my:command
## Agent Inventory
- my-agent
## Load Deeper Docs When
- You need implementation details or architecture rationale.
EOF
```
### Phase 2: Develop with Hot-Reload
```bash
# Start the dev server with file watching
/mp:dev serve ./my-plugin --watch
```
The dev server will:
- Validate the manifest on startup
- Discover and register all commands, skills, and agents
- Watch for file changes and re-validate on save
- Show inline errors with file:line references
### Phase 3: Test in Playground
```bash
# Launch interactive playground
/mp:dev playground ./my-plugin
# In the playground:
# > run /my:command "test input"
# > save my-test-case
# > log
```
### Phase 4: Visualize Dependencies
```bash
# Show dependency graph
/mp:dev graph ./my-plugin
```
Review the ASCII tree to verify:
- All capability declarations are correct
- Inter-resource dependencies are properly linked
- No circular dependencies exist
### Phase 5: Validate Before Publish
```bash
# Full validation suite
/mp:dev validate ./my-plugin
```
Fix all errors before publishing. Warnings are advisory but should be addressed.
### Phase 6: Regression Testing
```bash
# List saved fixtures
/mp:dev fixture list
# Replay a specific fixture
/mp:dev fixture replay my-test-case
```
## Validation Rules
### Manifest Validation (plugin.json)
| Rule | Severity | Description |
|------|----------|-------------|
| Valid JSON | error | File must be parseable JSON |
| `name` field | error | Must be a non-empty string |
| `version` field | error | Must be a non-empty string |
| `description` field | error | Must be a non-empty string |
| `contextEntry` field | error | Must reference `CONTEXT.md` or `PLUGIN_CONTEXT.md` |
| `CLAUDE.md` present | error | Plugin root must include CLAUDE.md runbook |
| `capabilities` present | warning | Plugin should declare capabilities |
| `capabilities.provides` is array | error | Must be an array of strings |
| `capabilities.requires` is array | error | Must be an array of strings |
### Command/Skill Validation (.md files)
| Rule | Severity | Description |
|------|----------|-------------|
| Has frontmatter | error | Must start with `---` |
| Frontmatter closed | error | Must have closing `---` |
| `name` in frontmatter | error | Commands and skills must have a name |
| `description` in frontmatter | warning | Should have a description |
| Top-level heading | info | Should have `# Title` after frontmatter |
## File Structure
```
plugin-root/
.claude-plugin/
plugin.json # Plugin manifest (validated by HotReloader)
CLAUDE.md # Required operator runbook and context budget
CONTEXT.md # Minimal operator context entrypoint
commands/
*.md # Slash commands (validated for frontmatter)
skills/
*/SKILL.md # Skills (validated for frontmatter)
agents/
*.md # Agents (validated for frontmatter)
config/
*.json # Configuration files
src/
devstudio/
types.ts # Type definitions
server.ts # FileWatcher, HotReloader, Playground, GraphRenderer
tests/
fixtures/
*.json # Recorded test fixtures (from playground)
```
## Troubleshooting
### Common Issues
**"Plugin manifest not found"**
- Ensure `.claude-plugin/plugin.json` exists in the plugin root
- Check that the path passed to `/mp:dev` is correct
**"Missing YAML frontmatter"**
- Markdown resource files must start with `---` on the first line
- Frontmatter must be closed with a second `---` line
**"Content hash unchanged but file was modified"**
- The FileWatcher uses content hashing, not timestamps
- If only whitespace changed, verify the hash actually differs
- The FNV-1a hash has a very low (but non-zero) collision rate for small changes
**"Fixture replay fails with empty output"**
- Playground execution is a simulation; real comRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.