ai-developer-skill-os 7.0.2 β†’ 7.5.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 (188) hide show
  1. package/.agents/AGENTS.md +44 -88
  2. package/.agents/CHANGELOG.md +69 -0
  3. package/.agents/LICENSE +21 -0
  4. package/.agents/README.md +59 -0
  5. package/.agents/_template/BEHAVIOR_SPEC.md +96 -0
  6. package/.agents/_template/examples/example-en.md +49 -0
  7. package/.agents/_template/examples/example-vi.md +49 -0
  8. package/.agents/docs/CHI_TIET_SKILLS.md +125 -0
  9. package/.agents/docs/GOVERNANCE.md +40 -0
  10. package/.agents/docs/HUONG_DAN_SU_DUNG.md +120 -0
  11. package/.agents/docs/SPEC.md +87 -0
  12. package/.agents/docs/adr/0001-intent-based-architecture.md +19 -0
  13. package/.agents/docs/adr/0002-kernel-freeze.md +21 -0
  14. package/.agents/docs/adr/0003-risk-based-verification.md +20 -0
  15. package/.agents/docs/adr/0004-progressive-evidence.md +19 -0
  16. package/.agents/docs/skill-classification.md +25 -0
  17. package/.agents/skills/qk-access-policy/SKILL.md +179 -0
  18. package/.agents/skills/qk-ai-builder/SKILL.md +215 -0
  19. package/.agents/skills/qk-api-lifecycle/SKILL.md +176 -0
  20. package/.agents/skills/qk-bug-resolution/SKILL.md +307 -0
  21. package/.agents/skills/qk-context-loader/SKILL.md +218 -0
  22. package/.agents/skills/qk-data-lifecycle/SKILL.md +192 -0
  23. package/.agents/skills/qk-db-optimizer/SKILL.md +196 -0
  24. package/.agents/skills/qk-design-to-code/SKILL.md +285 -0
  25. package/.agents/skills/qk-docs/SKILL.md +198 -0
  26. package/.agents/skills/qk-engineering-standard/SKILL.md +351 -0
  27. package/.agents/skills/qk-engineering-standard/rules/backend.md +122 -0
  28. package/.agents/skills/qk-engineering-standard/rules/database.md +3 -0
  29. package/.agents/skills/qk-engineering-standard/rules/frontend.md +152 -0
  30. package/.agents/skills/qk-engineering-standard/rules/security.md +3 -0
  31. package/.agents/skills/qk-engineering-standard/rules/testing.md +3 -0
  32. package/.agents/skills/qk-fe-api-integration/SKILL.md +326 -0
  33. package/.agents/skills/qk-feature-delivery/SKILL.md +305 -0
  34. package/.agents/skills/qk-help/SKILL.md +193 -0
  35. package/.agents/skills/qk-orchestrator/SKILL.md +277 -0
  36. package/.agents/skills/qk-orchestrator/references/routing-table.md +77 -0
  37. package/.agents/skills/qk-production-release/SKILL.md +284 -0
  38. package/.agents/skills/qk-project-bootstrap/SKILL.md +234 -0
  39. package/.agents/skills/qk-project-health/SKILL.md +199 -0
  40. package/.agents/skills/qk-project-memory/SKILL.md +172 -0
  41. package/.agents/skills/qk-system-evolution/SKILL.md +281 -0
  42. package/.agents/skills/qk-ui-audit/SKILL.md +314 -0
  43. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
  44. package/.agents/skills/qk-ui-system-builder/SKILL.md +221 -0
  45. package/.agents/skills/qk-validation-gate/SKILL.md +359 -0
  46. package/.agents/skills.json +819 -0
  47. package/.github/workflows/ci.yml +1 -1
  48. package/.qk-ai-skill-os/CHANGELOG.md +69 -0
  49. package/.qk-ai-skill-os/LICENSE +21 -0
  50. package/.qk-ai-skill-os/README.md +59 -0
  51. package/.qk-ai-skill-os/_template/BEHAVIOR_SPEC.md +96 -0
  52. package/.qk-ai-skill-os/_template/examples/example-en.md +49 -0
  53. package/.qk-ai-skill-os/_template/examples/example-vi.md +49 -0
  54. package/.qk-ai-skill-os/docs/CHI_TIET_SKILLS.md +125 -0
  55. package/.qk-ai-skill-os/docs/GOVERNANCE.md +40 -0
  56. package/.qk-ai-skill-os/docs/HUONG_DAN_SU_DUNG.md +120 -0
  57. package/.qk-ai-skill-os/docs/SPEC.md +87 -0
  58. package/.qk-ai-skill-os/docs/adr/0001-intent-based-architecture.md +19 -0
  59. package/.qk-ai-skill-os/docs/adr/0002-kernel-freeze.md +21 -0
  60. package/.qk-ai-skill-os/docs/adr/0003-risk-based-verification.md +20 -0
  61. package/.qk-ai-skill-os/docs/adr/0004-progressive-evidence.md +19 -0
  62. package/.qk-ai-skill-os/docs/skill-classification.md +25 -0
  63. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +121 -0
  64. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +179 -0
  65. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-api-integration/SKILL.md +389 -0
  66. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-auth-security/SKILL.md +96 -0
  67. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +125 -0
  68. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-bug-fix/SKILL.md +213 -0
  69. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-component-generator/SKILL.md +136 -0
  70. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-context-manager/SKILL.md +175 -0
  71. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-database-engineer/SKILL.md +104 -0
  72. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-deployment/SKILL.md +96 -0
  73. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-design-system/SKILL.md +137 -0
  74. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-form-builder/SKILL.md +140 -0
  75. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +155 -0
  76. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +133 -0
  77. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +129 -0
  78. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +146 -0
  79. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-git-engineer/SKILL.md +304 -0
  80. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-help/SKILL.md +68 -0
  81. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-migration/SKILL.md +284 -0
  82. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-project-audit/SKILL.md +280 -0
  83. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-refactor/SKILL.md +222 -0
  84. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-state-management/SKILL.md +140 -0
  85. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +127 -0
  86. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-ui-builder/SKILL.md +152 -0
  87. package/.qk-ai-skill-os/skills/_template/SKILL.md +238 -0
  88. package/.qk-ai-skill-os/skills/qk-access-policy/SKILL.md +179 -0
  89. package/.qk-ai-skill-os/skills/qk-ai-builder/SKILL.md +221 -0
  90. package/.qk-ai-skill-os/skills/qk-api-lifecycle/SKILL.md +176 -0
  91. package/.qk-ai-skill-os/skills/qk-bug-resolution/SKILL.md +307 -0
  92. package/.qk-ai-skill-os/skills/qk-context-loader/SKILL.md +218 -0
  93. package/.qk-ai-skill-os/skills/qk-data-lifecycle/SKILL.md +192 -0
  94. package/.qk-ai-skill-os/skills/qk-db-optimizer/SKILL.md +196 -0
  95. package/.qk-ai-skill-os/skills/qk-design-to-code/SKILL.md +291 -0
  96. package/.qk-ai-skill-os/skills/qk-docs/SKILL.md +198 -0
  97. package/.qk-ai-skill-os/skills/qk-engineering-standard/SKILL.md +351 -0
  98. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/backend.md +122 -0
  99. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/database.md +3 -0
  100. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/frontend.md +152 -0
  101. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/security.md +3 -0
  102. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/testing.md +3 -0
  103. package/.qk-ai-skill-os/skills/qk-fe-api-integration/SKILL.md +326 -0
  104. package/.qk-ai-skill-os/skills/qk-feature-delivery/SKILL.md +305 -0
  105. package/.qk-ai-skill-os/skills/qk-help/SKILL.md +193 -0
  106. package/.qk-ai-skill-os/skills/qk-orchestrator/SKILL.md +277 -0
  107. package/.qk-ai-skill-os/skills/qk-orchestrator/references/routing-table.md +77 -0
  108. package/.qk-ai-skill-os/skills/qk-production-release/SKILL.md +290 -0
  109. package/.qk-ai-skill-os/skills/qk-project-bootstrap/SKILL.md +240 -0
  110. package/.qk-ai-skill-os/skills/qk-project-health/SKILL.md +199 -0
  111. package/.qk-ai-skill-os/skills/qk-project-memory/SKILL.md +172 -0
  112. package/.qk-ai-skill-os/skills/qk-system-evolution/SKILL.md +285 -0
  113. package/.qk-ai-skill-os/skills/qk-ui-audit/SKILL.md +314 -0
  114. package/.qk-ai-skill-os/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
  115. package/.qk-ai-skill-os/skills/qk-ui-system-builder/SKILL.md +225 -0
  116. package/.qk-ai-skill-os/skills/qk-validation-gate/SKILL.md +361 -0
  117. package/.qk-ai-skill-os/skills.json +819 -0
  118. package/CLAUDE.md +110 -0
  119. package/README.md +25 -3
  120. package/add_lang.js +21 -0
  121. package/add_lang.py +25 -0
  122. package/add_sections.py +53 -0
  123. package/bin/install.js +225 -170
  124. package/bin/lint.js +122 -0
  125. package/docs/CHI_TIET_SKILLS.md +26 -26
  126. package/docs/HUONG_DAN_SU_DUNG.md +3 -3
  127. package/docs/SPEC.md +70 -20
  128. package/framework/skill-schema.md +310 -0
  129. package/package.json +15 -4
  130. package/patch.js +15 -0
  131. package/patch.py +89 -0
  132. package/patch2.py +83 -0
  133. package/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +1 -0
  134. package/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +1 -0
  135. package/skills/_archive_old_skills/qk-api-integration/SKILL.md +1 -0
  136. package/skills/_archive_old_skills/qk-auth-security/SKILL.md +1 -0
  137. package/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +1 -0
  138. package/skills/_archive_old_skills/qk-bug-fix/SKILL.md +1 -0
  139. package/skills/_archive_old_skills/qk-component-generator/SKILL.md +1 -0
  140. package/skills/_archive_old_skills/qk-context-manager/SKILL.md +1 -0
  141. package/skills/_archive_old_skills/qk-database-engineer/SKILL.md +1 -0
  142. package/skills/_archive_old_skills/qk-deployment/SKILL.md +1 -0
  143. package/skills/_archive_old_skills/qk-design-system/SKILL.md +1 -0
  144. package/skills/_archive_old_skills/qk-form-builder/SKILL.md +1 -0
  145. package/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +1 -0
  146. package/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +1 -0
  147. package/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +1 -0
  148. package/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +1 -0
  149. package/skills/_archive_old_skills/qk-git-engineer/SKILL.md +1 -0
  150. package/skills/_archive_old_skills/qk-help/SKILL.md +1 -0
  151. package/skills/_archive_old_skills/qk-migration/SKILL.md +1 -0
  152. package/skills/_archive_old_skills/qk-project-audit/SKILL.md +1 -0
  153. package/skills/_archive_old_skills/qk-refactor/SKILL.md +1 -0
  154. package/skills/_archive_old_skills/qk-state-management/SKILL.md +1 -0
  155. package/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +1 -0
  156. package/skills/_archive_old_skills/qk-ui-builder/SKILL.md +1 -0
  157. package/skills/_template/SKILL.md +238 -0
  158. package/skills/qk-access-policy/SKILL.md +179 -39
  159. package/skills/qk-ai-builder/SKILL.md +215 -40
  160. package/skills/qk-api-lifecycle/SKILL.md +176 -46
  161. package/skills/qk-bug-resolution/SKILL.md +307 -46
  162. package/skills/qk-context-loader/SKILL.md +218 -43
  163. package/skills/qk-data-lifecycle/SKILL.md +192 -44
  164. package/skills/qk-db-optimizer/SKILL.md +196 -41
  165. package/skills/qk-design-to-code/SKILL.md +285 -46
  166. package/skills/qk-docs/SKILL.md +198 -40
  167. package/skills/qk-engineering-standard/SKILL.md +351 -42
  168. package/skills/qk-fe-api-integration/SKILL.md +326 -55
  169. package/skills/qk-feature-delivery/SKILL.md +305 -48
  170. package/skills/qk-help/SKILL.md +178 -23
  171. package/skills/qk-orchestrator/SKILL.md +277 -42
  172. package/skills/qk-orchestrator/references/routing-table.md +77 -0
  173. package/skills/qk-production-release/SKILL.md +284 -41
  174. package/skills/qk-project-bootstrap/SKILL.md +234 -38
  175. package/skills/qk-project-health/SKILL.md +199 -40
  176. package/skills/qk-project-memory/SKILL.md +172 -40
  177. package/skills/qk-system-evolution/SKILL.md +281 -40
  178. package/skills/qk-ui-audit/SKILL.md +314 -42
  179. package/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
  180. package/skills/qk-ui-system-builder/SKILL.md +221 -43
  181. package/skills/qk-validation-gate/SKILL.md +359 -40
  182. package/skills.json +813 -824
  183. package/specs/fixtures/user-payload.json +12 -0
  184. package/specs/regressions/api-integration-null-fields.yaml +19 -0
  185. package/temp_fix.js +61 -0
  186. package/tests/registry.test.js +1 -1
  187. package/update_template.js +28 -0
  188. package/skills/qk-policy-engine/SKILL.md +0 -39
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: qk-deployment
3
+ description: >-
4
+ CαΊ₯u hΓ¬nh CI/CD pipelines, tαΊ‘o Dockerfile vΓ  thiαΊΏt lαΊ­p mΓ΄i trường để deploy lΓͺn Vercel, AWS hoαΊ·c VPS.
5
+ version: 1.0.0
6
+ category: backend
7
+ tags: [deploy, ci-cd, docker, github-actions, devops, hosting]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Deployment & DevOps
12
+
13
+ > **Language rule:**
14
+ > Use English for: code, identifiers, file names, architecture terms, technical decisions.
15
+ > Use the user's language for: explanations, questions, summaries, and feedback.
16
+ > The user may write in any language β€” detect and match it automatically.
17
+
18
+ ---
19
+
20
+ ## Trigger
21
+
22
+ Activate this skill when:
23
+ - User asks "how do I deploy this?", "create a Dockerfile", or "setup CI/CD"
24
+ - Configuring GitHub Actions, GitLab CI, or Jenkins
25
+ - Preparing a project for Vercel, Netlify, Render, or AWS
26
+ - Setting up environment variables for production
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - βœ… **Containerization:** Write `Dockerfile` and `docker-compose.yml`.
33
+ - βœ… **CI/CD Pipelines:** Write GitHub Actions YAML for testing, building, and deploying.
34
+ - βœ… **Environment Setup:** Create `.env.example` and document required production variables.
35
+ - βœ… **Build Scripts:** Ensure `package.json` has correct build and start commands.
36
+
37
+ ---
38
+
39
+ ## Non-goals
40
+
41
+ - ❌ Do NOT expose real production secrets. Always use placeholders or CI secrets.
42
+ - ❌ Do NOT over-complicate (e.g., don't setup Kubernetes if a simple Docker container on a VPS is enough).
43
+
44
+ ---
45
+
46
+ ## Workflow
47
+
48
+ ### Phase 1 β€” Platform Selection
49
+
50
+ Ask the user where they are deploying (if not specified):
51
+ 1. **PaaS (Vercel, Render, Heroku):** Very easy, mostly relies on `vercel.json` or standard build scripts. No Docker needed usually.
52
+ 2. **VPS/VM (DigitalOcean, AWS EC2):** Needs Docker and/or PM2 + Nginx reverse proxy.
53
+ 3. **Container Service (AWS ECS, Google Cloud Run):** Needs a highly optimized Dockerfile.
54
+
55
+ ### Phase 2 β€” Containerization (If required)
56
+
57
+ Create a multi-stage Dockerfile for minimal image size:
58
+ 1. `deps` stage: Install dependencies.
59
+ 2. `builder` stage: Build the app.
60
+ 3. `runner` stage: Copy only the built assets and prod modules, start the app.
61
+
62
+ ### Phase 3 β€” CI/CD Pipeline
63
+
64
+ Create `.github/workflows/deploy.yml`:
65
+ - Trigger on `push` to `main`.
66
+ - Job 1: Setup Node/Python/Go, install deps, run tests, run linter.
67
+ - Job 2: Build image and push to registry, or deploy to PaaS.
68
+
69
+ ### Phase 4 β€” Environment Variables
70
+
71
+ Audit the codebase for `process.env.XYZ` and create a `.env.example` file listing every required variable.
72
+
73
+ ---
74
+
75
+ ## Output Format
76
+
77
+ ```
78
+ πŸš€ Deployment Plan
79
+ ─────────────────────────────────────────────────
80
+ Target: [Vercel / Docker VPS / AWS]
81
+ Tooling: [GitHub Actions, Docker]
82
+
83
+ Files Created/Modified:
84
+ βœ… `Dockerfile` (Multi-stage build)
85
+ βœ… `.github/workflows/deploy.yml`
86
+ βœ… `.env.example`
87
+
88
+ ⚠️ Prerequisites:
89
+ Before deploying, you must set these secrets in GitHub Actions:
90
+ - `DOCKER_USERNAME`
91
+ - `DATABASE_URL`
92
+
93
+ πŸ”— Next Steps:
94
+ Commit these files and push to `main` to trigger the pipeline.
95
+ ```
96
+
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: qk-design-system
3
+ description: >-
4
+ Γ‰p buα»™c sα»­ dα»₯ng design system, component library vΓ  token hiện cΓ³, ngΔƒn chαΊ·n việc viαΊΏt HTML/CSS rΓ‘c.
5
+ version: 1.0.0
6
+ category: frontend
7
+ tags: [design-system, ui-components, styling, tailwind, material-ui, shadcn]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Design System Enforcer
12
+
13
+ > **Language rule:**
14
+ > Use English for: code, identifiers, file names, architecture terms, technical decisions.
15
+ > Use the user's language for: explanations, questions, summaries, and feedback.
16
+ > The user may write in any language β€” detect and match it automatically.
17
+
18
+ ---
19
+
20
+ ## Trigger
21
+
22
+ Activate this skill when:
23
+ - About to build UI screens or components
24
+ - Styling or layout work is required
25
+ - User asks to "make it look good" or "match the design"
26
+ - Integrating a third-party UI library (Tailwind, MUI, AntD, Shadcn)
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - βœ… Identify the UI library or design system in use
33
+ - βœ… Map standard HTML elements to project-specific components (e.g., `<button>` β†’ `<Button>`)
34
+ - βœ… Enforce usage of design tokens (colors, spacing, typography) instead of hardcoded values
35
+ - βœ… Provide available component variants and props to downstream skills (`ui-builder`)
36
+ - βœ… Prevent generation of raw CSS/inline styles if utility classes or styled-components are standard
37
+
38
+ ---
39
+
40
+ ## Non-goals
41
+
42
+ - ❌ Do NOT create new base components if an equivalent already exists
43
+ - ❌ Do NOT introduce a new styling method (e.g., don't add Tailwind if project uses CSS Modules)
44
+ - ❌ Do NOT design full pages (delegate to `ui-builder`)
45
+
46
+ ---
47
+
48
+ ## Workflow
49
+
50
+ ### Phase 1 β€” Detect Design System
51
+
52
+ Analyze dependencies and project files to identify:
53
+ 1. **Component Library:** Shadcn UI, MUI, Ant Design, Chakra, Bootstrap, custom internal library?
54
+ 2. **Styling Method:** Tailwind CSS, CSS Modules, Styled Components, Emotion, SCSS, Vanilla CSS?
55
+ 3. **Location of Shared Components:** Usually `src/components/ui/`, `src/shared/components/`, or from an npm package.
56
+ 4. **Design Tokens:** `tailwind.config.js`, `theme.ts`, `variables.scss`.
57
+
58
+ ---
59
+
60
+ ### Phase 2 β€” Component Mapping
61
+
62
+ Before `ui-builder` generates code, create a mapping table for required elements:
63
+
64
+ | Standard Element | Project Component | Source / Import Path |
65
+ |------------------|-------------------|----------------------|
66
+ | `<button>` | `<Button>` | `@/components/ui/button` |
67
+ | `<input type="text">` | `<Input>` | `@/components/ui/input` |
68
+ | `<div>` (Card) | `<Card>` | `@/components/ui/card` |
69
+ | `<h1>` | `<Typography variant="h1">` | `@mui/material` |
70
+
71
+ ---
72
+
73
+ ### Phase 3 β€” Token Extraction
74
+
75
+ Identify available tokens for spacing, colors, and typography to avoid hardcoding:
76
+ - *Instead of:* `margin-top: 16px; color: #3b82f6;`
77
+ - *Use:* `mt-4 text-blue-500` (Tailwind) or `theme.spacing(2)` (MUI) or `var(--primary-color)`.
78
+
79
+ ---
80
+
81
+ ### Phase 4 β€” Rule Enforcement
82
+
83
+ Pass strict instructions to `ui-builder` or `component-generator`:
84
+ - "You MUST use `<Button>` instead of `<button>`."
85
+ - "You MUST use Tailwind classes for all styling. No inline `style={{}}` allowed."
86
+
87
+ ---
88
+
89
+ ## Decision Tree
90
+
91
+ ```
92
+ Does the project use a component library (e.g., Shadcn, MUI)?
93
+ β”œβ”€β”€ Yes β†’ Is the required component available?
94
+ β”‚ β”œβ”€β”€ Yes β†’ Require its use
95
+ β”‚ └── No β†’ Instruct `component-generator` to create it following library style
96
+ └── No β†’ Check if custom shared components exist
97
+ β”œβ”€β”€ Yes β†’ Map to custom shared components
98
+ └── No β†’ Use raw HTML but enforce project's styling method (e.g., Tailwind)
99
+
100
+ Does the project use utility classes (Tailwind)?
101
+ β”œβ”€β”€ Yes β†’ Forbid inline styles or custom CSS files
102
+ └── No β†’ Enforce existing CSS Modules / Styled Components patterns
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Output Format
108
+
109
+ ```
110
+ 🎨 Design System Rules
111
+ ─────────────────────────────────────────────────
112
+ Library: [Shadcn / MUI / Tailwind / Custom / etc.]
113
+ Styling Method: [Tailwind / CSS Modules / Styled Components]
114
+
115
+ Component Mapping for this task:
116
+ βœ… Button β†’ `<Button>` from `@/components/ui/button`
117
+ βœ… Input β†’ `<Input>` from `@/components/ui/input`
118
+ βœ… Layout β†’ Flexbox with Tailwind (`flex flex-col gap-4`)
119
+
120
+ Styling Rules Enforced:
121
+ β€’ No raw HTML `<button>` allowed
122
+ β€’ No inline styles allowed
123
+ β€’ Use primary color token for CTAs
124
+
125
+ πŸ”— Next Steps:
126
+ Passing these rules to `ui-builder` to generate the UI.
127
+ ```
128
+
129
+ ---
130
+
131
+ ## Validation Checklist
132
+
133
+ - [ ] Design system and styling method correctly identified
134
+ - [ ] Mappings created for all necessary UI elements
135
+ - [ ] Design tokens (spacing/colors) prioritized over hardcoded values
136
+ - [ ] Strict enforcement rules passed to next skill
137
+
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: qk-form-builder
3
+ description: >-
4
+ XΓ’y dα»±ng Form chuαΊ©n xΓ‘c vα»›i quαΊ£n lΓ½ trαΊ‘ng thΓ‘i, validate dα»― liệu (Zod, Yup) vΓ  xα»­ lΓ½ hiển thα»‹ lα»—i.
5
+ version: 1.0.0
6
+ category: frontend
7
+ tags: [form, validation, react-hook-form, zod, yup, formik]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Form Builder
12
+
13
+ > **Language rule:**
14
+ > Use English for: code, identifiers, file names, architecture terms, technical decisions.
15
+ > Use the user's language for: explanations, questions, summaries, and feedback.
16
+ > The user may write in any language β€” detect and match it automatically.
17
+
18
+ ---
19
+
20
+ ## Trigger
21
+
22
+ Activate this skill when:
23
+ - User says "create a login form", "add a settings page", "build a contact form"
24
+ - User provides a data model and needs a UI to create/edit it
25
+ - A form needs complex validation logic added
26
+ - Refactoring a messy form into a structured library pattern (e.g., React Hook Form)
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - βœ… Define the form data schema and validation rules
33
+ - βœ… Manage form state efficiently (preventing unnecessary re-renders)
34
+ - βœ… Map form fields to the project's design system components
35
+ - βœ… Handle submission state (loading, success, error)
36
+ - βœ… Handle validation errors and display them accessibly
37
+ - βœ… Integrate with `api-integration` for submission
38
+
39
+ ---
40
+
41
+ ## Non-goals
42
+
43
+ - ❌ Do NOT reinvent form state management if a library is present
44
+ - ❌ Do NOT use raw HTML inputs if design system components exist
45
+ - ❌ Do NOT skip validation (client-side validation is required)
46
+
47
+ ---
48
+
49
+ ## Workflow
50
+
51
+ ### Phase 1 β€” Schema Design
52
+
53
+ Define the exact shape of the data the form collects.
54
+ Determine validation rules for each field (required, min length, email format, etc.).
55
+
56
+ If the project uses Zod, Yup, or Joi, define the schema first.
57
+ *Example:*
58
+ ```typescript
59
+ const userFormSchema = z.object({
60
+ email: z.string().email("Invalid email address"),
61
+ password: z.string().min(8, "Password must be at least 8 characters"),
62
+ });
63
+ ```
64
+
65
+ ---
66
+
67
+ ### Phase 2 β€” State Management Selection
68
+
69
+ Check project dependencies for form libraries:
70
+ 1. `react-hook-form` (Preferred for React)
71
+ 2. `formik`
72
+ 3. Custom Vue/Svelte bindings
73
+ 4. Standard controlled components (`useState`) if no library exists and form is simple.
74
+
75
+ ---
76
+
77
+ ### Phase 3 β€” Component Assembly
78
+
79
+ 1. Set up the form wrapper and submission handler.
80
+ 2. For each field in the schema, render the appropriate UI component (from `design-system`).
81
+ 3. Connect the UI component to the form state (register / Controller).
82
+ 4. Render error messages below fields if validation fails.
83
+
84
+ ---
85
+
86
+ ### Phase 4 β€” Submission & Integration
87
+
88
+ - Add `isLoading` state to the submit button.
89
+ - Disable submit button during submission.
90
+ - On success: Show success message or redirect, and optionally reset form.
91
+ - On error: Display backend error messages (toast or form-level alert).
92
+
93
+ ---
94
+
95
+ ## Decision Tree
96
+
97
+ ```
98
+ Does the project use a validation library (Zod, Yup)?
99
+ β”œβ”€β”€ Yes β†’ Use it to define schema and pass to form resolver
100
+ └── No β†’ Implement standard HTML5 validation or simple manual validation logic
101
+
102
+ Is it a complex multi-step form (wizard)?
103
+ β”œβ”€β”€ Yes β†’ Break into sub-components, use global or lifted state for form data
104
+ └── No β†’ Handle state locally within the single form component
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Output Format
110
+
111
+ ```
112
+ πŸ“ Form Built
113
+ ─────────────────────────────────────────────────
114
+ Name: [FormName]
115
+ Schema: [Zod / Yup / Manual]
116
+ Library: [React Hook Form / Formik / Native]
117
+
118
+ Fields Implemented:
119
+ βœ… email (string, required, email)
120
+ βœ… password (string, required, min: 8)
121
+
122
+ Integration:
123
+ - Validation: Client-side wired up
124
+ - Submission: Wired to `[submitFunction]`
125
+ - Loading UI: Handled on submit button
126
+
127
+ πŸ”— Next Steps:
128
+ Make sure the API endpoint is ready to accept this payload.
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Validation Checklist
134
+
135
+ - [ ] Form uses existing design system components (Inputs, Buttons)
136
+ - [ ] Client-side validation is implemented
137
+ - [ ] Error messages are displayed properly
138
+ - [ ] Loading state disables the submit button
139
+ - [ ] Accessibility: Inputs have associated labels and error ARIA attributes
140
+
@@ -0,0 +1,155 @@
1
+ ---
2
+ name: qk-frontend-architecture
3
+ description: >-
4
+ PhΓ’n tΓ­ch cαΊ₯u trΓΊc thΖ° mα»₯c frontend vΓ  quyαΊΏt Δ‘α»‹nh vα»‹ trΓ­ Δ‘αΊ·t file chuαΊ©n xΓ‘c theo kiαΊΏn trΓΊc hiện tαΊ‘i.
5
+ version: 1.0.0
6
+ category: frontend
7
+ tags: [architecture, folder-structure, conventions, file-placement]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Frontend Architecture
12
+
13
+ > **Language rule:**
14
+ > Use English for: code, identifiers, file names, architecture terms, technical decisions.
15
+ > Use the user's language for: explanations, questions, summaries, and feedback.
16
+ > The user may write in any language β€” detect and match it automatically.
17
+
18
+ ---
19
+
20
+ ## Trigger
21
+
22
+ Activate this skill when:
23
+ - About to create new files or components
24
+ - User asks "where should I put this file?" or "how should I organize this?"
25
+ - Moving or refactoring code across different modules
26
+ - Inheriting an unfamiliar frontend project
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - βœ… Discover the existing frontend folder structure
33
+ - βœ… Define where new components, hooks, services, and types should be placed
34
+ - βœ… Enforce separation of concerns (e.g., UI vs. Business Logic vs. Data)
35
+ - βœ… Identify architectural patterns in use (e.g., Feature-based, Layer-based)
36
+ - βœ… Validate file placement before execution by other skills
37
+
38
+ ---
39
+
40
+ ## Non-goals
41
+
42
+ - ❌ Do NOT rewrite the entire project architecture unless explicitly asked
43
+ - ❌ Do NOT generate code (delegate to `component-generator` or `ui-builder`)
44
+ - ❌ Do NOT enforce personal preferences over established project conventions
45
+
46
+ ---
47
+
48
+ ## Severity Levels
49
+
50
+ | Level | Meaning |
51
+ |-------|---------|
52
+ | P0 | Architectural violation that breaks the build or creates circular dependencies |
53
+ | P1 | File placed in completely wrong layer (e.g., API logic in UI component) |
54
+ | P2 | Inconsistent folder or file naming |
55
+ | P3 | Minor deviation from convention |
56
+
57
+ ---
58
+
59
+ ## Workflow
60
+
61
+ ### Phase 1 β€” Structure Discovery
62
+
63
+ *(Relies on `context-manager` if already loaded)*
64
+
65
+ Analyze the root source directory (e.g., `src/`, `app/`):
66
+ 1. **Layer-based:** `components/`, `hooks/`, `services/`, `utils/`, `types/`
67
+ 2. **Feature-based:** `features/auth/`, `features/products/`
68
+ 3. **Framework-specific:** `app/` (Next.js App Router), `pages/` (Next.js Pages Router, Nuxt)
69
+ 4. **Domain-driven:** `domains/user/`, `domains/payment/`
70
+ 5. **FSD (Feature Sliced Design):** `app/`, `processes/`, `pages/`, `widgets/`, `features/`, `entities/`, `shared/`
71
+
72
+ ---
73
+
74
+ ### Phase 2 β€” Rule Extraction
75
+
76
+ Based on discovery, define the project's rules for:
77
+ - **Components:** Are they flat? Grouped by feature? Atomic design?
78
+ - **Hooks:** Shared in `src/hooks/` or collocated with components?
79
+ - **State:** Global store vs. feature stores?
80
+ - **API/Services:** Where are HTTP calls made?
81
+ - **Types:** Centralized `types/` or collocated?
82
+ - **Naming Conventions:** PascalCase, camelCase, kebab-case, `index.ts` usage?
83
+
84
+ ---
85
+
86
+ ### Phase 3 β€” File Placement Decision
87
+
88
+ When a new feature/component is requested, map it to the structure:
89
+
90
+ **Input:** "Create a User Profile card that fetches user data."
91
+ **Decision:**
92
+ - UI Component: `src/features/user/components/UserProfileCard.tsx`
93
+ - API Hook: `src/features/user/api/useUser.ts`
94
+ - Types: `src/features/user/types/index.ts`
95
+
96
+ ---
97
+
98
+ ### Phase 4 β€” Enforcement & Validation
99
+
100
+ Before passing control to a generation skill (like `ui-builder`), ensure the plan adheres to the rules.
101
+
102
+ - [ ] Does it mix concerns? (e.g., putting an API call directly in a shared UI button)
103
+ - [ ] Does it violate import boundaries? (e.g., a shared component importing from a specific feature)
104
+ - [ ] Is the naming consistent?
105
+
106
+ ---
107
+
108
+ ## Decision Tree
109
+
110
+ ```
111
+ Is the project using a Feature-based structure?
112
+ β”œβ”€β”€ Yes β†’ Place feature-specific code in `features/<feature-name>/`
113
+ └── No β†’ Use Layer-based structure (`components/`, `hooks/`, etc.)
114
+
115
+ Is the code shared across multiple domains/features?
116
+ β”œβ”€β”€ Yes β†’ Place in `shared/` or global `components/` / `hooks/`
117
+ └── No β†’ Collocate with the specific domain/feature
118
+
119
+ Are there existing examples of this type of file?
120
+ β”œβ”€β”€ Yes β†’ Copy their placement and naming pattern
121
+ └── No β†’ Propose a standard location and ask user to confirm
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Output Format
127
+
128
+ ```
129
+ πŸ—οΈ Frontend Architecture Plan
130
+ ─────────────────────────────────────────────────
131
+ Structure Type: [Feature-based / Layer-based / FSD / etc.]
132
+ Naming: [PascalCase for components, camelCase for functions]
133
+
134
+ File Placement:
135
+ πŸ“„ [path/to/new/file1.tsx] β€” [Why it goes here]
136
+ πŸ“„ [path/to/new/file2.ts] β€” [Why it goes here]
137
+
138
+ ⚠️ Constraints enforced:
139
+ β€’ [Constraint 1, e.g., "API calls must be in hooks, not components"]
140
+ β€’ [Constraint 2, e.g., "Shared UI components cannot import from features/"]
141
+
142
+ πŸ”— Next Steps:
143
+ Delegating to `[skill-name]` to generate the files.
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Validation Checklist
149
+
150
+ - [ ] Structure type identified correctly
151
+ - [ ] File placement follows existing conventions
152
+ - [ ] Naming matches project standards
153
+ - [ ] Separation of concerns maintained
154
+ - [ ] Plan ready to be executed by generation skills
155
+
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: qk-frontend-debug
3
+ description: >-
4
+ ChαΊ©n Δ‘oΓ‘n vΓ  sα»­a cΓ‘c lα»—i Δ‘αΊ·c thΓΉ frontend nhΖ° Hydration error, infinite re-render, stale closure vΓ  vα»‘ CSS.
5
+ version: 1.0.0
6
+ category: frontend
7
+ tags: [debug, react, hydration, rerender, css, state-bug]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Frontend Debugger
12
+
13
+ > **Language rule:**
14
+ > Use English for: code, identifiers, file names, architecture terms, technical decisions.
15
+ > Use the user's language for: explanations, questions, summaries, and feedback.
16
+ > The user may write in any language β€” detect and match it automatically.
17
+
18
+ ---
19
+
20
+ ## Trigger
21
+
22
+ Activate this skill when:
23
+ - User reports a UI-specific bug ("screen is blank", "button doesn't work")
24
+ - React throws a Hydration Error (`Text content did not match. Server: "A" Client: "B"`)
25
+ - React throws an infinite loop error (`Too many re-renders`)
26
+ - CSS styling is broken or overflowing unexpectedly
27
+ - Form validation behaves incorrectly
28
+
29
+ **Note:** For backend or general logic bugs, use `bug-fix`. For performance issues, use `frontend-performance`.
30
+
31
+ ---
32
+
33
+ ## Scope
34
+
35
+ - βœ… Diagnose and fix React hydration mismatches (Next.js / SSR)
36
+ - βœ… Fix infinite loops in `useEffect` and missing dependencies
37
+ - βœ… Resolve state staleness (stale closures in async functions or hooks)
38
+ - βœ… Fix CSS layout issues (Flexbox/Grid blowouts, z-index stacking context)
39
+ - βœ… Provide a targeted, minimal fix that doesn't break other UI elements
40
+
41
+ ---
42
+
43
+ ## Non-goals
44
+
45
+ - ❌ Do NOT rewrite the entire component to fix a small CSS bug
46
+ - ❌ Do NOT disable hydration checks (`suppressHydrationWarning`) unless absolutely necessary and justified
47
+ - ❌ Do NOT apply quick-fixes (like `// @ts-ignore` or wrapping everything in `setTimeout`) without understanding the root cause
48
+
49
+ ---
50
+
51
+ ## Workflow
52
+
53
+ ### Phase 1 β€” Reproduction & Isolation
54
+
55
+ 1. Identify the exact error message or visual symptom.
56
+ 2. Isolate the component causing the issue.
57
+ 3. Determine the environment (SSR, CSR, mobile, specific browser).
58
+
59
+ ---
60
+
61
+ ### Phase 2 β€” Common Issue Diagnosis
62
+
63
+ **Hydration Errors (Next.js/SSR):**
64
+ - Cause: Rendering `window`, `localStorage`, or random data (e.g., `Math.random()`, Dates) on the first pass.
65
+ - Fix: Move client-only rendering inside a `useEffect` (isMounted pattern) or use dynamic imports with `ssr: false`.
66
+
67
+ **Too many re-renders:**
68
+ - Cause: Updating state directly in the render body, or inside a `useEffect` without proper dependencies.
69
+ - Fix: Move state updates into event handlers, or fix `useEffect` dependencies.
70
+
71
+ **Stale Closures:**
72
+ - Cause: A `useEffect` or `useCallback` is using old state because it's missing from the dependency array.
73
+ - Fix: Add dependencies, use refs (`useRef`) for mutable values, or use functional state updates (`setState(prev => prev + 1)`).
74
+
75
+ **CSS Z-Index/Stacking Issues:**
76
+ - Cause: Missing `position: relative/absolute` on parent, or a new stacking context was created.
77
+ - Fix: Inspect parent elements, adjust `z-index`, or use Portals for modals.
78
+
79
+ ---
80
+
81
+ ### Phase 3 β€” Fix Application
82
+
83
+ Apply the minimal fix required to resolve the issue while preserving surrounding logic and styles.
84
+
85
+ ---
86
+
87
+ ## Decision Tree
88
+
89
+ ```
90
+ Is it a Hydration Error?
91
+ β”œβ”€β”€ Yes β†’ Is it caused by client-side APIs (window/localStorage)?
92
+ β”‚ β”œβ”€β”€ Yes β†’ Use `useEffect` to delay rendering until mounted
93
+ β”‚ └── No β†’ Check for mismatched HTML tags (e.g., <p> inside <p>)
94
+ └── No β†’ Proceed to next check
95
+
96
+ Is it an infinite loop?
97
+ β”œβ”€β”€ Yes β†’ Check `useEffect` dependencies. Are objects/arrays re-created every render?
98
+ β”‚ β”œβ”€β”€ Yes β†’ Memoize them (`useMemo`) or move outside component
99
+ β”‚ └── No β†’ Ensure `setState` isn't called unconditionally in render
100
+ └── No β†’ Proceed
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Output Format
106
+
107
+ ```
108
+ πŸͺ² Frontend Debug Report
109
+ ─────────────────────────────────────────────────
110
+ Symptom: [Description of the bug]
111
+ Root Cause: [Explanation of why it failed, e.g., Stale Closure in useEffect]
112
+
113
+ πŸ”§ Fix Applied:
114
+ [Brief description of the code change]
115
+
116
+ βœ… Verification:
117
+ - Error no longer throws
118
+ - UI renders correctly
119
+
120
+ ⚠️ Notes:
121
+ [Any side effects or things to watch out for]
122
+ ```
123
+
124
+ ---
125
+
126
+ ## Validation Checklist
127
+
128
+ - [ ] Root cause clearly identified (not just patched)
129
+ - [ ] Fix is minimal and targeted
130
+ - [ ] No Hydration warnings remain
131
+ - [ ] Component doesn't infinitely loop
132
+ - [ ] No regression on related UI
133
+