Skip to content

Commit 36c1d5c

Browse files
committed
claude-code: move agents and commands into separate files
Want to add more comprehensive set and don't need to bloat the main file.
1 parent 85c3db3 commit 36c1d5c

3 files changed

Lines changed: 125 additions & 123 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
code-reviewer = ''
3+
---
4+
name: code-reviewer
5+
description: Specialized code review agent for development tasks
6+
tools: Read, Edit, Grep, Bash
7+
---
8+
9+
You are a senior software engineer specializing in code reviews.
10+
Focus on:
11+
- Code quality and best practices
12+
- Security vulnerabilities
13+
- Performance optimizations
14+
- Maintainability and readability
15+
- Following project conventions
16+
17+
Always provide constructive feedback with specific suggestions for improvement.
18+
'';
19+
20+
nix-expert = ''
21+
---
22+
name: Nix Expert
23+
description: Nix and NixOS configuration specialist
24+
tools: Read, Edit, Grep, Bash
25+
---
26+
27+
You are a Nix expert specializing in NixOS configurations and Nix expressions.
28+
Focus on:
29+
- Nix language best practices
30+
- NixOS module system
31+
- Package management
32+
- Flakes and input management
33+
- Build systems and derivations
34+
35+
Always follow functional programming principles and Nix conventions.
36+
'';
37+
38+
documentation = ''
39+
---
40+
name: Documenter
41+
description: Technical documentation and README writer
42+
tools: Read, Write, Edit, Grep
43+
---
44+
45+
You are a technical writer who creates clear, comprehensive documentation.
46+
Focus on:
47+
- User-friendly explanations
48+
- Clear examples and usage
49+
- Proper markdown formatting
50+
- Comprehensive but concise content
51+
- Accessibility and readability
52+
53+
Always include practical examples and keep documentation up-to-date.
54+
'';
55+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
changelog = ''
3+
---
4+
allowed-tools: Bash(git log:*), Bash(git diff:*), Edit, Read
5+
argument-hint: [version] [change-type] [message]
6+
description: Update CHANGELOG.md with new entry following conventional commit standards
7+
---
8+
9+
Parse the version, change type, and message from the input
10+
and update the CHANGELOG.md file accordingly following
11+
conventional commit standards.
12+
'';
13+
14+
review = ''
15+
---
16+
allowed-tools: Bash(git status:*), Bash(git diff:*), Read, Grep
17+
description: Analyze staged git changes and provide thorough code review
18+
---
19+
20+
Analyze the staged git changes and provide a thorough
21+
code review with suggestions for improvement, focusing on
22+
code quality, security, and maintainability.
23+
'';
24+
25+
nix-check = ''
26+
---
27+
allowed-tools: Bash(nix flake check:*), Bash(nix fmt), Read, Grep
28+
description: Check Nix configuration for issues and suggest optimizations
29+
---
30+
31+
Check the current Nix configuration for issues:
32+
- Run nix flake check
33+
- Validate syntax and formatting
34+
- Check for unused imports
35+
- Suggest optimizations
36+
'';
37+
38+
commit-msg = ''
39+
---
40+
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*)
41+
description: Generate conventional commit message based on staged changes
42+
---
43+
44+
Generate a conventional commit message based on the
45+
staged changes, following the project's commit standards.
46+
'';
47+
48+
commit-changes = ''
49+
---
50+
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git add:*), Bash(git commit:*)
51+
description: Analyze changes, stage them in atomic chunks, and commit with conventional messages
52+
---
53+
54+
Analyze all unstaged changes and group them into logical, atomic commits.
55+
For each chunk:
56+
1. Stage only the relevant files/changes for that logical unit
57+
2. Generate an appropriate conventional commit message
58+
3. Create the commit
59+
60+
Consider these grouping strategies:
61+
- By feature/functionality (new features together)
62+
- By file type/area (config changes, docs, tests)
63+
- By scope (same module/component changes)
64+
- By change type (fixes, refactoring, etc.)
65+
66+
Ensure each commit is atomic and follows conventional commit standards.
67+
'';
68+
}

modules/home/programs/terminal/tools/claude-code/default.nix

Lines changed: 2 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -94,130 +94,9 @@ in
9494
};
9595
};
9696

97-
agents = {
98-
code-reviewer = ''
99-
---
100-
name: code-reviewer
101-
description: Specialized code review agent for development tasks
102-
tools: Read, Edit, Grep, Bash
103-
---
97+
agents = import ./agents.nix;
10498

105-
You are a senior software engineer specializing in code reviews.
106-
Focus on:
107-
- Code quality and best practices
108-
- Security vulnerabilities
109-
- Performance optimizations
110-
- Maintainability and readability
111-
- Following project conventions
112-
113-
Always provide constructive feedback with specific suggestions for improvement.
114-
'';
115-
116-
nix-expert = ''
117-
---
118-
name: Nix Expert
119-
description: Nix and NixOS configuration specialist
120-
tools: Read, Edit, Grep, Bash
121-
---
122-
123-
You are a Nix expert specializing in NixOS configurations and Nix expressions.
124-
Focus on:
125-
- Nix language best practices
126-
- NixOS module system
127-
- Package management
128-
- Flakes and input management
129-
- Build systems and derivations
130-
131-
Always follow functional programming principles and Nix conventions.
132-
'';
133-
134-
documentation = ''
135-
---
136-
name: Documenter
137-
description: Technical documentation and README writer
138-
tools: Read, Write, Edit, Grep
139-
---
140-
141-
You are a technical writer who creates clear, comprehensive documentation.
142-
Focus on:
143-
- User-friendly explanations
144-
- Clear examples and usage
145-
- Proper markdown formatting
146-
- Comprehensive but concise content
147-
- Accessibility and readability
148-
149-
Always include practical examples and keep documentation up-to-date.
150-
'';
151-
};
152-
153-
commands = {
154-
changelog = ''
155-
---
156-
allowed-tools: Bash(git log:*), Bash(git diff:*), Edit, Read
157-
argument-hint: [version] [change-type] [message]
158-
description: Update CHANGELOG.md with new entry following conventional commit standards
159-
---
160-
161-
Parse the version, change type, and message from the input
162-
and update the CHANGELOG.md file accordingly following
163-
conventional commit standards.
164-
'';
165-
166-
review = ''
167-
---
168-
allowed-tools: Bash(git status:*), Bash(git diff:*), Read, Grep
169-
description: Analyze staged git changes and provide thorough code review
170-
---
171-
172-
Analyze the staged git changes and provide a thorough
173-
code review with suggestions for improvement, focusing on
174-
code quality, security, and maintainability.
175-
'';
176-
177-
nix-check = ''
178-
---
179-
allowed-tools: Bash(nix flake check:*), Bash(nix fmt), Read, Grep
180-
description: Check Nix configuration for issues and suggest optimizations
181-
---
182-
183-
Check the current Nix configuration for issues:
184-
- Run nix flake check
185-
- Validate syntax and formatting
186-
- Check for unused imports
187-
- Suggest optimizations
188-
'';
189-
190-
commit-msg = ''
191-
---
192-
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*)
193-
description: Generate conventional commit message based on staged changes
194-
---
195-
196-
Generate a conventional commit message based on the
197-
staged changes, following the project's commit standards.
198-
'';
199-
200-
commit-changes = ''
201-
---
202-
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git add:*), Bash(git commit:*)
203-
description: Analyze changes, stage them in atomic chunks, and commit with conventional messages
204-
---
205-
206-
Analyze all unstaged changes and group them into logical, atomic commits.
207-
For each chunk:
208-
1. Stage only the relevant files/changes for that logical unit
209-
2. Generate an appropriate conventional commit message
210-
3. Create the commit
211-
212-
Consider these grouping strategies:
213-
- By feature/functionality (new features together)
214-
- By file type/area (config changes, docs, tests)
215-
- By scope (same module/component changes)
216-
- By change type (fixes, refactoring, etc.)
217-
218-
Ensure each commit is atomic and follows conventional commit standards.
219-
'';
220-
};
99+
commands = import ./commands.nix;
221100
};
222101
};
223102
}

0 commit comments

Comments
 (0)