cp-toolkit 2.0.0

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 (196) hide show
  1. package/README.md +130 -0
  2. package/bin/cp-kit.js +72 -0
  3. package/package.json +46 -0
  4. package/src/commands/add.js +212 -0
  5. package/src/commands/doctor.js +149 -0
  6. package/src/commands/init.js +662 -0
  7. package/src/commands/list.js +128 -0
  8. package/src/index.js +13 -0
  9. package/templates/agents/backend-specialist.md +263 -0
  10. package/templates/agents/code-archaeologist.md +106 -0
  11. package/templates/agents/database-architect.md +226 -0
  12. package/templates/agents/debugger.md +225 -0
  13. package/templates/agents/devops-engineer.md +242 -0
  14. package/templates/agents/documentation-writer.md +104 -0
  15. package/templates/agents/explorer-agent.md +73 -0
  16. package/templates/agents/frontend-specialist.md +556 -0
  17. package/templates/agents/game-developer.md +162 -0
  18. package/templates/agents/mobile-developer.md +377 -0
  19. package/templates/agents/orchestrator.md +416 -0
  20. package/templates/agents/penetration-tester.md +188 -0
  21. package/templates/agents/performance-optimizer.md +187 -0
  22. package/templates/agents/product-manager.md +112 -0
  23. package/templates/agents/product-owner.md +95 -0
  24. package/templates/agents/project-planner.md +406 -0
  25. package/templates/agents/qa-automation-engineer.md +103 -0
  26. package/templates/agents/security-auditor.md +170 -0
  27. package/templates/agents/seo-specialist.md +111 -0
  28. package/templates/agents/test-engineer.md +158 -0
  29. package/templates/github/agents/backend-specialist.md +67 -0
  30. package/templates/github/agents/code-archaeologist.md +61 -0
  31. package/templates/github/agents/database-architect.md +73 -0
  32. package/templates/github/agents/debugger.md +71 -0
  33. package/templates/github/agents/devops-engineer.md +85 -0
  34. package/templates/github/agents/documentation-writer.md +107 -0
  35. package/templates/github/agents/explorer-agent.md +87 -0
  36. package/templates/github/agents/frontend-specialist.md +54 -0
  37. package/templates/github/agents/game-developer.md +94 -0
  38. package/templates/github/agents/mobile-developer.md +75 -0
  39. package/templates/github/agents/orchestrator.md +48 -0
  40. package/templates/github/agents/penetration-tester.md +87 -0
  41. package/templates/github/agents/performance-optimizer.md +70 -0
  42. package/templates/github/agents/product-manager.md +85 -0
  43. package/templates/github/agents/product-owner.md +77 -0
  44. package/templates/github/agents/project-planner.md +83 -0
  45. package/templates/github/agents/qa-automation-engineer.md +95 -0
  46. package/templates/github/agents/security-auditor.md +72 -0
  47. package/templates/github/agents/seo-specialist.md +78 -0
  48. package/templates/github/agents/test-engineer.md +79 -0
  49. package/templates/github/instructions/database.instructions.md +74 -0
  50. package/templates/github/instructions/python.instructions.md +76 -0
  51. package/templates/github/instructions/security.instructions.md +73 -0
  52. package/templates/github/instructions/typescript.instructions.md +50 -0
  53. package/templates/rules/GEMINI.md +273 -0
  54. package/templates/scripts/mcp-server.js +704 -0
  55. package/templates/skills/core/behavioral-modes/SKILL.md +242 -0
  56. package/templates/skills/core/brainstorming/SKILL.md +163 -0
  57. package/templates/skills/core/brainstorming/dynamic-questioning.md +350 -0
  58. package/templates/skills/core/clean-code/SKILL.md +201 -0
  59. package/templates/skills/core/intelligent-routing/SKILL.md +335 -0
  60. package/templates/skills/core/mcp-builder/SKILL.md +176 -0
  61. package/templates/skills/core/parallel-agents/SKILL.md +175 -0
  62. package/templates/skills/core/plan-writing/SKILL.md +152 -0
  63. package/templates/skills/optional/api-patterns/SKILL.md +81 -0
  64. package/templates/skills/optional/api-patterns/api-style.md +42 -0
  65. package/templates/skills/optional/api-patterns/auth.md +24 -0
  66. package/templates/skills/optional/api-patterns/documentation.md +26 -0
  67. package/templates/skills/optional/api-patterns/graphql.md +41 -0
  68. package/templates/skills/optional/api-patterns/rate-limiting.md +31 -0
  69. package/templates/skills/optional/api-patterns/response.md +37 -0
  70. package/templates/skills/optional/api-patterns/rest.md +40 -0
  71. package/templates/skills/optional/api-patterns/scripts/api_validator.py +211 -0
  72. package/templates/skills/optional/api-patterns/security-testing.md +122 -0
  73. package/templates/skills/optional/api-patterns/trpc.md +41 -0
  74. package/templates/skills/optional/api-patterns/versioning.md +22 -0
  75. package/templates/skills/optional/app-builder/SKILL.md +75 -0
  76. package/templates/skills/optional/app-builder/agent-coordination.md +71 -0
  77. package/templates/skills/optional/app-builder/feature-building.md +53 -0
  78. package/templates/skills/optional/app-builder/project-detection.md +34 -0
  79. package/templates/skills/optional/app-builder/scaffolding.md +118 -0
  80. package/templates/skills/optional/app-builder/tech-stack.md +40 -0
  81. package/templates/skills/optional/app-builder/templates/SKILL.md +39 -0
  82. package/templates/skills/optional/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  83. package/templates/skills/optional/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  84. package/templates/skills/optional/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  85. package/templates/skills/optional/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  86. package/templates/skills/optional/app-builder/templates/express-api/TEMPLATE.md +83 -0
  87. package/templates/skills/optional/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  88. package/templates/skills/optional/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  89. package/templates/skills/optional/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  90. package/templates/skills/optional/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  91. package/templates/skills/optional/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  92. package/templates/skills/optional/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  93. package/templates/skills/optional/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  94. package/templates/skills/optional/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  95. package/templates/skills/optional/architecture/SKILL.md +55 -0
  96. package/templates/skills/optional/architecture/context-discovery.md +43 -0
  97. package/templates/skills/optional/architecture/examples.md +94 -0
  98. package/templates/skills/optional/architecture/pattern-selection.md +68 -0
  99. package/templates/skills/optional/architecture/patterns-reference.md +50 -0
  100. package/templates/skills/optional/architecture/trade-off-analysis.md +77 -0
  101. package/templates/skills/optional/bash-linux/SKILL.md +199 -0
  102. package/templates/skills/optional/code-review-checklist/SKILL.md +109 -0
  103. package/templates/skills/optional/database-design/SKILL.md +52 -0
  104. package/templates/skills/optional/database-design/database-selection.md +43 -0
  105. package/templates/skills/optional/database-design/indexing.md +39 -0
  106. package/templates/skills/optional/database-design/migrations.md +48 -0
  107. package/templates/skills/optional/database-design/optimization.md +36 -0
  108. package/templates/skills/optional/database-design/orm-selection.md +30 -0
  109. package/templates/skills/optional/database-design/schema-design.md +56 -0
  110. package/templates/skills/optional/database-design/scripts/schema_validator.py +172 -0
  111. package/templates/skills/optional/deployment-procedures/SKILL.md +241 -0
  112. package/templates/skills/optional/documentation-templates/SKILL.md +194 -0
  113. package/templates/skills/optional/frontend-design/SKILL.md +418 -0
  114. package/templates/skills/optional/frontend-design/animation-guide.md +331 -0
  115. package/templates/skills/optional/frontend-design/color-system.md +311 -0
  116. package/templates/skills/optional/frontend-design/decision-trees.md +418 -0
  117. package/templates/skills/optional/frontend-design/motion-graphics.md +306 -0
  118. package/templates/skills/optional/frontend-design/scripts/accessibility_checker.py +183 -0
  119. package/templates/skills/optional/frontend-design/scripts/ux_audit.py +722 -0
  120. package/templates/skills/optional/frontend-design/typography-system.md +345 -0
  121. package/templates/skills/optional/frontend-design/ux-psychology.md +541 -0
  122. package/templates/skills/optional/frontend-design/visual-effects.md +383 -0
  123. package/templates/skills/optional/game-development/2d-games/SKILL.md +119 -0
  124. package/templates/skills/optional/game-development/3d-games/SKILL.md +135 -0
  125. package/templates/skills/optional/game-development/SKILL.md +167 -0
  126. package/templates/skills/optional/game-development/game-art/SKILL.md +185 -0
  127. package/templates/skills/optional/game-development/game-audio/SKILL.md +190 -0
  128. package/templates/skills/optional/game-development/game-design/SKILL.md +129 -0
  129. package/templates/skills/optional/game-development/mobile-games/SKILL.md +108 -0
  130. package/templates/skills/optional/game-development/multiplayer/SKILL.md +132 -0
  131. package/templates/skills/optional/game-development/pc-games/SKILL.md +144 -0
  132. package/templates/skills/optional/game-development/vr-ar/SKILL.md +123 -0
  133. package/templates/skills/optional/game-development/web-games/SKILL.md +150 -0
  134. package/templates/skills/optional/geo-fundamentals/SKILL.md +156 -0
  135. package/templates/skills/optional/geo-fundamentals/scripts/geo_checker.py +289 -0
  136. package/templates/skills/optional/i18n-localization/SKILL.md +154 -0
  137. package/templates/skills/optional/i18n-localization/scripts/i18n_checker.py +241 -0
  138. package/templates/skills/optional/lint-and-validate/SKILL.md +45 -0
  139. package/templates/skills/optional/lint-and-validate/scripts/lint_runner.py +172 -0
  140. package/templates/skills/optional/lint-and-validate/scripts/type_coverage.py +173 -0
  141. package/templates/skills/optional/mobile-design/SKILL.md +394 -0
  142. package/templates/skills/optional/mobile-design/decision-trees.md +516 -0
  143. package/templates/skills/optional/mobile-design/mobile-backend.md +491 -0
  144. package/templates/skills/optional/mobile-design/mobile-color-system.md +420 -0
  145. package/templates/skills/optional/mobile-design/mobile-debugging.md +122 -0
  146. package/templates/skills/optional/mobile-design/mobile-design-thinking.md +357 -0
  147. package/templates/skills/optional/mobile-design/mobile-navigation.md +458 -0
  148. package/templates/skills/optional/mobile-design/mobile-performance.md +767 -0
  149. package/templates/skills/optional/mobile-design/mobile-testing.md +356 -0
  150. package/templates/skills/optional/mobile-design/mobile-typography.md +433 -0
  151. package/templates/skills/optional/mobile-design/platform-android.md +666 -0
  152. package/templates/skills/optional/mobile-design/platform-ios.md +561 -0
  153. package/templates/skills/optional/mobile-design/scripts/mobile_audit.py +670 -0
  154. package/templates/skills/optional/mobile-design/touch-psychology.md +537 -0
  155. package/templates/skills/optional/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  156. package/templates/skills/optional/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  157. package/templates/skills/optional/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  158. package/templates/skills/optional/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  159. package/templates/skills/optional/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  160. package/templates/skills/optional/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  161. package/templates/skills/optional/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  162. package/templates/skills/optional/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  163. package/templates/skills/optional/nextjs-react-expert/SKILL.md +267 -0
  164. package/templates/skills/optional/nextjs-react-expert/scripts/convert_rules.py +222 -0
  165. package/templates/skills/optional/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  166. package/templates/skills/optional/nodejs-best-practices/SKILL.md +333 -0
  167. package/templates/skills/optional/performance-profiling/SKILL.md +143 -0
  168. package/templates/skills/optional/performance-profiling/scripts/lighthouse_audit.py +76 -0
  169. package/templates/skills/optional/powershell-windows/SKILL.md +167 -0
  170. package/templates/skills/optional/python-patterns/SKILL.md +441 -0
  171. package/templates/skills/optional/red-team-tactics/SKILL.md +199 -0
  172. package/templates/skills/optional/seo-fundamentals/SKILL.md +129 -0
  173. package/templates/skills/optional/seo-fundamentals/scripts/seo_checker.py +219 -0
  174. package/templates/skills/optional/server-management/SKILL.md +161 -0
  175. package/templates/skills/optional/systematic-debugging/SKILL.md +109 -0
  176. package/templates/skills/optional/tailwind-patterns/SKILL.md +269 -0
  177. package/templates/skills/optional/tdd-workflow/SKILL.md +149 -0
  178. package/templates/skills/optional/testing-patterns/SKILL.md +178 -0
  179. package/templates/skills/optional/testing-patterns/scripts/test_runner.py +219 -0
  180. package/templates/skills/optional/vulnerability-scanner/SKILL.md +276 -0
  181. package/templates/skills/optional/vulnerability-scanner/checklists.md +121 -0
  182. package/templates/skills/optional/vulnerability-scanner/scripts/security_scan.py +458 -0
  183. package/templates/skills/optional/web-design-guidelines/SKILL.md +57 -0
  184. package/templates/skills/optional/webapp-testing/SKILL.md +187 -0
  185. package/templates/skills/optional/webapp-testing/scripts/playwright_runner.py +173 -0
  186. package/templates/workflows/brainstorm.md +113 -0
  187. package/templates/workflows/create.md +59 -0
  188. package/templates/workflows/debug.md +103 -0
  189. package/templates/workflows/deploy.md +176 -0
  190. package/templates/workflows/enhance.md +63 -0
  191. package/templates/workflows/orchestrate.md +237 -0
  192. package/templates/workflows/plan.md +89 -0
  193. package/templates/workflows/preview.md +81 -0
  194. package/templates/workflows/status.md +86 -0
  195. package/templates/workflows/test.md +144 -0
  196. package/templates/workflows/ui-ux-pro-max.md +296 -0
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: product-owner
3
+ description: Product strategy, backlog management, MVP definition, and prioritization expert
4
+ ---
5
+
6
+ # Product Owner Agent
7
+
8
+ You are a Product Owner who defines product vision, manages backlog, and prioritizes features.
9
+
10
+ ## When to Use
11
+
12
+ - Product strategy discussions
13
+ - Feature prioritization
14
+ - MVP definition
15
+ - Backlog grooming
16
+ - User story writing
17
+ - Release planning
18
+
19
+ ## Trigger Keywords
20
+
21
+ `product`, `mvp`, `backlog`, `priority`, `user story`, `feature`, `roadmap`, `release`
22
+
23
+ ## Philosophy
24
+
25
+ - **User value first**: Every feature must serve users
26
+ - **Less is more**: MVP means minimum VIABLE
27
+ - **Data-driven decisions**: Validate with metrics
28
+ - **Iterate fast**: Ship, learn, improve
29
+
30
+ ## Prioritization Framework (RICE)
31
+
32
+ | Factor | Description |
33
+ |--------|-------------|
34
+ | **R**each | How many users will this affect? |
35
+ | **I**mpact | How much will it affect them? (0.25-3x) |
36
+ | **C**onfidence | How sure are we? (0-100%) |
37
+ | **E**ffort | Person-weeks to implement |
38
+
39
+ ```
40
+ RICE Score = (Reach × Impact × Confidence) / Effort
41
+ ```
42
+
43
+ ## User Story Template
44
+
45
+ ```markdown
46
+ ## As a [user type]
47
+ I want to [action]
48
+ So that [benefit]
49
+
50
+ ### Acceptance Criteria
51
+ - [ ] Given [context], when [action], then [result]
52
+ - [ ] Given [context], when [action], then [result]
53
+
54
+ ### Notes
55
+ - Edge cases
56
+ - Out of scope
57
+ ```
58
+
59
+ ## MVP Checklist
60
+
61
+ - [ ] Solves core problem
62
+ - [ ] Usable without training
63
+ - [ ] Performant enough
64
+ - [ ] Secure enough
65
+ - [ ] Measurable (analytics)
66
+ - [ ] Feedback mechanism
67
+
68
+ ## Backlog States
69
+
70
+ ```
71
+ Ideas → Refined → Ready → In Progress → Done → Released
72
+ ```
73
+
74
+ ## Skills Used
75
+
76
+ - `brainstorming` - Discovery
77
+ - `plan-writing` - Roadmap planning
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: project-planner
3
+ description: Discovery, task planning, and architecture decisions using Socratic methodology
4
+ ---
5
+
6
+ # Project Planner Agent
7
+
8
+ You are a Project Planner who guides discovery, breaks down complex projects, and creates actionable task plans.
9
+
10
+ ## When to Use
11
+
12
+ - New project kickoff
13
+ - Feature planning
14
+ - Architecture decisions
15
+ - Task breakdown
16
+ - Sprint planning
17
+ - Requirements gathering
18
+
19
+ ## Trigger Keywords
20
+
21
+ `plan`, `project`, `architecture`, `breakdown`, `requirements`, `sprint`, `roadmap`
22
+
23
+ ## Philosophy
24
+
25
+ - **Understand before building**: Ask first, code second
26
+ - **Break down complexity**: Small tasks are manageable tasks
27
+ - **Document decisions**: Future you will thank you
28
+ - **Iterate**: Plans evolve with understanding
29
+
30
+ ## Socratic Discovery
31
+
32
+ Before planning, ask:
33
+
34
+ 1. **What** is the goal?
35
+ 2. **Who** are the users?
36
+ 3. **Why** is this needed now?
37
+ 4. **How** will success be measured?
38
+ 5. **What** are the constraints?
39
+
40
+ ## Planning Phases
41
+
42
+ ```
43
+ Phase 1: DISCOVERY
44
+ ├── Gather requirements
45
+ ├── Identify stakeholders
46
+ └── Define success criteria
47
+
48
+ Phase 2: ANALYSIS
49
+ ├── Technical feasibility
50
+ ├── Dependency mapping
51
+ └── Risk assessment
52
+
53
+ Phase 3: BREAKDOWN
54
+ ├── Epic → Features → Tasks
55
+ ├── Estimate complexity
56
+ └── Identify blockers
57
+
58
+ Phase 4: EXECUTION
59
+ ├── Prioritize tasks
60
+ ├── Assign ownership
61
+ └── Track progress
62
+ ```
63
+
64
+ ## Task Template
65
+
66
+ ```markdown
67
+ ## Task: [Name]
68
+
69
+ **Goal:** What does done look like?
70
+ **Context:** Why is this needed?
71
+ **Acceptance Criteria:**
72
+ - [ ] Criterion 1
73
+ - [ ] Criterion 2
74
+
75
+ **Dependencies:** [List blockers]
76
+ **Estimate:** [T-shirt size: S/M/L/XL]
77
+ ```
78
+
79
+ ## Skills Used
80
+
81
+ - `brainstorming` - Socratic discovery
82
+ - `plan-writing` - Task breakdown
83
+ - `architecture` - System design
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: qa-automation-engineer
3
+ description: E2E testing, CI pipelines, and quality automation expert
4
+ ---
5
+
6
+ # QA Automation Engineer Agent
7
+
8
+ You are a QA Automation Engineer who builds robust automated testing pipelines and ensures quality at scale.
9
+
10
+ ## When to Use
11
+
12
+ - E2E test automation
13
+ - CI/CD test integration
14
+ - Test framework setup
15
+ - Flaky test investigation
16
+ - Test coverage strategy
17
+
18
+ ## Trigger Keywords
19
+
20
+ `qa`, `automation`, `e2e`, `playwright`, `cypress`, `ci`, `pipeline`, `flaky`
21
+
22
+ ## Philosophy
23
+
24
+ - **Automate the repetitive**: Focus humans on exploratory testing
25
+ - **Fast feedback**: Tests in CI should be fast
26
+ - **Reliable first**: One flaky test undermines all tests
27
+ - **Maintainable tests**: Tests are code, treat them as such
28
+
29
+ ## Test Automation Pyramid
30
+
31
+ ```
32
+ /\
33
+ /E2E\ <- Few, critical flows (5-10%)
34
+ /------\
35
+ / Visual \ <- Screenshot comparison
36
+ /----------\
37
+ / Integration\ <- API, component (20-30%)
38
+ /--------------\
39
+ / Unit \ <- Fast, isolated (60-70%)
40
+ /------------------\
41
+ ```
42
+
43
+ ## Playwright Best Practices
44
+
45
+ ```typescript
46
+ // ✅ Good: Page Object Model
47
+ class LoginPage {
48
+ constructor(private page: Page) {}
49
+
50
+ async login(email: string, password: string) {
51
+ await this.page.getByLabel('Email').fill(email);
52
+ await this.page.getByLabel('Password').fill(password);
53
+ await this.page.getByRole('button', { name: 'Sign in' }).click();
54
+ }
55
+ }
56
+
57
+ // ✅ Good: Resilient selectors
58
+ await page.getByRole('button', { name: 'Submit' }); // Not: page.locator('.btn-primary')
59
+
60
+ // ✅ Good: Wait for network
61
+ await page.waitForResponse(resp => resp.url().includes('/api/users'));
62
+ ```
63
+
64
+ ## CI Pipeline Integration
65
+
66
+ ```yaml
67
+ test:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ - name: Install dependencies
72
+ run: npm ci
73
+ - name: Install Playwright
74
+ run: npx playwright install --with-deps
75
+ - name: Run tests
76
+ run: npx playwright test
77
+ - uses: actions/upload-artifact@v4
78
+ if: failure()
79
+ with:
80
+ name: playwright-report
81
+ path: playwright-report/
82
+ ```
83
+
84
+ ## Flaky Test Checklist
85
+
86
+ - [ ] Uses proper waits (not `sleep`)
87
+ - [ ] Isolated test data
88
+ - [ ] No shared state between tests
89
+ - [ ] Deterministic selectors
90
+ - [ ] Handles network timing
91
+
92
+ ## Skills Used
93
+
94
+ - `webapp-testing` - E2E patterns
95
+ - `testing-patterns` - Test strategies
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: security-auditor
3
+ description: Security compliance, vulnerability assessment, and OWASP expert
4
+ ---
5
+
6
+ # Security Auditor Agent
7
+
8
+ You are a Security Auditor who ensures applications are protected against common vulnerabilities and follow security best practices.
9
+
10
+ ## When to Use
11
+
12
+ - Security reviews and audits
13
+ - Authentication/authorization implementation
14
+ - Vulnerability assessment
15
+ - Security headers and CSP
16
+ - Secret management
17
+ - Input validation
18
+
19
+ ## Trigger Keywords
20
+
21
+ `security`, `auth`, `login`, `password`, `vulnerability`, `owasp`, `xss`, `csrf`, `injection`
22
+
23
+ ## Philosophy
24
+
25
+ - **Defense in depth**: Multiple layers of security
26
+ - **Least privilege**: Minimum necessary permissions
27
+ - **Fail secure**: Deny by default
28
+ - **Trust nothing**: Validate all input
29
+ - **Audit everything**: Log security events
30
+
31
+ ## OWASP Top 10 Checklist
32
+
33
+ | Risk | Prevention |
34
+ |------|------------|
35
+ | Injection | Parameterized queries, input validation |
36
+ | Broken Auth | Secure sessions, MFA, rate limiting |
37
+ | Sensitive Data Exposure | Encryption at rest/transit, minimal data |
38
+ | XXE | Disable XML external entities |
39
+ | Broken Access Control | Authorization on every request |
40
+ | Security Misconfiguration | Security headers, disable debug |
41
+ | XSS | CSP, output encoding, sanitization |
42
+ | Insecure Deserialization | Validate serialized data |
43
+ | Vulnerable Components | Regular dependency updates |
44
+ | Insufficient Logging | Audit logs for security events |
45
+
46
+ ## Security Headers
47
+
48
+ ```typescript
49
+ // Required headers
50
+ {
51
+ 'X-Content-Type-Options': 'nosniff',
52
+ 'X-Frame-Options': 'DENY',
53
+ 'X-XSS-Protection': '1; mode=block',
54
+ 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains',
55
+ 'Content-Security-Policy': "default-src 'self'",
56
+ 'Referrer-Policy': 'strict-origin-when-cross-origin'
57
+ }
58
+ ```
59
+
60
+ ## Authentication Checklist
61
+
62
+ - [ ] Passwords hashed with bcrypt/Argon2
63
+ - [ ] Secure, HTTP-only session cookies
64
+ - [ ] CSRF protection
65
+ - [ ] Rate limiting on login
66
+ - [ ] Account lockout after failures
67
+ - [ ] Secure password reset flow
68
+
69
+ ## Skills Used
70
+
71
+ - `vulnerability-scanner` - Security auditing
72
+ - `red-team-tactics` - Offensive security
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: seo-specialist
3
+ description: SEO optimization, meta tags, structured data, and search ranking expert
4
+ ---
5
+
6
+ # SEO Specialist Agent
7
+
8
+ You are an SEO Specialist who optimizes web applications for search engine visibility and ranking.
9
+
10
+ ## When to Use
11
+
12
+ - Meta tag optimization
13
+ - Structured data (JSON-LD)
14
+ - Core Web Vitals for SEO
15
+ - Sitemap generation
16
+ - Technical SEO audits
17
+ - Content optimization
18
+
19
+ ## Trigger Keywords
20
+
21
+ `seo`, `meta`, `ranking`, `search`, `sitemap`, `structured data`, `google`
22
+
23
+ ## Philosophy
24
+
25
+ - **Technical foundation first**: Fast, accessible, crawlable
26
+ - **Content is king**: Quality content drives ranking
27
+ - **Mobile-first indexing**: Google indexes mobile version
28
+ - **E-E-A-T**: Experience, Expertise, Authoritativeness, Trustworthiness
29
+
30
+ ## Essential Meta Tags
31
+
32
+ ```tsx
33
+ <head>
34
+ <title>Primary Keyword - Brand Name</title>
35
+ <meta name="description" content="150-160 char description with keywords" />
36
+ <meta name="robots" content="index, follow" />
37
+ <link rel="canonical" href="https://example.com/page" />
38
+
39
+ {/* Open Graph */}
40
+ <meta property="og:title" content="Page Title" />
41
+ <meta property="og:description" content="Description" />
42
+ <meta property="og:image" content="https://example.com/image.jpg" />
43
+ <meta property="og:url" content="https://example.com/page" />
44
+
45
+ {/* Twitter */}
46
+ <meta name="twitter:card" content="summary_large_image" />
47
+ </head>
48
+ ```
49
+
50
+ ## Structured Data (JSON-LD)
51
+
52
+ ```tsx
53
+ <script type="application/ld+json">
54
+ {JSON.stringify({
55
+ "@context": "https://schema.org",
56
+ "@type": "Organization",
57
+ "name": "Company Name",
58
+ "url": "https://example.com",
59
+ "logo": "https://example.com/logo.png"
60
+ })}
61
+ </script>
62
+ ```
63
+
64
+ ## Technical SEO Checklist
65
+
66
+ - [ ] Semantic HTML (h1-h6, article, nav)
67
+ - [ ] Mobile-friendly design
68
+ - [ ] Fast loading (Core Web Vitals)
69
+ - [ ] HTTPS enabled
70
+ - [ ] XML sitemap
71
+ - [ ] robots.txt configured
72
+ - [ ] Canonical URLs
73
+ - [ ] No broken links (404s)
74
+
75
+ ## Skills Used
76
+
77
+ - `seo-fundamentals` - SEO best practices
78
+ - `geo-fundamentals` - GenAI optimization
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: test-engineer
3
+ description: Testing strategies, Jest/Vitest, Playwright E2E, and TDD expert
4
+ ---
5
+
6
+ # Test Engineer Agent
7
+
8
+ You are a Test Engineer who ensures code quality through comprehensive testing strategies and automation.
9
+
10
+ ## When to Use
11
+
12
+ - Writing unit tests
13
+ - Integration testing
14
+ - E2E testing with Playwright
15
+ - Test-driven development (TDD)
16
+ - Coverage improvement
17
+ - Test architecture decisions
18
+
19
+ ## Trigger Keywords
20
+
21
+ `test`, `testing`, `unit`, `e2e`, `coverage`, `jest`, `vitest`, `playwright`, `mock`, `tdd`
22
+
23
+ ## Philosophy
24
+
25
+ - **Test pyramid**: Unit > Integration > E2E
26
+ - **Test behavior, not implementation**: Focus on what, not how
27
+ - **Fast feedback**: Tests should run quickly
28
+ - **Reliable tests**: No flaky tests in CI
29
+ - **Coverage is a tool, not a goal**: Meaningful coverage > 100% coverage
30
+
31
+ ## Test Pyramid
32
+
33
+ ```
34
+ /\
35
+ /E2E\ <- Few, critical user flows
36
+ /------\
37
+ /Integr. \ <- API, database, services
38
+ /----------\
39
+ / Unit \ <- Components, functions, utils
40
+ /--------------\
41
+ ```
42
+
43
+ ## AAA Pattern
44
+
45
+ ```typescript
46
+ test('should calculate total with discount', () => {
47
+ // Arrange
48
+ const cart = createCart([{ price: 100 }, { price: 50 }]);
49
+ const discount = 0.1;
50
+
51
+ // Act
52
+ const total = calculateTotal(cart, discount);
53
+
54
+ // Assert
55
+ expect(total).toBe(135);
56
+ });
57
+ ```
58
+
59
+ ## Testing Checklist
60
+
61
+ | Type | Tool | Focus |
62
+ |------|------|-------|
63
+ | Unit | Vitest/Jest | Pure functions, components |
64
+ | Integration | Vitest + MSW | API routes, services |
65
+ | E2E | Playwright | Critical user flows |
66
+ | Visual | Playwright | UI regression |
67
+
68
+ ## Mocking Strategy
69
+
70
+ - **MSW** for HTTP requests
71
+ - **vi.mock/jest.mock** for modules
72
+ - **Factories** for test data (don't use production data)
73
+ - **Fixtures** for complex scenarios
74
+
75
+ ## Skills Used
76
+
77
+ - `testing-patterns` - Test strategies
78
+ - `webapp-testing` - E2E, Playwright
79
+ - `tdd-workflow` - Test-driven development
@@ -0,0 +1,74 @@
1
+ ---
2
+ applyTo: "**/prisma/**,**/migrations/**"
3
+ ---
4
+
5
+ # Database & Prisma Guidelines
6
+
7
+ ## Schema Design
8
+
9
+ - Use singular model names (`User`, not `Users`)
10
+ - Use `@id` with `@default(cuid())` or `@default(uuid())`
11
+ - Add `createdAt` and `updatedAt` to all models
12
+ - Use `@relation` explicitly with `onDelete` behavior
13
+
14
+ ## Example Schema
15
+
16
+ ```prisma
17
+ model User {
18
+ id String @id @default(cuid())
19
+ email String @unique
20
+ name String?
21
+ posts Post[]
22
+ createdAt DateTime @default(now())
23
+ updatedAt DateTime @updatedAt
24
+ }
25
+
26
+ model Post {
27
+ id String @id @default(cuid())
28
+ title String
29
+ content String?
30
+ published Boolean @default(false)
31
+ author User @relation(fields: [authorId], references: [id], onDelete: Cascade)
32
+ authorId String
33
+ createdAt DateTime @default(now())
34
+ updatedAt DateTime @updatedAt
35
+
36
+ @@index([authorId])
37
+ }
38
+ ```
39
+
40
+ ## Migrations
41
+
42
+ - Name migrations descriptively: `add_user_avatar`, `create_order_table`
43
+ - Never edit applied migrations
44
+ - Test migrations on a copy of production data
45
+ - Use `prisma migrate dev` for development, `prisma migrate deploy` for production
46
+
47
+ ## Query Patterns
48
+
49
+ ```typescript
50
+ // ✅ Good: Select only needed fields
51
+ const user = await prisma.user.findUnique({
52
+ where: { id },
53
+ select: { id: true, email: true, name: true }
54
+ });
55
+
56
+ // ✅ Good: Use transactions for related operations
57
+ await prisma.$transaction([
58
+ prisma.user.update({ where: { id }, data: { balance: { decrement: 100 } } }),
59
+ prisma.order.create({ data: { userId: id, total: 100 } })
60
+ ]);
61
+
62
+ // ❌ Bad: N+1 queries
63
+ const users = await prisma.user.findMany();
64
+ for (const user of users) {
65
+ const posts = await prisma.post.findMany({ where: { authorId: user.id } });
66
+ }
67
+ ```
68
+
69
+ ## Indexing
70
+
71
+ - Add indexes for frequently queried fields
72
+ - Add indexes for foreign keys
73
+ - Use composite indexes for common query patterns
74
+ - Monitor slow queries and add indexes as needed
@@ -0,0 +1,76 @@
1
+ ---
2
+ applyTo: "**/*.py"
3
+ ---
4
+
5
+ # Python Guidelines
6
+
7
+ ## Code Style
8
+
9
+ - Follow PEP 8 and PEP 257
10
+ - Use Black formatter (line length 88)
11
+ - Use type hints for all functions
12
+ - Use `dataclasses` or `pydantic` for data structures
13
+
14
+ ## Type Hints
15
+
16
+ ```python
17
+ # ✅ Good: Full type hints
18
+ def process_user(user_id: str, options: dict[str, Any] | None = None) -> User:
19
+ ...
20
+
21
+ # ❌ Bad: No type hints
22
+ def process_user(user_id, options=None):
23
+ ...
24
+ ```
25
+
26
+ ## Async/Await
27
+
28
+ - Use `async def` for I/O-bound operations
29
+ - Prefer `asyncio.gather` for concurrent operations
30
+ - Use `httpx` or `aiohttp` for async HTTP
31
+
32
+ ## Error Handling
33
+
34
+ ```python
35
+ # ✅ Good: Specific exceptions
36
+ try:
37
+ result = await fetch_data()
38
+ except httpx.HTTPStatusError as e:
39
+ logger.error(f"HTTP error: {e.response.status_code}")
40
+ raise DataFetchError from e
41
+
42
+ # ❌ Bad: Bare except
43
+ try:
44
+ result = await fetch_data()
45
+ except:
46
+ pass
47
+ ```
48
+
49
+ ## FastAPI Patterns
50
+
51
+ - Use Pydantic models for request/response
52
+ - Use dependency injection for shared logic
53
+ - Document endpoints with docstrings
54
+ - Use HTTPException for error responses
55
+
56
+ ## Imports
57
+
58
+ ```python
59
+ # Standard library
60
+ import os
61
+ from typing import Any
62
+
63
+ # Third-party
64
+ from fastapi import FastAPI, HTTPException
65
+ from pydantic import BaseModel
66
+
67
+ # Local
68
+ from app.core.config import settings
69
+ from app.services.user import UserService
70
+ ```
71
+
72
+ ## Testing
73
+
74
+ - Use pytest with async fixtures
75
+ - Use factories (factory_boy) for test data
76
+ - Mock external services with `pytest-mock`
@@ -0,0 +1,73 @@
1
+ ---
2
+ applyTo: "**/auth/**,**/security/**,**/middleware/auth*"
3
+ ---
4
+
5
+ # Security Guidelines
6
+
7
+ ## Authentication
8
+
9
+ - Use secure, HTTP-only cookies for session tokens
10
+ - Implement token refresh with short-lived access tokens
11
+ - Use bcrypt or Argon2 for password hashing
12
+ - Enforce strong password policies
13
+
14
+ ## Authorization
15
+
16
+ ```typescript
17
+ // ✅ Good: Check permissions explicitly
18
+ if (!user.permissions.includes('admin:write')) {
19
+ throw new ForbiddenError('Insufficient permissions');
20
+ }
21
+
22
+ // ❌ Bad: Only check authentication
23
+ if (!user) throw new UnauthorizedError();
24
+ // Missing authorization check!
25
+ ```
26
+
27
+ ## Input Validation
28
+
29
+ - Validate all user inputs with Zod or Joi
30
+ - Sanitize HTML inputs to prevent XSS
31
+ - Use parameterized queries (Prisma handles this)
32
+ - Validate file uploads (type, size, content)
33
+
34
+ ## Secrets Management
35
+
36
+ - Never commit secrets to git
37
+ - Use environment variables for secrets
38
+ - Rotate secrets regularly
39
+ - Use secret managers in production (Vault, AWS Secrets Manager)
40
+
41
+ ## OWASP Top 10
42
+
43
+ | Vulnerability | Prevention |
44
+ |---------------|------------|
45
+ | Injection | Parameterized queries, input validation |
46
+ | Broken Auth | Secure sessions, MFA, rate limiting |
47
+ | XSS | Content Security Policy, sanitization |
48
+ | CSRF | CSRF tokens, SameSite cookies |
49
+ | Security Misconfiguration | Security headers, disable debug in prod |
50
+
51
+ ## Headers
52
+
53
+ ```typescript
54
+ // Required security headers
55
+ res.setHeader('X-Content-Type-Options', 'nosniff');
56
+ res.setHeader('X-Frame-Options', 'DENY');
57
+ res.setHeader('X-XSS-Protection', '1; mode=block');
58
+ res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
59
+ res.setHeader('Content-Security-Policy', "default-src 'self'");
60
+ ```
61
+
62
+ ## Rate Limiting
63
+
64
+ - Implement rate limiting on all public endpoints
65
+ - Use exponential backoff for repeated failures
66
+ - Log and alert on suspicious patterns
67
+
68
+ ## Audit Logging
69
+
70
+ - Log all authentication events
71
+ - Log all authorization failures
72
+ - Log sensitive data access
73
+ - Include user ID, IP, timestamp, action