Skip to content

Commit 47b223e

Browse files
committed
feat: enhance claude module with agents and other feature
1 parent 217aeef commit 47b223e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+12475
-167
lines changed

home/hosts/norion/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
## Common Imports ##
1313
(map (lib.fs.relativeTo flakeRoot) [
1414
"modules/home/common/chromium.nix"
15-
"modules/home/common/claude.nix"
15+
"modules/home/common/claude"
1616
"modules/home/common/gaming"
1717
"modules/home/common/vscode.nix"
1818
"modules/home/common/xdg.nix"

home/hosts/rune/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
## Additional Imports ##
1313
(map (lib.fs.relativeTo flakeRoot) [
1414
"modules/home/common/chromium.nix"
15-
"modules/home/common/claude.nix"
15+
"modules/home/common/claude"
1616
"modules/home/common/gaming"
1717
"modules/home/common/vscode.nix"
1818
"modules/home/common/xdg.nix"

modules/home/common/claude.nix

Lines changed: 0 additions & 165 deletions
This file was deleted.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Global Claude Instructions
2+
3+
## Agent Dispatch Matrix
4+
5+
Automatically invoke specialized agents based on task patterns and keywords.
6+
7+
### Core Development Agents
8+
9+
| Keywords | Agent | Use When |
10+
| -------------------------------------------------------------------------------- | --------------------------- | ----------------------------------- |
11+
| error, bug, crash, exception, stack trace, debug, not working | `debugger` | Something is broken, need diagnosis |
12+
| code review, PR, pull request, review code, check code, feedback | `code-reviewer` | Standard code review |
13+
| thorough review, find problems, aggressive review, validate claims, code quality | `adversarial-code-reviewer` | Need rigorous validation of work |
14+
| refactor, clean up, simplify, reduce complexity, technical debt, code smell | `refactoring-specialist` | Restructuring existing code |
15+
| write tests, test coverage, unit test, integration test, E2E test, automation | `test-automator` | Creating or improving tests |
16+
17+
### Language-Specific Agents
18+
19+
| Keywords | Agent | Use When |
20+
| ----------------------------------------------------------------- | ------------------- | ---------------------------- |
21+
| JavaScript, JS, ES2023, Node.js, vanilla JS, async | `javascript-pro` | JavaScript development |
22+
| TypeScript, TS, type safety, tsconfig, types | `typescript-pro` | TypeScript development |
23+
| Python, Python 3.11, data science, pandas, numpy | `python-pro` | Python development |
24+
| Rust, systems programming, memory safety, WebAssembly, Cargo | `rust-engineer` | Rust development |
25+
| React, React 18, hooks, component, Redux, Next.js, JSX | `react-specialist` | React development |
26+
| Svelte, SvelteKit, runes, $state, $derived, component, reactivity | `svelte-pro` | Svelte/SvelteKit development |
27+
| SQL, database, query, PostgreSQL, MySQL, optimization, index | `sql-pro` | Database/SQL work |
28+
| GraphQL, federation, subscriptions, Apollo, schema | `graphql-architect` | GraphQL API design |
29+
30+
### Frontend & UI Agents
31+
32+
| Keywords | Agent | Use When |
33+
| ------------------------------------------------------------------ | ---------------------- | --------------------- |
34+
| frontend, React, Vue, UI, component, CSS, responsive, styling | `frontend-developer` | Frontend development |
35+
| UI design, visual design, interface, interaction, design system | `ui-designer` | UI/visual design work |
36+
| UX research, user research, usability, user testing, user insights | `ux-researcher` | Research/UX analysis |
37+
| accessibility, WCAG, a11y, screen reader, inclusive design, ADA | `accessibility-tester` | Accessibility testing |
38+
39+
### Backend & Infrastructure
40+
41+
| Keywords | Agent | Use When |
42+
| ------------------------------------------------------------------- | --------------------- | ---------------------------- |
43+
| backend, server, API, endpoint, microservices, architecture | `backend-developer` | Server-side development |
44+
| fullstack, full-stack, end-to-end feature, database to UI | `fullstack-developer` | Complete feature development |
45+
| deploy, deployment, CI/CD, pipeline, release automation | `deployment-engineer` | Deployment & release |
46+
| DevOps, infrastructure, operations, container, Docker, Kubernetes | `devops-engineer` | Infrastructure & operations |
47+
| network, networking, cloud architecture, security, zero-trust | `network-engineer` | Network & infrastructure |
48+
| WebSocket, real-time, realtime, Socket.io, messaging, bidirectional | `websocket-engineer` | Real-time communication |
49+
50+
### Security & Compliance
51+
52+
| Keywords | Agent | Use When |
53+
| -------------------------------------------------------- | -------------------- | -------------------------- |
54+
| security, vulnerability, CVE, auth, injection, XSS, CSRF | `security-engineer` | Security concerns |
55+
| compliance, GDPR, HIPAA, PCI DSS, audit, regulation | `compliance-auditor` | Compliance/regulatory work |
56+
57+
### Performance & Monitoring
58+
59+
| Keywords | Agent | Use When |
60+
| ------------------------------------------------------------- | ---------------------- | ------------------------ |
61+
| slow, performance, optimize, latency, bottleneck, profiling | `performance-engineer` | Performance optimization |
62+
| monitoring, metrics, anomaly detection, observability, alerts | `performance-monitor` | System monitoring |
63+
64+
### Documentation & Writing
65+
66+
| Keywords | Agent | Use When |
67+
| --------------------------------------------------------- | ------------------------ | ------------------------ |
68+
| document, documentation, README, API docs, write docs | `documentation-engineer` | Technical documentation |
69+
| API documentation, OpenAPI, Swagger, write API docs | `api-documenter` | API documentation |
70+
| writing, technical writing, user guide, tutorial, content | `technical-writer` | Technical writing |
71+
| SEO, search, ranking, structured data, optimization | `seo-specialist` | SEO/content optimization |
72+
73+
### API & Architecture
74+
75+
| Keywords | Agent | Use When |
76+
| ---------------------------------------------------------- | -------------- | --------------- |
77+
| API design, REST, GraphQL, endpoints, schema, architecture | `api-designer` | API design work |
78+
79+
### Build & Tools
80+
81+
| Keywords | Agent | Use When |
82+
| ------------------------------------------------------------------- | ---------------------- | -------------------- |
83+
| build, compilation, build system, Webpack, Vite, build optimization | `build-engineer` | Build system issues |
84+
| CLI, command-line, terminal, tool development, arguments | `cli-developer` | CLI tool development |
85+
| git, branching, merge, version control, rebase, workflow | `git-workflow-manager` | Git/version control |
86+
87+
### Prompt & LLM
88+
89+
| Keywords | Agent | Use When |
90+
| --------------------------------------------------------------- | ----------------- | ----------------- |
91+
| prompt, LLM, optimize prompt, token, few-shot, chain-of-thought | `prompt-engineer` | LLM prompt design |
92+
93+
### System & Resilience
94+
95+
| Keywords | Agent | Use When |
96+
| ------------------------------------------------------------ | ----------------------- | ----------------------- |
97+
| chaos, resilience, failure injection, load test, stress test | `chaos-engineer` | Resilience testing |
98+
| workflow, orchestration, process automation, state machine | `workflow-orchestrator` | Workflow design |
99+
| error handling, failure recovery, error coordination | `error-coordinator` | Error handling strategy |
100+
| error analysis, root cause, error pattern, logs, correlation | `error-detective` | Error pattern analysis |
101+
102+
### Multi-Agent Coordination
103+
104+
| Keywords | Agent | Use When |
105+
| ------------------------------------------------------------------- | ------------------------- | ------------------------- |
106+
| multi-agent, agent orchestration, agent coordination, team assembly | `agent-organizer` | Multi-agent system design |
107+
| multi-agent coordination, parallel execution, dependencies | `multi-agent-coordinator` | Multi-agent orchestration |
108+
| knowledge synthesis, patterns, insights, collective learning | `knowledge-synthesizer` | Knowledge extraction |
109+
| context management, state, information sharing | `context-manager` | Context/state management |
110+
111+
## Dispatch Rules
112+
113+
1. **Keyword Matching**: Scan user request for trigger keywords
114+
2. **Invoke Agent**: When a clear match is found, invoke with: `Task` tool with `subagent_type`
115+
3. **Announce**: State which agent is being used and why
116+
4. **Override**: User explicit request always supersedes automatic dispatch
117+
5. **Ambiguity**: If multiple agents match, ask user which fits best OR use most specific match
118+
6. **Compound Tasks**: For multi-phase work, invoke sequential agents as needed
119+
120+
## Examples
121+
122+
User: "There's a bug in my React component"
123+
→ Triggers: "bug", "React" → Invoke: `debugger` + `react-specialist`
124+
125+
User: "Make sure this code is production ready"
126+
→ Triggers: "production ready", validation → Invoke: `adversarial-code-reviewer`
127+
128+
User: "Design a REST API for user management"
129+
→ Triggers: "design", "REST API" → Invoke: `api-designer`
130+
131+
User: "Slow database queries need optimization"
132+
→ Triggers: "slow", "database" → Invoke: `performance-engineer` + `sql-pro`

0 commit comments

Comments
 (0)