@qoder-ai/qodercli 0.2.2 → 0.2.4-beta

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.
@@ -0,0 +1,327 @@
1
+ ---
2
+ name: agent-creator
3
+ description:
4
+ Guide for creating custom agents. Use when users want to create a new agent
5
+ that runs in an isolated context with custom system prompts and
6
+ specific tool access.
7
+ allowed-tools: Edit, Write
8
+ ---
9
+
10
+ # Creating Custom Agents for Qoder CLI
11
+
12
+ This skill guides you through creating custom agents. Agents are
13
+ specialized AI assistants that run in isolated contexts with custom system
14
+ prompts, specific tool access, and independent permissions.
15
+
16
+ ## When to Use Agents
17
+
18
+ Use agents when you need:
19
+
20
+ - **Context isolation** for long research or exploration tasks
21
+ - **Parallel execution** of multiple independent workstreams
22
+ - **Specialized expertise** with custom prompts for specific domains
23
+ - **Reusable configurations** across projects
24
+
25
+ **When NOT to use agents:**
26
+
27
+ - Simple, single-purpose tasks (use skills instead)
28
+ - Tasks requiring frequent back-and-forth with the user
29
+ - Quick, targeted changes
30
+
31
+ ## Agent Locations
32
+
33
+ | Location | Scope | Priority |
34
+ | -------------------------------- | ----------------- | -------- |
35
+ | `<project>/${QODER_CONFIG_DIR}/agents/` | Current project | Higher |
36
+ | `~/${QODER_CONFIG_DIR}/agents/` | All your projects | Lower |
37
+
38
+ **Project agents** (`${QODER_CONFIG_DIR}/agents/`): Ideal for codebase-specific
39
+ agents. Check into version control to share with your team.
40
+
41
+ **User agents** (`~/${QODER_CONFIG_DIR}/agents/`): Personal agents available across
42
+ all your projects.
43
+
44
+ ## Agent File Format
45
+
46
+ Each agent is a Markdown file with YAML frontmatter:
47
+
48
+ ```markdown
49
+ ---
50
+ name: agent-name
51
+ description: When to use this agent. Be specific!
52
+ ---
53
+
54
+ You are a [role]. When invoked:
55
+
56
+ 1. [First step]
57
+ 2. [Second step]
58
+ 3. [Output format]
59
+ ```
60
+
61
+ ### Required Fields
62
+
63
+ | Field | Description |
64
+ | ------------- | -------------------------------------------------------------------------- |
65
+ | `name` | Unique identifier (lowercase letters and hyphens only) |
66
+ | `description` | When to delegate to this agent (be specific). Including trigger scenarios. |
67
+
68
+ ## Writing Effective Descriptions
69
+
70
+ The description is **critical**. Include "use proactively" to encourage
71
+ automatic delegation - Qoder CLI uses it to decide when to delegate.
72
+
73
+ ```yaml
74
+ # Bad - Too vague
75
+ description: Helps with code
76
+
77
+ # Good - Specific and actionable
78
+ description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
79
+ ```
80
+
81
+ ### Optional Fields
82
+
83
+ | Field | Description |
84
+ | ---------------- | ----------------------------------------------------------------------------------- |
85
+ | `tools` | Tools the agent can use (string or array) |
86
+ | `disallowedTools`| Tools to explicitly deny (string or array) |
87
+ | `model` | Model to use: `inherit` (default), `sonnet`, `opus`, `haiku` |
88
+ | `color` | Display color: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan` |
89
+ | `displayName` | Human-friendly display name |
90
+ | `maxTurns` | Maximum conversation turns (positive integer) |
91
+ | `timeoutMins` | Timeout in minutes (positive integer) |
92
+ | `effort` | Thinking effort: `low`, `medium`, `high`, `max` |
93
+ | `skills` | Skills the agent can use (string or array) |
94
+
95
+ #### Tools
96
+
97
+ Specify which tools the agent has access to. This limits the agent's
98
+ capabilities for security and focus.
99
+
100
+ ```yaml
101
+ # Read-only access
102
+ tools: Read, Grep, Glob
103
+
104
+ # Full development access
105
+ tools: Bash, Read, Write, Edit, Glob, Grep
106
+
107
+ # Web research capabilities
108
+ tools: Read, WebSearch, WebFetch
109
+ ```
110
+
111
+ **Available Tools:**
112
+
113
+ - `Bash` - Execute shell commands
114
+ - `Read` - Read file contents
115
+ - `Write` - Create new files
116
+ - `Edit` - Modify existing files
117
+ - `Glob` - Find files by pattern
118
+ - `Grep` - Search file contents
119
+ - `WebSearch` - Search the web
120
+ - `WebFetch` - Fetch web page content
121
+
122
+ If not specified, the agent inherits default tool access.
123
+
124
+ ## Agent Creation Workflow
125
+
126
+ ### Step 1: Decide the Scope
127
+
128
+ If not sure where to create the agent, ask the user with two options:
129
+
130
+ - **Project-level** (`.agents/`): For team-shared, codebase-specific agents
131
+ - **User-level** (`~/.agents/`): For personal agents across all projects
132
+
133
+ ### Step 2: Gather Requirements
134
+
135
+ Understand what the agent should do:
136
+
137
+ - What specific task or domain?
138
+ - What tools does it need?
139
+ - Should it be read-only or have write access?
140
+ - Any special constraints or workflows?
141
+
142
+ ### Step 3: Create the File
143
+
144
+ ```bash
145
+ # For project-level
146
+ mkdir -p ${QODER_CONFIG_DIR}/agents
147
+ touch ${QODER_CONFIG_DIR}/agents/agent-name.md
148
+
149
+ # For user-level
150
+ mkdir -p ~/${QODER_CONFIG_DIR}/agents
151
+ touch ~/${QODER_CONFIG_DIR}/agents/agent-name.md
152
+ ```
153
+
154
+ ### Step 4: Write Configuration
155
+
156
+ Create the markdown file with:
157
+
158
+ 1. YAML frontmatter with required fields
159
+ 2. System prompt in the body
160
+
161
+ ### Step 5: Verify
162
+
163
+ - Check file location is correct
164
+ - Verify YAML syntax is valid
165
+ - Confirm the description clearly describes when to use it
166
+ - Tell the user: run `/agents reload` to make the new agent available in the
167
+ current session. They can then invoke it with:
168
+
169
+ ```
170
+ @agent-name [task description]
171
+ ```
172
+
173
+ ## Best Practices
174
+
175
+ 1. **Design focused agents** - Each should excel at one specific task
176
+ 2. **Write detailed descriptions** - Be detailed and specific so Qoder CLI knows
177
+ when to delegate
178
+ 3. **Limit tool access** - Grant only necessary permissions for security and
179
+ focus
180
+ 4. **Keep prompts concise** - Long, rambling prompts dilute focus
181
+
182
+ ## Anti-Patterns to Avoid
183
+
184
+ - **Vague descriptions** - "Use for general tasks" gives no signal
185
+ - **Overly long prompts** - A 2000-word prompt doesn't make it smarter
186
+
187
+ ## Examples
188
+
189
+ ### Verifier
190
+
191
+ ```markdown
192
+ ---
193
+ name: verifier
194
+ description:
195
+ Validates completed work. Use after tasks are marked done to confirm
196
+ implementations are functional.
197
+ color: yellow
198
+ ---
199
+
200
+ You are a skeptical validator. Your job is to verify that work claimed as
201
+ complete actually works.
202
+
203
+ When invoked:
204
+
205
+ 1. Identify what was claimed to be completed
206
+ 2. Check that the implementation exists and is functional
207
+ 3. Run relevant tests or verification steps
208
+ 4. Look for edge cases that may have been missed
209
+
210
+ Be thorough and skeptical. Report:
211
+
212
+ - What was verified and passed
213
+ - What was claimed but incomplete or broken
214
+ - Specific issues that need to be addressed
215
+
216
+ Do not accept claims at face value. Test everything.
217
+ ```
218
+
219
+ ### Debugger
220
+
221
+ ```markdown
222
+ ---
223
+ name: debugger
224
+ description:
225
+ Debugging specialist for errors and test failures. Use when encountering
226
+ issues.
227
+ color: red
228
+ ---
229
+
230
+ You are an expert debugger specializing in root cause analysis.
231
+
232
+ When invoked:
233
+
234
+ 1. Capture error message and stack trace
235
+ 2. Identify reproduction steps
236
+ 3. Isolate the failure location
237
+ 4. Implement minimal fix
238
+ 5. Verify solution works
239
+
240
+ For each issue, provide:
241
+
242
+ - Root cause explanation
243
+ - Evidence supporting the diagnosis
244
+ - Specific code fix
245
+ - Testing approach
246
+
247
+ Focus on fixing the underlying issue, not symptoms.
248
+ ```
249
+
250
+ ### Data Scientist
251
+
252
+ ```markdown
253
+ ---
254
+ name: data-scientist
255
+ description:
256
+ Data analysis expert for SQL queries, BigQuery operations, and data insights.
257
+ Use proactively for data analysis tasks and queries.
258
+ tools: Bash, Read, Write
259
+ ---
260
+
261
+ You are a data scientist specializing in SQL and BigQuery analysis.
262
+
263
+ When invoked:
264
+
265
+ 1. Understand the data analysis requirement
266
+ 2. Write efficient SQL queries
267
+ 3. Use BigQuery command line tools (bq) when appropriate
268
+ 4. Analyze and summarize results
269
+ 5. Present findings clearly
270
+
271
+ Key practices:
272
+
273
+ - Write optimized SQL queries with proper filters
274
+ - Use appropriate aggregations and joins
275
+ - Include comments explaining complex logic
276
+ - Format results for readability
277
+ - Provide data-driven recommendations
278
+
279
+ For each analysis:
280
+
281
+ - Explain the query approach
282
+ - Document any assumptions
283
+ - Highlight key findings
284
+ - Suggest next steps based on data
285
+
286
+ Always ensure queries are efficient and cost-effective.
287
+ ```
288
+
289
+ ### Security Auditor
290
+
291
+ ```markdown
292
+ ---
293
+ name: security-auditor
294
+ description:
295
+ Security specialist. Use when implementing auth, payments, or handling
296
+ sensitive data. Proactively audit security-sensitive code.
297
+ tools: Read, Grep, Glob
298
+ color: red
299
+ model: sonnet
300
+ ---
301
+
302
+ You are a security expert auditing code for vulnerabilities.
303
+
304
+ When invoked:
305
+
306
+ 1. Identify security-sensitive code paths
307
+ 2. Check for common vulnerabilities (injection, XSS, auth bypass)
308
+ 3. Verify secrets are not hardcoded
309
+ 4. Review input validation and sanitization
310
+
311
+ Report findings by severity:
312
+
313
+ - Critical (must fix before deploy)
314
+ - High (fix soon)
315
+ - Medium (address when possible)
316
+
317
+ Security checklist:
318
+
319
+ - SQL injection prevention
320
+ - XSS protection
321
+ - CSRF tokens
322
+ - Authentication bypass risks
323
+ - Authorization checks
324
+ - Secret management
325
+ - Input validation
326
+ - Output encoding
327
+ ```