@neyugn/agent-kits 0.5.0 → 0.5.3

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.
Files changed (72) hide show
  1. package/README.md +66 -81
  2. package/README.vi.md +79 -52
  3. package/README.zh.md +69 -88
  4. package/common/skills/filter-agent/SKILL.md +33 -45
  5. package/common/skills/filter-skill/SKILL.md +51 -73
  6. package/common/skills/scan-techstack/SKILL.md +30 -36
  7. package/dist/cli.js +85 -0
  8. package/kits/coder/agents/ai-engineer.md +27 -39
  9. package/kits/coder/agents/backend-specialist.md +31 -45
  10. package/kits/coder/agents/cloud-architect.md +31 -45
  11. package/kits/coder/agents/code-reviewer.md +45 -67
  12. package/kits/coder/agents/data-engineer.md +22 -32
  13. package/kits/coder/agents/database-specialist.md +30 -44
  14. package/kits/coder/agents/debugger.md +28 -42
  15. package/kits/coder/agents/devops-engineer.md +35 -53
  16. package/kits/coder/agents/documentation-writer.md +48 -68
  17. package/kits/coder/agents/frontend-specialist.md +30 -46
  18. package/kits/coder/agents/i18n-specialist.md +37 -51
  19. package/kits/coder/agents/integration-specialist.md +38 -54
  20. package/kits/coder/agents/mobile-developer.md +37 -53
  21. package/kits/coder/agents/multi-tenant-architect.md +25 -37
  22. package/kits/coder/agents/orchestrator.md +20 -32
  23. package/kits/coder/agents/performance-analyst.md +43 -65
  24. package/kits/coder/agents/project-planner.md +25 -39
  25. package/kits/coder/agents/queue-specialist.md +26 -38
  26. package/kits/coder/agents/realtime-specialist.md +44 -64
  27. package/kits/coder/agents/security-auditor.md +44 -64
  28. package/kits/coder/agents/test-engineer.md +30 -44
  29. package/kits/coder/agents/ux-researcher.md +26 -38
  30. package/kits/coder/rules/sections/classifier.md +11 -7
  31. package/kits/coder/rules/sections/code.md +5 -4
  32. package/kits/coder/skills/accessibility-patterns/SKILL.md +67 -81
  33. package/kits/coder/skills/ai-rag-patterns/SKILL.md +27 -23
  34. package/kits/coder/skills/api-patterns/SKILL.md +40 -43
  35. package/kits/coder/skills/auth-patterns/SKILL.md +47 -51
  36. package/kits/coder/skills/aws-patterns/SKILL.md +52 -57
  37. package/kits/coder/skills/brainstorming/SKILL.md +26 -23
  38. package/kits/coder/skills/clean-code/SKILL.md +74 -90
  39. package/kits/coder/skills/database-design/SKILL.md +32 -31
  40. package/kits/coder/skills/docker-patterns/SKILL.md +46 -49
  41. package/kits/coder/skills/documentation-templates/SKILL.md +21 -13
  42. package/kits/coder/skills/e2e-testing/SKILL.md +52 -58
  43. package/kits/coder/skills/flutter-patterns/SKILL.md +44 -46
  44. package/kits/coder/skills/frontend-design/SKILL.md +28 -24
  45. package/kits/coder/skills/github-actions/SKILL.md +43 -45
  46. package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +35 -33
  47. package/kits/coder/skills/graphql-patterns/SKILL.md +35 -33
  48. package/kits/coder/skills/i18n-localization/SKILL.md +37 -35
  49. package/kits/coder/skills/kubernetes-patterns/SKILL.md +35 -33
  50. package/kits/coder/skills/mermaid-diagrams/SKILL.md +54 -60
  51. package/kits/coder/skills/mobile-design/SKILL.md +51 -61
  52. package/kits/coder/skills/monitoring-observability/SKILL.md +32 -30
  53. package/kits/coder/skills/multi-tenancy/SKILL.md +16 -8
  54. package/kits/coder/skills/nodejs-best-practices/SKILL.md +19 -14
  55. package/kits/coder/skills/performance-profiling/SKILL.md +31 -29
  56. package/kits/coder/skills/plan-writing/SKILL.md +52 -59
  57. package/kits/coder/skills/postgres-patterns/SKILL.md +39 -39
  58. package/kits/coder/skills/prompt-engineering/SKILL.md +40 -42
  59. package/kits/coder/skills/queue-patterns/SKILL.md +22 -16
  60. package/kits/coder/skills/react-native-patterns/SKILL.md +35 -33
  61. package/kits/coder/skills/react-patterns/SKILL.md +46 -52
  62. package/kits/coder/skills/realtime-patterns/SKILL.md +44 -46
  63. package/kits/coder/skills/redis-patterns/SKILL.md +35 -33
  64. package/kits/coder/skills/security-fundamentals/SKILL.md +45 -46
  65. package/kits/coder/skills/seo-patterns/SKILL.md +56 -62
  66. package/kits/coder/skills/systematic-debugging/SKILL.md +38 -39
  67. package/kits/coder/skills/tailwind-patterns/SKILL.md +21 -13
  68. package/kits/coder/skills/terraform-patterns/SKILL.md +53 -57
  69. package/kits/coder/skills/testing-patterns/SKILL.md +42 -47
  70. package/kits/coder/skills/typescript-patterns/SKILL.md +54 -68
  71. package/kits/coder/skills/ui-ux-pro-max/SKILL.md +362 -364
  72. package/package.json +1 -1
@@ -6,7 +6,16 @@ allowed-tools: Read, Write, Edit
6
6
 
7
7
  # Plan Writing - Structured Task Decomposition
8
8
 
9
- > **Philosophy:** A good plan is a roadmap that prevents wrong turns. Break down before building up.
9
+ ## Quick Reference
10
+
11
+ - **4 phases**: Analysis (no code) → Planning (task file) → [User Approval] → Implementation
12
+ - **Plan format**: task slug `.md` · Each task: Agent · Skills · Priority · Dependencies · INPUT/OUTPUT/VERIFY
13
+ - **Never code during planning**: Plan = thinking only · Implement only after approval
14
+ - **Task assignment**: 1 task = 1 agent · 1 owner · explicit dependency chain
15
+ - **File naming**: `{kebab-case-feature}.md` · e.g., `dark-mode.md`, `auth-system.md`
16
+
17
+ ---
18
+
10
19
 
11
20
  ---
12
21
 
@@ -73,13 +82,11 @@ Level 4: Subtasks (If task is still too large)
73
82
 
74
83
  ### Good Task Characteristics
75
84
 
76
- | Characteristic | Description |
77
- | ------------------- | ------------------------------------------------- |
78
- | **Observable** | Has visible output when complete |
79
- | **Verifiable** | Clear criteria to confirm done |
80
- | **Independent** | Minimal dependencies blocking start |
81
- | **Sized correctly** | 15 min to 4 hours |
82
- | **Named clearly** | Action verb + object (e.g., "Create user schema") |
85
+ - **Observable**: Has visible output when complete
86
+ - **Verifiable**: Clear criteria to confirm done
87
+ - **Independent**: Minimal dependencies blocking start
88
+ - **Sized correctly**: 15 min to 4 hours
89
+ - **Named clearly**: Action verb + object (e.g., "Create user schema")
83
90
 
84
91
  ---
85
92
 
@@ -192,12 +199,10 @@ Before estimating, consider:
192
199
 
193
200
  ### Common Estimation Mistakes
194
201
 
195
- | Underestimates | Include In Estimate |
196
- | --------------------------- | ------------------------------ |
197
- | "Just wire things together" | Integration complexity |
198
- | "Tests are quick" | Edge cases and debugging tests |
199
- | "I know this codebase" | Context switching overhead |
200
- | "Simple fix" | Regression testing |
202
+ - "Just wire things together": Integration complexity
203
+ - "Tests are quick": Edge cases and debugging tests
204
+ - "I know this codebase": Context switching overhead
205
+ - "Simple fix": Regression testing
201
206
 
202
207
  ---
203
208
 
@@ -249,12 +254,10 @@ A task is DONE when:
249
254
 
250
255
  ### Writing Good Verification Criteria
251
256
 
252
- | Vague | Specific |
253
- | ----------------- | ---------------------------------------------- |
254
- | "Works correctly" | "Returns 200 for valid input, 400 for invalid" |
255
- | "Tested" | "Unit tests cover happy path + 3 error cases" |
256
- | "Integrated" | "API called successfully from frontend" |
257
- | "Complete" | "All checklist items verified" |
257
+ - "Works correctly": "Returns 200 for valid input, 400 for invalid"
258
+ - "Tested": "Unit tests cover happy path + 3 error cases"
259
+ - "Integrated": "API called successfully from frontend"
260
+ - "Complete": "All checklist items verified"
258
261
 
259
262
  ---
260
263
 
@@ -262,36 +265,30 @@ A task is DONE when:
262
265
 
263
266
  ### When to Update Plan
264
267
 
265
- | Event | Update Required |
266
- | ------------------- | ---------------------------------- |
267
- | Task completed | Check off, add to progress log |
268
- | Blocker discovered | Add to dependencies, update status |
269
- | Scope change | Revise tasks, re-estimate |
270
- | New information | Update risks/decisions log |
271
- | End of work session | Mark current progress |
268
+ - Task completed: Check off, add to progress log
269
+ - Blocker discovered: Add to dependencies, update status
270
+ - Scope change: Revise tasks, re-estimate
271
+ - New information: Update risks/decisions log
272
+ - End of work session: Mark current progress
272
273
 
273
274
  ### Plan Review Frequency
274
275
 
275
- | Project Duration | Review Frequency |
276
- | ---------------- | -------------------------- |
277
- | < 1 day | Start and end |
278
- | 1-3 days | Daily |
279
- | > 3 days | Daily + weekly deep review |
276
+ - < 1 day: Start and end
277
+ - 1-3 days: Daily
278
+ - > 3 days: Daily + weekly deep review
280
279
 
281
280
  ---
282
281
 
283
282
  ## 🚨 Anti-Patterns
284
283
 
285
- | Don't | Do |
286
- | --------------------------- | ------------------------------------ |
287
- | Giant monolithic tasks | Break into 15min-4hr chunks |
288
- | "It depends on everything" | Map only true blocking dependencies |
289
- | Estimate without buffers | Apply confidence multiplier |
290
- | Skip verification criteria | Define "done" for every task |
291
- | Never update the plan | Update as you learn |
292
- | Plan at wrong granularity | Match plan detail to project size |
293
- | Plan replaces communication | Plan supplements communication |
294
- | Over-plan simple work | Use judgment on when plans add value |
284
+ - Giant monolithic tasks: Break into 15min-4hr chunks
285
+ - "It depends on everything": Map only true blocking dependencies
286
+ - Estimate without buffers: Apply confidence multiplier
287
+ - Skip verification criteria: Define "done" for every task
288
+ - Never update the plan: Update as you learn
289
+ - Plan at wrong granularity: Match plan detail to project size
290
+ - Plan replaces communication: Plan supplements communication
291
+ - Over-plan simple work: Use judgment on when plans add value
295
292
 
296
293
  ---
297
294
 
@@ -299,17 +296,15 @@ A task is DONE when:
299
296
 
300
297
  ### Good Task Names
301
298
 
302
- | Format | Examples |
303
- | --------------------- | ---------------------------------- |
304
- | `Create [thing]` | Create user authentication schema |
305
- | `Implement [feature]` | Implement password reset flow |
306
- | `Update [existing]` | Update API error handling |
307
- | `Add [capability]` | Add email validation to signup |
308
- | `Remove [deprecated]` | Remove legacy auth endpoints |
309
- | `Fix [issue]` | Fix timezone conversion bug |
310
- | `Migrate [from → to]` | Migrate users table to new schema |
311
- | `Test [component]` | Test payment processing edge cases |
312
- | `Document [topic]` | Document API authentication flow |
299
+ - `Create [thing]`: Create user authentication schema
300
+ - `Implement [feature]`: Implement password reset flow
301
+ - `Update [existing]`: Update API error handling
302
+ - `Add [capability]`: Add email validation to signup
303
+ - `Remove [deprecated]`: Remove legacy auth endpoints
304
+ - `Fix [issue]`: Fix timezone conversion bug
305
+ - `Migrate [from → to]`: Migrate users table to new schema
306
+ - `Test [component]`: Test payment processing edge cases
307
+ - `Document [topic]`: Document API authentication flow
313
308
 
314
309
  ---
315
310
 
@@ -348,12 +343,10 @@ Before starting implementation:
348
343
 
349
344
  ## 🔗 Related Skills
350
345
 
351
- | Need | Skill |
352
- | ------------------------- | ---------------------- |
353
- | Discovery before planning | `brainstorming` |
354
- | Debugging with structure | `systematic-debugging` |
355
- | Clean implementation | `clean-code` |
356
- | API task breakdown | `api-patterns` |
346
+ - Discovery before planning: `brainstorming`
347
+ - Debugging with structure: `systematic-debugging`
348
+ - Clean implementation: `clean-code`
349
+ - API task breakdown: `api-patterns`
357
350
 
358
351
  ---
359
352
 
@@ -7,20 +7,28 @@ version: 2.0
7
7
 
8
8
  # PostgreSQL Patterns - Advanced Optimization
9
9
 
10
- > **Philosophy:** PostgreSQL is not just a database—it's a platform. Master its unique features to build performant, secure systems.
10
+ ## Quick Reference
11
+
12
+ - **EXPLAIN**: `EXPLAIN ANALYZE` for slow queries · Seq Scan on large tables = add index · `Index Scan` = optimal
13
+ - **Indexes**: B-tree (default) · GIN (JSON/full-text) · BRIN (time-series) · Composite: leftmost column rule
14
+ - **RLS**: `ALTER TABLE t ENABLE ROW LEVEL SECURITY` · Policy per tenant via `current_setting('app.tenant_id')`
15
+ - **Transactions**: Use explicit `BEGIN/COMMIT` for multi-statement · `FOR UPDATE` for pessimistic locking
16
+ - **JSON**: `jsonb` not `json` · Index with GIN · `->` for key · `->>` for text value
17
+ - **Performance**: Connection pooling (PgBouncer) · `VACUUM ANALYZE` periodically · Partial indexes for filtered queries
18
+
19
+ ---
20
+
11
21
 
12
22
  ---
13
23
 
14
24
  ## When to Use This Skill
15
25
 
16
- | Use | Don't Use |
17
- | ------------------------------- | ---------------------------- |
18
- | PostgreSQL schema design | Database-agnostic design |
19
- | Query optimization with EXPLAIN | Choosing between databases |
20
- | Row-Level Security (RLS) | ORM selection |
21
- | Partitioning strategies | Non-PostgreSQL databases |
22
- | PostgreSQL-specific data types | Basic normalization concepts |
23
- | JSONB, arrays, range types | N+1 query patterns (use ORM) |
26
+ - PostgreSQL schema design: Database-agnostic design
27
+ - Query optimization with EXPLAIN: Choosing between databases
28
+ - Row-Level Security (RLS): ORM selection
29
+ - Partitioning strategies: Non-PostgreSQL databases
30
+ - PostgreSQL-specific data types: Basic normalization concepts
31
+ - JSONB, arrays, range types: N+1 query patterns (use ORM)
24
32
 
25
33
  ➡️ For general database concepts, see `database-design` skill.
26
34
 
@@ -157,14 +165,12 @@ SELECT * FROM orders WHERE user_id = 123;
157
165
 
158
166
  ### Common Optimizations
159
167
 
160
- | Problem | Solution |
161
- | ------------------------ | ------------------------------------ |
162
- | Seq Scan on filtered col | Add index on WHERE columns |
163
- | Slow ORDER BY | Index matches ORDER BY columns |
164
- | Low selectivity | Partial index on common filter |
165
- | JSONB field queries | Extract to generated column + B-tree |
166
- | LIKE '%pattern%' | pg_trgm extension + GIN index |
167
- | Cross-table queries | Covering index with INCLUDE |
168
+ - Seq Scan on filtered col: Add index on WHERE columns
169
+ - Slow ORDER BY: Index matches ORDER BY columns
170
+ - Low selectivity: Partial index on common filter
171
+ - JSONB field queries: Extract to generated column + B-tree
172
+ - LIKE '%pattern%': pg_trgm extension + GIN index
173
+ - Cross-table queries: Covering index with INCLUDE
168
174
 
169
175
  ### Join Optimization
170
176
 
@@ -206,12 +212,10 @@ ALTER TABLE documents FORCE ROW LEVEL SECURITY;
206
212
 
207
213
  ### When to Partition
208
214
 
209
- | Criteria | Threshold |
210
- | -------------- | ---------------- |
211
- | Table size | > 100M rows |
212
- | Query filter | Always on date |
213
- | Data lifecycle | Retention policy |
214
- | Maintenance | Bulk deletes |
215
+ - Table size: > 100M rows
216
+ - Query filter: Always on date
217
+ - Data lifecycle: Retention policy
218
+ - Maintenance: Bulk deletes
215
219
 
216
220
  ### Partition Types
217
221
 
@@ -334,27 +338,23 @@ Before production:
334
338
 
335
339
  ## Anti-Patterns
336
340
 
337
- | Don't | Do |
338
- | ---------------------------- | ----------------------------------- |
339
- | Use TIMESTAMP without TZ | Use TIMESTAMPTZ |
340
- | VARCHAR(n) for variable text | TEXT with CHECK constraints |
341
- | SERIAL for IDs | BIGINT GENERATED ALWAYS AS IDENTITY |
342
- | JSON type | JSONB (indexable, smaller) |
343
- | Index every column | Index query patterns |
344
- | Ignore EXPLAIN output | Analyze before optimizing |
345
- | Store arrays for relations | Use junction tables |
346
- | Mixed-case identifiers | snake_case (unquoted) |
341
+ - Use TIMESTAMP without TZ: Use TIMESTAMPTZ
342
+ - VARCHAR(n) for variable text: TEXT with CHECK constraints
343
+ - SERIAL for IDs: BIGINT GENERATED ALWAYS AS IDENTITY
344
+ - JSON type: JSONB (indexable, smaller)
345
+ - Index every column: Index query patterns
346
+ - Ignore EXPLAIN output: Analyze before optimizing
347
+ - Store arrays for relations: Use junction tables
348
+ - Mixed-case identifiers: snake_case (unquoted)
347
349
 
348
350
  ---
349
351
 
350
352
  ## Related Skills
351
353
 
352
- | Need | Skill |
353
- | ----------------- | ----------------------- |
354
- | General DB design | `database-design` |
355
- | API integration | `api-patterns` |
356
- | Query performance | `performance-profiling` |
357
- | Security patterns | `security-fundamentals` |
354
+ - General DB design: `database-design`
355
+ - API integration: `api-patterns`
356
+ - Query performance: `performance-profiling`
357
+ - Security patterns: `security-fundamentals`
358
358
 
359
359
  ---
360
360
 
@@ -8,19 +8,27 @@ priority: CRITICAL
8
8
 
9
9
  # Prompt Engineering - AI Communication Excellence
10
10
 
11
- > **Philosophy:** Prompts are code. They should be **specific, structured, and testable**. Vague prompts produce vague results.
11
+ ## Quick Reference
12
+
13
+ - **Structure**: Role → Task → Format → Constraints → Examples → Output format
14
+ - **Be specific**: Vague prompt = vague output · specify length, format, tone, audience
15
+ - **Chain of Thought**: "Think step by step" for complex reasoning · "First, list..." for structured output
16
+ - **Few-shot**: 2-5 examples beats 1000-word description · Show don't tell
17
+ - **Iteration**: Start simple → add constraints → refine · Save effective prompts as templates
18
+ - **System prompt**: Set persona + rules + format once · User message = task only
19
+
20
+ ---
21
+
12
22
 
13
23
  ---
14
24
 
15
25
  ## Core Principles
16
26
 
17
- | Principle | Rule |
18
- | -------------- | -------------------------------------------------- |
19
- | **Specific** | Ambiguity causes inconsistent outputs |
20
- | **Structured** | Clear sections: Context Task → Format → Examples |
21
- | **Testable** | Evaluate on diverse inputs, measure consistency |
22
- | **Iterative** | Start simple, add complexity only when needed |
23
- | **Versioned** | Treat prompts as code with proper version control |
27
+ - **Specific**: Ambiguity causes inconsistent outputs
28
+ - **Structured**: Clear sections: Context → Task → Format → Examples
29
+ - **Testable**: Evaluate on diverse inputs, measure consistency
30
+ - **Iterative**: Start simple, add complexity only when needed
31
+ - **Versioned**: Treat prompts as code with proper version control
24
32
 
25
33
  ---
26
34
 
@@ -65,12 +73,10 @@ You are a senior backend engineer specializing in API design.
65
73
 
66
74
  ### 1. Few-Shot Learning
67
75
 
68
- | When to Use | Examples Needed |
69
- | -------------------------- | ------------------ |
70
- | Consistent formatting | 2-3 examples |
71
- | Complex reasoning patterns | 3-5 examples |
72
- | Edge case handling | Include edge cases |
73
- | Simple tasks | 0-1 examples |
76
+ - Consistent formatting: 2-3 examples
77
+ - Complex reasoning patterns: 3-5 examples
78
+ - Edge case handling: Include edge cases
79
+ - Simple tasks: 0-1 examples
74
80
 
75
81
  ```markdown
76
82
  Extract key information:
@@ -182,11 +188,9 @@ If uncertain:
182
188
 
183
189
  ### Token Efficiency
184
190
 
185
- | Inefficient | Efficient |
186
- | ---------------------------------- | -------------------------------- |
187
- | Long verbose instructions | Concise, direct commands |
188
- | Repeating context in every message | System prompt for stable context |
189
- | 10 examples when 3 suffice | Minimal effective examples |
191
+ - Long verbose instructions: Concise, direct commands
192
+ - Repeating context in every message: System prompt for stable context
193
+ - 10 examples when 3 suffice: Minimal effective examples
190
194
 
191
195
  ---
192
196
 
@@ -215,15 +219,13 @@ Task complexity?
215
219
 
216
220
  ## Anti-Patterns (DON'T)
217
221
 
218
- | Anti-Pattern | Correct Approach |
219
- | ------------------------------ | --------------------------------- |
220
- | Vague instructions | Specific, measurable requirements |
221
- | Complex prompt from start | Start simple, iterate |
222
- | Examples that don't match task | Representative, diverse examples |
223
- | No output format specified | Clear format expectations |
224
- | Ignoring edge cases | Test on boundary inputs |
225
- | Same prompt for all tasks | Task-specific optimized prompts |
226
- | No version control | Git-track prompts like code |
222
+ - Vague instructions: Specific, measurable requirements
223
+ - Complex prompt from start: Start simple, iterate
224
+ - Examples that don't match task: Representative, diverse examples
225
+ - No output format specified: Clear format expectations
226
+ - Ignoring edge cases: Test on boundary inputs
227
+ - Same prompt for all tasks: Task-specific optimized prompts
228
+ - No version control: Git-track prompts like code
227
229
 
228
230
  ---
229
231
 
@@ -252,25 +254,21 @@ Task complexity?
252
254
 
253
255
  ## 🔴 Self-Check Before Completing
254
256
 
255
- | Check | Question |
256
- | ---------------------- | ---------------------------------- |
257
- | ✅ **Specific?** | No ambiguous instructions? |
258
- | ✅ **Structured?** | Role Task Format → Examples? |
259
- | ✅ **Tested?** | Evaluated on diverse inputs? |
260
- | ✅ **Versioned?** | Prompt tracked in version control? |
261
- | ✅ **Optimized?** | Minimal tokens, maximum clarity? |
262
- | ✅ **Error handling?** | Handles uncertain/edge cases? |
257
+ - **Specific?**: No ambiguous instructions?
258
+ - **Structured?**: Role → Task → Format → Examples?
259
+ - ✅ **Tested?**: Evaluated on diverse inputs?
260
+ - ✅ **Versioned?**: Prompt tracked in version control?
261
+ - ✅ **Optimized?**: Minimal tokens, maximum clarity?
262
+ - ✅ **Error handling?**: Handles uncertain/edge cases?
263
263
 
264
264
  ---
265
265
 
266
266
  ## Related Skills
267
267
 
268
- | Need | Skill |
269
- | ----------------------- | ------------------------ |
270
- | Agent design | `agent-creator` (future) |
271
- | Skill creation | `skill-creator` (future) |
272
- | AI application patterns | `ai-patterns` (future) |
273
- | User communication | `brainstorming` |
268
+ - Agent design: `agent-creator` (future)
269
+ - Skill creation: `skill-creator` (future)
270
+ - AI application patterns: `ai-patterns` (future)
271
+ - User communication: `brainstorming`
274
272
 
275
273
  ---
276
274
 
@@ -7,7 +7,17 @@ tags: [architecture, queue, jobs, async, reliability]
7
7
 
8
8
  # Queue Patterns - Background Job Processing Skill
9
9
 
10
- > **Purpose:** Enable AI agents to design and implement reliable message queue systems with proper retry strategies, idempotency, and observability.
10
+ ## Quick Reference
11
+
12
+ - **System selection**: Node.js → BullMQ · Python → Celery · Serverless → SQS · Multi-lang → RabbitMQ · Streaming → Kafka
13
+ - **Job design**: Small payload (IDs only) · Idempotency key · Include tenant_id/correlation_id · Set timeout
14
+ - **Retry**: Exponential backoff · Max 3-5 attempts · Dead Letter Queue after max retries · DLQ monitored
15
+ - **Idempotency**: Running same job 2x = same result · Check before write · Deduplication key
16
+ - **Concurrency**: Bounded limits · Rate limit external API calls · Separate queues by priority (fast/normal/bulk)
17
+ - **Monitoring**: Queue depth · Processing time · DLQ count · Stalled jobs alerts
18
+
19
+ ---
20
+
11
21
 
12
22
  ---
13
23
 
@@ -27,13 +37,11 @@ tags: [architecture, queue, jobs, async, reliability]
27
37
 
28
38
  > **"A queue is a promise: jobs go in, results come out, nothing is lost."**
29
39
 
30
- | Principle | Implementation |
31
- | --------------------------- | -------------------------------------------------------- |
32
- | **Jobs Are Sacred** | Every job must complete, fail explicitly, or move to DLQ |
33
- | **Idempotency by Design** | Same job running twice = same outcome |
34
- | **Reliability Over Speed** | Slow and correct beats fast and lossy |
35
- | **Observability Mandatory** | Every job traceable from start to end |
36
- | **Fail Closed** | Unknown errors → retry, not ignore |
40
+ - **Jobs Are Sacred**: Every job must complete, fail explicitly, or move to DLQ
41
+ - **Idempotency by Design**: Same job running twice = same outcome
42
+ - **Reliability Over Speed**: Slow and correct beats fast and lossy
43
+ - **Observability Mandatory**: Every job traceable from start to end
44
+ - **Fail Closed**: Unknown errors retry, not ignore
37
45
 
38
46
  ---
39
47
 
@@ -169,14 +177,12 @@ WAITING → ACTIVE → COMPLETED
169
177
 
170
178
  ### Queue Architecture Decisions
171
179
 
172
- | Need | Solution |
173
- | -------------------------- | --------------------------------- |
174
- | Fast priority jobs | Separate priority queue |
175
- | Delayed execution | Scheduled jobs with `delay` |
176
- | Rate limiting external API | Limiter group in BullMQ |
177
- | Strict ordering | FIFO with job grouping |
178
- | Large batch processing | Parent-child jobs (chunking) |
179
- | Multi-tenant isolation | Queue per tenant OR tenant prefix |
180
+ - Fast priority jobs: Separate priority queue
181
+ - Delayed execution: Scheduled jobs with `delay`
182
+ - Rate limiting external API: Limiter group in BullMQ
183
+ - Strict ordering: FIFO with job grouping
184
+ - Large batch processing: Parent-child jobs (chunking)
185
+ - Multi-tenant isolation: Queue per tenant OR tenant prefix
180
186
 
181
187
  ### Concurrency Patterns
182
188
 
@@ -8,19 +8,27 @@ priority: MEDIUM
8
8
 
9
9
  # React Native Patterns - Mobile Excellence with Expo
10
10
 
11
- > **Philosophy:** Use Expo unless you have a very specific reason not to. OTA updates, managed native code, and faster development are worth the trade-offs.
11
+ ## Quick Reference
12
+
13
+ - **Framework**: Expo managed → EAS Build → Bare (native modules only)
14
+ - **Lists**: `FlatList`/`FlashList` not `ScrollView` for long lists · `keyExtractor` required
15
+ - **State**: Local → useState · Global → Zustand/Jotai · Server → React Query
16
+ - **Navigation**: expo-router (file-based) or @react-navigation · Always wrap in `NavigationContainer`
17
+ - **Performance**: Reanimated for 60fps animations · `memo` + `useCallback` · `InteractionManager` for heavy ops
18
+ - **Native**: MMKV for fast storage · expo-secure-store for secrets · Test on physical device always
19
+
20
+ ---
21
+
12
22
 
13
23
  ---
14
24
 
15
25
  ## 🎯 Core Principles
16
26
 
17
- | Principle | Rule |
18
- | ------------------ | ----------------------------------------------------- |
19
- | **Expo First** | Start with Expo, eject only when absolutely necessary |
20
- | **Platform Aware** | One codebase, platform-specific polish |
21
- | **Offline Ready** | Assume network is unreliable |
22
- | **Performance** | FlashList, memoization, native thread animations |
23
- | **Type Safe** | TypeScript is mandatory |
27
+ - **Expo First**: Start with Expo, eject only when absolutely necessary
28
+ - **Platform Aware**: One codebase, platform-specific polish
29
+ - **Offline Ready**: Assume network is unreliable
30
+ - **Performance**: FlashList, memoization, native thread animations
31
+ - **Type Safe**: TypeScript is mandatory
24
32
 
25
33
  ```
26
34
  ❌ WRONG: Bare React Native for simple apps
@@ -352,41 +360,35 @@ eas update --branch production --message "Bug fixes"
352
360
 
353
361
  ## 🚨 Anti-Patterns
354
362
 
355
- | Don't | Do |
356
- | ---------------------------- | ------------------------------------ |
357
- | Use FlatList for large lists | Use FlashList |
358
- | Inline styles | Use StyleSheet.create |
359
- | Fetch in render | Use useEffect or React Query |
360
- | Ignore platform differences | Test on both iOS and Android |
361
- | Store secrets in code | Use environment variables |
362
- | Skip error boundaries | Handle crashes gracefully |
363
- | Animate on JS thread | Use Reanimated for native animations |
364
- | Forget offline handling | Implement offline-first |
363
+ - Use FlatList for large lists: Use FlashList
364
+ - Inline styles: Use StyleSheet.create
365
+ - Fetch in render: Use useEffect or React Query
366
+ - Ignore platform differences: Test on both iOS and Android
367
+ - Store secrets in code: Use environment variables
368
+ - Skip error boundaries: Handle crashes gracefully
369
+ - Animate on JS thread: Use Reanimated for native animations
370
+ - Forget offline handling: Implement offline-first
365
371
 
366
372
  ---
367
373
 
368
374
  ## ✅ Self-Check Before Completing
369
375
 
370
- | Check | Question |
371
- | ------------------- | ---------------------------------------- |
372
- | ✅ **Expo?** | Using Expo unless specifically required? |
373
- | ✅ **TypeScript?** | Full type coverage? |
374
- | ✅ **Offline?** | Handles offline state gracefully? |
375
- | ✅ **Platform?** | Tested on both iOS and Android? |
376
- | ✅ **Performance?** | FlashList, memoization, Reanimated? |
377
- | ✅ **Secure?** | Tokens in SecureStore, not AsyncStorage? |
378
- | ✅ **Navigation?** | Expo Router properly configured? |
376
+ - **Expo?**: Using Expo unless specifically required?
377
+ - **TypeScript?**: Full type coverage?
378
+ - ✅ **Offline?**: Handles offline state gracefully?
379
+ - ✅ **Platform?**: Tested on both iOS and Android?
380
+ - ✅ **Performance?**: FlashList, memoization, Reanimated?
381
+ - ✅ **Secure?**: Tokens in SecureStore, not AsyncStorage?
382
+ - ✅ **Navigation?**: Expo Router properly configured?
379
383
 
380
384
  ---
381
385
 
382
386
  ## 🔗 Related Skills
383
387
 
384
- | Need | Skill |
385
- | ------------------ | ------------------ |
386
- | Flutter comparison | `flutter-patterns` |
387
- | Mobile design | `mobile-design` |
388
- | React patterns | `react-patterns` |
389
- | Testing | `testing-patterns` |
388
+ - Flutter comparison: `flutter-patterns`
389
+ - Mobile design: `mobile-design`
390
+ - React patterns: `react-patterns`
391
+ - Testing: `testing-patterns`
390
392
 
391
393
  ---
392
394