@votruongdanh/ai-agent-skills 3.1.7 → 3.2.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.
@@ -4,6 +4,31 @@
4
4
  > It persists project understanding across conversations.
5
5
  > **Do NOT delete this file** — it helps AI give better, context-aware responses.
6
6
 
7
+ ## Codex Memory Structure (when available)
8
+ - If the workspace has `memories/`, use it alongside this file.
9
+ - `memories/` = persistent user-level notes.
10
+ - `memories/session/` = temporary notes for current conversation.
11
+ - `memories/repo/` = repository-scoped technical facts and conventions.
12
+ - Keep `.ai-memory.md` as the cross-IDE source of truth; mirror only high-signal repo facts into `memories/repo/`.
13
+
14
+ ## Memory Compaction Rules (IMPORTANT)
15
+ - **Write style**: concise bullets, no paragraphs. Prefer numbers, filenames, and nouns over prose.
16
+ - **No duplication**: if a new note repeats an existing one, update the existing bullet instead of appending.
17
+ - **Deduping rule (anti-duplicate)**:
18
+ - Before writing, **scan the target section** for a similar bullet.
19
+ - Consider bullets “similar” if they match after: lowercasing + trimming + collapsing whitespace + removing trailing punctuation.
20
+ - If similar: **merge into 1 bullet** (keep the most specific wording, add missing file paths/IDs).
21
+ - Never keep 2 bullets that describe the same decision/issue/work item.
22
+ - **Hard limits**:
23
+ - Tech Stack: max 6 bullets
24
+ - Architecture: max 8 bullets
25
+ - Conventions: max 8 bullets
26
+ - Decisions: keep last 12 items
27
+ - Known Issues: keep last 20 items (closed issues can be removed once stable)
28
+ - Recent Work: keep last 15 items
29
+ - **Per bullet**: aim ≤ 140 characters. If longer, split into 2 bullets.
30
+ - **Always include**: files touched (paths), and why (1 short phrase).
31
+
7
32
  ## Tech Stack
8
33
  - Language: (auto-detected on first use)
9
34
  - Framework: (auto-detected on first use)
@@ -8,12 +8,15 @@ description: Reusable pre/post checklists for any skill execution
8
8
  - [ ] Understand user intent (ask if unclear)
9
9
  - [ ] Check if similar work was done before (from memory)
10
10
  - [ ] Identify the correct agent for the domain
11
+ - [ ] Minimize blast radius: identify the smallest set of files that must change
12
+ - [ ] If any step is uncertain or could cause broad changes, ask before editing
11
13
 
12
14
  ## Post-Execution Checklist (Run after ANY skill)
13
15
  - [ ] All checklist items from the skill are satisfied
14
16
  - [ ] No regressions introduced
15
17
  - [ ] Code follows existing project conventions
16
- - [ ] Update `.ai-memory.md` with findings
18
+ - [ ] Update `.ai-memory.md` with findings (follow “Memory Compaction Rules”)
19
+ - [ ] Dedupe `.ai-memory.md` updates: merge similar bullets instead of appending duplicates
17
20
  - [ ] Suggest related next steps
18
21
 
19
22
  ## Code Quality Checklist
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: memory-dedupe
3
+ description: Lightweight dedupe procedure for `.ai-memory.md` updates
4
+ ---
5
+
6
+ ## When to use
7
+ Run mentally for every memory update, especially when adding items to **Decisions**, **Known Issues**, or **Recent Work**.
8
+
9
+ ## Dedupe procedure (fast)
10
+ 1. Pick the **target section** (Decisions / Known Issues / Recent Work / etc.).
11
+ 2. Before adding a new bullet, scan existing bullets for a near-match.
12
+ 3. Normalize both bullets and compare:
13
+ - lowercase
14
+ - trim
15
+ - collapse whitespace
16
+ - remove trailing punctuation (`.`, `;`, `,`)
17
+ 4. If it’s the same idea:
18
+ - **merge** into the existing bullet
19
+ - keep the most concrete version (file paths, error codes, IDs, dates)
20
+ - remove the redundant one
21
+ 5. Only append a new bullet if it’s clearly a new fact/event/decision.
22
+
23
+ ## Examples
24
+ - Two bullets both say “Added auth middleware” → keep one, add the specific files touched.
25
+ - “Fix login bug” and “Fixed login issue” → merge into one with the root cause or PR/files.
26
+
@@ -11,7 +11,7 @@ This is the master agent routing skill. It analyzes every user request and silen
11
11
 
12
12
  ## Memory Protocol
13
13
  **START**: Read `.ai-memory.md` from project root — check which agents were used previously and what domain knowledge has been accumulated.
14
- **END**: Update `.ai-memory.md` with which agent was applied and why.
14
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with which agent was applied and why.
15
15
 
16
16
  ## Agent Selection Matrix
17
17
 
@@ -7,7 +7,7 @@ related-skills: [plan, create, orchestrate]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Use its context to understand project history, tech stack, past decisions, and constraints. If missing, note this and create it after completing this task.
10
- **END**: Update `.ai-memory.md` with: problem explored, options considered, chosen direction, constraints discovered, and any new project understanding.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: problem, options considered, chosen direction, constraints, and new project understanding.
11
11
 
12
12
  ## Goal
13
13
  Help the user explore many realistic options before implementation.
@@ -54,6 +54,7 @@ If any answer is unclear, ASK before proceeding.
54
54
  - Prefer practical ideas grounded in the current project.
55
55
  - Avoid pretending uncertain assumptions are facts.
56
56
  - If code context matters, inspect the repo structure first.
57
+ - If an option implies broad code changes, call it out explicitly and suggest a minimal path first.
57
58
  - Always read and update the memory file.
58
59
 
59
60
  ## Quality Gate
@@ -7,7 +7,7 @@ related-skills: [status, enhance]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check for known junk patterns, previous cleanup history, and project-specific ignore rules.
10
- **END**: Update `.ai-memory.md` with: files cleaned, space recovered, new .gitignore rules added, and any recurring junk patterns discovered.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was cleaned, space recovered, ignore rules added, and recurring patterns.
11
11
 
12
12
  ## Goal
13
13
  Identify and remove unnecessary files generated by AI, build processes, or development tools without affecting the working codebase.
@@ -7,7 +7,7 @@ related-skills: [plan, test, debug]
7
7
 
8
8
  ## Memory Protocol
9
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` with: what was created, files added/modified, patterns used, architecture decisions, and any follow-up tasks.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was created, files touched, patterns used, decisions, and follow-ups.
11
11
 
12
12
  ## Goal
13
13
  Create a new implementation cleanly and with minimal disruption.
@@ -51,6 +51,7 @@ If any answer is unclear, ASK before proceeding.
51
51
  - Match the project's conventions.
52
52
  - Include basic validation and error handling.
53
53
  - If tests exist nearby, add or update them when appropriate.
54
+ - Avoid changing unrelated files; if unsure about side effects, ASK before editing broadly.
54
55
  - Always read and update the memory file.
55
56
 
56
57
  ## Quality Gate
@@ -7,7 +7,7 @@ related-skills: [test, enhance, status]
7
7
 
8
8
  ## Memory Protocol
9
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` with: bug description, root cause found, fix applied, affected files, lessons learned, and any remaining risks.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: bug, root cause, fix, files touched, lessons learned, and remaining risks.
11
11
 
12
12
  ## Goal
13
13
  Find the real root cause, not just the first visible symptom.
@@ -62,6 +62,7 @@ If any answer is missing, ASK before proceeding.
62
62
  - Do not guess when evidence is missing; say what must be checked.
63
63
  - Prefer deterministic reproduction steps.
64
64
  - Mention any hidden risk or side effect of the fix.
65
+ - Avoid changing unrelated files; if a fix seems wide-impact, ASK before proceeding.
65
66
  - Always read and update the memory file.
66
67
 
67
68
  ## Related Skills
@@ -7,7 +7,7 @@ related-skills: [test, status, plan]
7
7
 
8
8
  ## Memory Protocol
9
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` with: deployment target, steps executed, environment details, issues encountered, rollback notes, and infrastructure decisions.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: target, steps, env details, issues, rollback notes, and infra decisions.
11
11
 
12
12
  ## Goal
13
13
  Prepare a safe, repeatable deployment or release plan.
@@ -57,6 +57,7 @@ If any answer is unclear, ASK before proceeding.
57
57
  - Prefer least-risk rollout patterns.
58
58
  - Never expose secrets.
59
59
  - Distinguish clearly between required and optional steps.
60
+ - Avoid unrelated infra/app changes; if a deployment step requires broad refactors, ASK first.
60
61
  - Always read and update the memory file.
61
62
 
62
63
  ## Related Skills
@@ -7,7 +7,7 @@ related-skills: [debug, test, plan]
7
7
 
8
8
  ## Memory Protocol
9
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` with: what was enhanced, improvements made, performance gains, tradeoffs accepted, and any remaining tech debt.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what changed, impact, tradeoffs, and remaining tech debt.
11
11
 
12
12
  ## Goal
13
13
  Improve an existing implementation without breaking working behavior.
@@ -49,6 +49,7 @@ If any answer is unclear, ASK before proceeding.
49
49
  - Preserve behavior unless the user asked for a behavior change.
50
50
  - Prefer small, meaningful upgrades over broad rewrites.
51
51
  - If performance is discussed, explain where the gain comes from.
52
+ - Avoid changing unrelated files; if improvement requires broad refactor, ASK before doing it.
52
53
  - Always read and update the memory file.
53
54
 
54
55
  ## Related Skills
@@ -7,7 +7,7 @@ related-skills: [debug, enhance, status]
7
7
 
8
8
  ## Memory Protocol
9
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` with: what was explained, key insights shared, any misconceptions clarified, and follow-up topics noted.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was explained, key insights, misconceptions clarified, and follow-ups.
11
11
 
12
12
  ## Goal
13
13
  Help the user deeply understand code, logic, architecture, or behavior — at the level of detail they need.
@@ -60,6 +60,7 @@ If any answer is unclear, ASK before proceeding.
60
60
  - Explain the WHY, not just the WHAT — developers can read syntax themselves.
61
61
  - Match explanation depth to the user's familiarity level.
62
62
  - If the code is unclear or has issues, mention them without derailing the explanation.
63
+ - Avoid proposing wide changes mid-explanation; if improvement requires broader edits, ASK before switching to implementation.
63
64
  - Always read and update the memory file.
64
65
 
65
66
  ## Related Skills
@@ -8,8 +8,10 @@ This project uses an **AI Skills system** with 13 skills, 11 specialist agents,
8
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
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
10
 
11
- 1. **Read memory**: If `.ai-memory.md` exists in project root, read it first for context.
12
- - If it doesn't exist, create it after completing the first task using the template at the end of this file.
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.
13
15
 
14
16
  2. **Classify the request** — Match to one of these skills:
15
17
 
@@ -28,6 +30,7 @@ This project uses an **AI Skills system** with 13 skills, 11 specialist agents,
28
30
  | `/orchestrate` | `.kiro/skills/orchestrate/SKILL.md` | Coordinate multi-step workflows |
29
31
  | `/ui-ux-pro-max` | `.kiro/skills/ui-ux-pro-max/SKILL.md` | Advanced UI/UX improvements |
30
32
  | `/explain` | `.kiro/skills/explain/SKILL.md` | Explain code, walk through logic, understand architecture |
33
+ | `/integrate` | `.kiro/skills/integrate/SKILL.md` | Integrate provided sample code with minimal impact |
31
34
 
32
35
  3. **If the request is vague/general** (no clear skill match):
33
36
  - "Help me with this project" → Read `.kiro/skills/status/SKILL.md` first, then suggest next steps
@@ -59,7 +62,10 @@ This project uses an **AI Skills system** with 13 skills, 11 specialist agents,
59
62
 
60
63
  6. **Run quality checks**: Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
61
64
 
62
- 7. **Update memory**: Save findings to `.ai-memory.md`.
65
+ 7. **Update memory**:
66
+ - Save findings to `.ai-memory.md` using the **Memory Compaction Rules** in `.ai-memory.md` (short bullets, dedupe, enforce section limits).
67
+ - If `memories/repo/` exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.
68
+ - If you notice duplicates, apply `.kiro/skills/_scripts/memory-dedupe.md` and merge bullets instead of appending.
63
69
 
64
70
  ### .ai-memory.md Template (create if not exists)
65
71
 
@@ -0,0 +1,50 @@
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
+ ## Rules (Blast-radius control)
22
+ - Touch the **smallest** possible set of files.
23
+ - Do **not** reformat or restructure unrelated code.
24
+ - Prefer **adapters/wrappers** over rewriting existing modules.
25
+ - If the integration requires changing shared interfaces, introduce compatibility shims (or feature flag) instead of breaking changes.
26
+ - If uncertain about side effects, **stop and ask** rather than guessing.
27
+
28
+ ## Workflow
29
+ 1. **Read Memory** — Load `.ai-memory.md` for architecture + conventions.
30
+ 2. **Locate Integration Point** — Identify the narrowest place to hook in (entry, router, service, component, util).
31
+ 3. **Diff the Concepts** — Map sample code concepts → existing abstractions (types, services, routes, state).
32
+ 4. **Design Minimal Bridge**:
33
+ - Prefer adding a thin adapter layer rather than changing existing call sites.
34
+ - Prefer dependency injection/config wiring over global edits.
35
+ 5. **Implement in Small Steps**:
36
+ - Add new file(s) when that reduces risk (e.g., `adapter/`, `integrations/`).
37
+ - Modify existing files only where the integration connects.
38
+ 6. **Verification**:
39
+ - Run/adjust existing tests if present; otherwise add a minimal smoke test when feasible.
40
+ - Ensure no unrelated behavior changes.
41
+ 7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md`.
42
+ 8. **Update Memory** — Log only high-signal bullets (integration point, key decision, files touched, outcome).
43
+
44
+ ## Output Format
45
+ - Integration target (what feature/module)
46
+ - Files touched (added/modified)
47
+ - Minimal change strategy (1–3 bullets)
48
+ - Verification performed (commands/tests)
49
+ - Risks / follow-ups (if any)
50
+
@@ -7,7 +7,7 @@ related-skills: [plan, create, deploy, test]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check project architecture, team structure, past orchestration plans, ongoing tasks, and blockers.
10
- **END**: Update `.ai-memory.md` with: workstreams defined, agent assignments, dependencies identified, execution order, and any blockers or risks discovered.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: workstreams, assignments, dependencies, execution order, and blockers/risks.
11
11
 
12
12
  ## Goal
13
13
  Break a complex request into a coordinated execution plan with clear agent assignments.
@@ -63,6 +63,7 @@ If any answer is unclear, ASK before proceeding.
63
63
  - Keep plans realistic for the current project.
64
64
  - Surface unknowns early.
65
65
  - Favor visible checkpoints over long hidden work.
66
+ - Control scope: each workstream must state minimal files to touch; ASK before allowing wide-impact changes.
66
67
  - Always read and update the memory file.
67
68
 
68
69
  ## Related Skills
@@ -7,7 +7,7 @@ related-skills: [brainstorm, create, orchestrate]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check existing plans, milestones, project structure, tech stack, ongoing work, and past decisions.
10
- **END**: Update `.ai-memory.md` with: plan created, phases defined, tasks listed, risks identified, and recommended first action.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: plan summary, phases/tasks, key risks, and first recommended action.
11
11
 
12
12
  ## Goal
13
13
  Turn a request into an actionable plan with clear phases and tasks.
@@ -57,6 +57,7 @@ If any answer is unclear, ASK before proceeding.
57
57
  ## Rules
58
58
  - Plans should be specific enough to execute.
59
59
  - Prefer task sizes that can be completed and reviewed quickly.
60
+ - Minimize blast radius: call out the smallest set of files likely to change; if scope is unclear, ASK.
60
61
  - Always read and update the memory file.
61
62
 
62
63
  ## Quality Gate
@@ -7,7 +7,7 @@ related-skills: [create, ui-ux-pro-max, plan]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check UI patterns, design decisions, existing previews, brand guidelines, and user flow notes.
10
- **END**: Update `.ai-memory.md` with: what was previewed, assumptions made, feedback received, and design decisions confirmed.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was previewed, assumptions, feedback, and confirmed decisions.
11
11
 
12
12
  ## Goal
13
13
  Show the user what the result will look or feel like before full implementation.
@@ -43,6 +43,7 @@ If any answer is unclear, ASK before proceeding.
43
43
  ## Rules
44
44
  - Keep previews realistic and consistent with the current project.
45
45
  - Label illustrative content clearly when it is mock data.
46
+ - Avoid implying broad code changes; if the preview would require major refactor, CALL IT OUT and ASK before implementation.
46
47
  - Always read and update the memory file.
47
48
 
48
49
  ## Quality Gate
@@ -7,7 +7,7 @@ related-skills: [plan, debug, deploy]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. This is the PRIMARY source for status — check all recorded history, decisions, tasks, bugs, and milestones.
10
- **END**: Update `.ai-memory.md` with: current status snapshot, what is working, what is incomplete, risks found, and recommended priorities.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: status snapshot, what's working, gaps, risks, and priorities.
11
11
 
12
12
  ## Goal
13
13
  Summarize where things stand right now, leveraging the memory file for deep context.
@@ -45,6 +45,7 @@ Summarize where things stand right now, leveraging the memory file for deep cont
45
45
  ## Rules
46
46
  - Be specific and evidence-based.
47
47
  - Separate facts from inference.
48
+ - Do not recommend broad refactors without confirming scope; ASK if the fix would touch many areas.
48
49
  - Always read and update the memory file.
49
50
 
50
51
  ## Quality Gate
@@ -7,7 +7,7 @@ related-skills: [debug, create, enhance]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check test framework in use, existing test coverage, known failing tests, testing patterns, and CI/CD test configuration.
10
- **END**: Update `.ai-memory.md` with: tests added/modified, coverage changes, testing patterns established, and any discovered gaps.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: tests changed, coverage deltas (if known), patterns established, and gaps.
11
11
 
12
12
  ## Goal
13
13
  Improve confidence in the system through targeted testing.
@@ -49,6 +49,7 @@ If any answer is unclear, ASK before proceeding.
49
49
  - Prefer stable tests over brittle tests.
50
50
  - Cover both happy path and key edge cases.
51
51
  - If no test framework exists, propose the lightest practical option.
52
+ - Avoid changing unrelated production code; if tests require refactors, ASK before widening scope.
52
53
  - Always read and update the memory file.
53
54
 
54
55
  ## Related Skills
@@ -7,7 +7,7 @@ related-skills: [create, preview, enhance]
7
7
 
8
8
  ## Memory Protocol
9
9
  **START**: Read `.ai-memory.md` from project root. Check design system, brand guidelines, component library, past UI decisions, accessibility notes, and responsive design patterns.
10
- **END**: Update `.ai-memory.md` with: UI/UX changes recommended/applied, design patterns used, accessibility improvements, and brand consistency notes.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: UI/UX changes, patterns used, a11y improvements, and brand consistency notes.
11
11
 
12
12
  ## Goal
13
13
  Upgrade the product experience with clear, practical UI/UX improvements.
@@ -56,6 +56,7 @@ If any answer is unclear, ASK before proceeding.
56
56
  - Optimize for clarity before decoration.
57
57
  - Respect existing brand and component patterns when present.
58
58
  - Include empty, loading, error, and success states when relevant.
59
+ - Avoid widespread redesigns unless asked; prioritize small, safe diffs and ASK before large UI rewrites.
59
60
  - Always read and update the memory file.
60
61
 
61
62
  ## Related Skills
package/README.md CHANGED
@@ -11,20 +11,26 @@ Cross-IDE AI agent skills with interactive CLI, dual-source `SKILL.md` discovery
11
11
  npx @votruongdanh/ai-agent-skills init
12
12
  ```
13
13
 
14
- The CLI launches an **interactive setup** — it auto-detects your IDE, lets you choose from a menu, and picks project vs global scope:
14
+ The CLI launches an **interactive setup** — it always asks you to choose an IDE from the full supported list, then picks project vs global scope:
15
15
 
16
16
  ```
17
17
  AI Agent Skills v3.2.0
18
18
 
19
- Auto-detected Cursor from .cursor
20
- Use Cursor? (y/n): y
19
+ 🔧 Choose your IDE:
20
+ 1) Cursor
21
+ 2) Kiro
22
+ 3) Antigravity
23
+ 4) Codex
24
+ 5) VS Code
25
+ 6) GitHub Copilot
26
+ 7) All supported IDEs
21
27
 
22
28
  📂 Install scope:
23
29
  1) This project only ← recommended
24
30
  2) Global (all projects)
25
31
 
26
32
  [1] Installing skills...
27
- 14 skills installed for Cursor
33
+ 15 skills installed for Cursor
28
34
 
29
35
  Done! Next steps:
30
36
  1. Reopen Cursor
@@ -38,14 +44,18 @@ For CI/CD or scripting, pass `--ide` to skip prompts:
38
44
 
39
45
  ```bash
40
46
  npx @votruongdanh/ai-agent-skills init --ide=cursor
47
+ npx @votruongdanh/ai-agent-skills init --ide=all
41
48
  npx @votruongdanh/ai-agent-skills init --ide=kiro
42
49
  npx @votruongdanh/ai-agent-skills init --ide=antigravity
50
+ npx @votruongdanh/ai-agent-skills init --ide=codex
43
51
  npx @votruongdanh/ai-agent-skills init --ide=vscode
44
52
  npx @votruongdanh/ai-agent-skills init --ide=copilot
45
53
  npx @votruongdanh/ai-agent-skills init --no-interactive
46
54
  ```
47
55
 
48
- The CLI also searches parent folders, so running from `src/` or `apps/web/` still detects the IDE marker at the workspace root.
56
+ The CLI still supports marker-based context detection for status/list flows when applicable, including parent-folder lookup.
57
+
58
+ For non-interactive mode (`--no-interactive`), `--ide` is required. You can pass `--ide=all` to install for every supported IDE in one run.
49
59
 
50
60
  ## Add Skills from GitHub
51
61
 
@@ -91,12 +101,13 @@ The `add` command:
91
101
  | Cursor legacy | `.cursor/rules/<skill>.mdc` | Generated compatibility layer |
92
102
  | Antigravity | `.agent/workflows/<skill>.md` | Generated workflow bridge |
93
103
  | Antigravity legacy | `agent/workflows/<skill>.md` | Compatibility alias for older setups |
104
+ | Codex | `.github/skills/<skill>/SKILL.md` | Detected from `AGENTS.md` and/or `memories/` |
94
105
  | VS Code | `.github/skills/<skill>/SKILL.md` | Native SKILL.md format for Copilot Chat |
95
106
  | GitHub Copilot | `.github/skills/<skill>/SKILL.md` | Alias of VS Code target |
96
107
 
97
108
  Native skill targets keep the full skill directory. Generated compatibility targets (Cursor `.mdc` rules, Antigravity workflows) only render `SKILL.md` content — companion `scripts/`, `references/`, and `assets/` remain native-only.
98
109
 
99
- ## Available Skills (14)
110
+ ## Available Skills (15)
100
111
 
101
112
  | Skill | Description |
102
113
  |-------|-------------|
@@ -114,9 +125,25 @@ Native skill targets keep the full skill directory. Generated compatibility targ
114
125
  | `/status` | Project health, dependency, and progress reports |
115
126
  | `/test` | Generate and run tests, coverage analysis |
116
127
  | `/ui-ux-pro-max` | UI/UX design, accessibility, responsive layouts |
128
+ | `/integrate` | Safely merge sample/snippet code into the existing system with minimal changes |
117
129
 
118
130
  All skills support both English and Vietnamese trigger keywords.
119
131
 
132
+ ## Project Memory & `.ai-memory.md`
133
+
134
+ The skills share a **project-wide memory file** (`.ai-memory.md`) that captures tech stack, architecture, decisions, known issues, and recent work.
135
+ Memory writes are optimized to stay **short and de-duplicated**:
136
+ - Central **Memory Compaction Rules** limit bullets per section and enforce concise, file-focused notes.
137
+ - A lightweight **dedupe protocol** prevents duplicate bullets by normalizing/merging similar entries instead of appending.
138
+ - Every skill’s `Memory Protocol` uses these rules, so memory stays useful over long-lived projects without growing out of control.
139
+
140
+ For Codex-style workspaces, memory can also be mirrored into:
141
+ - `memories/` (persistent user notes)
142
+ - `memories/session/` (conversation-scoped notes)
143
+ - `memories/repo/` (repo-scoped facts)
144
+
145
+ `.ai-memory.md` remains the cross-IDE canonical memory file.
146
+
120
147
  ## Agent Routing System
121
148
 
122
149
  The `/agents` skill includes 11 specialist agent personas that are automatically selected based on your request:
@@ -138,7 +165,7 @@ The router handles keyword matching, Vietnamese triggers, compound keywords, and
138
165
  ## How the Package is Structured
139
166
 
140
167
  ```
141
- .kiro/skills/ # Canonical skill source (14 skills)
168
+ .kiro/skills/ # Canonical skill source (15 skills)
142
169
  .agents/skills/ # Cross-client interop root
143
170
  lib/skill-bundle.js # Discovery, YAML parsing, catalog, render, install
144
171
  bin/cli.js # Interactive CLI with colors, prompts, GitHub fetcher
package/bin/cli.js CHANGED
@@ -181,48 +181,51 @@ async function interactiveInit() {
181
181
  // Step 1: Choose IDE
182
182
  const ideFlag = parseIDEFlag();
183
183
  let selectedIDE;
184
+ const supportedIDEOptions = [
185
+ { label: 'Cursor', value: 'cursor', description: '.cursor/skills + .cursor/rules', recommended: true },
186
+ { label: 'Kiro', value: 'kiro', description: '.kiro/skills' },
187
+ { label: 'Antigravity', value: 'antigravity', description: '.agent/workflows' },
188
+ { label: 'Codex', value: 'codex', description: '.github/skills + AGENTS.md' },
189
+ { label: 'VS Code', value: 'vscode', description: '.github/skills' },
190
+ { label: 'GitHub Copilot', value: 'copilot', description: '.github/skills' },
191
+ { label: 'All supported IDEs', value: 'all', description: 'Install for every supported IDE' },
192
+ ];
184
193
 
185
194
  if (ideFlag) {
186
- selectedIDE = normalizeIDEName(ideFlag);
187
- if (!selectedIDE) {
195
+ if (String(ideFlag).trim().toLowerCase() === 'all') {
196
+ selectedIDE = 'all';
197
+ console.log(info(`IDE target: ${c.bold}All supported IDEs${c.reset} (from --ide flag)\n`));
198
+ } else {
199
+ selectedIDE = normalizeIDEName(ideFlag);
200
+ }
201
+
202
+ if (!selectedIDE || selectedIDE === 'generic') {
188
203
  console.log(error(`Unknown IDE: ${ideFlag}`));
204
+ console.log(info(`Supported: cursor, kiro, antigravity, codex, vscode, copilot, all\n`));
189
205
  rl.close();
190
206
  process.exit(1);
191
207
  }
192
- const def = getIDEDefinition(selectedIDE);
193
- console.log(info(`IDE: ${c.bold}${def.displayName}${c.reset} (from --ide flag)\n`));
194
- } else {
195
- // Auto-detect first
196
- const detected = findIDEContext(process.cwd());
197
- if (detected.source === 'project' && detected.ide !== 'generic') {
198
- const def = getIDEDefinition(detected.ide);
199
- console.log(info(`Auto-detected ${c.bold}${def.displayName}${c.reset} from ${c.dim}${detected.matchedPath}${c.reset}`));
200
- const useDetected = await confirm(rl, `Use ${def.displayName}?`);
201
- if (useDetected) {
202
- selectedIDE = detected.ide;
203
- }
204
- }
205
208
 
206
- if (!selectedIDE) {
207
- const ideOptions = [
208
- { label: 'Cursor', value: 'cursor', description: '.cursor/skills + .cursor/rules', recommended: true },
209
- { label: 'Kiro', value: 'kiro', description: '.kiro/skills' },
210
- { label: 'Antigravity', value: 'antigravity', description: '.agent/workflows' },
211
- { label: 'VS Code', value: 'vscode', description: '.github/skills' },
212
- { label: 'GitHub Copilot', value: 'copilot', description: '.github/skills' },
213
- ];
214
- const choice = await selectMenu(rl, '🔧 Choose your IDE:', ideOptions);
215
- selectedIDE = choice.value;
209
+ if (selectedIDE !== 'all') {
210
+ const def = getIDEDefinition(selectedIDE);
211
+ console.log(info(`IDE: ${c.bold}${def.displayName}${c.reset} (from --ide flag)\n`));
216
212
  }
213
+ } else {
214
+ const choice = await selectMenu(rl, '🔧 Choose your IDE:', supportedIDEOptions);
215
+ selectedIDE = choice.value;
217
216
  }
218
217
 
219
218
  // Step 2: Choose scope (project vs global)
220
219
  let scope = hasFlag('--global') ? 'global' : null;
221
220
 
222
221
  if (!scope) {
222
+ const globalDescription =
223
+ selectedIDE === 'all'
224
+ ? 'Install to each IDE global directory'
225
+ : `~/${getIDEDefinition(selectedIDE).projectRoot}`;
223
226
  const scopeOptions = [
224
227
  { label: 'This project only', value: 'project', description: process.cwd(), recommended: true },
225
- { label: 'Global (all projects)', value: 'global', description: `~/${getIDEDefinition(selectedIDE).projectRoot}` },
228
+ { label: 'Global (all projects)', value: 'global', description: globalDescription },
226
229
  ];
227
230
  const scopeChoice = await selectMenu(rl, '📂 Install scope:', scopeOptions);
228
231
  scope = scopeChoice.value;
@@ -231,38 +234,53 @@ async function interactiveInit() {
231
234
  rl.close();
232
235
 
233
236
  // Step 3: Install
234
- const ideDefinition = getIDEDefinition(selectedIDE);
235
237
  const cwd = process.cwd();
236
- const projectMatch = findProjectRootForIDE(cwd, selectedIDE);
237
- const baseDir = scope === 'global' ? cwd : (projectMatch ? projectMatch.projectDir : cwd);
238
- const rootDir = scope === 'global' ? ideDefinition.globalRoot : path.join(baseDir, ideDefinition.projectRoot);
239
- const installedVersion = getInstalledVersion(rootDir);
238
+ const installTargets =
239
+ selectedIDE === 'all'
240
+ ? ['cursor', 'kiro', 'antigravity', 'codex', 'vscode', 'copilot']
241
+ : [selectedIDE];
240
242
 
241
243
  console.log(`\n${step(1, 'Installing skills...')}`);
242
244
 
243
- const result = installBundle({
244
- baseDir,
245
- ide: selectedIDE,
246
- scope,
247
- version: CURRENT_VERSION,
248
- includeCompatibilityAliases: true,
249
- });
245
+ const installResults = [];
246
+ for (const ide of installTargets) {
247
+ const ideDefinition = getIDEDefinition(ide);
248
+ const baseDir = cwd;
249
+ const rootDir =
250
+ scope === 'global'
251
+ ? ideDefinition.globalRoot
252
+ : path.join(baseDir, ideDefinition.projectRoot);
253
+ const installedVersion = getInstalledVersion(rootDir);
250
254
 
251
- console.log(success(`${result.skillCount} skills installed for ${c.bold}${result.displayName}${c.reset}`));
255
+ const result = installBundle({
256
+ baseDir,
257
+ ide,
258
+ scope,
259
+ version: CURRENT_VERSION,
260
+ includeCompatibilityAliases: true,
261
+ });
252
262
 
253
- if (installedVersion) {
254
- console.log(info(`Updated: ${c.yellow}${installedVersion}${c.reset} → ${c.green}${CURRENT_VERSION}${c.reset}`));
263
+ installResults.push({ result, installedVersion });
264
+ }
265
+
266
+ for (const { result, installedVersion } of installResults) {
267
+ console.log(success(`${result.skillCount} skills installed for ${c.bold}${result.displayName}${c.reset}`));
268
+ if (installedVersion) {
269
+ console.log(info(`Updated: ${c.yellow}${installedVersion}${c.reset} → ${c.green}${CURRENT_VERSION}${c.reset}`));
270
+ }
255
271
  }
256
272
 
257
273
  console.log(`\n${step(2, 'Targets created:')}`);
258
- for (const target of result.targets) {
259
- const rel = path.relative(cwd, target.targetDir) || '.';
260
- const tag = target.compatibility ? ` ${c.dim}(compat)${c.reset}` : '';
261
- console.log(` ${c.green}→${c.reset} ${rel}${tag}`);
274
+ for (const { result } of installResults) {
275
+ for (const target of result.targets) {
276
+ const rel = path.relative(cwd, target.targetDir) || '.';
277
+ const tag = target.compatibility ? ` ${c.dim}(compat)${c.reset}` : '';
278
+ console.log(` ${c.green}→${c.reset} ${rel}${tag}`);
279
+ }
262
280
  }
263
281
 
264
282
  // Warnings
265
- const uniqueWarnings = dedupeWarnings(result.warnings);
283
+ const uniqueWarnings = dedupeWarnings(installResults.flatMap(({ result }) => result.warnings));
266
284
  if (uniqueWarnings.length) {
267
285
  console.log('');
268
286
  for (const w of uniqueWarnings) {
@@ -271,8 +289,12 @@ async function interactiveInit() {
271
289
  }
272
290
 
273
291
  // Next steps
292
+ const nextStepIDEName =
293
+ selectedIDE === 'all'
294
+ ? 'your IDE'
295
+ : installResults[0].result.displayName;
274
296
  console.log(`\n${c.bold}${c.green}Done!${c.reset} Next steps:\n`);
275
- console.log(` 1. ${c.dim}Reopen${c.reset} ${c.bold}${result.displayName}${c.reset}`);
297
+ console.log(` 1. ${c.dim}Reopen${c.reset} ${c.bold}${nextStepIDEName}${c.reset}`);
276
298
  console.log(` 2. ${c.dim}Open agent chat and type${c.reset} ${c.cyan}/${c.reset} ${c.dim}to list skills${c.reset}`);
277
299
  console.log(` 3. ${c.dim}Try:${c.reset} ${c.cyan}/create${c.reset}, ${c.cyan}/debug${c.reset}, ${c.cyan}/explain${c.reset}, or ${c.cyan}/plan${c.reset}`);
278
300
  console.log('');
@@ -394,6 +416,7 @@ async function addSkillFromGitHub() {
394
416
  { label: 'Cursor', value: 'cursor', description: '.cursor/skills', recommended: true },
395
417
  { label: 'Kiro', value: 'kiro', description: '.kiro/skills' },
396
418
  { label: 'Antigravity', value: 'antigravity', description: '.agent/workflows' },
419
+ { label: 'Codex', value: 'codex', description: '.github/skills + AGENTS.md' },
397
420
  { label: 'VS Code', value: 'vscode', description: '.github/skills' },
398
421
  { label: 'GitHub Copilot', value: 'copilot', description: '.github/skills' },
399
422
  ];
@@ -495,7 +518,7 @@ function printResolution(context) {
495
518
  }
496
519
 
497
520
  console.log(warn('No IDE marker found. Falling back to generic SKILL.md layout.'));
498
- console.log(info(`Tip: use ${c.cyan}--ide=cursor${c.reset}, ${c.cyan}--ide=kiro${c.reset}, ${c.cyan}--ide=antigravity${c.reset}, ${c.cyan}--ide=vscode${c.reset}, or ${c.cyan}--ide=copilot${c.reset}\n`));
521
+ console.log(info(`Tip: use ${c.cyan}--ide=cursor${c.reset}, ${c.cyan}--ide=kiro${c.reset}, ${c.cyan}--ide=antigravity${c.reset}, ${c.cyan}--ide=codex${c.reset}, ${c.cyan}--ide=vscode${c.reset}, or ${c.cyan}--ide=copilot${c.reset}\n`));
499
522
  }
500
523
 
501
524
  function dedupeWarnings(warnings) {
@@ -555,6 +578,53 @@ function install(scope) {
555
578
  try {
556
579
  console.log(`\n${badge('AI Agent Skills')} v${CURRENT_VERSION}\n`);
557
580
 
581
+ const ideFlag = parseIDEFlag();
582
+ if (!ideFlag) {
583
+ console.log(error('Non-interactive install requires --ide=<name|all>.'));
584
+ console.log(info('Supported: cursor, kiro, antigravity, codex, vscode, copilot, all\n'));
585
+ process.exit(1);
586
+ }
587
+
588
+ const ideFlagNormalized = String(ideFlag).trim().toLowerCase();
589
+ const installTargets =
590
+ ideFlagNormalized === 'all'
591
+ ? ['cursor', 'kiro', 'antigravity', 'codex', 'vscode', 'copilot']
592
+ : null;
593
+
594
+ if (!installTargets && !normalizeIDEName(ideFlag)) {
595
+ console.log(error(`Unknown IDE: ${ideFlag}`));
596
+ console.log(info(`Supported: cursor, kiro, antigravity, codex, vscode, copilot, all\n`));
597
+ process.exit(1);
598
+ }
599
+
600
+ if (installTargets) {
601
+ console.log(info(`Using IDE target: ${c.bold}All supported IDEs${c.reset} (from --ide flag)\n`));
602
+ const baseDir = process.cwd();
603
+
604
+ for (const targetIDE of installTargets) {
605
+ const ideDefinition = getIDEDefinition(targetIDE);
606
+ const rootDir =
607
+ scope === 'global'
608
+ ? ideDefinition.globalRoot
609
+ : path.join(baseDir, ideDefinition.projectRoot);
610
+ const installedVersion = getInstalledVersion(rootDir);
611
+
612
+ console.log(step(1, `${installedVersion ? 'Updating' : 'Installing'} skills for ${c.bold}${ideDefinition.displayName}${c.reset}...\n`));
613
+
614
+ const result = installBundle({
615
+ baseDir,
616
+ ide: targetIDE,
617
+ scope,
618
+ version: CURRENT_VERSION,
619
+ includeCompatibilityAliases: true,
620
+ });
621
+
622
+ printInstallResult(result, installedVersion, scope);
623
+ }
624
+
625
+ return;
626
+ }
627
+
558
628
  const context = resolveInstallContext();
559
629
  const ideDefinition = getIDEDefinition(context.ide);
560
630
  const baseDir = scope === 'global' ? process.cwd() : context.baseDir;
@@ -710,6 +780,8 @@ ${c.bold}Usage:${c.reset}
710
780
 
711
781
  ${c.green}npx ${PACKAGE_NAME} init${c.reset} ${c.dim}Interactive setup (choose IDE + scope)${c.reset}
712
782
  ${c.green}npx ${PACKAGE_NAME} init --ide=cursor${c.reset} ${c.dim}Non-interactive install for specific IDE${c.reset}
783
+ ${c.green}npx ${PACKAGE_NAME} init --ide=all${c.reset} ${c.dim}Non-interactive install for all supported IDEs${c.reset}
784
+ ${c.green}npx ${PACKAGE_NAME} init --ide=codex${c.reset} ${c.dim}Install skills for Codex-style workspace${c.reset}
713
785
  ${c.green}npx ${PACKAGE_NAME} init --ide=vscode${c.reset} ${c.dim}Install skills to VS Code/Copilot layout${c.reset}
714
786
  ${c.green}npx ${PACKAGE_NAME} global${c.reset} ${c.dim}Install globally for all projects${c.reset}
715
787
  ${c.green}npx ${PACKAGE_NAME} add owner/repo${c.reset} ${c.dim}Add skills from a GitHub repository${c.reset}
@@ -729,8 +801,10 @@ ${c.bold}Supported IDEs:${c.reset}
729
801
  ${c.cyan}cursor${c.reset} ${c.dim}→ .cursor/skills + .cursor/rules${c.reset}
730
802
  ${c.cyan}kiro${c.reset} ${c.dim}→ .kiro/skills${c.reset}
731
803
  ${c.cyan}antigravity${c.reset} ${c.dim}→ .agent/workflows${c.reset}
804
+ ${c.cyan}codex${c.reset} ${c.dim}→ .github/skills (detected via AGENTS.md / memories)${c.reset}
732
805
  ${c.cyan}vscode${c.reset} ${c.dim}→ .github/skills${c.reset}
733
806
  ${c.cyan}copilot${c.reset} ${c.dim}→ .github/skills${c.reset}
807
+ ${c.cyan}all${c.reset} ${c.dim}→ install to all IDE targets above${c.reset}
734
808
 
735
809
  ${c.bold}Available skills:${c.reset}
736
810
  ${skillNames}
@@ -744,7 +818,7 @@ const command = process.argv[2];
744
818
 
745
819
  switch (command) {
746
820
  case 'init':
747
- if (parseIDEFlag() || hasFlag('--no-interactive')) {
821
+ if (hasFlag('--no-interactive')) {
748
822
  // Non-interactive: --ide flag or explicit opt-out
749
823
  checkForUpdates(() => install('project'));
750
824
  } else {
@@ -771,7 +845,7 @@ switch (command) {
771
845
  statusReport();
772
846
  break;
773
847
  case 'update':
774
- if (parseIDEFlag() || hasFlag('--no-interactive')) {
848
+ if (hasFlag('--no-interactive')) {
775
849
  checkForUpdates(() => install('project'));
776
850
  } else {
777
851
  checkForUpdates(() => interactiveInit().catch((err) => {
@@ -15,6 +15,8 @@ const IDE_ALIASES = {
15
15
  antigrafity: 'antigravity',
16
16
  kiro: 'kiro',
17
17
  cursor: 'cursor',
18
+ codex: 'codex',
19
+ 'openai-codex': 'codex',
18
20
  vscode: 'vscode',
19
21
  'vs-code': 'vscode',
20
22
  'vs_code': 'vscode',
@@ -60,6 +62,21 @@ const IDE_DEFINITIONS = {
60
62
  { relativeDir: 'rules', format: 'cursor-rule' },
61
63
  ],
62
64
  },
65
+ codex: {
66
+ displayName: 'Codex',
67
+ projectRoot: '.github',
68
+ globalRoot: path.join(os.homedir(), '.codex'),
69
+ detectProjectPaths: [
70
+ 'AGENTS.md',
71
+ 'memories',
72
+ '.github/skills',
73
+ '.github/copilot-instructions.md',
74
+ '.github/prompts',
75
+ '.agents/skills',
76
+ ],
77
+ detectGlobalPaths: ['.codex', '.codex/memories'],
78
+ targets: [{ relativeDir: 'skills', format: 'skill' }],
79
+ },
63
80
  vscode: {
64
81
  displayName: 'VS Code',
65
82
  projectRoot: '.github',
@@ -651,7 +668,7 @@ function findProjectRootForIDE(startDir, ide) {
651
668
  }
652
669
 
653
670
  function findIDEContext(startDir) {
654
- const candidates = ['antigravity', 'kiro', 'cursor', 'copilot', 'vscode'];
671
+ const candidates = ['antigravity', 'kiro', 'cursor', 'codex', 'copilot', 'vscode'];
655
672
 
656
673
  for (const currentDir of walkAncestorDirectories(startDir)) {
657
674
  for (const candidate of candidates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@votruongdanh/ai-agent-skills",
3
- "version": "3.1.7",
3
+ "version": "3.2.0",
4
4
  "description": "Cross-IDE AI agent skills with native installers for Kiro, Cursor, Antigravity, and VS Code/Copilot",
5
5
  "main": "index.js",
6
6
  "bin": {