aiblueprint-cli 1.4.11 → 1.4.13
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/claude-code-config/scripts/.claude/commands/fix-on-my-computer.md +87 -0
- package/claude-code-config/scripts/command-validator/CLAUDE.md +112 -0
- package/claude-code-config/scripts/command-validator/src/__tests__/validator.test.ts +62 -111
- package/claude-code-config/scripts/command-validator/src/cli.ts +5 -3
- package/claude-code-config/scripts/command-validator/src/lib/security-rules.ts +3 -4
- package/claude-code-config/scripts/command-validator/src/lib/types.ts +1 -0
- package/claude-code-config/scripts/command-validator/src/lib/validator.ts +47 -317
- package/claude-code-config/scripts/statusline/CLAUDE.md +29 -7
- package/claude-code-config/scripts/statusline/README.md +89 -1
- package/claude-code-config/scripts/statusline/defaults.json +75 -0
- package/claude-code-config/scripts/statusline/src/index.ts +101 -24
- package/claude-code-config/scripts/statusline/src/lib/config-types.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/config.ts +21 -0
- package/claude-code-config/scripts/statusline/src/lib/context.ts +32 -11
- package/claude-code-config/scripts/statusline/src/lib/formatters.ts +360 -22
- package/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/render-pure.ts +177 -0
- package/claude-code-config/scripts/statusline/src/lib/types.ts +11 -0
- package/claude-code-config/scripts/statusline/statusline.config.json +93 -0
- package/claude-code-config/skills/claude-memory/SKILL.md +689 -0
- package/claude-code-config/skills/claude-memory/references/comprehensive-example.md +175 -0
- package/claude-code-config/skills/claude-memory/references/project-patterns.md +334 -0
- package/claude-code-config/skills/claude-memory/references/prompting-techniques.md +411 -0
- package/claude-code-config/skills/claude-memory/references/section-templates.md +347 -0
- package/claude-code-config/skills/create-slash-commands/SKILL.md +1110 -0
- package/claude-code-config/skills/create-slash-commands/references/arguments.md +273 -0
- package/claude-code-config/skills/create-slash-commands/references/patterns.md +947 -0
- package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +656 -0
- package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +389 -0
- package/claude-code-config/skills/create-subagents/SKILL.md +425 -0
- package/claude-code-config/skills/create-subagents/references/context-management.md +567 -0
- package/claude-code-config/skills/create-subagents/references/debugging-agents.md +714 -0
- package/claude-code-config/skills/create-subagents/references/error-handling-and-recovery.md +502 -0
- package/claude-code-config/skills/create-subagents/references/evaluation-and-testing.md +374 -0
- package/claude-code-config/skills/create-subagents/references/orchestration-patterns.md +591 -0
- package/claude-code-config/skills/create-subagents/references/subagents.md +599 -0
- package/claude-code-config/skills/create-subagents/references/writing-subagent-prompts.md +513 -0
- package/dist/cli.js +20 -3
- package/package.json +1 -1
- package/claude-code-config/commands/apex.md +0 -109
- package/claude-code-config/commands/tasks/run-task.md +0 -220
- package/claude-code-config/commands/utils/watch-ci.md +0 -47
- package/claude-code-config/scripts/command-validator/biome.json +0 -29
- package/claude-code-config/scripts/command-validator/bun.lockb +0 -0
- package/claude-code-config/scripts/command-validator/package.json +0 -27
- package/claude-code-config/scripts/command-validator/vitest.config.ts +0 -7
- package/claude-code-config/scripts/hook-post-file.ts +0 -162
- package/claude-code-config/scripts/statusline/biome.json +0 -34
- package/claude-code-config/scripts/statusline/bun.lockb +0 -0
- package/claude-code-config/scripts/statusline/fixtures/test-input.json +0 -25
- package/claude-code-config/scripts/statusline/package.json +0 -19
- package/claude-code-config/scripts/statusline/statusline.config.ts +0 -25
- package/claude-code-config/scripts/statusline/test.ts +0 -20
- package/claude-code-config/scripts/validate-command.js +0 -712
- package/claude-code-config/scripts/validate-command.readme.md +0 -283
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
Real-world command prompt examples extracted from production slash commands, demonstrating different patterns and complexity levels.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<pattern_1_numbered_workflow>
|
|
6
|
+
|
|
7
|
+
**Use for**: Multi-step processes, git operations, CI monitoring, EPCT methodology
|
|
8
|
+
|
|
9
|
+
<example name="git_commit">
|
|
10
|
+
```markdown
|
|
11
|
+
---
|
|
12
|
+
description: Quick commit and push with minimal messages
|
|
13
|
+
allowed-tools: Bash(git :*), Bash(gh :*)
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
You are a git workflow specialist. Create commits efficiently.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. **STAGE**: Prepare changes
|
|
21
|
+
- `git add -A` or selective staging
|
|
22
|
+
- `git status` to verify
|
|
23
|
+
|
|
24
|
+
2. **COMMIT**: Create commit
|
|
25
|
+
- Generate message following convention
|
|
26
|
+
- `git commit -m "type: description"`
|
|
27
|
+
|
|
28
|
+
3. **PUSH**: Submit changes
|
|
29
|
+
- `git push` to remote
|
|
30
|
+
- Verify with `gh pr view`
|
|
31
|
+
|
|
32
|
+
## Execution Rules
|
|
33
|
+
|
|
34
|
+
- **NON-NEGOTIABLE**: Follow conventional commits
|
|
35
|
+
- Keep messages under 72 characters
|
|
36
|
+
- **CRITICAL**: Always verify push succeeded
|
|
37
|
+
|
|
38
|
+
## Priority
|
|
39
|
+
|
|
40
|
+
Speed > Completeness. Create working commits quickly.
|
|
41
|
+
|
|
42
|
+
````
|
|
43
|
+
</example>
|
|
44
|
+
|
|
45
|
+
<example name="ci_monitoring">
|
|
46
|
+
```markdown
|
|
47
|
+
---
|
|
48
|
+
description: Monitor CI pipeline and automatically fix failures until green
|
|
49
|
+
allowed-tools: Bash(gh :*), Bash(git :*), Read, Edit
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
You are a CI/CD specialist. Monitor and fix build failures autonomously.
|
|
53
|
+
|
|
54
|
+
## Workflow
|
|
55
|
+
|
|
56
|
+
1. **WAIT**: Initial delay if needed
|
|
57
|
+
|
|
58
|
+
- `sleep 30` for CI to start
|
|
59
|
+
- Check if run exists
|
|
60
|
+
|
|
61
|
+
2. **MONITOR**: Watch status
|
|
62
|
+
|
|
63
|
+
- `gh run list` to find runs
|
|
64
|
+
- `gh run watch <id>` to monitor
|
|
65
|
+
- **STOP** if passing
|
|
66
|
+
|
|
67
|
+
3. **ON FAILURE**: Fix and retry
|
|
68
|
+
- Get logs with `gh run view --log-failed`
|
|
69
|
+
- Fix issues systematically
|
|
70
|
+
- Push fix and retry
|
|
71
|
+
- Loop back (max 3 attempts)
|
|
72
|
+
|
|
73
|
+
## Execution Rules
|
|
74
|
+
|
|
75
|
+
- **MAX ATTEMPTS**: Stop after 3 failures
|
|
76
|
+
- **STAY IN SCOPE**: Only fix errors shown in logs
|
|
77
|
+
- **NEVER**: Skip failures or mark as acceptable
|
|
78
|
+
|
|
79
|
+
## Priority
|
|
80
|
+
|
|
81
|
+
Reliability > Speed. Fix root causes.
|
|
82
|
+
````
|
|
83
|
+
|
|
84
|
+
</example>
|
|
85
|
+
|
|
86
|
+
<example name="epct_task">
|
|
87
|
+
```markdown
|
|
88
|
+
---
|
|
89
|
+
description: Execute tasks with EPCT workflow (Explore-Plan-Code-Test)
|
|
90
|
+
argument-hint: <issue-number|issue-url|file-path>
|
|
91
|
+
allowed-tools: Bash(gh :*), Bash(git :*), Task, Read, Edit
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
You are a task execution specialist. Complete GitHub issues systematically.
|
|
95
|
+
|
|
96
|
+
## Workflow
|
|
97
|
+
|
|
98
|
+
1. **EXPLORE**: Gather information
|
|
99
|
+
- If GitHub issue: `gh issue view $1`
|
|
100
|
+
- Search codebase with parallel agents
|
|
101
|
+
- Find relevant files and patterns
|
|
102
|
+
- **CRITICAL**: Understand full context before planning
|
|
103
|
+
|
|
104
|
+
2. **PLAN**: Create strategy
|
|
105
|
+
- Document approach in task plan
|
|
106
|
+
- Post plan as comment if GitHub issue: `gh issue comment $1 --body "..."`
|
|
107
|
+
- **WAIT** for user approval if complex changes
|
|
108
|
+
|
|
109
|
+
3. **CODE**: Implement changes
|
|
110
|
+
- Follow existing patterns
|
|
111
|
+
- **STAY IN SCOPE**: Only what the task requires
|
|
112
|
+
- Commit incrementally
|
|
113
|
+
|
|
114
|
+
4. **TEST**: Verify changes
|
|
115
|
+
- Run relevant tests only
|
|
116
|
+
- Check lint and types
|
|
117
|
+
- **STOP** if tests fail
|
|
118
|
+
|
|
119
|
+
## Execution Rules
|
|
120
|
+
|
|
121
|
+
- **NON-NEGOTIABLE**: Get approval for architectural changes
|
|
122
|
+
- **STAY IN SCOPE**: Don't add unrelated improvements
|
|
123
|
+
- **TEST FIRST**: Verify before creating PR
|
|
124
|
+
|
|
125
|
+
## Priority
|
|
126
|
+
|
|
127
|
+
Correctness > Speed. Complete the task properly.
|
|
128
|
+
|
|
129
|
+
`````
|
|
130
|
+
</example>
|
|
131
|
+
|
|
132
|
+
</pattern_1_numbered_workflow>
|
|
133
|
+
|
|
134
|
+
<pattern_2_reference_docs>
|
|
135
|
+
|
|
136
|
+
**Use for**: CLI wrappers, command reference, documentation commands
|
|
137
|
+
|
|
138
|
+
<example name="vercel_cli">
|
|
139
|
+
````markdown
|
|
140
|
+
---
|
|
141
|
+
allowed-tools: Bash(vercel :*)
|
|
142
|
+
description: Vercel CLI commands for project management and deployment
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
# Vercel CLI Commands
|
|
146
|
+
|
|
147
|
+
## Project Management
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Link project to Vercel
|
|
151
|
+
vercel link
|
|
152
|
+
|
|
153
|
+
# Check project status
|
|
154
|
+
vercel inspect <deployment-url>
|
|
155
|
+
|
|
156
|
+
# List all deployments
|
|
157
|
+
vercel ls
|
|
158
|
+
`````
|
|
159
|
+
|
|
160
|
+
## Deployment
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Deploy to preview
|
|
164
|
+
vercel
|
|
165
|
+
|
|
166
|
+
# Deploy to production
|
|
167
|
+
vercel --prod
|
|
168
|
+
|
|
169
|
+
# Deploy with build environment variables
|
|
170
|
+
vercel --build-env KEY=value
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Environment Variables
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Add environment variable
|
|
177
|
+
vercel env add <name>
|
|
178
|
+
|
|
179
|
+
# List environment variables
|
|
180
|
+
vercel env ls
|
|
181
|
+
|
|
182
|
+
# Pull environment variables to .env.local
|
|
183
|
+
vercel env pull
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Common Workflows
|
|
187
|
+
|
|
188
|
+
### Initial Setup
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# 1. Link project
|
|
192
|
+
vercel link
|
|
193
|
+
|
|
194
|
+
# 2. Pull environment variables
|
|
195
|
+
vercel env pull
|
|
196
|
+
|
|
197
|
+
# 3. Deploy preview
|
|
198
|
+
vercel
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Production Deployment
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
# 1. Test preview first
|
|
205
|
+
vercel
|
|
206
|
+
|
|
207
|
+
# 2. If preview looks good, deploy production
|
|
208
|
+
vercel --prod
|
|
209
|
+
|
|
210
|
+
# 3. Inspect deployment
|
|
211
|
+
vercel inspect <url>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`````
|
|
215
|
+
</example>
|
|
216
|
+
|
|
217
|
+
<example name="neon_cli">
|
|
218
|
+
````markdown
|
|
219
|
+
---
|
|
220
|
+
allowed-tools: Bash(neonctl :*)
|
|
221
|
+
description: Neon CLI commands for managing serverless Postgres databases
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
# Neon CLI Commands
|
|
225
|
+
|
|
226
|
+
## Authentication
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Login to Neon
|
|
230
|
+
neonctl auth
|
|
231
|
+
|
|
232
|
+
# Check authentication status
|
|
233
|
+
neonctl auth check
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Project Management
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
# List projects
|
|
240
|
+
neonctl projects list
|
|
241
|
+
|
|
242
|
+
# Create project
|
|
243
|
+
neonctl projects create --name <name>
|
|
244
|
+
|
|
245
|
+
# Delete project
|
|
246
|
+
neonctl projects delete <project-id>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Branch Operations
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
# List branches
|
|
253
|
+
neonctl branches list
|
|
254
|
+
|
|
255
|
+
# Create branch from main
|
|
256
|
+
neonctl branches create --name <branch-name>
|
|
257
|
+
|
|
258
|
+
# Delete branch
|
|
259
|
+
neonctl branches delete <branch-id>
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Connection Strings
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
# Get connection string
|
|
266
|
+
neonctl connection-string <branch-id>
|
|
267
|
+
|
|
268
|
+
# Get connection string for specific role
|
|
269
|
+
neonctl connection-string <branch-id> --role-name <role>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Common Workflows
|
|
273
|
+
|
|
274
|
+
### Create Feature Branch Database
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# 1. List projects to find project ID
|
|
278
|
+
neonctl projects list
|
|
279
|
+
|
|
280
|
+
# 2. Create branch
|
|
281
|
+
neonctl branches create --name feature-auth --project-id <project-id>
|
|
282
|
+
|
|
283
|
+
# 3. Get connection string
|
|
284
|
+
neonctl connection-string <new-branch-id>
|
|
285
|
+
|
|
286
|
+
# 4. Add to .env.local
|
|
287
|
+
echo "DATABASE_URL=<connection-string>" >> .env.local
|
|
288
|
+
```
|
|
289
|
+
`````
|
|
290
|
+
|
|
291
|
+
</example>
|
|
292
|
+
|
|
293
|
+
</pattern_2_reference_docs>
|
|
294
|
+
|
|
295
|
+
<pattern_3_section_based_analysis>
|
|
296
|
+
|
|
297
|
+
**Use for**: Analysis commands, research tasks, investigation workflows
|
|
298
|
+
|
|
299
|
+
<example name="deep_code_analysis">
|
|
300
|
+
```markdown
|
|
301
|
+
---
|
|
302
|
+
description: Analyze code thoroughly to answer complex questions
|
|
303
|
+
argument-hint: <question> <target-area>
|
|
304
|
+
allowed-tools: Task, Read, Grep, Glob
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
You are a code analysis specialist. Answer questions with deep codebase investigation.
|
|
308
|
+
|
|
309
|
+
## Research Phase
|
|
310
|
+
|
|
311
|
+
**Goal**: Gather comprehensive context for $1
|
|
312
|
+
|
|
313
|
+
- Use Task tool with explore-codebase agent for $2
|
|
314
|
+
- **CRITICAL**: Read actual implementations, not just interfaces
|
|
315
|
+
- Trace through call chains to understand data flow
|
|
316
|
+
- Document findings in structured notes
|
|
317
|
+
|
|
318
|
+
## Analysis Phase
|
|
319
|
+
|
|
320
|
+
**Goal**: Synthesize findings to answer $1
|
|
321
|
+
|
|
322
|
+
- Connect related code sections
|
|
323
|
+
- Identify patterns and anti-patterns
|
|
324
|
+
- **BEFORE concluding**: Verify assumptions by reading more code
|
|
325
|
+
- Create clear mental model
|
|
326
|
+
|
|
327
|
+
## Response Phase
|
|
328
|
+
|
|
329
|
+
**Goal**: Provide actionable answer
|
|
330
|
+
|
|
331
|
+
- Answer $1 directly
|
|
332
|
+
- Provide code references with file:line format
|
|
333
|
+
- Include examples from codebase
|
|
334
|
+
- Suggest related areas to investigate
|
|
335
|
+
|
|
336
|
+
## Execution Rules
|
|
337
|
+
|
|
338
|
+
- **NEVER guess**: If uncertain, investigate more
|
|
339
|
+
- **READ actual code**: Don't rely on naming alone
|
|
340
|
+
- **TRACE deeply**: Follow implementations 3+ levels down
|
|
341
|
+
- **CITE sources**: Always include file:line references
|
|
342
|
+
|
|
343
|
+
````
|
|
344
|
+
</example>
|
|
345
|
+
|
|
346
|
+
<example name="security_audit">
|
|
347
|
+
```markdown
|
|
348
|
+
---
|
|
349
|
+
description: Audit code for security vulnerabilities with detailed analysis
|
|
350
|
+
allowed-tools: Grep, Read, Glob
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
You are a security audit specialist. Find and document vulnerabilities systematically.
|
|
354
|
+
|
|
355
|
+
## Scanning Phase
|
|
356
|
+
|
|
357
|
+
**Goal**: Identify potential security issues
|
|
358
|
+
|
|
359
|
+
- Search for dangerous patterns (eval, innerHTML, SQL string concat)
|
|
360
|
+
- Check authentication and authorization logic
|
|
361
|
+
- Review input validation and sanitization
|
|
362
|
+
- **CRITICAL**: Check both client and server code
|
|
363
|
+
|
|
364
|
+
## Verification Phase
|
|
365
|
+
|
|
366
|
+
**Goal**: Confirm vulnerabilities are exploitable
|
|
367
|
+
|
|
368
|
+
- Read surrounding code context
|
|
369
|
+
- Trace data flow from input to dangerous operation
|
|
370
|
+
- **BEFORE flagging**: Verify issue isn't mitigated elsewhere
|
|
371
|
+
- Document proof-of-concept if exploitable
|
|
372
|
+
|
|
373
|
+
## Reporting Phase
|
|
374
|
+
|
|
375
|
+
**Goal**: Provide actionable security report
|
|
376
|
+
|
|
377
|
+
- Categorize by severity (Critical, High, Medium, Low)
|
|
378
|
+
- Include file locations and code snippets
|
|
379
|
+
- Suggest specific remediation for each issue
|
|
380
|
+
- Prioritize fixes by risk
|
|
381
|
+
|
|
382
|
+
## Execution Rules
|
|
383
|
+
|
|
384
|
+
- **NO false positives**: Verify before reporting
|
|
385
|
+
- **PROVIDE context**: Show vulnerable code path
|
|
386
|
+
- **ACTIONABLE fixes**: Specific code suggestions
|
|
387
|
+
- **SEVERITY LEVELS**: Use CVSS or similar standard
|
|
388
|
+
````
|
|
389
|
+
|
|
390
|
+
</example>
|
|
391
|
+
|
|
392
|
+
<example name="performance_optimization">
|
|
393
|
+
```markdown
|
|
394
|
+
---
|
|
395
|
+
description: Analyze code for performance bottlenecks and suggest optimizations
|
|
396
|
+
argument-hint: [file-path]
|
|
397
|
+
allowed-tools: Read, Grep
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
You are a performance optimization specialist. Find and fix performance issues.
|
|
401
|
+
|
|
402
|
+
## Profiling Phase
|
|
403
|
+
|
|
404
|
+
**Goal**: Identify performance bottlenecks in #$ARGUMENTS
|
|
405
|
+
|
|
406
|
+
- Review @ #$ARGUMENTS for O(n²) or worse algorithms
|
|
407
|
+
- Check for unnecessary re-renders (React)
|
|
408
|
+
- Find redundant database queries
|
|
409
|
+
- Identify large bundle imports
|
|
410
|
+
|
|
411
|
+
## Analysis Phase
|
|
412
|
+
|
|
413
|
+
**Goal**: Understand impact of each issue
|
|
414
|
+
|
|
415
|
+
- **BEFORE flagging**: Consider if it's in hot path
|
|
416
|
+
- Estimate performance impact (milliseconds, renders, etc.)
|
|
417
|
+
- Check if issue scales with data size
|
|
418
|
+
- Prioritize by user-facing impact
|
|
419
|
+
|
|
420
|
+
## Optimization Phase
|
|
421
|
+
|
|
422
|
+
**Goal**: Provide specific optimizations
|
|
423
|
+
|
|
424
|
+
- Suggest algorithmic improvements with code examples
|
|
425
|
+
- Recommend memoization/caching where appropriate
|
|
426
|
+
- Show bundle splitting opportunities
|
|
427
|
+
- **INCLUDE**: Before/after performance estimates
|
|
428
|
+
|
|
429
|
+
## Execution Rules
|
|
430
|
+
|
|
431
|
+
- **MEASURE impact**: Don't optimize without evidence
|
|
432
|
+
- **HOT PATHS first**: Focus on frequently executed code
|
|
433
|
+
- **SPECIFIC suggestions**: Include implementation code
|
|
434
|
+
- **TRADE-OFFS**: Note any complexity costs
|
|
435
|
+
|
|
436
|
+
````
|
|
437
|
+
</example>
|
|
438
|
+
|
|
439
|
+
</pattern_3_section_based_analysis>
|
|
440
|
+
|
|
441
|
+
<hybrid_patterns>
|
|
442
|
+
|
|
443
|
+
Some commands combine multiple patterns based on complexity.
|
|
444
|
+
|
|
445
|
+
<example name="fix_errors">
|
|
446
|
+
```markdown
|
|
447
|
+
---
|
|
448
|
+
description: Automatically fix iOS and watchOS build errors
|
|
449
|
+
argument-hint: [iPhone|Watch|both (optional, defaults to both)]
|
|
450
|
+
allowed-tools: Bash(xcodebuild :*), Read, Edit
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
You are a Swift/iOS build specialist. Fix compilation errors systematically.
|
|
454
|
+
|
|
455
|
+
## Reference: Common Error Patterns
|
|
456
|
+
|
|
457
|
+
### Missing Imports
|
|
458
|
+
```swift
|
|
459
|
+
// Error: Cannot find type 'SomeType' in scope
|
|
460
|
+
// Fix: import FrameworkName
|
|
461
|
+
````
|
|
462
|
+
|
|
463
|
+
### Type Mismatches
|
|
464
|
+
|
|
465
|
+
```swift
|
|
466
|
+
// Error: Cannot convert value of type 'X' to expected type 'Y'
|
|
467
|
+
// Fix: Use proper type conversion or update declaration
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
## Workflow
|
|
471
|
+
|
|
472
|
+
1. **BUILD**: Run Xcode build for #$ARGUMENTS target
|
|
473
|
+
- `xcodebuild build -scheme $1 2>&1`
|
|
474
|
+
- Parse errors from output
|
|
475
|
+
- **STOP** if no errors
|
|
476
|
+
|
|
477
|
+
2. **ANALYZE**: Understand each error
|
|
478
|
+
- Read error messages carefully
|
|
479
|
+
- **CRITICAL**: Check file locations and line numbers
|
|
480
|
+
- Identify error categories
|
|
481
|
+
|
|
482
|
+
3. **FIX**: Apply fixes systematically
|
|
483
|
+
- Fix one error at a time
|
|
484
|
+
- Read surrounding code for context
|
|
485
|
+
- **VERIFY** fix doesn't break other code
|
|
486
|
+
- Commit after each fix
|
|
487
|
+
|
|
488
|
+
4. **RETRY**: Build again
|
|
489
|
+
- Repeat until clean build
|
|
490
|
+
- **MAX 5 iterations** to prevent loops
|
|
491
|
+
|
|
492
|
+
## Execution Rules
|
|
493
|
+
|
|
494
|
+
- **ONE error at a time**: Don't batch fixes
|
|
495
|
+
- **READ context**: Understand code before changing
|
|
496
|
+
- **COMMIT incrementally**: Each fix is separate commit
|
|
497
|
+
- **STOP after 5 tries**: Ask for help if stuck
|
|
498
|
+
|
|
499
|
+
````
|
|
500
|
+
</example>
|
|
501
|
+
|
|
502
|
+
</hybrid_patterns>
|
|
503
|
+
|
|
504
|
+
<frontmatter_examples>
|
|
505
|
+
|
|
506
|
+
<basic_command>
|
|
507
|
+
```yaml
|
|
508
|
+
---
|
|
509
|
+
description: Analyze this code for performance issues
|
|
510
|
+
---
|
|
511
|
+
````
|
|
512
|
+
|
|
513
|
+
</basic_command>
|
|
514
|
+
|
|
515
|
+
<command_with_args>
|
|
516
|
+
|
|
517
|
+
```yaml
|
|
518
|
+
---
|
|
519
|
+
argument-hint: <issue-number>
|
|
520
|
+
description: Fix GitHub issue following coding standards
|
|
521
|
+
---
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
</command_with_args>
|
|
525
|
+
|
|
526
|
+
<command_with_tools>
|
|
527
|
+
|
|
528
|
+
```yaml
|
|
529
|
+
---
|
|
530
|
+
allowed-tools: Bash(git :*), Bash(gh :*), Read, Edit
|
|
531
|
+
description: Create and push PR with auto-generated description
|
|
532
|
+
---
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
</command_with_tools>
|
|
536
|
+
|
|
537
|
+
<command_with_model>
|
|
538
|
+
|
|
539
|
+
```yaml
|
|
540
|
+
---
|
|
541
|
+
description: Quick commit automation
|
|
542
|
+
model: haiku
|
|
543
|
+
allowed-tools: Bash(git :*)
|
|
544
|
+
---
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
</command_with_model>
|
|
548
|
+
|
|
549
|
+
<complex_command>
|
|
550
|
+
|
|
551
|
+
```yaml
|
|
552
|
+
---
|
|
553
|
+
argument-hint: <action> <target> [options]
|
|
554
|
+
description: Multi-action command with flexible arguments
|
|
555
|
+
allowed-tools: [Read, Edit, Write, Bash(npm :*)]
|
|
556
|
+
model: sonnet
|
|
557
|
+
---
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
</complex_command>
|
|
561
|
+
|
|
562
|
+
</frontmatter_examples>
|
|
563
|
+
|
|
564
|
+
<xml_vs_markdown_examples>
|
|
565
|
+
|
|
566
|
+
<xml_format>
|
|
567
|
+
**Recommended for**: All slash commands (better structure, Claude-native)
|
|
568
|
+
|
|
569
|
+
```markdown
|
|
570
|
+
---
|
|
571
|
+
description: Review code for security issues
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
<objective>
|
|
575
|
+
Scan code for security vulnerabilities and provide remediation.
|
|
576
|
+
|
|
577
|
+
This helps identify risks before they reach production.
|
|
578
|
+
</objective>
|
|
579
|
+
|
|
580
|
+
<process>
|
|
581
|
+
1. Search for dangerous patterns (XSS, injection, etc.)
|
|
582
|
+
2. Verify each finding in context
|
|
583
|
+
3. Provide specific fixes with code examples
|
|
584
|
+
</process>
|
|
585
|
+
|
|
586
|
+
<success_criteria>
|
|
587
|
+
|
|
588
|
+
- All major vulnerability types checked
|
|
589
|
+
- Findings include file:line references
|
|
590
|
+
- Actionable remediation provided
|
|
591
|
+
</success_criteria>
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
**Benefits**:
|
|
595
|
+
|
|
596
|
+
- Clear section boundaries
|
|
597
|
+
- Claude-native format (trained on XML)
|
|
598
|
+
- Easy to parse and validate
|
|
599
|
+
- Supports nested structure
|
|
600
|
+
</xml_format>
|
|
601
|
+
|
|
602
|
+
<markdown_format>
|
|
603
|
+
**Use for**: Simple commands, user preference, documentation focus
|
|
604
|
+
|
|
605
|
+
```markdown
|
|
606
|
+
---
|
|
607
|
+
description: Review code for security issues
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
## Objective
|
|
611
|
+
|
|
612
|
+
Scan code for security vulnerabilities and provide remediation.
|
|
613
|
+
|
|
614
|
+
This helps identify risks before they reach production.
|
|
615
|
+
|
|
616
|
+
## Process
|
|
617
|
+
|
|
618
|
+
1. Search for dangerous patterns (XSS, injection, etc.)
|
|
619
|
+
2. Verify each finding in context
|
|
620
|
+
3. Provide specific fixes with code examples
|
|
621
|
+
|
|
622
|
+
## Success Criteria
|
|
623
|
+
|
|
624
|
+
- All major vulnerability types checked
|
|
625
|
+
- Findings include file:line references
|
|
626
|
+
- Actionable remediation provided
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
**Benefits**:
|
|
630
|
+
|
|
631
|
+
- Familiar markdown syntax
|
|
632
|
+
- Better for documentation
|
|
633
|
+
- Easier for humans to read/edit
|
|
634
|
+
- Works well for simple commands
|
|
635
|
+
</markdown_format>
|
|
636
|
+
|
|
637
|
+
<when_to_use_each>
|
|
638
|
+
|
|
639
|
+
**Use XML when**:
|
|
640
|
+
|
|
641
|
+
- Command is complex with multiple phases
|
|
642
|
+
- Need clear section boundaries
|
|
643
|
+
- Want Claude-optimized format
|
|
644
|
+
- Building reusable patterns
|
|
645
|
+
|
|
646
|
+
**Use Markdown when**:
|
|
647
|
+
|
|
648
|
+
- Command is simple (2-3 steps)
|
|
649
|
+
- User prefers markdown
|
|
650
|
+
- Documentation-focused
|
|
651
|
+
- Team unfamiliar with XML
|
|
652
|
+
|
|
653
|
+
**Default recommendation**: XML for consistency and Claude optimization
|
|
654
|
+
</when_to_use_each>
|
|
655
|
+
|
|
656
|
+
</xml_vs_markdown_examples>
|