Browse, search, and contribute community hacks — real-world patterns for provider switching, teams, skills, hooks, cost optimization, and more.
Browse real-world Genie patterns contributed by the community. Search by problem, explore by category, or contribute your own.
/genie-hacks with any subcommandlist| Command | Description |
|---|---|
/genie-hacks | List all hacks (same as list) |
/genie-hacks list | List all hacks with title, problem, and category |
/genie-hacks search <keyword> |
| Search hacks by keyword in title/problem/solution |
/genie-hacks show <hack-id> | Display full hack details |
/genie-hacks contribute | Submit a new hack via automated PR flow |
/genie-hacks help <problem> | Describe a problem, get matched to relevant hacks |
The canonical hacks live in the docs at genie/hacks.mdx. Below is the embedded registry for list, search, show, and help commands. Use this data directly — do not require an external file.
provider-switching--provider flag to switch per-task. Configure provider per agent role in team config.# Fast scaffolding with Codex
genie agent spawn engineer --provider codex
# Careful review with Claude
genie agent spawn reviewer --provider claude
# Team-level: set default per role
genie team create my-feature --repo . --wish my-slug
genie team hire engineer --provider codex
genie team hire reviewer --provider claude
team-coordination/dream to batch-execute wishes with dependency ordering. Same-layer wishes run in parallel.# Queue wishes for overnight execution
/dream
# Or manually create parallel teams
genie team create auth-refactor --repo . --wish auth-refactor
genie team create api-v2 --repo . --wish api-v2
# Monitor both
genie task status auth-refactor
genie task status api-v2
# Cross-team messaging
genie agent send 'auth-refactor is done, you can proceed' --to api-v2-team-lead
overnight-batch/dream to queue SHIP-ready wishes, set dependency order, and let agents execute overnight. Wake up to PRs and a DREAM-REPORT.md.# 1. Ensure wishes are in brainstorm.md under "Poured"
cat .genie/brainstorm.md
# 2. Launch dream run
/dream
# Select wishes: 1 3 5 (or "all")
# Confirm DREAM.md execution plan
# Go to sleep
# 3. Morning: check results
cat .genie/DREAM-REPORT.md
gh pr list --author @me
custom-skillsskills/<name>/SKILL.md with YAML frontmatter. Claude loads it when invoked via /<name>.mkdir -p skills/deploy-check
cat > skills/deploy-check/SKILL.md << 'EOF'
---
name: deploy-check
description: "Pre-deploy checklist — tests, migrations, env vars."
---
# /deploy-check
1. Run `bun test`
2. Check migrations: `bunx prisma migrate status`
3. Verify env vars are set
4. Build: `bun run build`
5. Report pass/fail table
EOF
# Use it
/deploy-check
hook-automation.claude/settings.json to trigger actions on events.# Auto-spawn is built in — set GENIE_AGENT_NAME for dispatch:
export GENIE_AGENT_NAME=my-agent
# Claude Code hook example (.claude/settings.json):
{
"hooks": {
"PreToolUse": [{
"matcher": "Bash",
"hooks": [{
"type": "command",
"command": "echo 'Tool being used: Bash'"
}]
}]
}
}
cost-optimization/refine for prompt optimization, and usage monitoring.# 1. Cheaper providers for boilerplate
genie team hire engineer --provider codex
genie team hire reviewer --provider claude
# 2. Tight wish scoping
# BAD: "Refactor the entire codebase"
# GOOD: "Extract auth middleware into src/middleware/auth.ts"
# 3. Refine prompts before dispatching
/refine
# 4. Monitor token usage
genie agent log engineer --transcript --ndjson | jq '.tokens' | paste -sd+ | bc
/dream batch runs.integration-patterns# Post to Slack via webhook
curl -X POST "$SLACK_WEBHOOK_URL" \
-H 'Content-Type: application/json' \
-d '{"text": "Genie: wish auth-refactor done. PR #123"}'
# Create GitHub issues from findings
gh issue create --title "Bug: auth token expiry" \
--body "Found during /trace: refresh fails silently"
# Trigger CI after PR
gh workflow run ci.yml --ref feat/my-feature
debugging-tipsgenie agent log --raw for live output, genie agent log --transcript for transcripts, /trace for root cause analysis, and genie reset for recovery.# Live agent output
genie agent log engineer --raw
# Compressed timeline
genie agent log engineer --transcript
# Filter to tool calls
genie agent log engineer --transcript --ndjson | jq 'select(.type == "tool_use") | .name'
# Systematic investigation
/trace
# Check team status
genie team ls my-team
genie task status my-wish-slug
# Unstick a blocked group
genie reset my-wish-slug#2
listDisplay all hacks from the registry in a formatted table.
Output format:
Genie Hacks — Community Patterns & Tips
| ID | Title | Category |
|----------------------|------------------------------------------|-------------|
| provider-switching | Provider Switching — Right Model for Job | providers |
| team-coordination | Multi-Team Coordination at Scale | teams |
| overnight-batch | Overnight Batch Execution with /dream | batch |
| custom-skills | Custom Skills for Repeated Workflows | skills |
| hook-automation | Git Hook Automation with Genie Hooks | hooks |
| cost-optimization | Cost Optimization Strategies | cost |
| integration-patterns | Integration Patterns — Connect to Stack | integration |
| debugging-tips | Debugging Agent Issues Like a Pro | debugging |
8 hacks available. Run `/genie-hacks show <id>` for details.
Contribute your own: `/genie-hacks contribute`
search <keyword>Search hack titles, problems, solutions, and code for the keyword (case-insensitive). Display matching hacks.
Output format:
Search results for "<keyword>":
1. [provider-switching] Provider Switching — Right Model for the Job
Problem: You're using one provider for everything...
Category: providers
2. [cost-optimization] Cost Optimization Strategies
Problem: Agent usage costs add up...
Category: cost
2 hacks matched. Run `/genie-hacks show <id>` for full details.
If no matches: No hacks found for "<keyword>". Try broader terms or run /genie-hacks list to browse all.
show <hack-id>Display the full hack with all fields. Look up by exact ID (case-insensitive).
Output format:
## <Title>
**Category:** <category> | **ID:** `<hack-id>`
### Problem
<problem text>
### Solution
<solution text>
### Code
<code block>
### Benefit
<benefit text>
### When to Use
<when-to-use text>
---
Found this useful? Share your own: `/genie-hacks contribute`
Full docs: https://docs.automagik.dev/genie/hacks
If not found: Hack "<id>" not found. Did you mean: <suggest closest IDs>? Run /genie-hacks list to see all.
help <problem>Fuzzy-match a problem description to relevant hacks. Extract keywords, score by overlap across all fields, show top 3.
Keyword mapping hints:
Output format:
Based on your problem: "<problem>"
Best matches:
1. [provider-switching] Provider Switching — Right Model for the Job
Why: Matches your need for speed/cost optimization across providers
Quick tip: Use `genie agent spawn engineer --provider codex` for fast scaffolding
2. [cost-optimization] Cost Optimization Strategies
Why: Directly addresses cost reduction techniques
Quick tip: Scope wishes tightly and use `/refine` before dispatching
3. [team-coordination] Multi-Team Coordination at Scale
Why: Parallel execution reduces wall-clock time
Quick tip: Use `/dream` for batch overnight execution
Run `/genie-hacks show <id>` for full details on any hack.
If no reasonable matches: No hacks closely match your problem. Try describing it differently, or run /genie-hacks list to browse all. Got a solution? Run /genie-hacks contribute!
contributeGuide the user through contributing a new hack to the community docs via an automated PR to automagik-dev/docs. This is the full end-to-end flow.
Prompt the user for each field interactively. Wait for each response before proceeding.
Prompt sequence:
Title: "What's your hack title? (short, descriptive)"
Problem: "What problem does it solve? (1-2 sentences)"
Solution: "How does it work? Show the commands, config, or code. (Use code blocks)"
Category: "What category? Pick one: providers | teams | skills | hooks | cost | integration | debugging | batch | other"
Benefit: "What's the key benefit? (one line)"
When to use: "When should someone use this? (one line)"
Format the hack in the standard template and show the user:
### <Title>
**ID:** `<generated-id>`
**Category:** <category>
**Problem:** <problem>
**Solution:**
<solution with code blocks>
**Benefit:** <benefit>
**When to use:** <when>
Ask: "Does this look good? (yes/edit/cancel)"
/genie-hacks contribute anytime."Run these checks in order. Stop at first failure with a helpful error.
# 1. Check gh is installed
command -v gh >/dev/null 2>&1
# If missing: "GitHub CLI (gh) is required. Install: https://cli.github.com/"
# 2. Check gh is authenticated
gh auth status 2>&1
# If not authenticated: "Run `gh auth login` to authenticate with GitHub first."
# 3. Check git is available
command -v git >/dev/null 2>&1
# If missing: "git is required but not found in PATH."
If any check fails, display the error message and suggest manual steps:
Manual contribution steps:
1. Fork https://github.com/automagik-dev/docs
2. Edit genie/hacks.mdx — add your hack in the correct category section
3. Commit: git commit -m "hack: <title>"
4. Open PR to automagik-dev/docs (base: dev)
# Cache directory for docs repo
DOCS_CACHE="$HOME/.genie/cache/docs-fork"
# Fork the docs repo (idempotent — no-op if already forked)
gh repo fork automagik-dev/docs --clone=false 2>/dev/null || true
# Get the user's GitHub username for the fork URL
GH_USER=$(gh api user --jq '.login')
# Clone or update the cached fork
if [ -d "$DOCS_CACHE/.git" ]; then
cd "$DOCS_CACHE"
git fetch origin
git checkout dev
git pull origin dev
else
gh repo clone "$GH_USER/docs" "$DOCS_CACHE" -- --branch dev
cd "$DOCS_CACHE"
git remote add upstream https://github.com/automagik-dev/docs.git 2>/dev/null || true
git fetch upstream
fi
# Create a branch for the hack
BRANCH="hack/$(echo '<title>' | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9-')"
git checkout -b "$BRANCH" origin/dev
If clone/fork fails, show the error and fall back to manual steps (same as Step 3 fallback).
Read genie/hacks.mdx from the cloned repo. Find the correct category section (look for ## <Category> heading — e.g., ## Providers, ## Teams, etc.). Append the new hack entry just before the next ## heading or at the end of the category section.
If the category section doesn't exist (e.g., for other), append a new section at the end of the file, before the Contributing section:
## Other
### <Title>
**ID:** `<generated-id>`
**Problem:** <problem>
**Solution:**
<solution>
**Benefit:** <benefit>
**When to use:** <when>
---
cd "$DOCS_CACHE"
git add genie/hacks.mdx
git commit -m "hack: <title>"
git push -u origin "$BRANCH"
# Create PR targeting the dev branch of the upstream docs repo
PR_URL=$(gh pr create \
--repo automagik-dev/docs \
--base dev \
--head "$GH_USER:$BRANCH" \
--title "hack: <title>" \
--body "$(cat <<'PREOF'
## New Community Hack
**Title:** <title>
**Category:** <category>
**Problem:** <problem>
**Solution:**
<solution summary>
**Benefit:** <benefit>
**When to use:** <when>
---
*Submitted via `/genie-hacks contribute`*
PREOF
)")
echo "PR created: $PR_URL"
Display the result to the user:
Your hack has been submitted!
PR: <PR_URL>
Title: hack: <title>
Target: automagik-dev/docs (dev branch)
What happens next:
- A maintainer will review your hack
- They may suggest edits via PR comments
- Once approved, it'll appear on the hacks page
Thank you for contributing to the Genie community!
Join the discussion on Discord: https://discord.gg/automagik
At any point if a step fails:
| Error | Recovery |
|---|---|
gh not installed | Show install URL, fall back to manual steps |
gh not authenticated | Show gh auth login command |
| Fork fails | Check if fork already exists with gh repo view $GH_USER/docs |
| Clone fails | Remove cache dir and retry: rm -rf $DOCS_CACHE && gh repo clone ... |
hacks.mdx not found | Create a new one with the standard template header |
| Push fails (auth) | Suggest gh auth refresh or SSH key setup |
| PR creation fails | Show the branch/commit info so user can create PR manually via GitHub web UI |
| Editor fails | Write the hack content to a temp file, show the path for manual copy |
If GitHub operations fail entirely, save the hack locally and guide the user:
# Save hack to local file
mkdir -p ~/.genie/cache/pending-hacks
cat > ~/.genie/cache/pending-hacks/<hack-id>.md << 'EOF'
<formatted hack content>
EOF
Then display:
Saved your hack locally at: ~/.genie/cache/pending-hacks/<hack-id>.md
To submit manually:
1. Fork https://github.com/automagik-dev/docs
2. Copy the hack content into genie/hacks.mdx under the "<category>" section
3. Commit with message: "hack: <title>"
4. Open PR targeting the `dev` branch
| Category | ID | Description |
|---|---|---|
| Providers | providers | Provider switching, model selection, BYOA |
| Teams | teams | Multi-agent coordination, team patterns |
| Skills | skills | Custom skills, skill chains, automation |
| Hooks | hooks | Git hooks, auto-spawn, event-driven flows |
| Cost | cost | Token optimization, model routing, budget control |
| Integration | integration | External tools, APIs, CI/CD, Slack, etc. |
| Debugging | debugging | Agent debugging, tracing, fixing bad behavior |
| Batch | batch | Overnight execution, queued processing |
| Other | other | Uncategorized community patterns |
The docs repo is cached at ~/.genie/cache/docs-fork/ to avoid re-cloning on every contribute. The cache is updated (git pull) on each contribute invocation. If the cache becomes corrupted, delete it and re-run — the contribute flow will re-clone automatically.
help, always try to find at least one relevant hack. Only say "no matches" if truly nothing fits.list, full format only for show.list and show with a nudge toward contribute.contribute command should be friendly and low-friction — one question at a time.dev branch for PRs — never main/master.