claude-dev-env 1.0.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 +21 -0
- package/README.md +219 -0
- package/agents/agent-writer.md +157 -0
- package/agents/clasp-deployment-orchestrator.md +609 -0
- package/agents/clean-coder.md +295 -0
- package/agents/code-quality-agent.md +40 -0
- package/agents/code-standards-agent.md +93 -0
- package/agents/config-centralizer.md +686 -0
- package/agents/config-extraction-agent.md +225 -0
- package/agents/doc-orchestrator.md +47 -0
- package/agents/docs-agent.md +112 -0
- package/agents/docx-agent.md +211 -0
- package/agents/git-commit-crafter.md +100 -0
- package/agents/magic-value-eliminator-agent.md +72 -0
- package/agents/mandatory-agent-workflow-agent.md +88 -0
- package/agents/parallel-workflow-coordinator.md +779 -0
- package/agents/pdf-agent.md +302 -0
- package/agents/plan-executor.md +226 -0
- package/agents/pr-description-writer.md +87 -0
- package/agents/project-context-loader.md +238 -0
- package/agents/project-docs-analyzer.md +54 -0
- package/agents/project-structure-organizer-agent.md +72 -0
- package/agents/readability-review-agent.md +76 -0
- package/agents/refactoring-specialist.md +69 -0
- package/agents/right-sized-engineer.md +129 -0
- package/agents/session-continuity-manager.md +53 -0
- package/agents/skill-to-agent-converter.md +371 -0
- package/agents/skill-writer-agent.md +470 -0
- package/agents/stub-detector-agent.md +140 -0
- package/agents/tdd-test-writer.md +62 -0
- package/agents/test-data-builder.md +68 -0
- package/agents/tooling-builder.md +78 -0
- package/agents/user-docs-writer.md +67 -0
- package/agents/validation-expert.md +71 -0
- package/agents/workflow-visual-documenter.md +82 -0
- package/agents/xlsx-agent.md +169 -0
- package/bin/install.mjs +256 -0
- package/commands/commit.md +28 -0
- package/commands/docupdate.md +322 -0
- package/commands/implement.md +102 -0
- package/commands/initialize.md +91 -0
- package/commands/plan.md +63 -0
- package/commands/pr-comments.md +47 -0
- package/commands/readability-review.md +20 -0
- package/commands/review-plan.md +7 -0
- package/commands/right-size.md +15 -0
- package/commands/stubcheck.md +89 -0
- package/commands/sum.md +30 -0
- package/docs/CODE_RULES.md +186 -0
- package/docs/DJANGO_PATTERNS.md +80 -0
- package/docs/REACT_PATTERNS.md +185 -0
- package/docs/TEST_QUALITY.md +104 -0
- package/hooks/advisory/migration-safety-advisor.py +49 -0
- package/hooks/advisory/refactor-guard.py +205 -0
- package/hooks/blocking/block-main-commit.py +168 -0
- package/hooks/blocking/code-rules-enforcer.py +549 -0
- package/hooks/blocking/destructive-command-blocker.py +107 -0
- package/hooks/blocking/docker-settings-guard.py +44 -0
- package/hooks/blocking/hedging-language-blocker.py +130 -0
- package/hooks/blocking/parallel-task-blocker.py +69 -0
- package/hooks/blocking/pr-description-enforcer.py +87 -0
- package/hooks/blocking/pyautogui-scroll-blocker.py +74 -0
- package/hooks/blocking/sensitive-file-protector.py +70 -0
- package/hooks/blocking/tdd-enforcer.py +62 -0
- package/hooks/blocking/test-preflight-check.py +343 -0
- package/hooks/blocking/write-existing-file-blocker.py +63 -0
- package/hooks/git-hooks/post-commit.py +103 -0
- package/hooks/github-action/test_workflow.py +33 -0
- package/hooks/hooks.json +246 -0
- package/hooks/lifecycle/config-change-guard.py +84 -0
- package/hooks/lifecycle/session-end-cleanup.py +59 -0
- package/hooks/notification/attention-needed-notify.py +63 -0
- package/hooks/notification/claude-notification-handler.py +59 -0
- package/hooks/notification/notification_utils.py +206 -0
- package/hooks/rewrite-plugin-paths.py +116 -0
- package/hooks/session/bulk-edit-reminder.py +30 -0
- package/hooks/session/code-rules-reminder.py +97 -0
- package/hooks/session/compact-context-reinject.py +39 -0
- package/hooks/session/hook-structure-context.py +140 -0
- package/hooks/session/plugin-data-dir-cleanup.py +39 -0
- package/hooks/validation/code-style-validator.py +145 -0
- package/hooks/validation/e2e-test-validator.py +142 -0
- package/hooks/validation/hook-format-validator.py +66 -0
- package/hooks/validation/mypy_validator.py +180 -0
- package/hooks/validators/README.md +125 -0
- package/hooks/validators/VALIDATION_REPORT.md +287 -0
- package/hooks/validators/__init__.py +19 -0
- package/hooks/validators/abbreviation_checks.py +82 -0
- package/hooks/validators/code_quality_checks.py +133 -0
- package/hooks/validators/comment_checks.py +188 -0
- package/hooks/validators/file_structure_checks.py +182 -0
- package/hooks/validators/git_checks.py +107 -0
- package/hooks/validators/health_check.py +214 -0
- package/hooks/validators/magic_value_checks.py +81 -0
- package/hooks/validators/mypy_integration.py +52 -0
- package/hooks/validators/output_formatter.py +266 -0
- package/hooks/validators/pr_reference_checks.py +72 -0
- package/hooks/validators/python_antipattern_checks.py +110 -0
- package/hooks/validators/python_style_checks.py +364 -0
- package/hooks/validators/react_checks.py +90 -0
- package/hooks/validators/ruff_integration.py +80 -0
- package/hooks/validators/run_all_validators.py +772 -0
- package/hooks/validators/security_checks.py +135 -0
- package/hooks/validators/test_abbreviation_checks.py +76 -0
- package/hooks/validators/test_bad.tsx +7 -0
- package/hooks/validators/test_code_quality_checks.py +129 -0
- package/hooks/validators/test_file_structure_checks.py +307 -0
- package/hooks/validators/test_files/01_basic_component.tsx +10 -0
- package/hooks/validators/test_files/02_component_without_react.tsx +10 -0
- package/hooks/validators/test_files/03_pure_component.tsx +10 -0
- package/hooks/validators/test_files/04_pure_component_import.tsx +10 -0
- package/hooks/validators/test_files/05_typescript_generics.tsx +14 -0
- package/hooks/validators/test_files/06_typescript_two_generics.tsx +18 -0
- package/hooks/validators/test_files/07_multiline_declaration.tsx +11 -0
- package/hooks/validators/test_files/08_error_boundary_valid.tsx +14 -0
- package/hooks/validators/test_files/09_error_boundary_with_other_class.tsx +20 -0
- package/hooks/validators/test_files/10_inheritance_chain.tsx +16 -0
- package/hooks/validators/test_files/11_ts_file.ts +10 -0
- package/hooks/validators/test_files/12_non_react_class.tsx +14 -0
- package/hooks/validators/test_files/13_functional_component.tsx +8 -0
- package/hooks/validators/test_files/14_indented_class.tsx +13 -0
- package/hooks/validators/test_files/15_getDerivedStateFromError.tsx +14 -0
- package/hooks/validators/test_files/16_mixed_components.tsx +20 -0
- package/hooks/validators/test_files/EXECUTIVE_SUMMARY.md +175 -0
- package/hooks/validators/test_files/TEST_RESULTS_TABLE.txt +60 -0
- package/hooks/validators/test_files/VALIDATION_REPORT.md +201 -0
- package/hooks/validators/test_files/async_views.py +23 -0
- package/hooks/validators/test_files/async_with_imports.py +14 -0
- package/hooks/validators/test_files/bad_inline_imports.py +37 -0
- package/hooks/validators/test_files/management/commands/cmd_01_no_debug_check.py +10 -0
- package/hooks/validators/test_files/management/commands/cmd_02_proper_debug_check.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_03_debug_check_with_return.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_04_imported_DEBUG.py +14 -0
- package/hooks/validators/test_files/management/commands/cmd_05_debug_check_in_helper.py +16 -0
- package/hooks/validators/test_files/management/commands/cmd_06_debug_check_late.py +22 -0
- package/hooks/validators/test_files/management/commands/cmd_07_positive_debug_check.py +15 -0
- package/hooks/validators/test_files/management/commands/cmd_08_debug_with_and.py +14 -0
- package/hooks/validators/test_files/not_management_command.py +10 -0
- package/hooks/validators/test_files/skip_decorators/test_01_simple_skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_02_pytest_skipif.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_03_unittest_skipIf.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_04_skip_with_parens.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_05_xfail.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_06_custom_skip.py +11 -0
- package/hooks/validators/test_files/skip_decorators/test_07_capital_Skip.py +8 -0
- package/hooks/validators/test_files/skip_decorators/test_08_skipUnless.py +7 -0
- package/hooks/validators/test_files/skip_decorators/test_09_pytest_mark_skip_simple.py +7 -0
- package/hooks/validators/test_files/test_async_functions.py +45 -0
- package/hooks/validators/test_files/test_purecomponent/PureComponentExample.tsx +7 -0
- package/hooks/validators/test_files/test_purecomponent/ReactPureComponentExample.tsx +7 -0
- package/hooks/validators/test_git_checks.py +295 -0
- package/hooks/validators/test_good.tsx +5 -0
- package/hooks/validators/test_health_check.py +57 -0
- package/hooks/validators/test_magic_value_checks.py +63 -0
- package/hooks/validators/test_mypy_integration.py +27 -0
- package/hooks/validators/test_output_formatter.py +150 -0
- package/hooks/validators/test_pr_reference_checks.py +41 -0
- package/hooks/validators/test_python_antipattern_checks.py +113 -0
- package/hooks/validators/test_python_style_checks.py +439 -0
- package/hooks/validators/test_react_checks.py +213 -0
- package/hooks/validators/test_results.txt +25 -0
- package/hooks/validators/test_ruff_integration.py +27 -0
- package/hooks/validators/test_run_all_validators.py +228 -0
- package/hooks/validators/test_run_all_validators_integration.py +48 -0
- package/hooks/validators/test_safety_checks.py +243 -0
- package/hooks/validators/test_security_checks.py +105 -0
- package/hooks/validators/test_test_safety_checks.py +321 -0
- package/hooks/validators/test_todo_checks.py +39 -0
- package/hooks/validators/test_type_safety_checks.py +85 -0
- package/hooks/validators/test_useless_test_checks.py +55 -0
- package/hooks/validators/test_validator_base.py +26 -0
- package/hooks/validators/test_verify_paths.py +34 -0
- package/hooks/validators/todo_checks.py +59 -0
- package/hooks/validators/type_safety_checks.py +101 -0
- package/hooks/validators/useless_test_checks.py +92 -0
- package/hooks/validators/validator_base.py +19 -0
- package/hooks/validators/verify_paths.py +57 -0
- package/hooks/workflow/auto-formatter.py +114 -0
- package/hooks/workflow/investigation-tracker-reset.py +46 -0
- package/package.json +30 -0
- package/rules/agent-spawn-protocol.md +47 -0
- package/rules/cleanup-temp-files.md +27 -0
- package/rules/code-reviews.md +11 -0
- package/rules/code-standards.md +43 -0
- package/rules/conservative-action.md +20 -0
- package/rules/context7.md +12 -0
- package/rules/explore-thoroughly.md +27 -0
- package/rules/git-workflow.md +42 -0
- package/rules/parallel-tools.md +23 -0
- package/rules/research-mode.md +23 -0
- package/rules/right-sized-engineering.md +28 -0
- package/rules/tdd.md +7 -0
- package/rules/testing.md +12 -0
- package/skills/agent-prompt/SKILL.md +102 -0
- package/skills/anthropic-plan/SKILL.md +107 -0
- package/skills/everything-search/SKILL.md +144 -0
- package/skills/ingest/SKILL.md +40 -0
- package/skills/npm-creator/SKILL.md +183 -0
- package/skills/pr-review-responder/EXAMPLES.md +590 -0
- package/skills/pr-review-responder/PRINCIPLES.md +539 -0
- package/skills/pr-review-responder/README.md +209 -0
- package/skills/pr-review-responder/SKILL.md +202 -0
- package/skills/pr-review-responder/TESTING.md +407 -0
- package/skills/pr-review-responder/scripts/respond_to_reviews.py +376 -0
- package/skills/pr-review-responder/update_skill.py +297 -0
- package/skills/prompt-generator/REFERENCE.md +150 -0
- package/skills/prompt-generator/SKILL.md +154 -0
- package/skills/readability-review/SKILL.md +127 -0
- package/skills/recall/SKILL.md +27 -0
- package/skills/remember/SKILL.md +63 -0
- package/skills/rule-audit/SKILL.md +307 -0
- package/skills/rule-creator/SKILL.md +150 -0
- package/skills/skill-writer/REFERENCE.md +246 -0
- package/skills/skill-writer/SKILL.md +270 -0
- package/skills/tdd-team/SKILL.md +128 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jon Lombardi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# claude-code-config
|
|
2
|
+
|
|
3
|
+
Consistent development standards for Claude Code across every repo. Install once, get TDD enforcement, code quality hooks, specialized agents, and battle-tested rules everywhere.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx claude-dev-env
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
To uninstall:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx claude-dev-env --uninstall
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The installer copies rules, docs, agents, commands, and skills to `~/.claude/` and merges hooks into `~/.claude/settings.json`. It auto-detects your Python 3 command for hook scripts. Running it again updates existing files in place.
|
|
18
|
+
|
|
19
|
+
## What This Solves
|
|
20
|
+
|
|
21
|
+
Without shared config, every repo needs its own `.claude/rules/`, `.claude/hooks/`, `.claude/agents/`, etc. That means:
|
|
22
|
+
|
|
23
|
+
- Duplicated config across 5+ repos
|
|
24
|
+
- Drift when you update standards in one place but forget others
|
|
25
|
+
- New repos start with zero guardrails
|
|
26
|
+
|
|
27
|
+
This package centralizes all general-purpose Claude Code config. Project-specific rules still live in each repo's `.claude/` directory and merge with these.
|
|
28
|
+
|
|
29
|
+
## What's Included
|
|
30
|
+
|
|
31
|
+
### Rules (13)
|
|
32
|
+
|
|
33
|
+
Behavioral rules loaded into every session. These shape how Claude approaches work before any code is written.
|
|
34
|
+
|
|
35
|
+
| Rule | What it does |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| `tdd` | Red-green-refactor is non-negotiable |
|
|
38
|
+
| `code-standards` | References CODE_RULES.md for all code generation |
|
|
39
|
+
| `conservative-action` | Research first, act only when explicitly asked |
|
|
40
|
+
| `right-sized-engineering` | Simple > clever, functions > classes, concrete > abstract |
|
|
41
|
+
| `explore-thoroughly` | Read before proposing, map patterns before committing |
|
|
42
|
+
| `research-mode` | Anti-hallucination: cite sources, say "I don't know", use direct quotes |
|
|
43
|
+
| `parallel-tools` | Independent tool calls run simultaneously |
|
|
44
|
+
| `agent-spawn-protocol` | Context sufficiency check before delegating to agents |
|
|
45
|
+
| `git-workflow` | Draft PRs, one commit per review stage, stacked PR patterns |
|
|
46
|
+
| `code-reviews` | Systematic PR review response protocol |
|
|
47
|
+
| `testing` | Complete mocks, reference TEST_QUALITY.md |
|
|
48
|
+
| `context7` | Fetch current docs via Context7 MCP instead of relying on training data |
|
|
49
|
+
| `cleanup-temp-files` | Remove scratch files after tasks complete |
|
|
50
|
+
|
|
51
|
+
### Docs (4)
|
|
52
|
+
|
|
53
|
+
Reference documents that rules and agents point to for detailed standards.
|
|
54
|
+
|
|
55
|
+
| Document | Coverage |
|
|
56
|
+
|----------|----------|
|
|
57
|
+
| `CODE_RULES.md` | Hook-enforced rules, naming conventions, config patterns, type hints, readability rubric |
|
|
58
|
+
| `TEST_QUALITY.md` | Test writing standards, mock completeness, assertion patterns |
|
|
59
|
+
| `REACT_PATTERNS.md` | Component architecture, hooks, state management conventions |
|
|
60
|
+
| `DJANGO_PATTERNS.md` | Model patterns, view architecture, ORM best practices |
|
|
61
|
+
|
|
62
|
+
### Agents (34)
|
|
63
|
+
|
|
64
|
+
Specialized agent prompts for common development tasks. Claude Code automatically discovers these and makes them available for delegation.
|
|
65
|
+
|
|
66
|
+
**Code Quality:** clean-coder, code-quality-agent, code-standards-agent, readability-review-agent, refactoring-specialist, right-sized-engineer
|
|
67
|
+
|
|
68
|
+
**Testing:** tdd-test-writer, test-data-builder, validation-expert
|
|
69
|
+
|
|
70
|
+
**Planning:** plan-executor, parallel-workflow-coordinator, mandatory-agent-workflow-agent, stub-detector-agent
|
|
71
|
+
|
|
72
|
+
**Documentation:** docs-agent, doc-orchestrator, user-docs-writer, project-docs-analyzer
|
|
73
|
+
|
|
74
|
+
**Configuration:** config-extraction-agent, config-centralizer, magic-value-eliminator-agent, project-structure-organizer-agent
|
|
75
|
+
|
|
76
|
+
**Tooling:** agent-writer, skill-writer-agent, skill-to-agent-converter, tooling-builder
|
|
77
|
+
|
|
78
|
+
**Git:** git-commit-crafter, pr-description-writer, session-continuity-manager
|
|
79
|
+
|
|
80
|
+
**File Formats:** docx-agent, pdf-agent, xlsx-agent
|
|
81
|
+
|
|
82
|
+
**Other:** clasp-deployment-orchestrator, workflow-visual-documenter, project-context-loader
|
|
83
|
+
|
|
84
|
+
### Commands (11)
|
|
85
|
+
|
|
86
|
+
Slash commands for common workflows.
|
|
87
|
+
|
|
88
|
+
| Command | Purpose |
|
|
89
|
+
|---------|---------|
|
|
90
|
+
| `/commit` | Structured git commit with conventional format |
|
|
91
|
+
| `/plan` | Create implementation plans with config search |
|
|
92
|
+
| `/implement` | Execute plans with TDD workflow |
|
|
93
|
+
| `/review-plan` | Review and critique implementation plans |
|
|
94
|
+
| `/readability-review` | 8-dimension readability scoring |
|
|
95
|
+
| `/right-size` | Check for over/under-engineering |
|
|
96
|
+
| `/stubcheck` | Find stubs, TODOs, and NotImplementedError |
|
|
97
|
+
| `/pr-comments` | Process PR review comments systematically |
|
|
98
|
+
| `/docupdate` | Update documentation after changes |
|
|
99
|
+
| `/initialize` | Session initialization with protocol review |
|
|
100
|
+
| `/sum` | Summarize current work context |
|
|
101
|
+
|
|
102
|
+
### Skills (14)
|
|
103
|
+
|
|
104
|
+
| Skill | Purpose |
|
|
105
|
+
|-------|---------|
|
|
106
|
+
| `prompt-generator` | Write, refine, and structure prompts for Claude with emotion-informed framing |
|
|
107
|
+
| `agent-prompt` | Craft structured agent prompts and spawn background agents after approval |
|
|
108
|
+
| `tdd-team` | Orchestrate a 4-agent TDD team (planner, tester, implementer, validator) |
|
|
109
|
+
| `pr-review-responder` | Systematic PR review response: fetch comments, checklist, fix, reply, commit |
|
|
110
|
+
| `anthropic-plan` | Readonly codebase exploration before code changes, produces a plan file |
|
|
111
|
+
| `readability-review` | 8-dimension readability scoring (160 pts) with automatic fixes |
|
|
112
|
+
| `ingest` | Digest codebase into LLM-friendly text files via gitingest |
|
|
113
|
+
| `npm-creator` | Scaffold npm installer packages for Claude Code plugin repos |
|
|
114
|
+
| `rule-audit` | Full enforcement audit of rules, hooks, and docs across user and project layers |
|
|
115
|
+
| `rule-creator` | Create and harden Claude Code rules with positive framing and rationale |
|
|
116
|
+
| `skill-writer` | Guide for creating well-structured Agent Skills |
|
|
117
|
+
| `everything-search` | Fast Windows file search via Everything (voidtools) es.exe |
|
|
118
|
+
| `recall` | Retrieve prior session context and decisions from Obsidian vault |
|
|
119
|
+
| `remember` | Save decisions, gotchas, and architectural choices to Obsidian vault |
|
|
120
|
+
|
|
121
|
+
### Hooks (31 registered, 70+ files)
|
|
122
|
+
|
|
123
|
+
Automated enforcement that runs on Claude Code events. The installer detects your Python 3 command and rewrites hook paths to absolute `~/.claude/hooks/` paths in `settings.json`.
|
|
124
|
+
|
|
125
|
+
#### PreToolUse (before tool execution)
|
|
126
|
+
|
|
127
|
+
| Matcher | Hook | What it does |
|
|
128
|
+
|---------|------|-------------|
|
|
129
|
+
| Write\|Edit | `write-existing-file-blocker` | Warns before overwriting files that should be edited |
|
|
130
|
+
| Write\|Edit | `sensitive-file-protector` | Blocks writes to .env, credentials, and sensitive files |
|
|
131
|
+
| Write\|Edit | `pyautogui-scroll-blocker` | Prevents pyautogui scroll direction bugs |
|
|
132
|
+
| Write\|Edit | `hook-format-validator` | Validates hook file format on write |
|
|
133
|
+
| Write\|Edit | `run_all_validators` | Runs the full validation suite (30+ checks) |
|
|
134
|
+
| Write\|Edit | `code-rules-enforcer` | Blocks CODE_RULES.md violations (comments, magic values, imports) |
|
|
135
|
+
| Write\|Edit | `tdd-enforcer` | Prompts TDD confirmation when writing production code |
|
|
136
|
+
| Write\|Edit | `code-style-validator` | Checks indentation and function spacing |
|
|
137
|
+
| Write\|Edit | `docker-settings-guard` | Blocks direct edits to Docker settings files |
|
|
138
|
+
| Edit | `refactor-guard` | Ensures refactoring happens only after green tests |
|
|
139
|
+
| Edit | `migration-safety-advisor` | Warns about risky database migration patterns |
|
|
140
|
+
| Bash | `destructive-command-blocker` | Blocks rm -rf, git reset --hard, and other destructive commands |
|
|
141
|
+
| Bash | `block-main-commit` | Blocks direct commits to main/master branch |
|
|
142
|
+
| Bash | `pr-description-enforcer` | Enforces PR description structure and style |
|
|
143
|
+
| Bash | `test-preflight-check` | Validates server health and database before test runs |
|
|
144
|
+
| Task\|Agent | `parallel-task-blocker` | Suggests team orchestration for parallel agent spawning |
|
|
145
|
+
| AskUserQuestion | `attention-needed-notify` | Desktop notification when Claude needs your input |
|
|
146
|
+
|
|
147
|
+
#### Other Events
|
|
148
|
+
|
|
149
|
+
| Event | Hook | What it does |
|
|
150
|
+
|-------|------|-------------|
|
|
151
|
+
| UserPromptSubmit | `hook-structure-context` | Injects hook directory context into session |
|
|
152
|
+
| UserPromptSubmit | `bulk-edit-reminder` | Suggests script-based approach for bulk updates |
|
|
153
|
+
| UserPromptSubmit | `code-rules-reminder` | Injects CODE_RULES.md reminder on code-related prompts |
|
|
154
|
+
| SessionStart (compact) | `compact-context-reinject` | Re-injects critical rules after context compaction |
|
|
155
|
+
| SessionStart | `plugin-data-dir-cleanup` | Cleans stale plugin data on session start |
|
|
156
|
+
| Stop | `attention-needed-notify` | Desktop notification when Claude stops |
|
|
157
|
+
| Stop | `hedging-language-blocker` | Blocks responses with hedging language (anti-hallucination) |
|
|
158
|
+
| SessionEnd | `session-end-cleanup` | Cleans temporary state on session end |
|
|
159
|
+
| ConfigChange | `config-change-guard` | Guards against accidental settings changes |
|
|
160
|
+
| PostToolUse (Write\|Edit) | `mypy_validator` | Runs mypy type checking after file writes |
|
|
161
|
+
| PostToolUse (Write\|Edit) | `e2e-test-validator` | Validates e2e test conventions after writes |
|
|
162
|
+
| PostToolUse (Write\|Edit) | `auto-formatter` | Auto-formats Python (ruff/black) and JS (prettier) on write |
|
|
163
|
+
| PostToolUse (Agent\|Task) | `investigation-tracker-reset` | Resets investigation tracker after delegation |
|
|
164
|
+
| Notification | `claude-notification-handler` | Routes Claude Code notifications to desktop |
|
|
165
|
+
|
|
166
|
+
#### Validators Module
|
|
167
|
+
|
|
168
|
+
The `hooks/validators/` directory contains 30+ individual check modules with a full test suite:
|
|
169
|
+
|
|
170
|
+
Abbreviations, code quality, comments, file structure, git conventions, magic values, mypy integration, PR references, Python antipatterns, Python style, React patterns, ruff integration, security, TODO tracking, type safety, useless test detection, and more.
|
|
171
|
+
|
|
172
|
+
## Also Available as a Plugin
|
|
173
|
+
|
|
174
|
+
If you prefer the Claude Code plugin system over npm:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
claude plugin install jl-cmd/claude-code-config
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Recommended Companion Plugins
|
|
181
|
+
|
|
182
|
+
These plugins provide additional skills and capabilities that complement this config:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
claude plugin install anthropics/claude-code-plugins # Official: frontend-design, code-review, playwright, hookify, skill-creator, claude-md-management, serena, pyright-lsp, typescript-lsp, claude-code-setup
|
|
186
|
+
claude plugin install anthropics/claude-code-workflows # Official: python-dev, ui-design, unit-testing, context-management, agent-teams, and more
|
|
187
|
+
claude plugin install jl-cmd/claude-journal # Session logging to Obsidian vault (provides /session-log)
|
|
188
|
+
claude plugin install jl-cmd/claude-deep-research # Deep multi-source research with citations
|
|
189
|
+
claude plugin install jl-cmd/claude-workflow # Workflow definitions with YAML schemas
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
GSD (project management) is available as an npm package:
|
|
193
|
+
```bash
|
|
194
|
+
npx get-shit-done-cc
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Customization
|
|
198
|
+
|
|
199
|
+
Installed rules merge with your project's `.claude/` config. To override a rule for a specific project, create a rule with the same filename in your project's `.claude/rules/` directory.
|
|
200
|
+
|
|
201
|
+
Installed hooks run alongside any hooks already in your `settings.json` or `settings.local.json`. The installer preserves existing hook entries.
|
|
202
|
+
|
|
203
|
+
## Agent Gate Installer
|
|
204
|
+
|
|
205
|
+
This repo also includes an npm installer for [agent-gate](https://github.com/jl-cmd/agent-gate), a prompt evaluation gate for Claude Code. See [`installer/README.md`](installer/README.md) for details.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
npx agent-gate-installer
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Requirements
|
|
212
|
+
|
|
213
|
+
- Node.js 18+ (for the installer)
|
|
214
|
+
- Python 3.8+ (for hooks)
|
|
215
|
+
- Claude Code CLI
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
MIT
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-writer
|
|
3
|
+
description: Use this agent when you need to create a new subagent for Claude Code. This agent guides you through designing, structuring, and writing effective subagents with proper frontmatter, system prompts, and best practices. Trigger when user asks to "create an agent", "write a new subagent", "design an agent", or "help me build an agent".
|
|
4
|
+
tools: Read,Write,Glob,AskUserQuestion
|
|
5
|
+
model: sonnet
|
|
6
|
+
color: blue
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Agent Writer - Subagent Creation Assistant
|
|
10
|
+
|
|
11
|
+
You are a specialized agent that helps create well-structured, effective subagents for Claude Code. Your role is to guide the user through the entire agent creation process, ensuring best practices and proper structure.
|
|
12
|
+
|
|
13
|
+
## Your Process
|
|
14
|
+
|
|
15
|
+
### Phase 1: Discovery & Design
|
|
16
|
+
|
|
17
|
+
Ask the user these key questions to understand their needs:
|
|
18
|
+
|
|
19
|
+
1. **Purpose & Scope**
|
|
20
|
+
- What specific problem or workflow will this agent handle?
|
|
21
|
+
- What makes this task worthy of a dedicated agent vs a skill or direct implementation?
|
|
22
|
+
- What is the expected trigger context? (e.g., "after code completion", "when user mentions X")
|
|
23
|
+
|
|
24
|
+
2. **Specialization Level**
|
|
25
|
+
- Is this a narrow, focused task (recommended) or broader capability?
|
|
26
|
+
- What expertise domain does this require? (e.g., testing, refactoring, documentation)
|
|
27
|
+
|
|
28
|
+
3. **Tool Requirements**
|
|
29
|
+
- Which tools does this agent need? (Read, Write, Edit, Bash, Grep, Glob, Task, etc.)
|
|
30
|
+
- Should it have restricted access for safety? (e.g., read-only agents)
|
|
31
|
+
- Will it need to invoke other agents via Task tool?
|
|
32
|
+
|
|
33
|
+
4. **Invocation Strategy**
|
|
34
|
+
- Should this be PROACTIVE (auto-invoked when context matches)?
|
|
35
|
+
- Or explicit-only (user must request it)?
|
|
36
|
+
- What keywords/patterns should trigger it?
|
|
37
|
+
|
|
38
|
+
5. **Examples & Edge Cases**
|
|
39
|
+
- What are 2-3 concrete examples of when this agent should be used?
|
|
40
|
+
- What are scenarios where it should NOT be used?
|
|
41
|
+
|
|
42
|
+
### Phase 2: Generate Agent Structure
|
|
43
|
+
|
|
44
|
+
Based on discovery, create the agent file with:
|
|
45
|
+
|
|
46
|
+
**Frontmatter Requirements:**
|
|
47
|
+
```yaml
|
|
48
|
+
---
|
|
49
|
+
name: agent-name-in-kebab-case
|
|
50
|
+
description: Clear description of when to use this agent, including trigger keywords and scenarios. For proactive agents, include "Use PROACTIVELY" or "MUST be used when".
|
|
51
|
+
tools: comma,separated,tool,list (or omit for all tools)
|
|
52
|
+
model: sonnet (or opus/haiku/inherit)
|
|
53
|
+
---
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**System Prompt Structure:**
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
# [Agent Name] - [Brief Subtitle]
|
|
60
|
+
|
|
61
|
+
You are a specialized agent that [primary purpose]. Your role is to [detailed responsibility].
|
|
62
|
+
|
|
63
|
+
## Your Responsibilities
|
|
64
|
+
|
|
65
|
+
[Bulleted list of what this agent does]
|
|
66
|
+
|
|
67
|
+
## Your Process
|
|
68
|
+
|
|
69
|
+
[Step-by-step workflow the agent should follow]
|
|
70
|
+
|
|
71
|
+
## Critical Rules
|
|
72
|
+
|
|
73
|
+
[Mandatory constraints and requirements]
|
|
74
|
+
|
|
75
|
+
## When to Use This Agent
|
|
76
|
+
|
|
77
|
+
[Specific triggering scenarios with examples]
|
|
78
|
+
|
|
79
|
+
## When NOT to Use This Agent
|
|
80
|
+
|
|
81
|
+
[Anti-patterns and exclusions]
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
|
|
85
|
+
<example>
|
|
86
|
+
Context: [Scenario description]
|
|
87
|
+
user: "[Example user request]"
|
|
88
|
+
assistant: "[How this agent should respond]"
|
|
89
|
+
<commentary>
|
|
90
|
+
[Why this agent is appropriate here]
|
|
91
|
+
</commentary>
|
|
92
|
+
</example>
|
|
93
|
+
|
|
94
|
+
[2-3 more examples showing variety]
|
|
95
|
+
|
|
96
|
+
## Output Format
|
|
97
|
+
|
|
98
|
+
[Expected deliverables and communication style]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Phase 3: Validation & Refinement
|
|
102
|
+
|
|
103
|
+
Before finalizing, check:
|
|
104
|
+
|
|
105
|
+
1. **Single Responsibility**: Does it do ONE thing well?
|
|
106
|
+
2. **Clear Triggers**: Is it obvious when to invoke this agent?
|
|
107
|
+
3. **Tool Minimization**: Does it have only necessary tools?
|
|
108
|
+
4. **Actionable Instructions**: Can another AI follow these instructions?
|
|
109
|
+
5. **Example Coverage**: Do examples show both use and non-use cases?
|
|
110
|
+
|
|
111
|
+
### Phase 4: Placement Decision
|
|
112
|
+
|
|
113
|
+
Determine where to save the agent:
|
|
114
|
+
|
|
115
|
+
- **Project-specific**: `.claude/agents/` (version controlled, team-shared)
|
|
116
|
+
- **Personal/global**: `~/.claude/agents/` (user-specific, cross-project)
|
|
117
|
+
- **Plugin**: For distribution to others
|
|
118
|
+
|
|
119
|
+
Default to project-specific unless user specifies otherwise.
|
|
120
|
+
|
|
121
|
+
## Best Practices You Must Follow
|
|
122
|
+
|
|
123
|
+
1. **Focused Purpose**: "Design focused subagents with single responsibilities"
|
|
124
|
+
2. **Detailed Prompts**: "Write detailed prompts with specific instructions and constraints"
|
|
125
|
+
3. **Tool Restriction**: "Limit tool access to only necessary ones"
|
|
126
|
+
4. **Proactive Language**: Use "Use PROACTIVELY" for auto-invocation
|
|
127
|
+
5. **Action-Oriented Descriptions**: "Make descriptions specific and action-oriented"
|
|
128
|
+
6. **Multiple Examples**: Always include 2-3 diverse examples showing when to use
|
|
129
|
+
7. **Clear Boundaries**: Define both when to use AND when not to use
|
|
130
|
+
|
|
131
|
+
## Anti-Patterns to Avoid
|
|
132
|
+
|
|
133
|
+
- ❌ Vague descriptions like "helps with code"
|
|
134
|
+
- ❌ Agents that do multiple unrelated things
|
|
135
|
+
- ❌ Missing examples or edge cases
|
|
136
|
+
- ❌ Unclear tool requirements
|
|
137
|
+
- ❌ No guidance on when NOT to use
|
|
138
|
+
- ❌ Generic system prompts without specific instructions
|
|
139
|
+
|
|
140
|
+
## Your Communication Style
|
|
141
|
+
|
|
142
|
+
- Ask clarifying questions when requirements are unclear
|
|
143
|
+
- Propose concrete examples to validate understanding
|
|
144
|
+
- Suggest improvements to overly broad agent concepts
|
|
145
|
+
- Show the user the generated agent before saving
|
|
146
|
+
- Explain your design decisions
|
|
147
|
+
|
|
148
|
+
## Workflow Summary
|
|
149
|
+
|
|
150
|
+
1. **Ask discovery questions** (use AskUserQuestion for key decisions)
|
|
151
|
+
2. **Propose agent structure** based on answers
|
|
152
|
+
3. **Generate complete agent file** with frontmatter + system prompt
|
|
153
|
+
4. **Review with user** before saving
|
|
154
|
+
5. **Save to appropriate location**
|
|
155
|
+
6. **Provide usage guidance** (how to invoke, test scenarios)
|
|
156
|
+
|
|
157
|
+
Remember: A great agent is narrow, focused, and has crystal-clear triggering conditions. When in doubt, make it more specific, not more general.
|