@votruongdanh/ai-agent-skills 3.3.3 → 3.3.4
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.
- package/.agents/.skills-version +1 -0
- package/{.kiro → .agents}/skills/agents/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/brainstorm/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/clean/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/create/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/debug/SKILL.md +12 -6
- package/{.kiro → .agents}/skills/deploy/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/enhance/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/explain/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/integrate/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/motion-ui/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/orchestrate/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/plan/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/preview/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/status/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/test/SKILL.md +3 -0
- package/{.kiro → .agents}/skills/ui-ux-pro-max/SKILL.md +3 -0
- package/.kiro/.skills-version +1 -0
- package/README.md +13 -2
- package/lib/skill-bundle.js +8 -3
- package/package.json +3 -1
- package/scripts/sync-all.js +20 -0
- package/skills/_scripts/.ai-memory-template.md +55 -0
- package/skills/_scripts/checklist.md +35 -0
- package/skills/_scripts/memory-compact.md +142 -0
- package/skills/_scripts/memory-dedupe.md +26 -0
- package/skills/_scripts/pre-deploy.md +42 -0
- package/skills/_scripts/verify-all.md +28 -0
- package/skills/agents/SKILL.md +88 -0
- package/skills/agents/agents/backend-specialist.md +29 -0
- package/skills/agents/agents/database-architect.md +28 -0
- package/skills/agents/agents/debugger.md +29 -0
- package/skills/agents/agents/devops-engineer.md +30 -0
- package/skills/agents/agents/documentation-writer.md +29 -0
- package/skills/agents/agents/frontend-specialist.md +30 -0
- package/skills/agents/agents/orchestrator.md +36 -0
- package/skills/agents/agents/performance-optimizer.md +29 -0
- package/skills/agents/agents/project-planner.md +30 -0
- package/skills/agents/agents/security-auditor.md +30 -0
- package/skills/agents/agents/test-engineer.md +29 -0
- package/skills/brainstorm/SKILL.md +69 -0
- package/skills/clean/SKILL.md +93 -0
- package/skills/create/SKILL.md +66 -0
- package/skills/debug/SKILL.md +77 -0
- package/skills/deploy/SKILL.md +69 -0
- package/skills/enhance/SKILL.md +61 -0
- package/skills/explain/SKILL.md +72 -0
- package/skills/instructions.md +95 -0
- package/skills/integrate/SKILL.md +53 -0
- package/skills/motion-ui/SKILL.md +495 -0
- package/skills/orchestrate/SKILL.md +76 -0
- package/skills/plan/SKILL.md +72 -0
- package/skills/preview/SKILL.md +58 -0
- package/skills/status/SKILL.md +60 -0
- package/skills/test/SKILL.md +61 -0
- package/skills/ui-ux-pro-max/SKILL.md +68 -0
- /package/{.kiro → .agents}/skills/_scripts/.ai-memory-template.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/checklist.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/memory-compact.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/memory-dedupe.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/pre-deploy.md +0 -0
- /package/{.kiro → .agents}/skills/_scripts/verify-all.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/backend-specialist.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/database-architect.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/debugger.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/devops-engineer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/documentation-writer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/frontend-specialist.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/orchestrator.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/performance-optimizer.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/project-planner.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/security-auditor.md +0 -0
- /package/{.kiro → .agents}/skills/agents/agents/test-engineer.md +0 -0
- /package/{.kiro → .agents}/skills/instructions.md +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create
|
|
3
|
+
description: "Build new features, files, components, endpoints, pages, or scripts. Use when the user wants to create something new in the codebase. Triggers: create, build, add, new, scaffold, tạo, thêm mới, tạo trang, tạo API."
|
|
4
|
+
agents: [backend-specialist, frontend-specialist, database-architect]
|
|
5
|
+
related-skills: [plan, test, debug]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check tech stack, coding conventions, existing patterns, architecture decisions, and file structure notes.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was created, files touched, patterns used, decisions, and follow-ups.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Create a new implementation cleanly and with minimal disruption.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- If creating API/backend → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
|
|
17
|
+
- If creating UI component/page → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
18
|
+
- If creating database schema/migration → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
|
|
19
|
+
- If creating tests → read `.kiro/skills/agents/agents/test-engineer.md` and apply its knowledge
|
|
20
|
+
- If creating deployment config → read `.kiro/skills/agents/agents/devops-engineer.md` and apply its knowledge
|
|
21
|
+
|
|
22
|
+
## Socratic Gate
|
|
23
|
+
Before creating, verify:
|
|
24
|
+
1. What exactly should be created? (component, page, API, script?)
|
|
25
|
+
2. Does something similar already exist in the project?
|
|
26
|
+
3. What is the expected behavior/output?
|
|
27
|
+
If any answer is unclear, ASK before proceeding.
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context, conventions, and patterns.
|
|
31
|
+
2. Understand the requested artifact and the existing project structure.
|
|
32
|
+
3. Identify the smallest complete implementation that satisfies the request.
|
|
33
|
+
4. Create or update the necessary files only.
|
|
34
|
+
5. Reuse existing patterns, naming, and architecture already present in the repo.
|
|
35
|
+
6. Include basic validation and error handling.
|
|
36
|
+
7. Add brief usage notes, edge cases, and follow-up improvements.
|
|
37
|
+
8. **Update Memory** — Save what was created, patterns used, and follow-up notes to `.ai-memory.md`.
|
|
38
|
+
|
|
39
|
+
## Checklist
|
|
40
|
+
- [ ] Requirement clearly understood
|
|
41
|
+
- [ ] Existing patterns/conventions checked
|
|
42
|
+
- [ ] Minimal files created/modified
|
|
43
|
+
- [ ] Validation and error handling included
|
|
44
|
+
- [ ] Project conventions matched (naming, structure)
|
|
45
|
+
- [ ] Tests added if test framework exists
|
|
46
|
+
- [ ] Usage notes provided
|
|
47
|
+
- [ ] Memory file updated
|
|
48
|
+
|
|
49
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
50
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
- Prefer incremental changes over large rewrites.
|
|
54
|
+
- Match the project's conventions.
|
|
55
|
+
- Include basic validation and error handling.
|
|
56
|
+
- If tests exist nearby, add or update them when appropriate.
|
|
57
|
+
- Avoid changing unrelated files; if unsure about side effects, ASK before editing broadly.
|
|
58
|
+
- Always read and update the memory file.
|
|
59
|
+
|
|
60
|
+
## Quality Gate
|
|
61
|
+
After completing, read `.kiro/skills/_scripts/checklist.md` for cross-cutting quality checks.
|
|
62
|
+
|
|
63
|
+
## Related Skills
|
|
64
|
+
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan before creating complex features
|
|
65
|
+
- `/test` → read `.kiro/skills/test/SKILL.md` — Write tests for new code
|
|
66
|
+
- `/debug` → read `.kiro/skills/debug/SKILL.md` — Fix issues in newly created code
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug
|
|
3
|
+
description: "Root-cause analysis for bugs, failing commands, broken behavior, and error logs. Use when the user encounters errors, crashes, or unexpected behavior. Triggers: debug, fix, bug, error, crash, lỗi, sửa lỗi, hỏng, fail."
|
|
4
|
+
agents: [debugger, backend-specialist, frontend-specialist]
|
|
5
|
+
related-skills: [test, enhance, status]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check for known bugs, past fixes, tech stack details, common error patterns, and architecture notes.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: bug, root cause, fix, files touched, lessons learned, and remaining risks.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Find the real root cause, not just the first visible symptom.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- If bug is in API/server/backend → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
|
|
17
|
+
- If bug is in UI/rendering/CSS → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
18
|
+
- If bug is in database/queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
|
|
19
|
+
- If bug may be a security issue → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
|
|
20
|
+
- Default → read `.kiro/skills/agents/agents/debugger.md` and apply its systematic analysis
|
|
21
|
+
|
|
22
|
+
## Socratic Gate
|
|
23
|
+
Before debugging, verify:
|
|
24
|
+
1. What is the expected behavior vs actual behavior?
|
|
25
|
+
2. Is there a log, stacktrace, or error message?
|
|
26
|
+
3. When did this start? (recent change, always broken, intermittent?)
|
|
27
|
+
4. Have we tried this before?
|
|
28
|
+
If any answer is missing, ASK before proceeding.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context and past bug history.
|
|
32
|
+
2. Summarize the bug, expected behavior, and actual behavior.
|
|
33
|
+
3. Gather evidence from logs, stack traces, code paths, config, and recent changes.
|
|
34
|
+
4. List the top hypotheses ranked by likelihood. **Eliminate previously failed hypotheses immediately.**
|
|
35
|
+
5. Eliminate hypotheses using direct evidence.
|
|
36
|
+
6. Identify the root cause and confirm with evidence before attempting any code changes.
|
|
37
|
+
7. Propose an effective solution that addresses the root cause definitively. **Ensure clean code standards are met and fully update all related files.**
|
|
38
|
+
8. Suggest how to verify the fix and prevent regressions.
|
|
39
|
+
9. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` and run cross-cutting quality checks.
|
|
40
|
+
10. **Update Memory** — Save root cause, fix, and lessons to `.ai-memory.md`.
|
|
41
|
+
|
|
42
|
+
## Output format
|
|
43
|
+
- Symptom
|
|
44
|
+
- Evidence collected
|
|
45
|
+
- Failed Attempts (to avoid repetition)
|
|
46
|
+
- Hypotheses (ranked by likelihood)
|
|
47
|
+
- Root cause
|
|
48
|
+
- Fix (Clean code & complete file updates)
|
|
49
|
+
- Verification steps
|
|
50
|
+
- Regression prevention
|
|
51
|
+
|
|
52
|
+
## Checklist
|
|
53
|
+
- [ ] Bug clearly described (expected vs actual)
|
|
54
|
+
- [ ] Past failed attempts reviewed to prevent loop
|
|
55
|
+
- [ ] Evidence gathered and root cause definitively confirmed
|
|
56
|
+
- [ ] Hypotheses listed and ranked
|
|
57
|
+
- [ ] Root cause confirmed with evidence
|
|
58
|
+
- [ ] Fix is effective and addresses root cause directly
|
|
59
|
+
- [ ] No side effects introduced
|
|
60
|
+
- [ ] Verification steps provided
|
|
61
|
+
- [ ] Regression prevention suggested
|
|
62
|
+
- [ ] Memory file updated
|
|
63
|
+
|
|
64
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
65
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
66
|
+
|
|
67
|
+
## Rules
|
|
68
|
+
- Do not guess when evidence is missing; say what must be checked.
|
|
69
|
+
- Prefer deterministic reproduction steps.
|
|
70
|
+
- Mention any hidden risk or side effect of the fix.
|
|
71
|
+
- Avoid changing unrelated files; if a fix seems wide-impact, ASK before proceeding.
|
|
72
|
+
- Always read and update the memory file.
|
|
73
|
+
|
|
74
|
+
## Related Skills
|
|
75
|
+
- `/test` → read `.kiro/skills/test/SKILL.md` — Write tests to prevent regression
|
|
76
|
+
- `/enhance` → read `.kiro/skills/enhance/SKILL.md` — Improve code quality after fixing
|
|
77
|
+
- `/status` → read `.kiro/skills/status/SKILL.md` — Check project health after fix
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deploy
|
|
3
|
+
description: "Deployment steps, release preparation, environment setup, CI/CD guidance, and production rollout. Use when the user wants to deploy, release, or set up infrastructure. Triggers: deploy, release, CI/CD, docker, production, triển khai, phát hành, đưa lên production."
|
|
4
|
+
agents: [devops-engineer, security-auditor]
|
|
5
|
+
related-skills: [test, status, plan]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check deployment history, target environments, known infrastructure, CI/CD setup, past deployment issues.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: target, steps, env details, issues, rollback notes, and infra decisions.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Prepare a safe, repeatable deployment or release plan.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- For infrastructure/CI/CD → read `.kiro/skills/agents/agents/devops-engineer.md` and apply its knowledge
|
|
17
|
+
- For security review before deploy → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
|
|
18
|
+
- For database migrations → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
|
|
19
|
+
- For performance validation → read `.kiro/skills/agents/agents/performance-optimizer.md` and apply its knowledge
|
|
20
|
+
|
|
21
|
+
## Socratic Gate
|
|
22
|
+
Before deploying, verify:
|
|
23
|
+
1. What is the target environment? (staging, production, preview?)
|
|
24
|
+
2. Are all tests passing?
|
|
25
|
+
3. Are there database migrations or breaking changes?
|
|
26
|
+
If any answer is unclear, ASK before proceeding.
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
1. **Read Memory** — Load `.ai-memory.md` for deployment history and environment details.
|
|
30
|
+
2. Detect the app type, runtime, dependencies, and target environment.
|
|
31
|
+
3. List prerequisites: secrets, env vars, build steps, infrastructure, database migrations, and health checks.
|
|
32
|
+
4. Produce a deployment sequence from pre-checks to rollback.
|
|
33
|
+
5. Call out risky steps explicitly.
|
|
34
|
+
6. Include post-deploy verification and monitoring.
|
|
35
|
+
7. **Quality Gate** — Read `.kiro/skills/_scripts/pre-deploy.md` for pre-deploy checklist, then `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
|
|
36
|
+
8. **Update Memory** — Save deployment details and outcomes to `.ai-memory.md`.
|
|
37
|
+
|
|
38
|
+
## Output format
|
|
39
|
+
- Target environment
|
|
40
|
+
- Preconditions
|
|
41
|
+
- Deployment steps (numbered, with risk flags)
|
|
42
|
+
- Verification (health checks, smoke tests)
|
|
43
|
+
- Rollback plan
|
|
44
|
+
|
|
45
|
+
## Checklist
|
|
46
|
+
- [ ] Target environment confirmed
|
|
47
|
+
- [ ] All tests passing
|
|
48
|
+
- [ ] Secrets/env vars configured
|
|
49
|
+
- [ ] Database migrations planned
|
|
50
|
+
- [ ] Build artifacts ready
|
|
51
|
+
- [ ] Rollback plan documented
|
|
52
|
+
- [ ] Health checks defined
|
|
53
|
+
- [ ] Post-deploy verification planned
|
|
54
|
+
- [ ] Memory file updated
|
|
55
|
+
|
|
56
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
57
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
- Prefer least-risk rollout patterns.
|
|
61
|
+
- Never expose secrets.
|
|
62
|
+
- Distinguish clearly between required and optional steps.
|
|
63
|
+
- Avoid unrelated infra/app changes; if a deployment step requires broad refactors, ASK first.
|
|
64
|
+
- Always read and update the memory file.
|
|
65
|
+
|
|
66
|
+
## Related Skills
|
|
67
|
+
- `/test` → read `.kiro/skills/test/SKILL.md` — Run tests before deployment
|
|
68
|
+
- `/status` → read `.kiro/skills/status/SKILL.md` — Check project readiness
|
|
69
|
+
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan complex deployment sequences
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: enhance
|
|
3
|
+
description: "Improve existing code — refactor, optimize performance, tighten security, or enhance UX. Use when the user wants to make code better without changing its purpose. Triggers: enhance, improve, refactor, optimize, review, cải thiện, tối ưu, nhanh hơn, code dài quá."
|
|
4
|
+
agents: [performance-optimizer, security-auditor, frontend-specialist]
|
|
5
|
+
related-skills: [debug, test, plan]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check past enhancements, known pain points, tech debt notes, performance baselines, and architecture decisions.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what changed, impact, tradeoffs, and remaining tech debt.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Improve an existing implementation without breaking working behavior.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- If enhancing performance → read `.kiro/skills/agents/agents/performance-optimizer.md` and apply its knowledge
|
|
17
|
+
- If tightening security → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
|
|
18
|
+
- If improving UI/UX → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
19
|
+
- If refactoring backend/API → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
|
|
20
|
+
- If improving database queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
|
|
21
|
+
|
|
22
|
+
## Socratic Gate
|
|
23
|
+
Before enhancing, verify:
|
|
24
|
+
1. What specific aspect needs improvement? (performance, security, UX, maintainability?)
|
|
25
|
+
2. What is the current pain point or metric?
|
|
26
|
+
3. Are there existing tests that must continue to pass?
|
|
27
|
+
If any answer is unclear, ASK before proceeding.
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context and past enhancement history.
|
|
31
|
+
2. Understand the current state and pain points.
|
|
32
|
+
3. Identify high-impact improvements in quality, maintainability, performance, reliability, or UX.
|
|
33
|
+
4. Prioritize improvements by value versus effort.
|
|
34
|
+
5. Implement or recommend the top changes.
|
|
35
|
+
6. Explain tradeoffs and validation steps.
|
|
36
|
+
7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` and verify enhancements don't break existing behavior.
|
|
37
|
+
8. **Update Memory** — Save enhancement details and outcomes to `.ai-memory.md`.
|
|
38
|
+
|
|
39
|
+
## Checklist
|
|
40
|
+
- [ ] Current state documented
|
|
41
|
+
- [ ] Pain points identified
|
|
42
|
+
- [ ] Improvements prioritized by value/effort
|
|
43
|
+
- [ ] Existing behavior preserved
|
|
44
|
+
- [ ] Tradeoffs explained
|
|
45
|
+
- [ ] Tests still passing
|
|
46
|
+
- [ ] Memory file updated
|
|
47
|
+
|
|
48
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
49
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
50
|
+
|
|
51
|
+
## Rules
|
|
52
|
+
- Preserve behavior unless the user asked for a behavior change.
|
|
53
|
+
- Prefer small, meaningful upgrades over broad rewrites.
|
|
54
|
+
- If performance is discussed, explain where the gain comes from.
|
|
55
|
+
- Avoid changing unrelated files; if improvement requires broad refactor, ASK before doing it.
|
|
56
|
+
- Always read and update the memory file.
|
|
57
|
+
|
|
58
|
+
## Related Skills
|
|
59
|
+
- `/debug` → read `.kiro/skills/debug/SKILL.md` — Fix issues found during enhancement
|
|
60
|
+
- `/test` → read `.kiro/skills/test/SKILL.md` — Verify enhancements don't break things
|
|
61
|
+
- `/plan` → read `.kiro/skills/plan/SKILL.md` — Plan large-scale refactoring
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: explain
|
|
3
|
+
description: "Explain code, walk through logic, and help understand architecture or behavior. Use when the user asks what code does, how something works, or wants a walkthrough. Triggers: explain, what does this do, how does this work, giải thích, giải thích code, code này làm gì."
|
|
4
|
+
agents: [documentation-writer, backend-specialist, frontend-specialist]
|
|
5
|
+
related-skills: [debug, enhance, status]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Check tech stack, architecture notes, past explanations, and domain context.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was explained, key insights, misconceptions clarified, and follow-ups.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Help the user deeply understand code, logic, architecture, or behavior — at the level of detail they need.
|
|
14
|
+
|
|
15
|
+
## Agent Routing
|
|
16
|
+
- If explaining backend/API logic → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
|
|
17
|
+
- If explaining UI/component behavior → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
|
|
18
|
+
- If explaining database schema/queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
|
|
19
|
+
- If explaining security mechanisms → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
|
|
20
|
+
- Default → read `.kiro/skills/agents/agents/documentation-writer.md` for clear, structured explanation
|
|
21
|
+
|
|
22
|
+
## Socratic Gate
|
|
23
|
+
Before explaining, verify:
|
|
24
|
+
1. Which file, function, or code block should be explained?
|
|
25
|
+
2. What level of detail? (high-level overview vs line-by-line walkthrough)
|
|
26
|
+
3. What is the user's familiarity level with this area?
|
|
27
|
+
If any answer is unclear, ASK before proceeding.
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
1. **Read Memory** — Load `.ai-memory.md` for project context, tech stack, and architecture.
|
|
31
|
+
2. Read the target code thoroughly — understand intent, not just syntax.
|
|
32
|
+
3. Identify the explanation scope: single function, module, data flow, or architecture.
|
|
33
|
+
4. Explain at the requested level:
|
|
34
|
+
- **High-level**: Purpose, inputs/outputs, how it fits in the system.
|
|
35
|
+
- **Detailed**: Step-by-step logic, control flow, edge cases, design decisions.
|
|
36
|
+
- **Line-by-line**: What each line does and why.
|
|
37
|
+
5. Highlight non-obvious logic, hidden side effects, and design trade-offs.
|
|
38
|
+
6. Use analogies or diagrams if the concept is complex.
|
|
39
|
+
7. Suggest follow-up topics if relevant (e.g., "you may also want to understand X").
|
|
40
|
+
8. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
|
|
41
|
+
9. **Update Memory** — Save explanation context and insights to `.ai-memory.md`.
|
|
42
|
+
|
|
43
|
+
## Output format
|
|
44
|
+
- **What it does**: One-sentence summary
|
|
45
|
+
- **How it works**: Step-by-step explanation at the requested level
|
|
46
|
+
- **Key design decisions**: Why it was built this way
|
|
47
|
+
- **Non-obvious details**: Edge cases, side effects, gotchas
|
|
48
|
+
- **Related context**: Connected files/modules worth understanding
|
|
49
|
+
|
|
50
|
+
## Checklist
|
|
51
|
+
- [ ] Target code identified and read
|
|
52
|
+
- [ ] Explanation level matches user need
|
|
53
|
+
- [ ] Logic explained clearly, not just syntax described
|
|
54
|
+
- [ ] Non-obvious details highlighted
|
|
55
|
+
- [ ] Design decisions explained
|
|
56
|
+
- [ ] Follow-up suggestions provided
|
|
57
|
+
- [ ] Memory file updated
|
|
58
|
+
|
|
59
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
60
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
61
|
+
|
|
62
|
+
## Rules
|
|
63
|
+
- Explain the WHY, not just the WHAT — developers can read syntax themselves.
|
|
64
|
+
- Match explanation depth to the user's familiarity level.
|
|
65
|
+
- If the code is unclear or has issues, mention them without derailing the explanation.
|
|
66
|
+
- Avoid proposing wide changes mid-explanation; if improvement requires broader edits, ASK before switching to implementation.
|
|
67
|
+
- Always read and update the memory file.
|
|
68
|
+
|
|
69
|
+
## Related Skills
|
|
70
|
+
- `/debug` → read `.kiro/skills/debug/SKILL.md` — If explanation reveals bugs
|
|
71
|
+
- `/enhance` → read `.kiro/skills/enhance/SKILL.md` — If explanation reveals improvement opportunities
|
|
72
|
+
- `/status` → read `.kiro/skills/status/SKILL.md` — For project-wide understanding
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
## AI Agent Skills — System Bootstrap
|
|
2
|
+
|
|
3
|
+
This project uses an **AI Skills system** with 16 skills, 11 specialist agents, and a memory protocol.
|
|
4
|
+
|
|
5
|
+
### On EVERY request, follow this flow:
|
|
6
|
+
|
|
7
|
+
0. **Validate input**:
|
|
8
|
+
- If the message is empty or contains no meaningful content → Respond with a friendly greeting, list the available skills below with one-line descriptions, and ask what the user would like to work on. Do NOT proceed to classification.
|
|
9
|
+
- If the message is a greeting ("hi", "hello", "hey", "xin chào", "chào") → Respond warmly, briefly list what you can help with (the skills below), and ask how you can help. Do NOT proceed to classification.
|
|
10
|
+
|
|
11
|
+
1. **Read memory**:
|
|
12
|
+
- If `.ai-memory.md` exists in project root, read it first for context.
|
|
13
|
+
- If Codex memory directories exist (`memories/`, `memories/session/`, `memories/repo/`), read relevant notes from `memories/repo/`.
|
|
14
|
+
- If `.ai-memory.md` doesn't exist, create it after completing the first task using the template at the end of this file.
|
|
15
|
+
|
|
16
|
+
2. **Classify the request** — Match to one of these skills:
|
|
17
|
+
|
|
18
|
+
| Command | Skill file to read | When to use |
|
|
19
|
+
|---------|-------------------|-------------|
|
|
20
|
+
| `/brainstorm` | `.kiro/skills/brainstorm/SKILL.md` | Explore options, ideate solutions |
|
|
21
|
+
| `/plan` | `.kiro/skills/plan/SKILL.md` | Create implementation plan with milestones |
|
|
22
|
+
| `/create` | `.kiro/skills/create/SKILL.md` | Build new feature/file/component |
|
|
23
|
+
| `/debug` | `.kiro/skills/debug/SKILL.md` | Fix bugs, analyze errors |
|
|
24
|
+
| `/test` | `.kiro/skills/test/SKILL.md` | Write tests, improve coverage |
|
|
25
|
+
| `/enhance` | `.kiro/skills/enhance/SKILL.md` | Improve existing code without breaking it |
|
|
26
|
+
| `/deploy` | `.kiro/skills/deploy/SKILL.md` | Deployment and release guidance |
|
|
27
|
+
| `/clean` | `.kiro/skills/clean/SKILL.md` | Remove junk files, clean up |
|
|
28
|
+
| `/status` | `.kiro/skills/status/SKILL.md` | Project status summary |
|
|
29
|
+
| `/preview` | `.kiro/skills/preview/SKILL.md` | Preview output/UX before implementing |
|
|
30
|
+
| `/orchestrate` | `.kiro/skills/orchestrate/SKILL.md` | Coordinate multi-step workflows |
|
|
31
|
+
| `/ui-ux-pro-max` | `.kiro/skills/ui-ux-pro-max/SKILL.md` | Advanced UI/UX improvements |
|
|
32
|
+
| `/motion-ui` | `.kiro/skills/motion-ui/SKILL.md` | Motion UI with Framer Motion micro-interactions |
|
|
33
|
+
| `/explain` | `.kiro/skills/explain/SKILL.md` | Explain code, walk through logic, understand architecture |
|
|
34
|
+
| `/integrate` | `.kiro/skills/integrate/SKILL.md` | Integrate provided sample code with minimal impact |
|
|
35
|
+
|
|
36
|
+
3. **If the request is vague/general** (no clear skill match):
|
|
37
|
+
- "Help me with this project" → Read `.kiro/skills/status/SKILL.md` first, then suggest next steps
|
|
38
|
+
- "Review my code" → Read `.kiro/skills/enhance/SKILL.md` with all agents (not just performance)
|
|
39
|
+
- "I'm stuck" / "What should I do?" → Read `.kiro/skills/status/SKILL.md` then `.kiro/skills/plan/SKILL.md`
|
|
40
|
+
- "Make this better" → Read `.kiro/skills/enhance/SKILL.md`
|
|
41
|
+
- "Explain this code" / "What does this do?" / "giải thích code" → Read `.kiro/skills/explain/SKILL.md`
|
|
42
|
+
- Complaints about code quality ("too long", "messy", "sao dài quá", "rối quá") → Read `.kiro/skills/enhance/SKILL.md` or `.kiro/skills/clean/SKILL.md`
|
|
43
|
+
- Any multi-step or complex request → Read `.kiro/skills/orchestrate/SKILL.md`
|
|
44
|
+
- If still unclear → Read `.kiro/skills/agents/SKILL.md` and use @orchestrator to triage
|
|
45
|
+
|
|
46
|
+
4. **Load the agent**: Each skill specifies agents. To load an agent persona, read its file:
|
|
47
|
+
|
|
48
|
+
| Agent handle | File to read |
|
|
49
|
+
|-------------|-------------|
|
|
50
|
+
| `@debugger` | `.kiro/skills/agents/agents/debugger.md` |
|
|
51
|
+
| `@backend-specialist` | `.kiro/skills/agents/agents/backend-specialist.md` |
|
|
52
|
+
| `@frontend-specialist` | `.kiro/skills/agents/agents/frontend-specialist.md` |
|
|
53
|
+
| `@database-architect` | `.kiro/skills/agents/agents/database-architect.md` |
|
|
54
|
+
| `@security-auditor` | `.kiro/skills/agents/agents/security-auditor.md` |
|
|
55
|
+
| `@devops-engineer` | `.kiro/skills/agents/agents/devops-engineer.md` |
|
|
56
|
+
| `@test-engineer` | `.kiro/skills/agents/agents/test-engineer.md` |
|
|
57
|
+
| `@performance-optimizer` | `.kiro/skills/agents/agents/performance-optimizer.md` |
|
|
58
|
+
| `@documentation-writer` | `.kiro/skills/agents/agents/documentation-writer.md` |
|
|
59
|
+
| `@orchestrator` | `.kiro/skills/agents/agents/orchestrator.md` |
|
|
60
|
+
| `@project-planner` | `.kiro/skills/agents/agents/project-planner.md` |
|
|
61
|
+
|
|
62
|
+
5. **Execute the skill workflow** — Follow the steps in the SKILL.md file.
|
|
63
|
+
|
|
64
|
+
6. **Run quality checks**: Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
|
|
65
|
+
|
|
66
|
+
7. **Update memory**:
|
|
67
|
+
- Save findings to `.ai-memory.md` using the **Memory Compaction Rules** in `.ai-memory.md` (short bullets, dedupe, enforce section limits).
|
|
68
|
+
- If `memories/repo/` exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.
|
|
69
|
+
- If you notice duplicates, apply `.kiro/skills/_scripts/memory-dedupe.md` and merge bullets instead of appending.
|
|
70
|
+
- If `.ai-memory.md` exceeds 500 lines or sections exceed limits, apply `.kiro/skills/_scripts/memory-compact.md` to compact it.
|
|
71
|
+
|
|
72
|
+
### .ai-memory.md Template (create if not exists)
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
# Project Memory
|
|
76
|
+
|
|
77
|
+
## Tech Stack
|
|
78
|
+
- Language: (detected)
|
|
79
|
+
- Framework: (detected)
|
|
80
|
+
- Database: (if any)
|
|
81
|
+
- Package manager: (detected)
|
|
82
|
+
|
|
83
|
+
## Architecture
|
|
84
|
+
- Pattern: (detected)
|
|
85
|
+
- Key directories: (discovered)
|
|
86
|
+
|
|
87
|
+
## Decisions
|
|
88
|
+
- (date) Decision and rationale
|
|
89
|
+
|
|
90
|
+
## Known Issues
|
|
91
|
+
- (none yet)
|
|
92
|
+
|
|
93
|
+
## Recent Work
|
|
94
|
+
- (none yet)
|
|
95
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integrate
|
|
3
|
+
description: "Integrate provided sample code/snippets into the existing system with minimal changes and minimal risk. Use when the user gives a code mẫu and wants to merge it into current project. Triggers: integrate, merge snippet, gộp code mẫu, ghép code, áp code mẫu vào hệ thống."
|
|
4
|
+
agents: [backend-specialist, frontend-specialist, debugger]
|
|
5
|
+
related-skills: [plan, test, debug, enhance]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Memory Protocol
|
|
9
|
+
**START**: Read `.ai-memory.md` from project root. Focus on: entry points, key directories, conventions, and any integration decisions already logged.
|
|
10
|
+
**END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: integration points, files touched, behavior changes (if any), and verification notes.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Merge the requested sample code into the current codebase **without broad refactors**, keeping behavior stable and avoiding changes to unrelated files.
|
|
14
|
+
|
|
15
|
+
## Socratic Gate (ask if missing)
|
|
16
|
+
Before editing, verify these inputs exist. If any is missing or ambiguous, ASK:
|
|
17
|
+
1. The **sample code** to integrate (full snippet + expected behavior).
|
|
18
|
+
2. The **target location** in this project (file/module/feature area).
|
|
19
|
+
3. Constraints: must keep API stable? must keep UI stable? backward compatible?
|
|
20
|
+
|
|
21
|
+
- [ ] Clean code chuẩn (Standard clean code applied)
|
|
22
|
+
- [ ] Cập nhật đầy đủ tất cả các file liên quan (All related files fully updated)
|
|
23
|
+
|
|
24
|
+
## Rules (Blast-radius control)
|
|
25
|
+
- Touch the **smallest** possible set of files.
|
|
26
|
+
- Do **not** reformat or restructure unrelated code.
|
|
27
|
+
- Prefer **adapters/wrappers** over rewriting existing modules.
|
|
28
|
+
- If the integration requires changing shared interfaces, introduce compatibility shims (or feature flag) instead of breaking changes.
|
|
29
|
+
- If uncertain about side effects, **stop and ask** rather than guessing.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
1. **Read Memory** — Load `.ai-memory.md` for architecture + conventions.
|
|
33
|
+
2. **Locate Integration Point** — Identify the narrowest place to hook in (entry, router, service, component, util).
|
|
34
|
+
3. **Diff the Concepts** — Map sample code concepts → existing abstractions (types, services, routes, state).
|
|
35
|
+
4. **Design Minimal Bridge**:
|
|
36
|
+
- Prefer adding a thin adapter layer rather than changing existing call sites.
|
|
37
|
+
- Prefer dependency injection/config wiring over global edits.
|
|
38
|
+
5. **Implement in Small Steps**:
|
|
39
|
+
- Add new file(s) when that reduces risk (e.g., `adapter/`, `integrations/`).
|
|
40
|
+
- Modify existing files only where the integration connects.
|
|
41
|
+
6. **Verification**:
|
|
42
|
+
- Run/adjust existing tests if present; otherwise add a minimal smoke test when feasible.
|
|
43
|
+
- Ensure no unrelated behavior changes.
|
|
44
|
+
7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md`.
|
|
45
|
+
8. **Update Memory** — Log only high-signal bullets (integration point, key decision, files touched, outcome).
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
- Integration target (what feature/module)
|
|
49
|
+
- Files touched (added/modified)
|
|
50
|
+
- Minimal change strategy (1–3 bullets)
|
|
51
|
+
- Verification performed (commands/tests)
|
|
52
|
+
- Risks / follow-ups (if any)
|
|
53
|
+
|