@friedbotstudio/create-baseline 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +222 -0
- package/bin/cli.js +247 -0
- package/obj/template/.claude/agents/swarm-worker.md +52 -0
- package/obj/template/.claude/bin/LICENSE +201 -0
- package/obj/template/.claude/bin/NOTICE +48 -0
- package/obj/template/.claude/commands/approve-spec.md +29 -0
- package/obj/template/.claude/commands/approve-swarm.md +27 -0
- package/obj/template/.claude/commands/grant-commit.md +19 -0
- package/obj/template/.claude/commands/init-project.md +191 -0
- package/obj/template/.claude/hooks/artifact_template_guard.sh +141 -0
- package/obj/template/.claude/hooks/consent_gate_grant.sh +89 -0
- package/obj/template/.claude/hooks/destructive_cmd_guard.sh +42 -0
- package/obj/template/.claude/hooks/env_guard.sh +36 -0
- package/obj/template/.claude/hooks/git_commit_guard.sh +93 -0
- package/obj/template/.claude/hooks/harness_continuation.sh +121 -0
- package/obj/template/.claude/hooks/lib/__pycache__/resume_writer.cpython-314.pyc +0 -0
- package/obj/template/.claude/hooks/lib/common.sh +328 -0
- package/obj/template/.claude/hooks/lib/resume_writer.py +341 -0
- package/obj/template/.claude/hooks/lint_runner.sh +55 -0
- package/obj/template/.claude/hooks/memory_pre_compact.sh +36 -0
- package/obj/template/.claude/hooks/memory_session_start.sh +244 -0
- package/obj/template/.claude/hooks/memory_stop.sh +173 -0
- package/obj/template/.claude/hooks/plantuml_syntax_guard.sh +161 -0
- package/obj/template/.claude/hooks/process_lifecycle_guard.sh +89 -0
- package/obj/template/.claude/hooks/setup_guard.sh +50 -0
- package/obj/template/.claude/hooks/spec_approval_guard.sh +81 -0
- package/obj/template/.claude/hooks/spec_design_calls_guard.sh +183 -0
- package/obj/template/.claude/hooks/spec_diagram_presence_guard.sh +141 -0
- package/obj/template/.claude/hooks/swarm_approval_guard.sh +39 -0
- package/obj/template/.claude/hooks/swarm_boundary_guard.sh +136 -0
- package/obj/template/.claude/hooks/tdd_order_guard.sh +176 -0
- package/obj/template/.claude/hooks/test_runner.sh +75 -0
- package/obj/template/.claude/hooks/tests/fixtures/ac008_byte_equal_reference.txt +12 -0
- package/obj/template/.claude/hooks/tests/memory_session_start_test.sh +285 -0
- package/obj/template/.claude/hooks/track_guard.sh +127 -0
- package/obj/template/.claude/hooks/verify_pass_guard.sh +88 -0
- package/obj/template/.claude/memory/README.md +108 -0
- package/obj/template/.claude/memory/_pending.md +15 -0
- package/obj/template/.claude/memory/_resume.md +12 -0
- package/obj/template/.claude/memory/conventions.md +26 -0
- package/obj/template/.claude/memory/decisions.md +29 -0
- package/obj/template/.claude/memory/landmarks.md +26 -0
- package/obj/template/.claude/memory/landmines.md +27 -0
- package/obj/template/.claude/memory/libraries.md +27 -0
- package/obj/template/.claude/memory/pending-questions.md +28 -0
- package/obj/template/.claude/project.json +221 -0
- package/obj/template/.claude/settings.json +110 -0
- package/obj/template/.claude/skills/archive/SKILL.md +48 -0
- package/obj/template/.claude/skills/archive/archive.sh +145 -0
- package/obj/template/.claude/skills/audit-baseline/SKILL.md +80 -0
- package/obj/template/.claude/skills/audit-baseline/audit.sh +919 -0
- package/obj/template/.claude/skills/brd/SKILL.md +44 -0
- package/obj/template/.claude/skills/brd/template.md +83 -0
- package/obj/template/.claude/skills/chore/SKILL.md +99 -0
- package/obj/template/.claude/skills/claude-automation-recommender/LICENSE +202 -0
- package/obj/template/.claude/skills/claude-automation-recommender/NOTICE +69 -0
- package/obj/template/.claude/skills/claude-automation-recommender/SKILL.md +358 -0
- package/obj/template/.claude/skills/claude-automation-recommender/references/hooks-patterns.md +226 -0
- package/obj/template/.claude/skills/claude-automation-recommender/references/mcp-servers.md +263 -0
- package/obj/template/.claude/skills/claude-automation-recommender/references/plugins-reference.md +98 -0
- package/obj/template/.claude/skills/claude-automation-recommender/references/skills-reference.md +408 -0
- package/obj/template/.claude/skills/claude-automation-recommender/references/subagent-templates.md +181 -0
- package/obj/template/.claude/skills/code-structure/SKILL.md +204 -0
- package/obj/template/.claude/skills/commit/SKILL.md +21 -0
- package/obj/template/.claude/skills/copywriting/SKILL.md +252 -0
- package/obj/template/.claude/skills/copywriting/evals/evals.json +111 -0
- package/obj/template/.claude/skills/copywriting/references/ai-writing-detection.md +200 -0
- package/obj/template/.claude/skills/copywriting/references/copy-frameworks.md +344 -0
- package/obj/template/.claude/skills/copywriting/references/natural-transitions.md +272 -0
- package/obj/template/.claude/skills/design-ui/SKILL.md +175 -0
- package/obj/template/.claude/skills/design-ui/references/design-vs-development.md +89 -0
- package/obj/template/.claude/skills/design-ui/references/intent-table.md +64 -0
- package/obj/template/.claude/skills/design-ui/references/orchestration.md +121 -0
- package/obj/template/.claude/skills/design-ui/references/state-machine.md +125 -0
- package/obj/template/.claude/skills/document/SKILL.md +66 -0
- package/obj/template/.claude/skills/documentation/SKILL.md +50 -0
- package/obj/template/.claude/skills/harness/SKILL.md +169 -0
- package/obj/template/.claude/skills/humanizer/SKILL.md +489 -0
- package/obj/template/.claude/skills/humanizer/references/ai-writing-detection.md +208 -0
- package/obj/template/.claude/skills/impeccable/PROJECT_NOTES.md +22 -0
- package/obj/template/.claude/skills/impeccable/SKILL.md +153 -0
- package/obj/template/.claude/skills/impeccable/agents/openai.yaml +4 -0
- package/obj/template/.claude/skills/impeccable/reference/adapt.md +190 -0
- package/obj/template/.claude/skills/impeccable/reference/animate.md +173 -0
- package/obj/template/.claude/skills/impeccable/reference/audit.md +134 -0
- package/obj/template/.claude/skills/impeccable/reference/bolder.md +113 -0
- package/obj/template/.claude/skills/impeccable/reference/brand.md +104 -0
- package/obj/template/.claude/skills/impeccable/reference/clarify.md +174 -0
- package/obj/template/.claude/skills/impeccable/reference/cognitive-load.md +106 -0
- package/obj/template/.claude/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/obj/template/.claude/skills/impeccable/reference/colorize.md +154 -0
- package/obj/template/.claude/skills/impeccable/reference/craft.md +138 -0
- package/obj/template/.claude/skills/impeccable/reference/critique.md +213 -0
- package/obj/template/.claude/skills/impeccable/reference/delight.md +302 -0
- package/obj/template/.claude/skills/impeccable/reference/distill.md +111 -0
- package/obj/template/.claude/skills/impeccable/reference/document.md +427 -0
- package/obj/template/.claude/skills/impeccable/reference/extract.md +70 -0
- package/obj/template/.claude/skills/impeccable/reference/harden.md +347 -0
- package/obj/template/.claude/skills/impeccable/reference/heuristics-scoring.md +234 -0
- package/obj/template/.claude/skills/impeccable/reference/interaction-design.md +195 -0
- package/obj/template/.claude/skills/impeccable/reference/layout.md +141 -0
- package/obj/template/.claude/skills/impeccable/reference/live.md +513 -0
- package/obj/template/.claude/skills/impeccable/reference/motion-design.md +99 -0
- package/obj/template/.claude/skills/impeccable/reference/onboard.md +234 -0
- package/obj/template/.claude/skills/impeccable/reference/optimize.md +258 -0
- package/obj/template/.claude/skills/impeccable/reference/overdrive.md +130 -0
- package/obj/template/.claude/skills/impeccable/reference/personas.md +178 -0
- package/obj/template/.claude/skills/impeccable/reference/polish.md +232 -0
- package/obj/template/.claude/skills/impeccable/reference/product.md +62 -0
- package/obj/template/.claude/skills/impeccable/reference/quieter.md +99 -0
- package/obj/template/.claude/skills/impeccable/reference/responsive-design.md +114 -0
- package/obj/template/.claude/skills/impeccable/reference/shape.md +136 -0
- package/obj/template/.claude/skills/impeccable/reference/spatial-design.md +100 -0
- package/obj/template/.claude/skills/impeccable/reference/teach.md +137 -0
- package/obj/template/.claude/skills/impeccable/reference/typeset.md +124 -0
- package/obj/template/.claude/skills/impeccable/reference/typography.md +159 -0
- package/obj/template/.claude/skills/impeccable/reference/ux-writing.md +107 -0
- package/obj/template/.claude/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
- package/obj/template/.claude/skills/impeccable/scripts/command-metadata.json +94 -0
- package/obj/template/.claude/skills/impeccable/scripts/design-parser.mjs +820 -0
- package/obj/template/.claude/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/obj/template/.claude/skills/impeccable/scripts/is-generated.mjs +69 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-accept.mjs +465 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-browser.js +4684 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-inject.mjs +436 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-poll.mjs +187 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-server.mjs +679 -0
- package/obj/template/.claude/skills/impeccable/scripts/live-wrap.mjs +395 -0
- package/obj/template/.claude/skills/impeccable/scripts/live.mjs +247 -0
- package/obj/template/.claude/skills/impeccable/scripts/load-context.mjs +93 -0
- package/obj/template/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/obj/template/.claude/skills/impeccable/scripts/pin.mjs +214 -0
- package/obj/template/.claude/skills/implement/SKILL.md +83 -0
- package/obj/template/.claude/skills/intake/SKILL.md +46 -0
- package/obj/template/.claude/skills/intake/template.md +61 -0
- package/obj/template/.claude/skills/integrate/SKILL.md +62 -0
- package/obj/template/.claude/skills/memory-flush/SKILL.md +172 -0
- package/obj/template/.claude/skills/memory-flush/sweep.py +286 -0
- package/obj/template/.claude/skills/memory-flush/tests/run.sh +327 -0
- package/obj/template/.claude/skills/prose/SKILL.md +119 -0
- package/obj/template/.claude/skills/rca/SKILL.md +42 -0
- package/obj/template/.claude/skills/rca/template.md +83 -0
- package/obj/template/.claude/skills/research/SKILL.md +75 -0
- package/obj/template/.claude/skills/scenario/SKILL.md +64 -0
- package/obj/template/.claude/skills/scout/SKILL.md +72 -0
- package/obj/template/.claude/skills/security/SKILL.md +75 -0
- package/obj/template/.claude/skills/simplify/SKILL.md +67 -0
- package/obj/template/.claude/skills/spec/SKILL.md +69 -0
- package/obj/template/.claude/skills/spec/template.md +274 -0
- package/obj/template/.claude/skills/spec-diagram-review/SKILL.md +81 -0
- package/obj/template/.claude/skills/spec-lint/SKILL.md +55 -0
- package/obj/template/.claude/skills/spec-lint/lint.sh +218 -0
- package/obj/template/.claude/skills/spec-render/SKILL.md +45 -0
- package/obj/template/.claude/skills/spec-render/render.sh +109 -0
- package/obj/template/.claude/skills/spec-traceability-review/SKILL.md +72 -0
- package/obj/template/.claude/skills/swarm-dispatch/SKILL.md +212 -0
- package/obj/template/.claude/skills/swarm-dispatch/swarm_merge.sh +154 -0
- package/obj/template/.claude/skills/swarm-plan/SKILL.md +90 -0
- package/obj/template/.claude/skills/swarm-plan/validate.sh +181 -0
- package/obj/template/.claude/skills/tdd/SKILL.md +100 -0
- package/obj/template/.claude/skills/technical-tutorials/SKILL.md +569 -0
- package/obj/template/.claude/skills/technical-tutorials/references/audience-context-README.md +53 -0
- package/obj/template/.claude/skills/technical-tutorials/references/audience-context.md +246 -0
- package/obj/template/.claude/skills/technical-tutorials/references/audience-example.md +175 -0
- package/obj/template/.claude/skills/technical-tutorials/references/audience-template.md +152 -0
- package/obj/template/.claude/skills/triage/SKILL.md +55 -0
- package/obj/template/.claude/skills/verify/SKILL.md +74 -0
- package/obj/template/.mcp.json +24 -0
- package/obj/template/CLAUDE.md +327 -0
- package/obj/template/docs/init/seed.md +585 -0
- package/obj/template/manifest.json +214 -0
- package/package.json +48 -0
- package/src/.mcp.template.json +24 -0
- package/src/.npmrc.template +2 -0
- package/src/CLAUDE.template.md +327 -0
- package/src/agents/swarm-worker.template.md +51 -0
- package/src/cli/conflict.js +31 -0
- package/src/cli/doctor.js +152 -0
- package/src/cli/install.js +93 -0
- package/src/cli/io.js +27 -0
- package/src/cli/manifest.js +38 -0
- package/src/cli/mcp.js +54 -0
- package/src/cli/merge.js +107 -0
- package/src/cli/plantuml.js +121 -0
- package/src/cli/util.js +10 -0
- package/src/memory/_pending.template.md +15 -0
- package/src/memory/_resume.template.md +12 -0
- package/src/memory/conventions.template.md +26 -0
- package/src/memory/decisions.template.md +29 -0
- package/src/memory/landmarks.template.md +26 -0
- package/src/memory/landmines.template.md +27 -0
- package/src/memory/libraries.template.md +27 -0
- package/src/memory/pending-questions.template.md +28 -0
- package/src/project.template.json +221 -0
- package/src/seed.template.md +585 -0
- package/src/settings.template.json +110 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-automation-recommender
|
|
3
|
+
owner: baseline
|
|
4
|
+
description: Analyze a codebase and recommend Claude Code automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their Claude Code setup, mentions improving Claude Code workflows, asks how to first set up Claude Code for a project, or wants to know what Claude Code features they should use.
|
|
5
|
+
tools: Read, Glob, Grep, Bash
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Claude Automation Recommender
|
|
9
|
+
|
|
10
|
+
Analyze codebase patterns to recommend tailored Claude Code automations across all extensibility options.
|
|
11
|
+
|
|
12
|
+
**This skill is read-only.** It analyzes the codebase and outputs recommendations. It does NOT create or modify any files. Users implement the recommendations themselves or ask Claude separately to help build them.
|
|
13
|
+
|
|
14
|
+
## Working with the baseline
|
|
15
|
+
|
|
16
|
+
> **This skill is invoked from inside a project that ships the Claude Code Baseline (`docs/init/seed.md`).** Read that file before recommending — it lists what is already installed.
|
|
17
|
+
|
|
18
|
+
The baseline already provides the following. **Do not recommend any of these as additions** — they exist:
|
|
19
|
+
|
|
20
|
+
- **22 hooks**: 17 write/run-boundary guards — `setup_guard`, `destructive_cmd_guard`, `git_commit_guard`, `env_guard`, `spec_approval_guard`, `swarm_approval_guard`, `verify_pass_guard`, `track_guard`, `artifact_template_guard`, `plantuml_syntax_guard`, `spec_diagram_presence_guard`, `spec_design_calls_guard`, `swarm_boundary_guard`, `tdd_order_guard`, `process_lifecycle_guard`, `lint_runner`, `test_runner` — plus 4 lifecycle hooks: `memory_session_start`, `memory_stop`, `memory_pre_compact`, `harness_continuation` — plus 1 input-boundary hook: `consent_gate_grant`.
|
|
21
|
+
- **1 subagent**: `swarm-worker` — the only subagent in the baseline. It executes pre-decided recipes from main context inside isolated git worktrees during `/swarm-dispatch`. **No new subagents should be recommended.** All decision-making lives in skills running in main context, where conversational nuance and full file visibility are preserved.
|
|
22
|
+
- **36 skills**: artifact drafting (4), workflow phases (10), phase workers — `scenario`, `implement`, `verify`, `prose`, `design-ui` (5), spec helpers — `spec-lint`, `spec-render`, `spec-diagram-review`, `spec-traceability-review` (4), orchestration — `harness`, `swarm-plan`, `swarm-dispatch` (3), memory — `memory-flush` (1), audit — `audit-baseline` (1), alternate tracks — `chore` (1), plus seven shared globals: `claude-automation-recommender`, `code-structure`, `humanizer`, `documentation`, `technical-tutorials`, `copywriting`, `impeccable`. Several skills mandatorily invoke another skill: `scenario` and `implement` invoke `code-structure`; `design-ui` invokes `impeccable`; `prose` invokes `humanizer` (always) and `copywriting` (when persuasive). The `technical-tutorials` skill carries its audience-context reference doc inline at `.claude/skills/technical-tutorials/references/audience-context.md` (consolidated 2026-04-28 from the upstream `developer-audience-context` skill).
|
|
23
|
+
- **4 commands**: `/approve-spec`, `/approve-swarm`, `/grant-commit`, `/init-project`.
|
|
24
|
+
- **3 MCP servers**: `context7` (library docs), `plantuml` (diagram rendering), `playwright` (Microsoft-official browser automation; used by `design-ui` for cross-engine visual verification, by `integrate` for optional cross-engine smoke).
|
|
25
|
+
|
|
26
|
+
Your job is to surface **gaps** the baseline doesn't cover for *this project*. Examples of valuable recommendations:
|
|
27
|
+
|
|
28
|
+
- **Project-management MCPs** (Linear, Jira, GitHub Issues) when the codebase shows references to those systems.
|
|
29
|
+
- **Monitoring / observability MCPs** (Sentry, Datadog) when the project has an error-tracking integration.
|
|
30
|
+
- **Stack-specific lint/test commands** populating `project.json → test.cmd` and `lint.cmd` based on detected framework (Vitest vs Jest vs pytest, Ruff vs Black vs Prettier+ESLint, etc.).
|
|
31
|
+
- **Stack-specific destructive-command patterns** to extend `project.json → destructive.{hard_block,ask}_patterns` (e.g., `terraform destroy`, `kubectl delete`, `rails db:drop`).
|
|
32
|
+
- **TDD glob conventions** matching the project's actual test file layout (`*_test.go`, `*.test.tsx`, `tests/test_*.py`).
|
|
33
|
+
- **New skills** for repeated project workflows the baseline phases don't cover (e.g., `release-notes` for a project with monthly cuts, or stack-specific skills like `react-patterns` that the `swarm-worker` template can preload via the `{{SKILLS}}` token).
|
|
34
|
+
|
|
35
|
+
## Output format for `/init-project` consumption
|
|
36
|
+
|
|
37
|
+
When invoked from `/init-project`, structure your output as a JSON block (in addition to the human-readable narrative) that the orchestrator can parse and apply:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"stack": {
|
|
42
|
+
"language": "typescript",
|
|
43
|
+
"framework": "next.js",
|
|
44
|
+
"test_runner": "vitest",
|
|
45
|
+
"test_cmd": "vitest run --reporter=basic",
|
|
46
|
+
"linter": "biome",
|
|
47
|
+
"lint_cmd": "biome check --apply"
|
|
48
|
+
},
|
|
49
|
+
"project_json": {
|
|
50
|
+
"tdd": {
|
|
51
|
+
"source_globs": ["src/**", "app/**"],
|
|
52
|
+
"test_globs": ["**/*.test.{ts,tsx}"]
|
|
53
|
+
},
|
|
54
|
+
"destructive": {
|
|
55
|
+
"ask_patterns_extend": ["\\bvercel\\s+remove\\b", "\\bsupabase\\s+db\\s+reset\\b"]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"additions": {
|
|
59
|
+
"mcp_servers": [
|
|
60
|
+
{"name": "linear", "command": "npx -y @linear/mcp", "why": "issues referenced in 23 commits"}
|
|
61
|
+
],
|
|
62
|
+
"skills": [],
|
|
63
|
+
"hooks": [],
|
|
64
|
+
"swarm_worker_skills": []
|
|
65
|
+
},
|
|
66
|
+
"gaps": [
|
|
67
|
+
"No CI configuration detected; the baseline assumes the user runs tests locally"
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
When invoked outside `/init-project` (ad-hoc), the human-readable narrative alone is fine — skip the JSON.
|
|
73
|
+
|
|
74
|
+
### `swarm-worker` template — stack skills the worker should preload
|
|
75
|
+
|
|
76
|
+
The baseline ships exactly one subagent: `swarm-worker`. It is template-rendered. `/init-project` reads `src/agents/swarm-worker.template.md` and substitutes four tokens. The base body always preloads `scenario` and `implement`; this section is about **adding stack-specific skills** that the worker should also have loaded so its `Skill(implement)` invocation lands in a context primed for the stack.
|
|
77
|
+
|
|
78
|
+
Recommend stack skills in `additions.swarm_worker_skills` — a flat list of skill names (no `from_template` indirection, no per-variant explosion). `/init-project` re-renders the worker with `SKILLS = ["scenario", "implement"] + swarm_worker_skills`.
|
|
79
|
+
|
|
80
|
+
Schema for the recommendation:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
"swarm_worker_skills": ["react-patterns", "react-testing-library", "accessibility"]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Rules:
|
|
87
|
+
|
|
88
|
+
- **Every skill listed must exist on disk** *or* appear earlier in `additions.skills[]` so it's installed before the worker re-render runs. `/init-project` enforces this; emit it correctly and the render lands cleanly.
|
|
89
|
+
- **Stack skills only.** Generic discipline (`code-structure`, `humanizer`) is already invoked by the worker's two mandatory skills (`scenario` → `code-structure`; `implement` → `code-structure` + `context7`). Don't duplicate.
|
|
90
|
+
- **Don't recommend new subagent types.** The worker's job is execution, not judgment; specialization happens via skills loaded into its context, not via parallel agent personas. New decision-making roles belong in skills, which run in main context where context richness matters.
|
|
91
|
+
|
|
92
|
+
## Output Guidelines
|
|
93
|
+
|
|
94
|
+
- **Recommend 1-2 of each type**: Don't overwhelm - surface the top 1-2 most valuable automations per category
|
|
95
|
+
- **If user asks for a specific type**: Focus only on that type and provide more options (3-5 recommendations)
|
|
96
|
+
- **Go beyond the reference lists**: The reference files contain common patterns, but use web search to find recommendations specific to the codebase's tools, frameworks, and libraries
|
|
97
|
+
- **Tell users they can ask for more**: End by noting they can request more recommendations for any specific category
|
|
98
|
+
|
|
99
|
+
## Automation Types Overview
|
|
100
|
+
|
|
101
|
+
| Type | Best For |
|
|
102
|
+
|------|----------|
|
|
103
|
+
| **Hooks** | Automatic actions on tool events (format on save, lint, block edits) |
|
|
104
|
+
| **Subagents** | Specialized reviewers/analyzers that run in parallel |
|
|
105
|
+
| **Skills** | Packaged expertise, workflows, and repeatable tasks (invoked by Claude or user via `/skill-name`) |
|
|
106
|
+
| **Plugins** | Collections of skills that can be installed |
|
|
107
|
+
| **MCP Servers** | External tool integrations (databases, APIs, browsers, docs) |
|
|
108
|
+
|
|
109
|
+
## Workflow
|
|
110
|
+
|
|
111
|
+
### Phase 1: Codebase Analysis
|
|
112
|
+
|
|
113
|
+
Gather project context:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Detect project type and tools
|
|
117
|
+
ls -la package.json pyproject.toml Cargo.toml go.mod pom.xml 2>/dev/null
|
|
118
|
+
cat package.json 2>/dev/null | head -50
|
|
119
|
+
|
|
120
|
+
# Check dependencies for MCP server recommendations
|
|
121
|
+
cat package.json 2>/dev/null | grep -E '"(react|vue|angular|next|express|fastapi|django|prisma|supabase|stripe)"'
|
|
122
|
+
|
|
123
|
+
# Check for existing Claude Code config
|
|
124
|
+
ls -la .claude/ CLAUDE.md 2>/dev/null
|
|
125
|
+
|
|
126
|
+
# Analyze project structure
|
|
127
|
+
ls -la src/ app/ lib/ tests/ components/ pages/ api/ 2>/dev/null
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Key Indicators to Capture:**
|
|
131
|
+
|
|
132
|
+
| Category | What to Look For | Informs Recommendations For |
|
|
133
|
+
|----------|------------------|----------------------------|
|
|
134
|
+
| Language/Framework | package.json, pyproject.toml, import patterns | Hooks, MCP servers |
|
|
135
|
+
| Frontend stack | React, Vue, Angular, Next.js | Playwright MCP, frontend skills |
|
|
136
|
+
| Backend stack | Express, FastAPI, Django | API documentation tools |
|
|
137
|
+
| Database | Prisma, Supabase, raw SQL | Database MCP servers |
|
|
138
|
+
| External APIs | Stripe, OpenAI, AWS SDKs | context7 MCP for docs |
|
|
139
|
+
| Testing | Jest, pytest, Playwright configs | Testing hooks, subagents |
|
|
140
|
+
| CI/CD | GitHub Actions, CircleCI | GitHub MCP server |
|
|
141
|
+
| Issue tracking | Linear, Jira references | Issue tracker MCP |
|
|
142
|
+
| Docs patterns | OpenAPI, JSDoc, docstrings | Documentation skills |
|
|
143
|
+
|
|
144
|
+
### Phase 2: Generate Recommendations
|
|
145
|
+
|
|
146
|
+
Based on analysis, generate recommendations across all categories:
|
|
147
|
+
|
|
148
|
+
#### A. MCP Server Recommendations
|
|
149
|
+
|
|
150
|
+
See [references/mcp-servers.md](references/mcp-servers.md) for detailed patterns.
|
|
151
|
+
|
|
152
|
+
| Codebase Signal | Recommended MCP Server |
|
|
153
|
+
|-----------------|------------------------|
|
|
154
|
+
| Uses popular libraries (React, Express, etc.) | **context7** - Live documentation lookup |
|
|
155
|
+
| Frontend with UI testing needs | **Playwright** - Browser automation/testing |
|
|
156
|
+
| Uses Supabase | **Supabase MCP** - Direct database operations |
|
|
157
|
+
| PostgreSQL/MySQL database | **Database MCP** - Query and schema tools |
|
|
158
|
+
| GitHub repository | **GitHub MCP** - Issues, PRs, actions |
|
|
159
|
+
| Uses Linear for issues | **Linear MCP** - Issue management |
|
|
160
|
+
| AWS infrastructure | **AWS MCP** - Cloud resource management |
|
|
161
|
+
| Slack workspace | **Slack MCP** - Team notifications |
|
|
162
|
+
| Memory/context persistence | **Memory MCP** - Cross-session memory |
|
|
163
|
+
| Sentry error tracking | **Sentry MCP** - Error investigation |
|
|
164
|
+
| Docker containers | **Docker MCP** - Container management |
|
|
165
|
+
|
|
166
|
+
#### B. Skills Recommendations
|
|
167
|
+
|
|
168
|
+
See [references/skills-reference.md](references/skills-reference.md) for details.
|
|
169
|
+
|
|
170
|
+
Create skills in `.claude/skills/<name>/SKILL.md`. Some are also available via plugins:
|
|
171
|
+
|
|
172
|
+
| Codebase Signal | Skill | Plugin |
|
|
173
|
+
|-----------------|-------|--------|
|
|
174
|
+
| Building plugins | skill-development | plugin-dev |
|
|
175
|
+
| Git commits | commit | commit-commands |
|
|
176
|
+
| React/Vue/Angular | frontend-design | frontend-design |
|
|
177
|
+
| Automation rules | writing-rules | hookify |
|
|
178
|
+
| Feature planning | feature-dev | feature-dev |
|
|
179
|
+
|
|
180
|
+
**Custom skills to create** (with templates, scripts, examples):
|
|
181
|
+
|
|
182
|
+
| Codebase Signal | Skill to Create | Invocation |
|
|
183
|
+
|-----------------|-----------------|------------|
|
|
184
|
+
| API routes | **api-doc** (with OpenAPI template) | Both |
|
|
185
|
+
| Database project | **create-migration** (with validation script) | User-only |
|
|
186
|
+
| Test suite | **gen-test** (with example tests) | User-only |
|
|
187
|
+
| Component library | **new-component** (with templates) | User-only |
|
|
188
|
+
| PR workflow | **pr-check** (with checklist) | User-only |
|
|
189
|
+
| Releases | **release-notes** (with git context) | User-only |
|
|
190
|
+
| Code style | **project-conventions** | Claude-only |
|
|
191
|
+
| Onboarding | **setup-dev** (with prereq script) | User-only |
|
|
192
|
+
|
|
193
|
+
#### C. Hooks Recommendations
|
|
194
|
+
|
|
195
|
+
See [references/hooks-patterns.md](references/hooks-patterns.md) for configurations.
|
|
196
|
+
|
|
197
|
+
| Codebase Signal | Recommended Hook |
|
|
198
|
+
|-----------------|------------------|
|
|
199
|
+
| Prettier configured | PostToolUse: auto-format on edit |
|
|
200
|
+
| ESLint/Ruff configured | PostToolUse: auto-lint on edit |
|
|
201
|
+
| TypeScript project | PostToolUse: type-check on edit |
|
|
202
|
+
| Tests directory exists | PostToolUse: run related tests |
|
|
203
|
+
| `.env` files present | PreToolUse: block `.env` edits |
|
|
204
|
+
| Lock files present | PreToolUse: block lock file edits |
|
|
205
|
+
| Security-sensitive code | PreToolUse: require confirmation |
|
|
206
|
+
|
|
207
|
+
#### D. Subagent Recommendations
|
|
208
|
+
|
|
209
|
+
**Do not recommend new subagent types in this baseline.** The architecture commits to: decisions live in main context (where conversation history, screenshots, and offhand user feedback are preserved); subagents only execute pre-decided recipes (currently only `swarm-worker` for parallel code execution). Anything you'd previously have made a `code-reviewer` / `security-reviewer` / `api-documenter` subagent should be a **skill** invoked from main context — find or recommend a skill, not an agent.
|
|
210
|
+
|
|
211
|
+
If the project has a strong stack signal that warrants additional skills the `swarm-worker` should preload, recommend them via `additions.swarm_worker_skills` (described under "`swarm-worker` template — stack skills the worker should preload").
|
|
212
|
+
|
|
213
|
+
#### E. Plugin Recommendations
|
|
214
|
+
|
|
215
|
+
See [references/plugins-reference.md](references/plugins-reference.md) for available plugins.
|
|
216
|
+
|
|
217
|
+
| Codebase Signal | Recommended Plugin |
|
|
218
|
+
|-----------------|-------------------|
|
|
219
|
+
| General productivity | **anthropic-agent-skills** - Core skills bundle |
|
|
220
|
+
| Document workflows | Install docx, xlsx, pdf skills |
|
|
221
|
+
| Frontend development | **frontend-design** plugin |
|
|
222
|
+
| Building AI tools | **mcp-builder** for MCP development |
|
|
223
|
+
|
|
224
|
+
### Phase 3: Output Recommendations Report
|
|
225
|
+
|
|
226
|
+
Format recommendations clearly. **Only include 1-2 recommendations per category** - the most valuable ones for this specific codebase. Skip categories that aren't relevant.
|
|
227
|
+
|
|
228
|
+
```markdown
|
|
229
|
+
## Claude Code Automation Recommendations
|
|
230
|
+
|
|
231
|
+
I've analyzed your codebase and identified the top automations for each category. Here are my top 1-2 recommendations per type:
|
|
232
|
+
|
|
233
|
+
### Codebase Profile
|
|
234
|
+
- **Type**: [detected language/runtime]
|
|
235
|
+
- **Framework**: [detected framework]
|
|
236
|
+
- **Key Libraries**: [relevant libraries detected]
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### 🔌 MCP Servers
|
|
241
|
+
|
|
242
|
+
#### context7
|
|
243
|
+
**Why**: [specific reason based on detected libraries]
|
|
244
|
+
**Install**: `claude mcp add context7`
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
### 🎯 Skills
|
|
249
|
+
|
|
250
|
+
#### [skill name]
|
|
251
|
+
**Why**: [specific reason]
|
|
252
|
+
**Create**: `.claude/skills/[name]/SKILL.md`
|
|
253
|
+
**Invocation**: User-only / Both / Claude-only
|
|
254
|
+
**Also available in**: [plugin-name] plugin (if applicable)
|
|
255
|
+
```yaml
|
|
256
|
+
---
|
|
257
|
+
name: [skill-name]
|
|
258
|
+
description: [what it does]
|
|
259
|
+
disable-model-invocation: true # for user-only
|
|
260
|
+
---
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
### ⚡ Hooks
|
|
266
|
+
|
|
267
|
+
#### [hook name]
|
|
268
|
+
**Why**: [specific reason based on detected config]
|
|
269
|
+
**Where**: `.claude/settings.json`
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### 🤖 Swarm-worker stack skills
|
|
274
|
+
|
|
275
|
+
#### [skill name to preload]
|
|
276
|
+
**Why**: [specific reason — usually a strong stack signal that justifies preloading the skill into the swarm-worker's context]
|
|
277
|
+
**Where**: `additions.swarm_worker_skills` in the JSON output
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
**Want more?** Ask for additional recommendations for any specific category (e.g., "show me more MCP server options" or "what other hooks would help?").
|
|
282
|
+
|
|
283
|
+
**Want help implementing any of these?** Just ask and I can help you set up any of the recommendations above.
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Decision Framework
|
|
287
|
+
|
|
288
|
+
### When to Recommend MCP Servers
|
|
289
|
+
- External service integration needed (databases, APIs)
|
|
290
|
+
- Documentation lookup for libraries/SDKs
|
|
291
|
+
- Browser automation or testing
|
|
292
|
+
- Team tool integration (GitHub, Linear, Slack)
|
|
293
|
+
- Cloud infrastructure management
|
|
294
|
+
|
|
295
|
+
### When to Recommend Skills
|
|
296
|
+
|
|
297
|
+
- Document generation (docx, xlsx, pptx, pdf — also in plugins)
|
|
298
|
+
- Frequently repeated prompts or workflows
|
|
299
|
+
- Project-specific tasks with arguments
|
|
300
|
+
- Applying templates or scripts to tasks (skills can bundle supporting files)
|
|
301
|
+
- Quick actions invoked with `/skill-name`
|
|
302
|
+
- Workflows that should run in isolation (`context: fork`)
|
|
303
|
+
|
|
304
|
+
**Invocation control:**
|
|
305
|
+
- `disable-model-invocation: true` — User-only (for side effects: deploy, commit, send)
|
|
306
|
+
- `user-invocable: false` — Claude-only (for background knowledge)
|
|
307
|
+
- Default (omit both) — Both can invoke
|
|
308
|
+
|
|
309
|
+
### When to Recommend Hooks
|
|
310
|
+
- Repetitive post-edit actions (formatting, linting)
|
|
311
|
+
- Protection rules (block sensitive file edits)
|
|
312
|
+
- Validation checks (tests, type checks)
|
|
313
|
+
|
|
314
|
+
### When to Recommend Subagents
|
|
315
|
+
**Don't.** The baseline ships exactly one subagent (`swarm-worker`) for parallel code execution; "specialized expertise" is a skill-shaped problem in this architecture, not an agent-shaped one. Recommend the skill instead.
|
|
316
|
+
|
|
317
|
+
### When to Recommend Plugins
|
|
318
|
+
- Need multiple related skills
|
|
319
|
+
- Want pre-packaged automation bundles
|
|
320
|
+
- Team-wide standardization
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Configuration Tips
|
|
325
|
+
|
|
326
|
+
### MCP Server Setup
|
|
327
|
+
|
|
328
|
+
**Team sharing**: Check `.mcp.json` into repo so entire team gets same MCP servers
|
|
329
|
+
|
|
330
|
+
**Debugging**: Use `--mcp-debug` flag to identify configuration issues
|
|
331
|
+
|
|
332
|
+
**Prerequisites to recommend:**
|
|
333
|
+
- GitHub CLI (`gh`) - enables native GitHub operations
|
|
334
|
+
- Puppeteer/Playwright CLI - for browser MCP servers
|
|
335
|
+
|
|
336
|
+
### Headless Mode (for CI/Automation)
|
|
337
|
+
|
|
338
|
+
Recommend headless Claude for automated pipelines:
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Pre-commit hook example
|
|
342
|
+
claude -p "fix lint errors in src/" --allowedTools Edit,Write
|
|
343
|
+
|
|
344
|
+
# CI pipeline with structured output
|
|
345
|
+
claude -p "<prompt>" --output-format stream-json | your_command
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Permissions for Hooks
|
|
349
|
+
|
|
350
|
+
Configure allowed tools in `.claude/settings.json`:
|
|
351
|
+
|
|
352
|
+
```json
|
|
353
|
+
{
|
|
354
|
+
"permissions": {
|
|
355
|
+
"allow": ["Edit", "Write", "Bash(npm test:*)", "Bash(git commit:*)"]
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
```
|
package/obj/template/.claude/skills/claude-automation-recommender/references/hooks-patterns.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Hooks Recommendations
|
|
2
|
+
|
|
3
|
+
Hooks automatically run commands in response to Claude Code events. They're ideal for enforcement and automation that should happen consistently.
|
|
4
|
+
|
|
5
|
+
**Note**: These are common patterns. Use web search to find hooks for tools/frameworks not listed here to recommend the best hooks for the user.
|
|
6
|
+
|
|
7
|
+
## Auto-Formatting Hooks
|
|
8
|
+
|
|
9
|
+
### Prettier (JavaScript/TypeScript)
|
|
10
|
+
| Detection | File Exists |
|
|
11
|
+
|-----------|-------------|
|
|
12
|
+
| `.prettierrc`, `.prettierrc.json`, `prettier.config.js` | ✓ |
|
|
13
|
+
|
|
14
|
+
**Recommend**: PostToolUse hook on Edit/Write to auto-format
|
|
15
|
+
**Value**: Code stays formatted without thinking about it
|
|
16
|
+
|
|
17
|
+
### ESLint (JavaScript/TypeScript)
|
|
18
|
+
| Detection | File Exists |
|
|
19
|
+
|-----------|-------------|
|
|
20
|
+
| `.eslintrc`, `.eslintrc.json`, `eslint.config.js` | ✓ |
|
|
21
|
+
|
|
22
|
+
**Recommend**: PostToolUse hook on Edit/Write to auto-fix
|
|
23
|
+
**Value**: Lint errors fixed automatically
|
|
24
|
+
|
|
25
|
+
### Black/isort (Python)
|
|
26
|
+
| Detection | File Exists |
|
|
27
|
+
|-----------|-------------|
|
|
28
|
+
| `pyproject.toml` with black/isort, `.black`, `setup.cfg` | ✓ |
|
|
29
|
+
|
|
30
|
+
**Recommend**: PostToolUse hook to format Python files
|
|
31
|
+
**Value**: Consistent Python formatting
|
|
32
|
+
|
|
33
|
+
### Ruff (Python - Modern)
|
|
34
|
+
| Detection | File Exists |
|
|
35
|
+
|-----------|-------------|
|
|
36
|
+
| `ruff.toml`, `pyproject.toml` with `[tool.ruff]` | ✓ |
|
|
37
|
+
|
|
38
|
+
**Recommend**: PostToolUse hook for lint + format
|
|
39
|
+
**Value**: Fast, comprehensive Python linting
|
|
40
|
+
|
|
41
|
+
### gofmt (Go)
|
|
42
|
+
| Detection | File Exists |
|
|
43
|
+
|-----------|-------------|
|
|
44
|
+
| `go.mod` | ✓ |
|
|
45
|
+
|
|
46
|
+
**Recommend**: PostToolUse hook to run gofmt
|
|
47
|
+
**Value**: Standard Go formatting
|
|
48
|
+
|
|
49
|
+
### rustfmt (Rust)
|
|
50
|
+
| Detection | File Exists |
|
|
51
|
+
|-----------|-------------|
|
|
52
|
+
| `Cargo.toml` | ✓ |
|
|
53
|
+
|
|
54
|
+
**Recommend**: PostToolUse hook to run rustfmt
|
|
55
|
+
**Value**: Standard Rust formatting
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Type Checking Hooks
|
|
60
|
+
|
|
61
|
+
### TypeScript
|
|
62
|
+
| Detection | File Exists |
|
|
63
|
+
|-----------|-------------|
|
|
64
|
+
| `tsconfig.json` | ✓ |
|
|
65
|
+
|
|
66
|
+
**Recommend**: PostToolUse hook to run tsc --noEmit
|
|
67
|
+
**Value**: Catch type errors immediately
|
|
68
|
+
|
|
69
|
+
### mypy/pyright (Python)
|
|
70
|
+
| Detection | File Exists |
|
|
71
|
+
|-----------|-------------|
|
|
72
|
+
| `mypy.ini`, `pyrightconfig.json`, pyproject.toml with mypy | ✓ |
|
|
73
|
+
|
|
74
|
+
**Recommend**: PostToolUse hook for type checking
|
|
75
|
+
**Value**: Catch type errors in Python
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Protection Hooks
|
|
80
|
+
|
|
81
|
+
### Block Sensitive File Edits
|
|
82
|
+
| Detection | Presence Of |
|
|
83
|
+
|-----------|-------------|
|
|
84
|
+
| `.env`, `.env.local`, `.env.production` | Environment files |
|
|
85
|
+
| `credentials.json`, `secrets.yaml` | Secret files |
|
|
86
|
+
| `.git/` directory | Git internals |
|
|
87
|
+
|
|
88
|
+
**Recommend**: PreToolUse hook that blocks Edit/Write to these paths
|
|
89
|
+
**Value**: Prevent accidental secret exposure or git corruption
|
|
90
|
+
|
|
91
|
+
### Block Lock File Edits
|
|
92
|
+
| Detection | Presence Of |
|
|
93
|
+
|-----------|-------------|
|
|
94
|
+
| `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml` | JS lock files |
|
|
95
|
+
| `Cargo.lock`, `poetry.lock`, `Pipfile.lock` | Other lock files |
|
|
96
|
+
|
|
97
|
+
**Recommend**: PreToolUse hook that blocks direct edits
|
|
98
|
+
**Value**: Lock files should only change via package manager
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Test Runner Hooks
|
|
103
|
+
|
|
104
|
+
### Jest (JavaScript/TypeScript)
|
|
105
|
+
| Detection | Presence Of |
|
|
106
|
+
|-----------|-------------|
|
|
107
|
+
| `jest.config.js`, `jest` in package.json | Jest configured |
|
|
108
|
+
| `__tests__/`, `*.test.ts`, `*.spec.ts` | Test files exist |
|
|
109
|
+
|
|
110
|
+
**Recommend**: PostToolUse hook to run related tests after edit
|
|
111
|
+
**Value**: Immediate test feedback on changes
|
|
112
|
+
|
|
113
|
+
### pytest (Python)
|
|
114
|
+
| Detection | Presence Of |
|
|
115
|
+
|-----------|-------------|
|
|
116
|
+
| `pytest.ini`, `pyproject.toml` with pytest | pytest configured |
|
|
117
|
+
| `tests/`, `test_*.py` | Test files exist |
|
|
118
|
+
|
|
119
|
+
**Recommend**: PostToolUse hook to run pytest on changed files
|
|
120
|
+
**Value**: Immediate test feedback
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Quick Reference: Detection → Recommendation
|
|
125
|
+
|
|
126
|
+
| If You See | Recommend This Hook |
|
|
127
|
+
|------------|-------------------|
|
|
128
|
+
| Prettier config | Auto-format on Edit/Write |
|
|
129
|
+
| ESLint config | Auto-lint on Edit/Write |
|
|
130
|
+
| Ruff/Black config | Auto-format Python |
|
|
131
|
+
| tsconfig.json | Type-check on Edit |
|
|
132
|
+
| Test directory | Run related tests on Edit |
|
|
133
|
+
| .env files | Block .env edits |
|
|
134
|
+
| Lock files | Block lock file edits |
|
|
135
|
+
| Go project | gofmt on Edit |
|
|
136
|
+
| Rust project | rustfmt on Edit |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Notification Hooks
|
|
141
|
+
|
|
142
|
+
Notification hooks run when Claude Code sends notifications. Use matchers to filter by notification type.
|
|
143
|
+
|
|
144
|
+
### Permission Alerts
|
|
145
|
+
| Matcher | Use Case |
|
|
146
|
+
|---------|----------|
|
|
147
|
+
| `permission_prompt` | Alert when Claude requests permissions |
|
|
148
|
+
|
|
149
|
+
**Recommend**: Play sound, send desktop notification, or log permission requests
|
|
150
|
+
**Value**: Never miss permission prompts when multitasking
|
|
151
|
+
|
|
152
|
+
### Idle Notifications
|
|
153
|
+
| Matcher | Use Case |
|
|
154
|
+
|---------|----------|
|
|
155
|
+
| `idle_prompt` | Alert when Claude is waiting for input (60+ seconds idle) |
|
|
156
|
+
|
|
157
|
+
**Recommend**: Play sound or send notification when Claude needs attention
|
|
158
|
+
**Value**: Know when Claude is ready for your input
|
|
159
|
+
|
|
160
|
+
### Example Configuration
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"hooks": {
|
|
165
|
+
"Notification": [
|
|
166
|
+
{
|
|
167
|
+
"matcher": "permission_prompt",
|
|
168
|
+
"hooks": [
|
|
169
|
+
{
|
|
170
|
+
"type": "command",
|
|
171
|
+
"command": "afplay /System/Library/Sounds/Ping.aiff"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"matcher": "idle_prompt",
|
|
177
|
+
"hooks": [
|
|
178
|
+
{
|
|
179
|
+
"type": "command",
|
|
180
|
+
"command": "osascript -e 'display notification \"Claude is waiting\" with title \"Claude Code\"'"
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Available Matchers
|
|
190
|
+
|
|
191
|
+
| Matcher | Triggers When |
|
|
192
|
+
|---------|---------------|
|
|
193
|
+
| `permission_prompt` | Claude needs permission for a tool |
|
|
194
|
+
| `idle_prompt` | Claude waiting for input (60+ seconds) |
|
|
195
|
+
| `auth_success` | Authentication succeeds |
|
|
196
|
+
| `elicitation_dialog` | MCP tool needs input |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Quick Reference: Detection → Recommendation
|
|
201
|
+
|
|
202
|
+
| If You See | Recommend This Hook |
|
|
203
|
+
|------------|-------------------|
|
|
204
|
+
| Prettier config | Auto-format on Edit/Write |
|
|
205
|
+
| ESLint config | Auto-lint on Edit/Write |
|
|
206
|
+
| Ruff/Black config | Auto-format Python |
|
|
207
|
+
| tsconfig.json | Type-check on Edit |
|
|
208
|
+
| Test directory | Run related tests on Edit |
|
|
209
|
+
| .env files | Block .env edits |
|
|
210
|
+
| Lock files | Block lock file edits |
|
|
211
|
+
| Go project | gofmt on Edit |
|
|
212
|
+
| Rust project | rustfmt on Edit |
|
|
213
|
+
| Multitasking workflow | Notification hooks for alerts |
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Hook Placement
|
|
218
|
+
|
|
219
|
+
Hooks go in `.claude/settings.json`:
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
.claude/
|
|
223
|
+
└── settings.json ← Hook configurations here
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Recommend creating the `.claude/` directory if it doesn't exist.
|