@anionzo/skill 1.1.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 (80) hide show
  1. package/CONTRIBUTING.md +302 -0
  2. package/LICENSE +21 -0
  3. package/README.md +209 -0
  4. package/adapters/README.md +13 -0
  5. package/adapters/claude-code/README.md +32 -0
  6. package/adapters/copilot/README.md +32 -0
  7. package/adapters/gemini/README.md +32 -0
  8. package/adapters/generic/README.md +32 -0
  9. package/adapters/opencode/README.md +32 -0
  10. package/docs/adapter-guide.md +62 -0
  11. package/docs/authoring-guide.md +69 -0
  12. package/docs/design-brief.md +97 -0
  13. package/docs/knowledge-spec.md +78 -0
  14. package/docs/research-notes.md +99 -0
  15. package/docs/skill-spec.md +107 -0
  16. package/i18n/CONTRIBUTING.vi.md +302 -0
  17. package/i18n/README.vi.md +209 -0
  18. package/i18n/adapter-guide.vi.md +62 -0
  19. package/i18n/authoring-guide.vi.md +69 -0
  20. package/i18n/design-brief.vi.md +97 -0
  21. package/i18n/knowledge-spec.vi.md +78 -0
  22. package/i18n/research-notes.vi.md +99 -0
  23. package/i18n/skill-spec.vi.md +107 -0
  24. package/knowledge/README.md +7 -0
  25. package/knowledge/global/debugging-patterns.md +20 -0
  26. package/knowledge/global/engineering-principles.md +23 -0
  27. package/knowledge/global/evidence-before-claims.md +20 -0
  28. package/knowledge/global/review-heuristics.md +23 -0
  29. package/knowledge/global/skill-triggering-rules.md +24 -0
  30. package/knowledge/project/README.md +10 -0
  31. package/knowledge/working/README.md +10 -0
  32. package/package.json +43 -0
  33. package/scripts/sync-platform-files +73 -0
  34. package/scripts/validate-skills +103 -0
  35. package/skills/brainstorming/SKILL.md +45 -0
  36. package/skills/brainstorming/examples.md +61 -0
  37. package/skills/brainstorming/meta.yaml +23 -0
  38. package/skills/brainstorming/references/output-template.md +26 -0
  39. package/skills/bug-triage/SKILL.md +47 -0
  40. package/skills/bug-triage/examples.md +68 -0
  41. package/skills/bug-triage/meta.yaml +25 -0
  42. package/skills/bug-triage/references/output-template.md +26 -0
  43. package/skills/code-review/SKILL.md +41 -0
  44. package/skills/code-review/examples.md +77 -0
  45. package/skills/code-review/meta.yaml +24 -0
  46. package/skills/code-review/references/checklist.md +34 -0
  47. package/skills/code-review/references/output-template.md +12 -0
  48. package/skills/docs-writer/SKILL.md +42 -0
  49. package/skills/docs-writer/examples.md +108 -0
  50. package/skills/docs-writer/meta.yaml +22 -0
  51. package/skills/docs-writer/references/output-template.md +17 -0
  52. package/skills/feature-delivery/SKILL.md +39 -0
  53. package/skills/feature-delivery/examples.md +83 -0
  54. package/skills/feature-delivery/meta.yaml +26 -0
  55. package/skills/feature-delivery/references/output-template.md +26 -0
  56. package/skills/planning/SKILL.md +61 -0
  57. package/skills/planning/examples.md +124 -0
  58. package/skills/planning/meta.yaml +29 -0
  59. package/skills/planning/references/output-template.md +37 -0
  60. package/skills/refactor-safe/SKILL.md +53 -0
  61. package/skills/refactor-safe/examples.md +96 -0
  62. package/skills/refactor-safe/meta.yaml +28 -0
  63. package/skills/refactor-safe/references/output-template.md +37 -0
  64. package/skills/repo-onboarding/SKILL.md +52 -0
  65. package/skills/repo-onboarding/examples.md +115 -0
  66. package/skills/repo-onboarding/meta.yaml +23 -0
  67. package/skills/repo-onboarding/references/output-template.md +24 -0
  68. package/skills/using-skills/SKILL.md +108 -0
  69. package/skills/using-skills/examples.md +79 -0
  70. package/skills/using-skills/meta.yaml +29 -0
  71. package/skills/using-skills/references/output-template.md +14 -0
  72. package/skills/verification-before-completion/SKILL.md +46 -0
  73. package/skills/verification-before-completion/examples.md +83 -0
  74. package/skills/verification-before-completion/meta.yaml +26 -0
  75. package/skills/verification-before-completion/references/checklist.md +7 -0
  76. package/skills/verification-before-completion/references/output-template.md +16 -0
  77. package/templates/SKILL.md +29 -0
  78. package/templates/examples.md +13 -0
  79. package/templates/meta.yaml +14 -0
  80. package/templates/output-template.md +11 -0
@@ -0,0 +1,108 @@
1
+ # Examples
2
+
3
+ ## Example 1
4
+
5
+ User request:
6
+
7
+ ```text
8
+ Please refresh the README so setup instructions match the current app.
9
+ ```
10
+
11
+ Expected result:
12
+
13
+ - verify install, run, and test commands from source
14
+ - update only the stale sections
15
+ - note anything that still cannot be confirmed
16
+
17
+ ## Example 2
18
+
19
+ User request:
20
+
21
+ ```text
22
+ Write a short runbook for restarting the worker.
23
+ ```
24
+
25
+ Expected result:
26
+
27
+ - identify the real command path
28
+ - write operator-focused steps
29
+ - include safety notes if the restart has side effects
30
+
31
+ ### Completed output — Example 1
32
+
33
+ ```
34
+ Target document: README.md
35
+
36
+ Audience: New developers setting up the project locally.
37
+
38
+ What changed:
39
+ - Updated Node.js version requirement from 16 to 20 (verified in .nvmrc and package.json engines)
40
+ - Replaced `npm run seed` with `npm run db:seed` (old command no longer exists in package.json)
41
+ - Added the required REDIS_URL environment variable (added in config/default.ts 3 months ago but never documented)
42
+ - Removed reference to deprecated /health endpoint (replaced by /api/status in src/routes/status.ts)
43
+
44
+ Source of truth used:
45
+ - package.json (engines, scripts)
46
+ - .nvmrc
47
+ - config/default.ts (env vars)
48
+ - src/routes/status.ts (health check endpoint)
49
+
50
+ Verification: Ran `npm install && npm run dev && curl localhost:3000/api/status` — confirmed the documented flow works end to end.
51
+
52
+ Assumptions or follow-ups: The Docker setup section was not touched — it may also reference the old Node 16 base image. Worth a separate pass.
53
+ ```
54
+
55
+ ### Completed output — Example 2
56
+
57
+ ```
58
+ Target document: docs/runbooks/restart-worker.md
59
+
60
+ Audience: On-call operators who need to restart the background worker.
61
+
62
+ What was written:
63
+ - Step-by-step restart command: `kubectl rollout restart deployment/worker -n production`
64
+ - Pre-check: verify no active jobs via `kubectl exec -it deploy/worker -- npm run jobs:status`
65
+ - Post-check: confirm worker reconnects to RabbitMQ within 30s
66
+ - Safety note: restarting mid-job will cause the active job to be requeued (idempotent by design)
67
+
68
+ Source of truth used:
69
+ - k8s/worker-deployment.yaml
70
+ - src/workers/processor.ts (job idempotency contract)
71
+ - ops/runbook-template.md (existing format reference)
72
+
73
+ Verification: Ran the restart command in staging — worker reconnected in 12s, 3 in-flight jobs were requeued and completed successfully.
74
+
75
+ Assumptions or follow-ups: The runbook assumes kubectl access. A CLI alias (`make restart-worker`) could be added for convenience.
76
+ ```
77
+
78
+ ## Example 3 — Sample completed output
79
+
80
+ User request:
81
+
82
+ ```text
83
+ Please refresh the README so setup instructions match the current app.
84
+ ```
85
+
86
+ ### Completed output
87
+
88
+ ```
89
+ Target document: README.md
90
+
91
+ Audience: New developers setting up the project locally.
92
+
93
+ What changed:
94
+ - Updated Node.js version requirement from 16 to 20 (verified in .nvmrc and package.json engines)
95
+ - Replaced `npm run seed` with `npm run db:seed` (old command no longer exists in package.json)
96
+ - Added the required REDIS_URL environment variable (added in config/default.ts 3 months ago but never documented)
97
+ - Removed reference to deprecated /health endpoint (replaced by /api/status in src/routes/status.ts)
98
+
99
+ Source of truth used:
100
+ - package.json (engines, scripts)
101
+ - .nvmrc
102
+ - config/default.ts (env vars)
103
+ - src/routes/status.ts (health check endpoint)
104
+
105
+ Verification: Ran `npm install && npm run dev && curl localhost:3000/api/status` — confirmed the documented flow works end to end.
106
+
107
+ Assumptions or follow-ups: The Docker setup section was not touched — it may also reference the old Node 16 base image. Worth a separate pass.
108
+ ```
@@ -0,0 +1,22 @@
1
+ name: docs-writer
2
+ version: 0.1.0
3
+ category: documentation
4
+ summary: Update documentation from verified source behavior so the docs stay useful and current.
5
+ summary_vi: Cập nhật tài liệu từ hành vi nguồn đã xác minh để docs luôn hữu ích và cập nhật.
6
+ triggers:
7
+ - update the README
8
+ - write onboarding docs
9
+ - refresh runbook or API notes
10
+ inputs:
11
+ - current code or behavior
12
+ - existing documentation
13
+ outputs:
14
+ - updated docs
15
+ - assumptions and verification notes
16
+ constraints:
17
+ - prefer source-verified statements
18
+ - keep links repository-relative when possible
19
+ related_skills:
20
+ - using-skills
21
+ - repo-onboarding
22
+ - code-review
@@ -0,0 +1,17 @@
1
+ ## Target
2
+
3
+ - Document:
4
+ - Audience:
5
+
6
+ ## Update Summary
7
+
8
+ - Sections changed:
9
+ - Why they changed:
10
+
11
+ ## Verification
12
+
13
+ - Source files or commands checked:
14
+
15
+ ## Follow-Up
16
+
17
+ - Assumptions or remaining gaps
@@ -0,0 +1,39 @@
1
+ # Feature Delivery
2
+
3
+ ## Purpose
4
+
5
+ Implement a feature with a minimal, repo-aligned change that is verified before handoff.
6
+
7
+ ## When To Use
8
+
9
+ Load this skill when the user wants code changed to add or update behavior.
10
+
11
+ ## Workflow
12
+
13
+ 1. Restate the desired outcome in user-visible terms.
14
+ 2. Inspect the existing code paths and nearby patterns before designing the change.
15
+ 3. Choose the smallest approach that fits the current architecture.
16
+ 4. Make the change.
17
+ 5. Verify it with the most relevant checks available, such as tests, typecheck, or targeted runtime validation.
18
+ 6. Summarize what changed, why the approach was chosen, and what remains uncertain.
19
+
20
+ ## Output Format
21
+
22
+ - goal and scope
23
+ - chosen approach
24
+ - files changed
25
+ - verification performed
26
+ - follow-up or risk note
27
+
28
+ ## Red Flags
29
+
30
+ - introducing new abstractions before checking existing patterns
31
+ - widening scope during implementation without calling it out
32
+ - stopping after code edits without verification
33
+ - describing code changes only in implementation terms instead of user impact
34
+
35
+ ## Done Criteria
36
+
37
+ This skill is complete when the feature works as intended, the change is verified with the most relevant check available, and the outcome is summarized clearly.
38
+
39
+ Before declaring done, run `verification-before-completion` to confirm the claim is backed by fresh evidence.
@@ -0,0 +1,83 @@
1
+ # Examples
2
+
3
+ ## Example 1
4
+
5
+ User request:
6
+
7
+ ```text
8
+ Add an export CSV button to the orders page.
9
+ ```
10
+
11
+ Expected result:
12
+
13
+ - inspect the orders page and nearby action patterns
14
+ - implement the smallest UI and backend change needed
15
+ - verify export behavior and summarize any edge cases left open
16
+
17
+ ### Completed output — Example 1
18
+
19
+ ```
20
+ Goal and scope: Add a "Export CSV" button to the orders list page that downloads the currently filtered orders as a CSV file.
21
+
22
+ Chosen approach: Added a server-side endpoint (GET /api/orders/export?filters=...) that streams CSV rows using the existing OrderService query. The frontend button calls this endpoint and triggers a browser download via a hidden anchor element — same pattern used by the existing invoice export.
23
+
24
+ Files changed:
25
+ - src/routes/orders.ts — new GET /api/orders/export route
26
+ - src/services/OrderService.ts — added toCsvStream() method
27
+ - src/pages/OrdersPage.tsx — added ExportButton component next to existing filter bar
28
+ - tests/orders.export.test.ts — new integration test for the export endpoint
29
+
30
+ Verification performed: ran `npm test -- orders.export` — 3/3 tests passing (empty result, normal result, filtered result). Manual check: downloaded CSV opens correctly in LibreOffice.
31
+
32
+ Follow-up: Large exports (>50k rows) may need streaming pagination. Not blocking for current usage but worth a ticket.
33
+
34
+ Handoff: verification-before-completion
35
+ ```
36
+
37
+ ### Completed output — Example 2
38
+
39
+ ```
40
+ Goal and scope: Add email-based filtering to the audit logs page without changing the existing query architecture.
41
+
42
+ Chosen approach: Extended the existing audit log query builder to accept an `actor_email` filter parameter. Added a text input to the audit log filter bar. The query uses a LEFT JOIN to the users table to match email — no schema change needed.
43
+
44
+ Files changed:
45
+ - src/routes/audit.ts — added actor_email query param handling
46
+ - src/services/AuditService.ts — extended listAuditLogs() to accept actorEmail filter
47
+ - src/pages/AuditLogsPage.tsx — added email filter input to filter bar
48
+ - tests/audit.filter.test.ts — new test for email filtering
49
+
50
+ Verification performed: ran `npm test -- audit` — 5/5 tests passing. Manual check: filtering by "admin@example.com" returns correct subset.
51
+
52
+ Follow-up: The email join could be slow on large tables without an index. Current dataset is <100k rows so not urgent.
53
+
54
+ Handoff: verification-before-completion
55
+ ```
56
+
57
+ ## Example 3 — Sample completed output
58
+
59
+ User request:
60
+
61
+ ```text
62
+ Add an export CSV button to the orders page.
63
+ ```
64
+
65
+ ### Completed output
66
+
67
+ ```
68
+ Goal and scope: Add a "Export CSV" button to the orders list page that downloads the currently filtered orders as a CSV file.
69
+
70
+ Chosen approach: Added a server-side endpoint (GET /api/orders/export?filters=...) that streams CSV rows using the existing OrderService query. The frontend button calls this endpoint and triggers a browser download via a hidden anchor element — same pattern used by the existing invoice export.
71
+
72
+ Files changed:
73
+ - src/routes/orders.ts — new GET /api/orders/export route
74
+ - src/services/OrderService.ts — added toCsvStream() method
75
+ - src/pages/OrdersPage.tsx — added ExportButton component next to existing filter bar
76
+ - tests/orders.export.test.ts — new integration test for the export endpoint
77
+
78
+ Verification performed: ran `npm test -- orders.export` — 3/3 tests passing (empty result, normal result, filtered result). Manual check: downloaded CSV opens correctly in LibreOffice.
79
+
80
+ Follow-up: Large exports (>50k rows) may need streaming pagination. Not blocking for current usage but worth a ticket.
81
+
82
+ Handoff: verification-before-completion
83
+ ```
@@ -0,0 +1,26 @@
1
+ name: feature-delivery
2
+ version: 0.1.0
3
+ category: implementation
4
+ summary: Deliver a small or medium feature by following existing patterns and making the smallest correct change.
5
+ summary_vi: Triển khai feature nhỏ hoặc vừa bằng cách theo pattern có sẵn và thực hiện thay đổi đúng nhỏ nhất.
6
+ triggers:
7
+ - implement this feature
8
+ - add this behavior
9
+ - wire this new capability in
10
+ inputs:
11
+ - user request
12
+ - relevant repo context
13
+ - existing patterns in the codebase
14
+ outputs:
15
+ - chosen approach
16
+ - files changed
17
+ - verification performed
18
+ constraints:
19
+ - inspect existing patterns before inventing new structure
20
+ - ask only one blocking question when necessary
21
+ related_skills:
22
+ - using-skills
23
+ - planning
24
+ - repo-onboarding
25
+ - verification-before-completion
26
+ - code-review
@@ -0,0 +1,26 @@
1
+ ## Goal
2
+
3
+ - User-visible outcome:
4
+ - Scope boundary:
5
+
6
+ ## Approach
7
+
8
+ - Existing pattern followed:
9
+ - Why this approach:
10
+
11
+ ## Files Changed
12
+
13
+ - List of files modified or created:
14
+
15
+ ## Verification
16
+
17
+ - Commands or checks run:
18
+ - Result:
19
+
20
+ ## Follow-Up
21
+
22
+ - Remaining risk or next step:
23
+
24
+ ## Handoff
25
+
26
+ - Next skill to invoke (verification-before-completion, code-review, or done):
@@ -0,0 +1,61 @@
1
+ # Planning
2
+
3
+ ## Purpose
4
+
5
+ Produce an execution-ready plan before code changes begin.
6
+
7
+ This skill exists to make planning explicit, especially for multi-file or non-trivial work.
8
+
9
+ ## When To Use
10
+
11
+ Load this skill when:
12
+
13
+ - the task will likely change more than one file
14
+ - the request is still ambiguous after initial reading
15
+ - the change touches APIs, data flow, persistence, or architecture boundaries
16
+ - the user explicitly asks for a plan
17
+ - implementation risk is high enough that code should not start immediately
18
+
19
+ ## Workflow
20
+
21
+ 1. Restate the goal in user-visible terms.
22
+ 2. Define the scope boundary:
23
+ - what is in scope
24
+ - what is out of scope
25
+ 3. Inspect the existing code paths and patterns that the work should follow.
26
+ 4. Choose the smallest viable approach that fits the repo.
27
+ 5. Break the work into ordered steps.
28
+ 6. Call out risks, assumptions, and missing decisions.
29
+ 7. Define how the work will be verified.
30
+ 8. End with the next implementation skill to invoke.
31
+
32
+ ## Output Format
33
+
34
+ - goal
35
+ - scope
36
+ - existing patterns or files to follow
37
+ - proposed approach
38
+ - ordered implementation steps
39
+ - risks and assumptions
40
+ - verification plan
41
+ - next skill to invoke
42
+
43
+ ## Planning Rules
44
+
45
+ - Keep the plan concrete enough that another engineer could execute it.
46
+ - Prefer a small number of meaningful steps over a long task dump.
47
+ - Name the files, modules, or surfaces likely to change when possible.
48
+ - Make uncertainty explicit instead of hiding it in vague language.
49
+ - Do not start coding inside the plan.
50
+
51
+ ## Red Flags
52
+
53
+ - jumping from request to code without checking current patterns
54
+ - writing a plan so abstract that it does not guide implementation
55
+ - turning the plan into a full design doc for a small change
56
+ - leaving verification unspecified
57
+ - mixing code edits into the planning phase
58
+
59
+ ## Done Criteria
60
+
61
+ This skill is complete when the implementation path, risks, and verification steps are clear enough to hand off to `feature-delivery`, `refactor-safe`, or to a bounded bug fix.
@@ -0,0 +1,124 @@
1
+ # Examples
2
+
3
+ ## Example 1
4
+
5
+ User request:
6
+
7
+ ```text
8
+ Add SSO login to the admin dashboard.
9
+ ```
10
+
11
+ Expected result:
12
+
13
+ - inspect the current auth flow and integration points
14
+ - define what parts of the login system will change
15
+ - produce a bounded implementation plan before any code changes begin
16
+
17
+ Sample completed output:
18
+
19
+ ```
20
+ Goal: Allow admin users to log in via SSO using SAML instead of local credentials.
21
+
22
+ Scope:
23
+ - In scope: SAML assertion parsing, session creation after SSO, admin login page update
24
+ - Out of scope: User-facing login, MFA changes, password migration
25
+
26
+ Current Pattern:
27
+ - src/auth/local.ts handles current login flow
28
+ - sessions are created in src/auth/session.ts
29
+
30
+ Proposed Approach:
31
+ - Add a SAML callback route that validates assertions and delegates to session.ts
32
+ - Update the admin login page to show SSO button
33
+
34
+ Steps:
35
+ 1. Add saml-passport library and wire callback route
36
+ 2. Extract session-creation logic into shared helper
37
+ 3. Update admin login UI
38
+ 4. Add integration test for SAML callback
39
+
40
+ Risks: SAML IdP metadata must be confirmed before step 1
41
+ Verification: run auth integration tests; manually test SSO callback with IdP
42
+ Handoff: feature-delivery
43
+ ```
44
+
45
+ ## Example 2
46
+
47
+ User request:
48
+
49
+ ```text
50
+ Plan the work to support soft delete on customers.
51
+ ```
52
+
53
+ Expected result:
54
+
55
+ - identify data model, query, and UI surfaces affected
56
+ - define scope and rollback or migration risks
57
+ - specify verification before implementation starts
58
+
59
+ ### Completed output — Example 2
60
+
61
+ ```
62
+ Goal: Add soft delete support for customers — records should be marked as deleted rather than removed from the database.
63
+
64
+ Scope:
65
+ - In scope: Customer model (add deletedAt column), all queries that read/update customers, admin UI to show/hide deleted records
66
+ - Out of scope: Hard delete migration for existing data, cascade soft delete for related orders/transactions
67
+
68
+ Current Pattern:
69
+ - src/models/Customer.ts — Prisma model, no soft delete support
70
+ - src/services/CustomerService.ts — CRUD operations using direct Prisma calls
71
+ - src/routes/customers.ts — REST endpoints, no filtering for deleted records
72
+ - Admin UI at /admin/customers — lists all customers with no deleted/active distinction
73
+
74
+ Proposed Approach:
75
+ - Add deletedAt DateTime? column to Customer model via Prisma migration
76
+ - Update all CustomerService queries to filter `where: { deletedAt: null }` by default
77
+ - Add restoreCustomer() method to CustomerService
78
+ - Add a "Show deleted" toggle to the admin UI
79
+
80
+ Steps:
81
+ 1. Prisma migration: add deletedAt column, backfill existing records as null
82
+ 2. Update CustomerService list/get/update to exclude soft-deleted records
83
+ 3. Add deleteCustomer() (sets deletedAt) and restoreCustomer() methods
84
+ 4. Update admin UI with deleted/active toggle
85
+ 5. Add integration tests for soft delete and restore flows
86
+
87
+ Risks:
88
+ - Related tables (orders, transactions) still reference soft-deleted customers — need to decide if they should be hidden too
89
+ - Any external integrations that sync customer data may not handle soft-deleted records
90
+
91
+ Verification: Run customer-related test suite (18 tests); manually verify admin UI shows/hides deleted records; confirm API returns 404 for deleted customer details endpoint.
92
+
93
+ Handoff: feature-delivery
94
+ ```
95
+
96
+ ### Completed output — Example 3
97
+
98
+ ```
99
+ Goal: Fix the API timeout issue that occurs under load (>100 concurrent requests).
100
+
101
+ Summary after triage context:
102
+ - Timeouts occur on GET /api/reports endpoint when >100 concurrent requests hit
103
+ - Root cause identified: each request triggers a full table scan on the reports table (no index on the date range filter)
104
+ - The reports table has 2M+ rows and the query filters by createdAt range without an index
105
+
106
+ Proposed Approach:
107
+ - Add a composite index on (createdAt, status) to speed up the date range filter
108
+ - Add query result caching (5-minute TTL) for identical report requests
109
+ - Set a query timeout of 10s to fail fast instead of hanging
110
+
111
+ Steps:
112
+ 1. Add Prisma migration for the composite index
113
+ 2. Add Redis caching layer for report queries (cache key: hash of query params)
114
+ 3. Set query timeout in the database connection string
115
+ 4. Load test with k6 to confirm timeout is resolved at 200 concurrent requests
116
+
117
+ Risks:
118
+ - The index will take ~30s to build on production (2M rows) — should use CONCURRENTLY
119
+ - Redis caching adds a new dependency — need to confirm Redis is available in production
120
+
121
+ Verification: Run k6 load test at 200 concurrent requests — p99 latency should be <2s (currently >30s timeout).
122
+
123
+ Handoff: feature-delivery
124
+ ```
@@ -0,0 +1,29 @@
1
+ name: planning
2
+ version: 0.1.0
3
+ category: planning
4
+ summary: Turn a request into an execution-ready plan with scope, approach, risks, and verification before code changes begin.
5
+ summary_vi: Biến request thành plan sẵn sàng thực thi với phạm vi, cách tiếp cận, rủi ro, và xác minh trước khi bắt đầu code.
6
+ triggers:
7
+ - make a plan
8
+ - think through the implementation first
9
+ - prepare before coding
10
+ inputs:
11
+ - user request
12
+ - relevant repo context
13
+ - existing patterns and constraints
14
+ outputs:
15
+ - scope
16
+ - approach
17
+ - file plan
18
+ - verification plan
19
+ constraints:
20
+ - keep the plan concrete and bounded
21
+ - separate planning from implementation
22
+ related_skills:
23
+ - using-skills
24
+ - brainstorming
25
+ - repo-onboarding
26
+ - feature-delivery
27
+ - bug-triage
28
+ - refactor-safe
29
+ - verification-before-completion
@@ -0,0 +1,37 @@
1
+ ## Goal
2
+
3
+ - User-visible outcome:
4
+
5
+ ## Scope
6
+
7
+ - In scope:
8
+ - Out of scope:
9
+
10
+ ## Current Pattern
11
+
12
+ - Files or modules to follow:
13
+ - Relevant existing behavior:
14
+
15
+ ## Proposed Approach
16
+
17
+ - Chosen approach:
18
+ - Why this approach:
19
+
20
+ ## Steps
21
+
22
+ 1.
23
+ 2.
24
+ 3.
25
+
26
+ ## Risks And Assumptions
27
+
28
+ - Risk:
29
+ - Assumption:
30
+
31
+ ## Verification
32
+
33
+ - Tests or checks:
34
+
35
+ ## Handoff
36
+
37
+ - Next skill to invoke:
@@ -0,0 +1,53 @@
1
+ # Refactor Safe
2
+
3
+ ## Purpose
4
+
5
+ Restructure code without changing behavior.
6
+
7
+ ## When To Use
8
+
9
+ Load this skill when:
10
+
11
+ - the user wants to move, rename, extract, or reorganize code without adding features
12
+ - a module has grown too large and needs splitting
13
+ - a pattern is being replaced across a bounded area
14
+ - cleanup is needed before a new feature touches the same code
15
+
16
+ Do not use this skill when the intent is also to change behavior. Separate the refactor from the feature change — do one at a time.
17
+
18
+ ## Workflow
19
+
20
+ 1. State the goal in one sentence and confirm it does not include behavior changes.
21
+ 2. Define the scope boundary explicitly:
22
+ - which files, functions, or modules are in scope
23
+ - what is not in scope
24
+ 3. Check the current regression coverage for the area:
25
+ - identify which tests cover the code being refactored
26
+ - note any gaps before starting
27
+ 4. Write or tighten regression tests if the coverage is insufficient to protect the refactor.
28
+ 5. Make the structural change.
29
+ 6. Run the full relevant test suite and confirm it passes.
30
+ 7. Check for behavioral drift: compare inputs and outputs of the refactored surface at the boundary.
31
+ 8. Run `verification-before-completion` before declaring the refactor done.
32
+
33
+ ## Output Format
34
+
35
+ - goal and scope boundary
36
+ - behavior contract
37
+ - coverage check before
38
+ - steps taken
39
+ - coverage result after
40
+ - behavioral drift check
41
+ - handoff or follow-up
42
+
43
+ ## Red Flags
44
+
45
+ - starting the refactor before checking current test coverage
46
+ - changing behavior while "just refactoring"
47
+ - expanding scope mid-refactor without calling it out
48
+ - declaring done based on "looks right" without running tests
49
+ - mixing a refactor commit with a feature change commit
50
+
51
+ ## Done Criteria
52
+
53
+ This skill is complete when the test suite passes, no behavioral drift is detected at the refactored surface, and the verification field is populated with actual test output.