@silverassist/agents-toolkit 2.2.0 → 2.4.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.
package/README.md CHANGED
@@ -14,6 +14,7 @@ Reusable AI agent prompts for development workflows — supports **GitHub Copilo
14
14
  - ✅ **Global Install**: Install once for all projects with `--global`
15
15
  - ✅ **Modular Partials**: Reusable prompt fragments
16
16
  - ✅ **Customizable**: Easy to extend and modify
17
+ - ✅ **PostToolUse Hooks**: Automated validation and formatting after Copilot edits
17
18
  - ✅ **CLI Tool**: Quick installation in any project
18
19
 
19
20
  ## Installation
@@ -63,19 +64,24 @@ AGENTS.md # Copilot Coding Agent instructions (proje
63
64
  │ ├── analyze-ticket.prompt.md
64
65
  │ ├── create-plan.prompt.md
65
66
  │ ├── work-ticket.prompt.md
66
- │ └── ...
67
+ │ └── ... # 10 prompts total (depends on --tracker)
67
68
  ├── instructions/
68
69
  │ ├── typescript.instructions.md
69
70
  │ ├── react-components.instructions.md
70
- ├── server-actions.instructions.md
71
- │ ├── tests.instructions.md
72
- └── css-styling.instructions.md
73
- └── skills/
74
- ├── component-architecture/
71
+ └── ... # filtered by --stack
72
+ └── skills/ # Symlinks → ../../.agents/skills/ (npx skills standard)
73
+ ├── domain-driven-design -> ../../.agents/skills/domain-driven-design
74
+ ├── testing-patterns -> ../../.agents/skills/testing-patterns
75
+ └── ... # filtered by --stack
76
+ .agents/
77
+ └── skills/ # Canonical store (single source of truth)
75
78
  ├── domain-driven-design/
76
- └── testing-patterns/
79
+ ├── testing-patterns/
80
+ └── ... # 9 skills total, filtered by --stack
77
81
  ```
78
82
 
83
+ > **Skills follow the [`npx skills`](https://github.com/vercel-labs/skills) standard.** The real skill files live once in the canonical `.agents/skills/` store, and each agent's `skills/` directory contains symlinks to it — a single source of truth shared across Copilot, Claude Code, and Codex. Use `--copy` to materialize real copies instead of symlinks (e.g. on Windows without developer mode; symlinks also fall back to copies automatically when unsupported).
84
+
79
85
  **Running prompts in VS Code:**
80
86
 
81
87
  1. Open Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`)
@@ -95,26 +101,37 @@ This creates the following structure:
95
101
 
96
102
  ```
97
103
  CLAUDE.md # Project instructions for Claude Code (project root)
104
+ .agents/
105
+ └── skills/ # Canonical skills store (single source of truth)
106
+ ├── domain-driven-design/
107
+ ├── testing-patterns/
108
+ └── ... # 9 skills total, filtered by --stack
98
109
  .claude/
99
- └── commands/
100
- ├── _partials/
101
- ├── analyze-ticket.md
102
- ├── create-plan.md
103
- ├── work-ticket.md
104
- └── ...
110
+ ├── commands/
111
+ ├── _partials/
112
+ ├── analyze-ticket.md
113
+ ├── create-plan.md
114
+ ├── work-ticket.md
115
+ └── ... # 10 commands total (depends on --tracker)
116
+ └── skills/ # Symlinks → ../../.agents/skills/ (read natively by Claude Code)
117
+ ├── domain-driven-design -> ../../.agents/skills/domain-driven-design
118
+ ├── testing-patterns -> ../../.agents/skills/testing-patterns
119
+ └── ... # filtered by --stack
105
120
  .github/
106
- ├── instructions/ # Shared with Copilot
107
- └── skills/ # Shared with Copilot
121
+ └── instructions/ # Shared with Copilot
108
122
  ```
109
123
 
124
+ > Skills now install to `.claude/skills/` (where Claude Code reads them natively) as symlinks to the canonical `.agents/skills/` store — no longer to `.github/skills/`.
125
+
110
126
  **Running commands in Claude Code:**
111
127
 
112
128
  Type `/` in the chat to see all available slash commands:
113
129
 
114
130
  ```
115
- /analyze-ticket
116
- /work-ticket
117
- /create-pr
131
+ /analyze-github-issue
132
+ /work-github-issue
133
+ /create-github-pr
134
+ /finalize-github-pr
118
135
  ```
119
136
 
120
137
  ### Codex
@@ -135,17 +152,20 @@ AGENTS.md # Project instructions for Codex (project
135
152
  │ ├── analyze-ticket.prompt.md
136
153
  │ ├── create-plan.prompt.md
137
154
  │ ├── work-ticket.prompt.md
138
- │ └── ...
155
+ │ └── ... # 10 prompts total (depends on --tracker)
139
156
  ├── instructions/
140
157
  │ ├── typescript.instructions.md
141
158
  │ ├── react-components.instructions.md
142
- ├── server-actions.instructions.md
143
- │ ├── tests.instructions.md
144
- └── css-styling.instructions.md
145
- └── skills/
146
- ├── component-architecture/
159
+ └── ... # filtered by --stack
160
+ └── skills/ # Symlinks → ../../.agents/skills/ (npx skills standard)
161
+ ├── domain-driven-design -> ../../.agents/skills/domain-driven-design
162
+ ├── testing-patterns -> ../../.agents/skills/testing-patterns
163
+ └── ... # filtered by --stack
164
+ .agents/
165
+ └── skills/ # Canonical store (single source of truth)
147
166
  ├── domain-driven-design/
148
- └── testing-patterns/
167
+ ├── testing-patterns/
168
+ └── ... # 9 skills total, filtered by --stack
149
169
  ```
150
170
 
151
171
  ### Global Install (Optional)
@@ -207,8 +227,10 @@ The same set of prompts is available for all supported tools.
207
227
  | `work-ticket` | Start working on a Jira ticket | `{ticket-id}` | Jira |
208
228
  | `work-github-issue` | Start working on a GitHub issue | `{issue-number}` | GitHub |
209
229
  | `prepare-pr` | Prepare code for PR | — | All |
210
- | `create-pr` | Create a pull request | `{ticket-id}` | Jira |
211
- | `finalize-pr` | Finalize and merge PR | `{ticket-id}` | Jira |
230
+ | `create-pr` | Create a pull request (Jira) | `{ticket-id}` | Jira |
231
+ | `create-github-pr` | Create a pull request (GitHub) | `{issue-number}` | GitHub |
232
+ | `finalize-pr` | Finalize and merge PR (Jira) | `{ticket-id}` | Jira |
233
+ | `finalize-github-pr` | Finalize and merge PR (GitHub) | `{issue-number}` | GitHub |
212
234
 
213
235
  ### Utility
214
236
 
@@ -220,6 +242,8 @@ The same set of prompts is available for all supported tools.
220
242
 
221
243
  ### Workflow Stages
222
244
 
245
+ **Jira workflow:**
246
+
223
247
  ```
224
248
  ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
225
249
  │ 1. Analyze │────▶│ 2. Plan │────▶│ 3. Work │
@@ -233,6 +257,21 @@ The same set of prompts is available for all supported tools.
233
257
  └─────────────────┘ └─────────────────┘ └─────────────────┘
234
258
  ```
235
259
 
260
+ **GitHub workflow:**
261
+
262
+ ```
263
+ ┌──────────────────────┐ ┌─────────────────┐ ┌──────────────────────┐
264
+ │ 1. Analyze │────▶│ 2. Plan │────▶│ 3. Work │
265
+ │ analyze-github-issue│ │ create-plan │ │ work-github-issue │
266
+ └──────────────────────┘ └─────────────────┘ └──────────────────────┘
267
+
268
+
269
+ ┌──────────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
270
+ │ 6. Finalize │◀────│ 5. Create PR │◀─│ 4. Prepare │
271
+ │ finalize-github-pr │ │ create-github-pr │ │ prepare-pr │
272
+ └──────────────────────┘ └──────────────────────┘ └─────────────────┘
273
+ ```
274
+
236
275
  ## CLI Reference
237
276
 
238
277
  ### install
@@ -257,6 +296,8 @@ npx @silverassist/agents-toolkit@latest install [options]
257
296
  | `--instructions-only` | Only install instructions and instructions file |
258
297
  | `--partials-only` | Only install partials |
259
298
  | `--skills-only` | Only install skills |
299
+ | `--hooks-only` | Only install hooks (PostToolUse validation scripts) |
300
+ | `--copy` | Copy skills into each agent dir instead of symlinking to `.agents/skills/` |
260
301
  | `--dry-run` | Show what would be installed without making changes |
261
302
 
262
303
  **Examples:**
@@ -306,7 +347,7 @@ npx @silverassist/agents-toolkit@latest update --global
306
347
 
307
348
  ### update
308
349
 
309
- Update all prompts to the latest version. **Overwrites existing files** (equivalent to `install --force`).
350
+ Update all prompts to the latest version. **Overwrites existing files and refreshes the skills lockfile** (equivalent to `install --force`).
310
351
 
311
352
  ```bash
312
353
  npx @silverassist/agents-toolkit@latest update [options]
@@ -316,6 +357,28 @@ npx @silverassist/agents-toolkit@latest update --codex
316
357
 
317
358
  > ⚠️ **Warning:** This will replace any customizations you've made to the installed files.
318
359
 
360
+ ### restore
361
+
362
+ Restore skills from the lockfile. Reads `agents-toolkit-lock.json` and reinstalls all skills with the correct symlinks. Designed for post-clone setup and CI pipelines.
363
+
364
+ ```bash
365
+ npx @silverassist/agents-toolkit@latest restore
366
+ npx @silverassist/agents-toolkit@latest restore --force # overwrite existing files
367
+ npx @silverassist/agents-toolkit@latest restore --dry-run # preview only
368
+ ```
369
+
370
+ > If the lockfile was written by a different package version, `restore` warns but still proceeds.
371
+
372
+ ### status
373
+
374
+ Check whether installed skills match the lockfile. Useful in CI to detect drift (manually edited skills or stale installs).
375
+
376
+ ```bash
377
+ npx @silverassist/agents-toolkit@latest status
378
+ ```
379
+
380
+ Exits with code `0` if all skills are up-to-date, `1` if any skill is `missing` or `modified`.
381
+
319
382
  ### list
320
383
 
321
384
  List all available prompts and skills.
@@ -338,6 +401,8 @@ npx @silverassist/agents-toolkit@latest list
338
401
  | Get latest version (discard customizations) | `update` |
339
402
  | Update specific category only | `update --prompts-only` |
340
403
  | Preview what would change | `install --dry-run` |
404
+ | Restore skills after clone / CI | `restore` |
405
+ | Check if skills are in sync | `status` |
341
406
 
342
407
  ## Partials
343
408
 
@@ -374,15 +439,88 @@ Specialized knowledge guides for domain-specific patterns:
374
439
  | `domain-driven-design` | DDD principles, domain organization, barrel exports |
375
440
  | `testing-patterns` | Jest + RTL patterns for Next.js 15 and Server Actions |
376
441
 
377
- **GitHub Copilot** reference a skill explicitly:
442
+ Skills follow the [`npx skills`](https://github.com/vercel-labs/skills) standard: the real files live once in the canonical `.agents/skills/` store, and each agent's `skills/` directory symlinks to it (single source of truth, easy updates). Pass `--copy` to materialize real copies instead.
443
+
444
+ **GitHub Copilot** — skills are symlinked into `.github/skills/`. Reference a skill explicitly:
378
445
 
379
446
  ```
380
447
  @workspace Use the component-architecture skill to create a new payment form
381
448
  ```
382
449
 
383
- **Claude Code** — skills are stored in `.github/skills/` and can be referenced in any prompt or command.
450
+ **Claude Code** — skills are symlinked into `.claude/skills/`, where Claude Code reads them natively, and can be referenced in any prompt or command.
451
+
452
+ **Codex** — skills are symlinked into `.github/skills/` and can be referenced from `AGENTS.md` and task context.
453
+
454
+ ### Skills Lockfile
455
+
456
+ When skills are installed, an `agents-toolkit-lock.json` file is written to the project root. This lockfile records each installed skill with its SHA-256 hash (same algorithm used by `npx skills`), allowing teammates and CI pipelines to restore the exact same skill files without committing them to the repository.
457
+
458
+ **Recommended `.gitignore` entries** (automatically appended by `install`):
459
+
460
+ ```gitignore
461
+ # agents-toolkit managed — regenerate with: npx @silverassist/agents-toolkit restore
462
+ .agents/skills/
463
+ .github/skills/
464
+ .claude/skills/
465
+ ```
466
+
467
+ **Workflow:**
384
468
 
385
- **Codex** — skills are stored in `.github/skills/` and can be referenced from `AGENTS.md` and task context.
469
+ ```bash
470
+ # Developer A — installs and commits only the lockfile
471
+ npx @silverassist/agents-toolkit@latest install
472
+ git add agents-toolkit-lock.json
473
+ git commit -m "chore: add agents-toolkit skills"
474
+
475
+ # Developer B / CI — after cloning, restores skills from the lockfile
476
+ npx @silverassist/agents-toolkit@latest restore
477
+
478
+ # Check sync status in CI
479
+ npx @silverassist/agents-toolkit@latest status # exits 1 if any skill is missing/modified
480
+
481
+ # Update skills to latest package version
482
+ npx @silverassist/agents-toolkit@latest update # rewrites lockfile with new hashes
483
+ ```
484
+
485
+ ## Hooks
486
+
487
+ PostToolUse hooks run automatically after GitHub Copilot edits files. They provide real-time validation and formatting without manual intervention.
488
+
489
+ | Hook | Trigger | Description |
490
+ |------|---------|-------------|
491
+ | `validate-tsx` | `*.tsx` in `components/` | Validates kebab-case folders, `index.tsx` naming, default export, and Props interface |
492
+ | `lint-format` | `*.ts, *.tsx, *.js, *.jsx, *.css` | Runs ESLint `--fix` and Prettier `--write` on the modified file |
493
+
494
+ Hooks are installed to:
495
+
496
+ - **Project** (default): `.github/hooks/`
497
+ - **Global** (`--global`): `~/.copilot/hooks/`
498
+
499
+ ```
500
+ .github/hooks/ # or ~/.copilot/hooks/ for global
501
+ ├── validate-tsx.json # Hook config (PostToolUse trigger)
502
+ ├── lint-format.json # Hook config (PostToolUse trigger)
503
+ └── scripts/
504
+ ├── validate-tsx.sh # Validation logic (exit 1 = warning)
505
+ └── lint-format.sh # Auto-fix logic (always exit 0)
506
+ ```
507
+
508
+ Install only hooks:
509
+
510
+ ```bash
511
+ # Project-level (hooks apply to this project only)
512
+ npx @silverassist/agents-toolkit@latest install --hooks-only
513
+
514
+ # Global (hooks apply to all Copilot sessions)
515
+ npx @silverassist/agents-toolkit@latest install --hooks-only --global
516
+ ```
517
+
518
+ > **How hook paths resolve.** Copilot runs a hook `command` from the workspace root, not
519
+ > the hooks directory. Each generated config therefore sets a `cwd` so `scripts/<name>.sh`
520
+ > resolves: `.github/hooks` (relative, portable) for project installs and the absolute hooks
521
+ > path for global installs. Configs also declare the required `version: 1` field. If you
522
+ > installed hooks with an older version and see `scripts/<name>.sh: No such file or directory`,
523
+ > re-run the install with `--force` to regenerate the configs.
386
524
 
387
525
  ## Agent Instructions Files
388
526
 
@@ -405,12 +543,36 @@ Installed at the project root with `--claude`. Contains project-wide instruction
405
543
 
406
544
  - Node.js 18+
407
545
  - Git installed and configured
408
- - **For Jira tracker:** Atlassian MCP configured
409
- - **For GitHub tracker:** GitHub MCP configured
546
+ - **For Jira tracker:** Atlassian MCP configured (see below)
547
+ - **For GitHub tracker:** GitHub MCP configured (see below)
410
548
  - **For GitHub Copilot:** VS Code with GitHub Copilot extension
411
549
  - **For Claude Code:** Claude Code CLI or VS Code extension
412
550
  - **For Codex:** Codex CLI/session running at project root
413
551
 
552
+ ### MCP Server Configuration
553
+
554
+ The Jira and GitHub workflow prompts rely on MCP servers to read/write tickets and pull requests.
555
+ Add a `.mcp.json` file to your project root (or use VS Code's MCP settings) to register the servers:
556
+
557
+ ```json
558
+ {
559
+ "servers": {
560
+ "atlassian": {
561
+ "type": "http",
562
+ "url": "https://mcp.atlassian.com/v1/mcp"
563
+ },
564
+ "github": {
565
+ "type": "http",
566
+ "url": "https://api.githubcopilot.com/mcp/"
567
+ }
568
+ }
569
+ }
570
+ ```
571
+
572
+ > You only need to include the server(s) matching your `--tracker` choice.
573
+ > The Atlassian MCP uses OAuth — authenticate once with `npx @atlassian/mcp-server auth` or via the VS Code MCP UI.
574
+ > The GitHub MCP is authenticated automatically when you are signed in to GitHub Copilot.
575
+
414
576
  ## License
415
577
 
416
578
  [PolyForm Noncommercial License 1.0.0](https://github.com/SilverAssist/agents-toolkit/blob/main/LICENSE)