@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
@@ -7,7 +7,16 @@ version: 2.0
7
7
 
8
8
  # Testing Patterns - Principles & Best Practices
9
9
 
10
- > **Philosophy:** Tests are documentation. Write tests that explain behavior, not implementation.
10
+ ## Quick Reference
11
+
12
+ - **Pyramid**: Unit (fast/many) > Integration (medium) > E2E (slow/few) · 70/20/10 ratio
13
+ - **AAA pattern**: Arrange (setup) → Act (execute) → Assert (verify) · 1 assertion per concern
14
+ - **Naming**: `describe('UserService')` / `it('should throw when email invalid')` · behavior not implementation
15
+ - **Mocking**: Mock external deps (DB/API/time) · Don't mock internals · Use MSW for HTTP
16
+ - **Coverage**: 80%+ meaningful coverage · 100% for critical paths · Coverage ≠ quality
17
+ - **Avoid**: `expect(true).toBe(true)` · Tests that test mocks · Snapshot tests for logic
18
+
19
+ ---
11
20
 
12
21
  ---
13
22
 
@@ -85,13 +94,11 @@ describe("UserService", () => {
85
94
 
86
95
  ### What to Unit Test
87
96
 
88
- | Test | Don't Test |
89
- | -------------- | ------------------------ |
90
- | Business logic | Framework code |
91
- | Edge cases | Third-party libraries |
92
- | Error handling | Simple getters/setters |
93
- | Calculations | Constructor-only classes |
94
- | Validations | Private methods directly |
97
+ - Business logic: Framework code
98
+ - Edge cases: Third-party libraries
99
+ - Error handling: Simple getters/setters
100
+ - Calculations: Constructor-only classes
101
+ - Validations: Private methods directly
95
102
 
96
103
  ---
97
104
 
@@ -139,13 +146,11 @@ describe("UserAPI", () => {
139
146
 
140
147
  ### When to Mock
141
148
 
142
- | Mock | Don't Mock |
143
- | ------------------------ | ------------------- |
144
- | External APIs | Code under test |
145
- | Database (in unit tests) | Simple dependencies |
146
- | Time/Date | Pure functions |
147
- | Network calls | In-memory stores |
148
- | Third-party services | Internal modules |
149
+ - External APIs: Code under test
150
+ - Database (in unit tests): Simple dependencies
151
+ - Time/Date: Pure functions
152
+ - Network calls: In-memory stores
153
+ - Third-party services: Internal modules
149
154
 
150
155
  ### Mock Types
151
156
 
@@ -213,12 +218,10 @@ const user = createUser({ role: "admin" });
213
218
 
214
219
  ## Test Naming Conventions
215
220
 
216
- | Pattern | Example |
217
- | --------------------------------- | ---------------------------------------- |
218
- | **should_behavior** | `should returnErrorWhenUserNotFound` |
219
- | **when_condition** | `whenUserIsNull_throwsError` |
220
- | **given_when_then** | `givenValidInput_whenSubmit_thenSuccess` |
221
- | **methodName_condition_expected** | `getUser_withInvalidId_returnsNull` |
221
+ - **should_behavior**: `should returnErrorWhenUserNotFound`
222
+ - **when_condition**: `whenUserIsNull_throwsError`
223
+ - **given_when_then**: `givenValidInput_whenSubmit_thenSuccess`
224
+ - **methodName_condition_expected**: `getUser_withInvalidId_returnsNull`
222
225
 
223
226
  **Rule:** Test names should describe behavior, not implementation.
224
227
 
@@ -226,34 +229,28 @@ const user = createUser({ role: "admin" });
226
229
 
227
230
  ## Coverage Guidelines
228
231
 
229
- | Level | Meaning |
230
- | -------- | ----------------------------------- |
231
- | **80%+** | Good coverage for most projects |
232
- | **90%+** | High coverage, critical systems |
233
- | **100%** | Often impractical, may waste effort |
232
+ - **80%+**: Good coverage for most projects
233
+ - **90%+**: High coverage, critical systems
234
+ - **100%**: Often impractical, may waste effort
234
235
 
235
236
  ### What to Cover
236
237
 
237
- | Priority | Area |
238
- | ---------- | ---------------------------- |
239
- | **High** | Business logic, calculations |
240
- | **Medium** | Error paths, edge cases |
241
- | **Low** | Simple getters, boilerplate |
238
+ - **High**: Business logic, calculations
239
+ - **Medium**: Error paths, edge cases
240
+ - **Low**: Simple getters, boilerplate
242
241
 
243
242
  ---
244
243
 
245
244
  ## Anti-Patterns
246
245
 
247
- | Don't | Do |
248
- | --------------------------- | -------------------------- |
249
- | Test implementation details | Test behavior/outcomes |
250
- | Duplicate test code | Use factories/helpers |
251
- | Complex test setup | Simplify or split tests |
252
- | Ignore flaky tests | Fix root cause immediately |
253
- | Skip cleanup | Reset state every test |
254
- | Test multiple things | One assertion per test |
255
- | Hard-code test data | Use factories |
256
- | Rely on test order | Make tests independent |
246
+ - Test implementation details: Test behavior/outcomes
247
+ - Duplicate test code: Use factories/helpers
248
+ - Complex test setup: Simplify or split tests
249
+ - Ignore flaky tests: Fix root cause immediately
250
+ - Skip cleanup: Reset state every test
251
+ - Test multiple things: One assertion per test
252
+ - Hard-code test data: Use factories
253
+ - Rely on test order: Make tests independent
257
254
 
258
255
  ---
259
256
 
@@ -273,12 +270,10 @@ Before pushing code:
273
270
 
274
271
  ## Related Skills
275
272
 
276
- | Need | Skill |
277
- | ------------------- | ----------------------- |
278
- | Clean code | `clean-code` |
279
- | API testing | `api-patterns` |
280
- | E2E testing | `webapp-testing` |
281
- | Performance testing | `performance-profiling` |
273
+ - Clean code: `clean-code`
274
+ - API testing: `api-patterns`
275
+ - E2E testing: `webapp-testing`
276
+ - Performance testing: `performance-profiling`
282
277
 
283
278
  ---
284
279
 
@@ -6,17 +6,25 @@ allowed-tools: Read, Write, Edit, Glob, Grep
6
6
 
7
7
  # TypeScript Patterns
8
8
 
9
- > **Philosophy:** Types are documentation that never lies. Strong types catch bugs at compile time, not runtime.
9
+ ## Quick Reference
10
+
11
+ - **Strict mode**: Always `"strict": true` · `noUncheckedIndexedAccess` · `exactOptionalPropertyTypes`
12
+ - **No `any`**: Use `unknown` for unknowns · type narrowing with guards · `as` only as last resort
13
+ - **Utilities**: `Partial<T>` · `Required<T>` · `Pick<T,K>` · `Omit<T,K>` · `Record<K,V>` · `ReturnType<F>`
14
+ - **Type vs Interface**: `interface` for objects/classes (extendable) · `type` for unions/intersections
15
+ - **Async**: Always type return `Promise<T>` · use `try/catch` with typed errors · avoid `void` for important returns
16
+ - **Inference**: Let TS infer when obvious · explicit types for API boundaries and function params
17
+
18
+ ---
19
+
10
20
 
11
21
  ---
12
22
 
13
23
  ## 📑 Content Map
14
24
 
15
- | File | When to Read |
16
- | ------------------------------- | ----------------------- |
17
- | `references/advanced-types.md` | Complex type gymnastics |
18
- | `references/error-patterns.md` | Debugging type errors |
19
- | `references/migration-guide.md` | JS to TS migration |
25
+ - `references/advanced-types.md`: Complex type gymnastics
26
+ - `references/error-patterns.md`: Debugging type errors
27
+ - `references/migration-guide.md`: JS to TS migration
20
28
 
21
29
  ---
22
30
 
@@ -144,12 +152,10 @@ type GetUserParams = Parameters<typeof getUser>;
144
152
  }
145
153
  ```
146
154
 
147
- | Flag | What It Does |
148
- | ---------------------------- | -------------------------------------------- |
149
- | `strict` | Enables all strict type checking |
150
- | `noUncheckedIndexedAccess` | Array/object access returns `T \| undefined` |
151
- | `noImplicitOverride` | Require `override` keyword |
152
- | `exactOptionalPropertyTypes` | Distinguish `undefined` vs missing |
155
+ - `strict`: Enables all strict type checking
156
+ - `noUncheckedIndexedAccess`: Array/object access returns `T \
157
+ - `noImplicitOverride`: Require `override` keyword
158
+ - `exactOptionalPropertyTypes`: Distinguish `undefined` vs missing
153
159
 
154
160
  ---
155
161
 
@@ -162,12 +168,10 @@ type GetUserParams = Parameters<typeof getUser>;
162
168
  npx tsc --extendedDiagnostics --incremental false | grep -E "Check time|Files:|Lines:|Nodes:"
163
169
  ```
164
170
 
165
- | Problem | Solution |
166
- | ----------------------------- | --------------------------- |
167
- | Slow type checking | Enable `skipLibCheck: true` |
168
- | Rebuilding everything | Enable `incremental: true` |
169
- | Large codebase | Use Project References |
170
- | "Type instantiation too deep" | See fixes below |
171
+ - Slow type checking: Enable `skipLibCheck: true`
172
+ - Rebuilding everything: Enable `incremental: true`
173
+ - Large codebase: Use Project References
174
+ - "Type instantiation too deep": See fixes below
171
175
 
172
176
  ### Fixing "Type instantiation is excessively deep"
173
177
 
@@ -194,20 +198,16 @@ type Prev = [never, 0, 1, 2, 3, 4];
194
198
 
195
199
  ### "The inferred type of X cannot be named"
196
200
 
197
- | Cause | Fix |
198
- | ------------------- | ------------------------------------ |
199
- | Missing type export | Export the required type explicitly |
200
- | Circular dependency | Use type-only imports: `import type` |
201
- | Complex inference | Use `ReturnType<typeof fn>` |
201
+ - Missing type export: Export the required type explicitly
202
+ - Circular dependency: Use type-only imports: `import type`
203
+ - Complex inference: Use `ReturnType<typeof fn>`
202
204
 
203
205
  ### "Cannot find module"
204
206
 
205
- | Cause | Fix |
206
- | ---------------------- | ----------------------------------------- |
207
- | Wrong moduleResolution | Match your bundler (node, bundler) |
208
- | Missing baseUrl | Check tsconfig paths alignment |
209
- | Monorepo setup | Use workspace protocol (workspace:\*) |
210
- | Cache issues | `rm -rf node_modules/.cache .tsbuildinfo` |
207
+ - Wrong moduleResolution: Match your bundler (node, bundler)
208
+ - Missing baseUrl: Check tsconfig paths alignment
209
+ - Monorepo setup: Use workspace protocol (workspace:\*)
210
+ - Cache issues: `rm -rf node_modules/.cache .tsbuildinfo`
211
211
 
212
212
  ### Missing Type Declarations
213
213
 
@@ -231,11 +231,9 @@ declare module "cjs-package" {
231
231
 
232
232
  ### ESM-First Approach
233
233
 
234
- | Configuration | Value |
235
- | ------------------- | ------------------------- |
236
- | package.json `type` | `"module"` |
237
- | moduleResolution | `"bundler"` or `"node16"` |
238
- | module | `"esnext"` or `"node16"` |
234
+ - package.json `type`: `"module"`
235
+ - moduleResolution: `"bundler"` or `"node16"`
236
+ - module: `"esnext"` or `"node16"`
239
237
 
240
238
  ### CJS Interop
241
239
 
@@ -269,10 +267,8 @@ const defaultExport = pkg.default || pkg;
269
267
 
270
268
  ### Nx vs Turborepo Decision
271
269
 
272
- | Choose | When |
273
- | ------------- | ------------------------------------- |
274
- | **Turborepo** | Simple structure, speed, <20 packages |
275
- | **Nx** | Complex deps, visualization, plugins |
270
+ - **Turborepo**: Simple structure, speed, <20 packages
271
+ - **Nx**: Complex deps, visualization, plugins
276
272
 
277
273
  ---
278
274
 
@@ -280,10 +276,8 @@ const defaultExport = pkg.default || pkg;
280
276
 
281
277
  ### Biome vs ESLint
282
278
 
283
- | Choose | When |
284
- | ---------- | ---------------------------------------- |
285
- | **Biome** | Speed critical, single tool, TS-first |
286
- | **ESLint** | Need specific rules, Vue/Angular support |
279
+ - **Biome**: Speed critical, single tool, TS-first
280
+ - **ESLint**: Need specific rules, Vue/Angular support
287
281
 
288
282
  ### Type Testing
289
283
 
@@ -357,15 +351,13 @@ function handleStatus(status: Status) {
357
351
 
358
352
  ## 10. Anti-Patterns
359
353
 
360
- | Don't | Do |
361
- | --------------------------------- | -------------------------------- |
362
- | `any` everywhere | `unknown` with type guards |
363
- | Excessive type assertions (`as`) | Proper type inference |
364
- | Ignoring strict mode | Enable all strict flags |
365
- | Complex mapped types in hot paths | Pre-compute, cache types |
366
- | Index as object key without check | `noUncheckedIndexedAccess: true` |
367
- | Type in separate file from impl | Co-locate types with code |
368
- | Over-complicated generics | Simpler solution first |
354
+ - `any` everywhere: `unknown` with type guards
355
+ - Excessive type assertions (`as`): Proper type inference
356
+ - Ignoring strict mode: Enable all strict flags
357
+ - Complex mapped types in hot paths: Pre-compute, cache types
358
+ - Index as object key without check: `noUncheckedIndexedAccess: true`
359
+ - Type in separate file from impl: Co-locate types with code
360
+ - Over-complicated generics: Simpler solution first
369
361
 
370
362
  ---
371
363
 
@@ -373,20 +365,16 @@ function handleStatus(status: Status) {
373
365
 
374
366
  ### JavaScript to TypeScript
375
367
 
376
- | Phase | Action |
377
- | ----- | --------------------------------------- |
378
- | 1 | Enable `allowJs`, `checkJs` in tsconfig |
379
- | 2 | Rename files `.js` → `.ts` gradually |
380
- | 3 | Add types file by file |
381
- | 4 | Enable strict mode progressively |
368
+ - 1: Enable `allowJs`, `checkJs` in tsconfig
369
+ - 2: Rename files `.js` → `.ts` gradually
370
+ - 3: Add types file by file
371
+ - 4: Enable strict mode progressively
382
372
 
383
373
  ### Useful Tools
384
374
 
385
- | Tool | Purpose |
386
- | ------------ | ------------------------------- |
387
- | `ts-migrate` | Automated migration from Airbnb |
388
- | `typesync` | Install missing @types |
389
- | `TypeStat` | Auto-fix TypeScript types |
375
+ - `ts-migrate`: Automated migration from Airbnb
376
+ - `typesync`: Install missing @types
377
+ - `TypeStat`: Auto-fix TypeScript types
390
378
 
391
379
  ---
392
380
 
@@ -405,12 +393,10 @@ function handleStatus(status: Status) {
405
393
 
406
394
  ## Related Skills
407
395
 
408
- | Need | Skill |
409
- | ------------------ | ----------------------- |
410
- | React + TypeScript | `react-patterns` |
411
- | API design | `api-patterns` |
412
- | Testing | `testing-patterns` |
413
- | Performance | `performance-profiling` |
396
+ - React + TypeScript: `react-patterns`
397
+ - API design: `api-patterns`
398
+ - Testing: `testing-patterns`
399
+ - Performance: `performance-profiling`
414
400
 
415
401
  ---
416
402