We welcome contributions! This guide covers everything you need to get started.
- Python 3.11+ (3.13 recommended)
- jq
- Claude Code with the closedloop plugin installed
# Fork on GitHub, then clone your fork
git clone git@github.com:YOUR_USERNAME/claude-plugins.git
cd claude-plugins
git remote add upstream git@github.com:closedloop-ai/claude-plugins.git
# Create virtual environment
python3.13 -m venv .venv
source .venv/bin/activate
# Install dev dependencies
pip install ruff pyright pytest
# Set up git hooks (required)
git config core.hooksPath .githookssource .venv/bin/activate
# Run tests
pytest plugins/
# Run linting
ruff check .
# Run type checking
pyrightAll contributions come through forks. External contributors do not have push access to the main repository.
- Fork the repository on GitHub
- Clone your fork and add the upstream remote:
git clone git@github.com:YOUR_USERNAME/claude-plugins.git cd claude-plugins git remote add upstream git@github.com:closedloop-ai/claude-plugins.git - Create a feature branch from
main:git fetch upstream git checkout -b feat/my-change upstream/main
feat/*— New features or agentsfix/*— Bug fixesdocs/*— Documentation changesrefactor/*— Code restructuring
git fetch upstream
git rebase upstream/main- Push your branch to your fork (not the upstream repo)
- Open a PR from your fork's branch to
closedloop-ai/claude-plugins:main - Include a description of what changed and why
- Update
CHANGELOG.mdin the affected plugin directory (enforced by pre-push hook when modifyingplugins/files) - Address review feedback with additional commits (don't force-push during review)
- A maintainer will squash merge to
mainafter approval
- Each agent has a single, well-defined responsibility
- Agent descriptions are callable by the orchestrator — keep them precise
- Model selection: opus for creative/planning tasks, sonnet for implementation, haiku for lightweight coordination
- Skills encapsulate reusable instruction sets; prefer skills over duplicating instructions across agents
- When adding new agents, consider what patterns should be captured
- The
learning-captureagent looks for patterns tagged with context fields - Contribute quality patterns via
/push-learningsif they generalize across projects
- Prefer extending existing agents over creating new ones
- Add hooks only when lifecycle integration genuinely improves outcomes
- Python tools should be standalone scripts with no internal dependencies
- Ruff for linting (config in
pyproject.toml) - Pyright for type checking
- All public functions typed with annotations
- Test every new Python tool with pytest
- YAML frontmatter:
name,description,model,tools,skills(only what's needed) - System prompt: concise, role-first, constraint-driven
- No hallucinated tool calls in prompts — only tools listed in frontmatter
- Skill identifiers must include plugin-name prefix (e.g.,
self-learning:toon-format, nottoon-format)
- Use TOON for learning pattern files (
*.toon) - Follow syntax from the
self-learning:toon-formatskill - ~40% token reduction vs JSON while maintaining lossless round-trip compatibility
- Python tools: pytest with good coverage on new code
- Agent changes: manual smoke test with
/codeon a representative task - Hook changes: test all 5 lifecycle events (
SessionStart,SessionEnd,SubagentStart,SubagentStop,PreToolUse)
Use conventional commits:
feat(code): add visual-qa-subagent for screenshot review
fix(platform): correct fastapi-router-specialist tool list
docs(judges): update AGENTS.md with new judge
refactor(code): simplify plan-writer merge mode
Scopes: bootstrap, code, code-review, judges, platform, self-learning
When modifying agents, skills, hooks, commands, or any file under plugins/{plugin-name}/:
-
Update the version in the plugin's manifest file:
plugins/code/.claude-plugin/plugin.jsonplugins/code-review/.claude-plugin/plugin.jsonplugins/judges/.claude-plugin/plugin.jsonplugins/self-learning/.claude-plugin/plugin.jsonplugins/platform/.claude-plugin/plugin.json
-
Follow semantic versioning (MAJOR.MINOR.PATCH):
- PATCH: Bug fixes, wording corrections in agent prompts
- MINOR: New agents, skills, commands, hooks; backward-compatible changes
- MAJOR: Breaking changes to orchestration flow, hook API, or skill interface
-
Update
CHANGELOG.mdin the affected plugin directory (required by pre-push hook) -
After merging, users must run
/plugin marketplace update closedloop && /exitto reload