Minimal Claude Code Plugin
A minimal base setup for creating Claude Code plugins with an intelligent /setup command that automatically configures project linting and typechecking.
Structure
minimal-claude/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest (required)
├── commands/ # Slash commands
│ ├── setup-code-quality.md # Generate /fix command
│ ├── setup-claude-md.md # Generate CLAUDE.md guidelines
│ ├── setup-commits.md # Generate /commit command
│ └── example.md
├── agents/ # Subagents
│ └── example-agent.md
├── skills/ # Agent Skills
│ └── SKILL.md
└── hooks/ # Event hooks
└── hooks.json
Featured Command: /setup-code-quality
The /setup-code-quality command intelligently detects your project type and configures automated code quality checks:
- Detects Project Type: Automatically identifies if you're using JavaScript/TypeScript, Python, Go, Rust, PHP, or Java
- Checks Existing Tools: Verifies which linting and typechecking tools are already installed
- Installs Missing Tools: Only installs what's needed (eslint, prettier, mypy, clippy, etc.)
- Generates
/fix Command: Creates a custom /fix command tailored to your project that:
- Runs all your linting and typechecking tools
- Parses errors and groups them by domain (types, lint, formatting)
- Spawns parallel agents to fix all issues simultaneously
Usage
/setup-code-quality
After running setup, use the generated command:
/fix
This will automatically fix all linting and type errors in your project using parallel agents!
Featured Command: /setup-claude-md
The /setup-claude-md command creates a minimal, non-bloated CLAUDE.md file with zero-tolerance code quality guidelines:
- Detects Project Type: Identifies your project and its tooling
- Extracts Exact Commands: Finds the actual lint/typecheck commands from your config
- Generates CLAUDE.md: Creates a minimal guidelines file (under 100 lines) that:
- Enforces running checks after EVERY file edit
- Implements zero-tolerance for errors/warnings
- Uses your project's specific commands
- Gets automatically injected into Claude's prompt
Usage
/setup-claude-md
This creates a CLAUDE.md file that tells Claude to automatically run your linting and typechecking commands after every edit, fixing all issues immediately.
Example generated CLAUDE.md (for a TypeScript project):
# Code Quality Guidelines
**Zero-tolerance policy**: All code must pass linting and type checking.
## After Every Edit
After writing, editing, or updating ANY file, you MUST:
1. Run these commands:
```bash
npm run lint
npm run typecheck
- Fix ALL errors and warnings immediately
- Re-run checks until zero errors/warnings remain
**Minimal, actionable, effective.**
## Featured Command: `/setup-commits`
The `/setup-commits` command creates a `/commit` command that enforces quality checks before committing:
1. **Detects Project Type**: Identifies your project's linting/typechecking tools
2. **Runs Quality Checks**: Executes all checks before allowing commits
3. **Generates Smart Commit Messages**: AI-powered, human-readable commit messages
4. **Auto-push**: Automatically pushes to remote after committing
### Usage
```bash
/setup-commits
This creates a /commit command that:
- Runs
npm run lint and npm run typecheck (or your project's equivalent)
- Only proceeds if all checks pass (zero tolerance)
- Analyzes your changes
- Generates a clear commit message like "Add user authentication with JWT"
- Commits and pushes automatically
Example workflow:
# Make changes to your code
# Then run:
/commit
# Claude will:
# ✓ Run all quality checks
# ✓ Generate commit message
# ✓ Commit changes
# ✓ Push to remote
Plugin Components
Commands (/commands)
Custom slash commands that users can invoke. Each command is a Markdown file with frontmatter:
---
description: Command description
---
Your command prompt here.
Agents (/agents)
Specialized subagents that Claude can invoke for specific tasks. Define agents in Markdown files with frontmatter.
Skills (/skills)
Agent Skills that Claude can invoke autonomously based on context. Skills are defined in SKILL.md files.
Hooks (/hooks)
Event handlers that respond to Claude Code actions. Configure in hooks.json:
PostToolUse - After any tool is used
UserPromptSubmit - When user submits a prompt
SessionStart - When a session starts
Installation
Option 1: Install from GitHub (Recommended)
Once you've pushed this to GitHub, users can install it directly:
# Add the marketplace
/plugin marketplace add your-username/minimal-claude
# Install the plugin
/plugin install minimal-claude@your-username