Guide for contributors who want to create and submit new stacks.
Every stack must follow this structure:
stacks/<stack-name>/
├── README.md # Required: what's in the stack, how to install
├── CLAUDE.md # Required: project instructions for Claude Code
├── settings.json # Required: hook configuration
├── skills/ # Required: at least one skill
│ └── <skill-name>/
│ └── SKILL.md
├── hooks/ # Optional: automation scripts
│ └── <hook-name>.sh
└── templates/ # Optional: project templates
Skills use YAML frontmatter + markdown:
---
name: my-skill
description: One-line description of when to use this skill. Be specific about trigger conditions.
---
# Skill Title
Clear, step-by-step instructions for Claude Code to follow.
## Step 1: ...
- Concrete actions
- Code examples where helpful
- Decision points with criteriaGuidelines:
- The
descriptionfield is critical -- Claude Code uses it to decide when to invoke the skill - Write instructions as if talking to a capable developer, not a beginner
- Include decision criteria, not just steps
- Provide code patterns to copy, not abstract descriptions
- Include a checklist at the end for verification
Hooks are bash scripts that:
- Read JSON from stdin
- Extract the file path
- Run tools on the file
- Exit cleanly
Template:
#!/bin/bash
# PostToolUse hook: <what this hook does>
# <additional context>
set -euo pipefail
INPUT=$(cat)
FILE_PATH=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty')
# Filter: only process relevant files
if [[ -z "$FILE_PATH" || "$FILE_PATH" != *.<extension> ]]; then
exit 0
fi
if [[ ! -f "$FILE_PATH" ]]; then
exit 0
fi
# Check if the tool is available
if ! command -v <tool> &> /dev/null; then
exit 0
fi
# Run the tool
<tool> "$FILE_PATH" 2>/dev/null || trueGuidelines:
- Always check if the tool is installed (
command -v) - Always filter by file extension
- Always check if the file exists
- Use
|| trueto prevent hook failures from blocking Claude Code - Use
set -euo pipefailfor safety - Keep hooks fast (under 30 seconds)
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/<hook-name>.sh",
"timeout": 30,
"statusMessage": "Running <hook-name>..."
}
]
}
]
}
}Guidelines:
- Use
$CLAUDE_PROJECT_DIRfor portable paths - Set reasonable timeouts (30s for formatters, 120s for tests)
- Write clear
statusMessagevalues
The CLAUDE.md should cover:
- Language/framework conventions -- coding style, preferred libraries, patterns
- Project structure -- where things go and why
- Anti-patterns -- common mistakes to avoid (be specific)
- Testing conventions -- how to write and run tests
- Domain-specific guidance -- patterns unique to this tech stack
Do:
- Be specific and actionable
- Include code examples for non-obvious patterns
- List concrete anti-patterns with explanations
Don't:
- Repeat generic programming advice
- Include project-specific paths or names
- Add configuration that belongs in settings.json
Before submitting, verify:
-
Fresh install test:
mkdir /tmp/test-project && cd /tmp/test-project git init # Follow your README's install instructions exactly # Start Claude Code and verify everything works
-
Skills discoverable: Ask Claude to list available skills
-
Hooks fire: Edit a file and verify hooks run
-
Graceful degradation: Remove a tool (e.g., uninstall ruff) and verify hooks don't crash
- Fork the repository
- Create your stack in
stacks/<stack-name>/ - Add an entry to the main README's "Available Stacks" table
- Submit a PR with:
- A description of the stack and its target audience
- Screenshots or examples of skills/hooks in action
- Confirmation you've tested a fresh install