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,213 @@
1
+ ---
2
+ name: qk-bug-fix
3
+ description: >-
4
+ Chẩn đoán và sửa lỗi an toàn. Tái hiện lỗi, tìm nguyên nhân gốc rễ và áp dụng bản sửa lỗi tối thiểu, có kiểm chứng.
5
+ version: 2.0.0
6
+ category: engineering
7
+ tags: [bug, fix, debug, root-cause, regression]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Bug Fix — Diagnose & Repair
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 specific bug with a stack trace, error message, or behavior description
24
+ - A test is failing
25
+ - The app crashes or hangs
26
+ - A regression occurred after a code change
27
+ - User says "it's broken", "this doesn't work", "I'm getting an error"
28
+
29
+ **Not this skill** → Use `project-audit` if the problem is unknown and needs discovery first.
30
+
31
+ ---
32
+
33
+ ## Scope
34
+
35
+ - ✅ Reproduce the reported bug
36
+ - ✅ Identify the root cause (not just the symptom)
37
+ - ✅ Apply a minimal, targeted fix
38
+ - ✅ Verify the fix with evidence (tests, logs, comparison)
39
+ - ✅ Prevent recurrence with guards or tests
40
+
41
+ ---
42
+
43
+ ## Non-goals
44
+
45
+ - ❌ Do NOT refactor code outside the buggy area
46
+ - ❌ Do NOT change public APIs unless the bug requires it
47
+ - ❌ Do NOT silence errors with empty `try/catch` or blind `?.` / `!`
48
+ - ❌ Do NOT change formatting or unrelated code
49
+ - ❌ Do NOT mark as done without verifying the fix
50
+
51
+ ---
52
+
53
+ ## Severity Levels
54
+
55
+ | Level | Meaning |
56
+ |-------|---------|
57
+ | P0 | Production down, data loss, security breach |
58
+ | P1 | Core feature broken, blocking users |
59
+ | P2 | Non-critical feature broken, workaround exists |
60
+ | P3 | Edge case, cosmetic, minor annoyance |
61
+
62
+ ---
63
+
64
+ ## Workflow
65
+
66
+ ### Phase 1 — Triage & Understand
67
+
68
+ Before touching code, gather:
69
+ - What is the symptom? (error message, wrong behavior, crash)
70
+ - What is the expected behavior?
71
+ - How to reproduce? (steps, conditions, environment)
72
+ - What changed recently? (git log, deployment, dependency update)
73
+ - What is the severity and impact scope?
74
+
75
+ If critical information is missing → ask before proceeding.
76
+
77
+ ---
78
+
79
+ ### Phase 2 — Reproduce the Issue
80
+
81
+ 1. Write a failing test or script that triggers the bug
82
+ 2. Confirm the bug is consistently reproducible
83
+ 3. For intermittent bugs → identify timing, data, or environment conditions
84
+ 4. Document the exact reproduction steps
85
+
86
+ > Rule: **Never skip reproduction.** A fix without a repro is a guess.
87
+
88
+ ---
89
+
90
+ ### Phase 3 — Localize the Problem
91
+
92
+ 1. Read the stack trace top-down, following frames inside project code
93
+ 2. Use logs, breakpoints, or `git blame` / `git bisect` to narrow scope
94
+ 3. Identify the exact file and line where the failure originates
95
+ 4. Trace the data flow that leads to the failure
96
+
97
+ ---
98
+
99
+ ### Phase 4 — Root Cause Analysis
100
+
101
+ Answer: *Why does this happen? What condition triggers it?*
102
+
103
+ Common root cause categories:
104
+ - Logic error (wrong condition, wrong operator)
105
+ - Off-by-one or boundary case
106
+ - Null / undefined / missing data
107
+ - Async timing or race condition
108
+ - Type mismatch
109
+ - Stale state or stale closure
110
+ - Config or environment issue
111
+ - API contract change
112
+ - Dependency version change
113
+
114
+ Use 5 Whys: keep asking "why" until you reach the actual cause, not just the symptom.
115
+
116
+ ---
117
+
118
+ ### Phase 5 — Apply the Fix
119
+
120
+ Rules:
121
+ - Fix the root cause, not the symptom
122
+ - Smallest possible change that fully resolves the issue
123
+ - Keep existing code style, naming, and conventions
124
+ - Handle related edge cases to prevent similar bugs
125
+ - Remove all debug code, console.logs, and temporary patches
126
+ - Do not change public APIs unless strictly required
127
+
128
+ ---
129
+
130
+ ### Phase 6 — Verify the Result
131
+
132
+ - [ ] The failing test from Phase 2 now passes
133
+ - [ ] Run the related test suite — no new failures
134
+ - [ ] Run lint and type-check — clean
135
+ - [ ] Manually reproduce the original steps — bug is gone
136
+ - [ ] No regressions in adjacent functionality
137
+
138
+ ---
139
+
140
+ ### Phase 7 — Report & Prevent
141
+
142
+ Summarize and propose prevention:
143
+ - What was the root cause?
144
+ - What was changed and why?
145
+ - Are there similar patterns elsewhere in the codebase?
146
+ - Should a test be added to prevent regression?
147
+
148
+ ---
149
+
150
+ ## Decision Tree
151
+
152
+ ```
153
+ Is the bug reproducible?
154
+ ├── No → Isolate timing, data, environment conditions first
155
+ └── Yes → Is the root cause known?
156
+ ├── No → Run Phase 3-4 (localize + analyze)
157
+ └── Yes → Apply minimal fix → verify → report
158
+ ```
159
+
160
+ ```
161
+ Is the fix risky (touches shared code / public API)?
162
+ ├── Yes → Confirm scope with user before applying
163
+ └── No → Apply fix
164
+ ```
165
+
166
+ ---
167
+
168
+ ## Output Format
169
+
170
+ ```
171
+ 🐛 Bug Report
172
+ ─────────────────────────────────────────────────
173
+ Symptom: [What broke + how to reproduce]
174
+ Root cause: [Exact file:line — why it happens]
175
+ Severity: [P0 / P1 / P2 / P3]
176
+
177
+ 🔧 Fix Applied
178
+ ─────────────────────────────────────────────────
179
+ Changed: [File(s) modified]
180
+ Change: [What was changed and why it's minimal]
181
+
182
+ ✅ Verification
183
+ ─────────────────────────────────────────────────
184
+ Tests: [Test name / command — PASSED]
185
+ Lint/Types: [Clean / warnings noted]
186
+ Manual: [Reproduced original steps — bug gone]
187
+ Regression: [No new failures]
188
+
189
+ 🛡️ Prevention
190
+ ─────────────────────────────────────────────────
191
+ Test added: [Yes / No — reason]
192
+ Similar areas to check: [file or pattern to review]
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Validation Checklist
198
+
199
+ - [ ] Bug was reproduced before fixing
200
+ - [ ] Root cause identified at exact file:line with explanation
201
+ - [ ] Fix is minimal — only changes what's needed
202
+ - [ ] Failing test now passes
203
+ - [ ] Related tests and lint/type-check clean
204
+ - [ ] No debug code left behind
205
+ - [ ] Side effects documented
206
+ - [ ] Prevention strategy noted
207
+
208
+ ---
209
+
210
+ ## Examples
211
+
212
+ See `examples/` folder.
213
+
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: qk-component-generator
3
+ description: >-
4
+ Tạo các UI Component độc lập, tái sử dụng được, có type an toàn và tuân thủ chuẩn design system.
5
+ version: 1.0.0
6
+ category: frontend
7
+ tags: [component, react, vue, ui, props, reusable]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Component Generator
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 Card component", "make a reusable Button", "extract this into a component"
24
+ - A larger skill (`ui-builder`, `form-builder`) requires a new isolated UI piece to be built
25
+ - Refactoring a large component by splitting it into smaller, reusable parts
26
+
27
+ ---
28
+
29
+ ## Scope
30
+
31
+ - ✅ Generate a single, focused component (e.g., `UserCard`, `StatBadge`, `Dropdown`)
32
+ - ✅ Define strict, explicit types/interfaces for all props
33
+ - ✅ Implement component variants (e.g., `size`, `color`, `variant`) if needed
34
+ - ✅ Follow project styling rules (Tailwind, CSS Modules, Styled Components)
35
+ - ✅ Ensure accessibility (ARIA attributes, semantic HTML) where applicable
36
+
37
+ ---
38
+
39
+ ## Non-goals
40
+
41
+ - ❌ Do NOT build full pages or complex screens (delegate to `ui-builder`)
42
+ - ❌ Do NOT handle complex business logic or data fetching inside a dumb/presentational component
43
+ - ❌ Do NOT overwrite existing components without explicit instruction
44
+
45
+ ---
46
+
47
+ ## Workflow
48
+
49
+ ### Phase 1 — Component Design
50
+
51
+ Determine:
52
+ 1. **Name:** PascalCase (e.g., `ProductCard`).
53
+ 2. **Responsibility:** What exactly does this component do? Keep it single-responsibility.
54
+ 3. **Props:** What data does it need from its parent? What events does it emit?
55
+
56
+ ---
57
+
58
+ ### Phase 2 — API (Props) Definition
59
+
60
+ Draft the interface first.
61
+ - Make required props explicit.
62
+ - Use optional props (`?`) for variants or non-essential data.
63
+ - Avoid `any`.
64
+
65
+ *Example:*
66
+ ```typescript
67
+ interface ProductCardProps {
68
+ id: string;
69
+ title: string;
70
+ price: number;
71
+ imageUrl?: string;
72
+ isAvailable?: boolean;
73
+ onAddToCart: (id: string) => void;
74
+ }
75
+ ```
76
+
77
+ ---
78
+
79
+ ### Phase 3 — Implementation
80
+
81
+ Write the component code.
82
+ 1. Use destructuring for props.
83
+ 2. Apply styling based on `design-system` rules.
84
+ 3. Handle empty/null states (e.g., if `imageUrl` is missing, show a placeholder).
85
+ 4. Add basic interactivity (e.g., calling `onAddToCart` when clicked).
86
+
87
+ ---
88
+
89
+ ### Phase 4 — Validation
90
+
91
+ - [ ] Are all props typed correctly?
92
+ - [ ] Is it truly reusable (no hardcoded data)?
93
+ - [ ] Does it use project design tokens?
94
+ - [ ] Is it exported correctly according to project conventions (default vs. named export)?
95
+
96
+ ---
97
+
98
+ ## Decision Tree
99
+
100
+ ```
101
+ Does the component need to manage its own state (e.g., an accordion opening/closing)?
102
+ ├── Yes → Add local state (`useState`). Keep it minimal.
103
+ └── No → Make it a pure "dumb" component receiving props.
104
+
105
+ Are there multiple visual styles requested (e.g., primary, secondary, outline)?
106
+ ├── Yes → Add a `variant` prop and map it to style classes.
107
+ └── No → Implement the single required style.
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Output Format
113
+
114
+ ```
115
+ 🧩 Component Generated
116
+ ─────────────────────────────────────────────────
117
+ Name: [ComponentName]
118
+ Path: [path/to/Component.tsx]
119
+
120
+ Props Interface:
121
+ [List key props here briefly]
122
+
123
+ Features:
124
+ • [Feature 1, e.g., "Supports primary/secondary variants"]
125
+ • [Feature 2, e.g., "Fully typed with TypeScript"]
126
+
127
+ 🔗 Next Steps:
128
+ Component is ready to be imported into your layout.
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Examples
134
+
135
+ See `examples/` folder.
136
+
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: qk-context-manager
3
+ description: >-
4
+ Xác định các file cần thiết, tóm tắt kiến trúc và quản lý bộ nhớ ngữ cảnh để tránh tràn bộ nhớ.
5
+ version: 1.0.0
6
+ category: engineering
7
+ tags: [context, architecture, memory, file-selection, summarization]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Context Manager
12
+
13
+ > **Language rule:**
14
+ > Use **English** for: file paths, architecture terms, module names, technical labels.
15
+ > Use **the user's language** for: explanations, summaries, and questions.
16
+
17
+ ---
18
+
19
+ ## Trigger
20
+
21
+ Activate this skill when:
22
+ - Starting work on an unfamiliar or large codebase
23
+ - About to read many files and need to prioritize
24
+ - Context window is at risk of overflowing
25
+ - User asks "where is X", "what does Y do", "how is this project structured"
26
+ - Another skill (e.g. `project-audit`, `frontend-architecture`) needs project context first
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - ✅ Identify which files are relevant to the current task
33
+ - ✅ Summarize project architecture in structured format
34
+ - ✅ Map folder structure to responsibilities
35
+ - ✅ Track what has been read and what still needs reading
36
+ - ✅ Flag context window risks
37
+ - ✅ Maintain a working memory summary for multi-turn sessions
38
+
39
+ ---
40
+
41
+ ## Non-goals
42
+
43
+ - ❌ Do NOT modify any files
44
+ - ❌ Do NOT fix bugs
45
+ - ❌ Do NOT make architectural decisions
46
+ - ❌ Do NOT read every file blindly — be selective and efficient
47
+
48
+ ---
49
+
50
+ ## Workflow
51
+
52
+ ### Phase 1 — Project Discovery
53
+
54
+ Read only top-level signals first:
55
+ 1. `package.json` / `pyproject.toml` / `Cargo.toml` → detect framework, language, scripts
56
+ 2. Root config files → `.env.example`, `tsconfig.json`, `vite.config.ts`, `next.config.js`
57
+ 3. Folder structure (1-2 levels deep) → identify key directories
58
+ 4. Entry points → `src/index.ts`, `app/`, `pages/`, `main.py`
59
+
60
+ Produce: **Project Profile** (framework, language, key directories, architecture style)
61
+
62
+ ---
63
+
64
+ ### Phase 2 — Task-Scoped File Selection
65
+
66
+ Given the current task, identify the minimum relevant set of files:
67
+
68
+ ```
69
+ Task type → Files to read
70
+ ─────────────────────────────────────────────────────
71
+ UI work → components/, pages/, styles/, design system files
72
+ API work → services/, hooks/, api/, types/
73
+ State work → store/, context/, hooks/
74
+ Bug fix → files mentioned in error, related modules
75
+ Architecture → folder structure, key abstractions
76
+ ```
77
+
78
+ Rules:
79
+ - Read **entry points** before diving into details
80
+ - Prefer **index files** as anchors
81
+ - Skip `node_modules`, `dist`, `build`, `.git`
82
+ - If uncertain which file → check imports, not the file itself
83
+
84
+ ---
85
+
86
+ ### Phase 3 — Architecture Summary
87
+
88
+ Produce a concise summary:
89
+
90
+ ```
91
+ Project: [Name / repo]
92
+ Framework: [React 18 / Next.js 14 / Vue 3 / etc.]
93
+ Language: [TypeScript / JavaScript / Python]
94
+ Structure: [Feature-based / Layer-based / Domain-based]
95
+
96
+ Key directories:
97
+ src/components/ → Shared UI components
98
+ src/features/ → Feature modules (collocated)
99
+ src/services/ → API and data services
100
+ src/hooks/ → Custom React hooks
101
+ src/types/ → TypeScript interfaces
102
+
103
+ State: [Zustand / Redux / React Query / Pinia]
104
+ HTTP client: [axios instance at src/lib/axios.ts]
105
+ Auth: [JWT stored in httpOnly cookie]
106
+ ```
107
+
108
+ ---
109
+
110
+ ### Phase 4 — Working Memory Maintenance
111
+
112
+ During multi-turn sessions:
113
+ - Track which files have been read (avoid re-reading)
114
+ - Track decisions made (e.g. "we decided to use feature-based structure")
115
+ - Flag when context is approaching limits
116
+ - Offer to summarize and compress if needed
117
+
118
+ ---
119
+
120
+ ## Decision Tree
121
+
122
+ ```
123
+ Is this a new project / first time seeing this codebase?
124
+ ├── Yes → Run full Phase 1 + Phase 2 + Phase 3
125
+ └── No → Has something changed since last context load?
126
+ ├── Yes → Re-run Phase 2 for affected area
127
+ └── No → Use cached architecture summary
128
+ ```
129
+
130
+ ```
131
+ Is context window at risk?
132
+ ├── Yes → Summarize what's been read, drop low-relevance files
133
+ └── No → Continue loading relevant files
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Output Format
139
+
140
+ ```
141
+ 🗂️ Project Context Loaded
142
+
143
+ Framework: [framework]
144
+ Language: [language]
145
+ Structure: [style]
146
+
147
+ Relevant files for this task:
148
+ 📄 [path/to/file.ts] — [why it's relevant]
149
+ 📄 [path/to/file.ts] — [why it's relevant]
150
+
151
+ Architecture summary:
152
+ [2-4 lines describing how this codebase is organized]
153
+
154
+ ⚠️ Context notes:
155
+ [Any risks, unknowns, or files that couldn't be read]
156
+
157
+ ✅ Ready. Proceeding with: [next skill or action]
158
+ ```
159
+
160
+ ---
161
+
162
+ ## Validation Checklist
163
+
164
+ - [ ] Framework and language correctly identified
165
+ - [ ] Only task-relevant files selected (no noise)
166
+ - [ ] Architecture summary is accurate and concise
167
+ - [ ] Context window usage is reasonable
168
+ - [ ] Working memory updated for this session
169
+
170
+ ---
171
+
172
+ ## Examples
173
+
174
+ See `examples/` folder.
175
+
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: qk-database-engineer
3
+ description: >-
4
+ Thiết kế database schema, viết script migration và tối ưu truy vấn cho SQL/NoSQL bằng ORM (Prisma, Drizzle...).
5
+ version: 1.0.0
6
+ category: backend
7
+ tags: [database, sql, prisma, drizzle, schema, migration, query-optimization]
8
+ platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
9
+ ---
10
+
11
+ # Database Engineer
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 new table", "add a column", "design the schema"
24
+ - Writing complex data retrieval logic (joins, aggregations)
25
+ - A query is running slowly and needs optimization (indexing)
26
+ - Running or generating database migrations
27
+
28
+ ---
29
+
30
+ ## Scope
31
+
32
+ - ✅ **Schema Design:** Model tables, relations (1:1, 1:N, N:M), and constraints (Unique, FK).
33
+ - ✅ **ORM Integration:** Generate code for Prisma, Drizzle, TypeORM, Sequelize, or Mongoose.
34
+ - ✅ **Migrations:** Generate SQL or ORM migration files safely.
35
+ - ✅ **Query Optimization:** Prevent N+1 queries, add indexes, use efficient aggregations.
36
+
37
+ ---
38
+
39
+ ## Non-goals
40
+
41
+ - ❌ Do NOT execute destructive migrations (DROP TABLE) on production environments without extreme warnings and approval.
42
+ - ❌ Do NOT mix raw SQL into ORM logic unless necessary for performance.
43
+
44
+ ---
45
+
46
+ ## Workflow
47
+
48
+ ### Phase 1 — Schema Design
49
+
50
+ Understand the business entities and relations.
51
+ - Identify primary keys (UUID vs Auto-increment ID).
52
+ - Identify foreign keys and cascade rules (`ON DELETE CASCADE`).
53
+ - Ensure proper normalization (usually 3NF) or denormalization (if NoSQL).
54
+
55
+ ### Phase 2 — ORM / Migration Generation
56
+
57
+ Map the design to the project's tool:
58
+ - **Prisma:** Update `schema.prisma`.
59
+ - **Drizzle:** Update `schema.ts`.
60
+ - **Raw SQL:** Write `V1__create_table.sql`.
61
+
62
+ ### Phase 3 — Query Implementation
63
+
64
+ Write the data access methods (Repository pattern or direct ORM calls).
65
+ - Avoid fetching `SELECT *` if only 2 columns are needed.
66
+ - Batch queries or use joins to prevent N+1 issues.
67
+
68
+ ---
69
+
70
+ ## Decision Tree
71
+
72
+ ```
73
+ Is the project using an ORM?
74
+ ├── Prisma → Modify `schema.prisma`, use `prisma.entity.findMany()`
75
+ ├── Drizzle → Modify schema TS files, use Drizzle query builder
76
+ └── No → Write raw SQL or use query builder (Knex)
77
+
78
+ Does the schema change drop data or alter existing columns?
79
+ ├── Yes → Flag as High Risk. Provide rollback strategy. Ask for approval.
80
+ └── No → Standard migration (e.g., adding a nullable column).
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Output Format
86
+
87
+ ```
88
+ 🗄️ Database Engineering Report
89
+ ─────────────────────────────────────────────────
90
+ Action: [Schema Update / Query Optimization]
91
+ Tooling: [Prisma / Raw SQL / etc.]
92
+
93
+ Changes:
94
+ ✅ Added model: `User` (1:N with `Post`)
95
+ ✅ Added index on `User.email`
96
+ ✅ Generated query: `getUserWithPosts`
97
+
98
+ ⚠️ Risk Assessment:
99
+ [Low / High — e.g., "Safe addition, no data loss"]
100
+
101
+ 🔗 Next Steps:
102
+ Run `npx prisma migrate dev` to apply these changes locally.
103
+ ```
104
+