agentic-skill-mill 1.0.5 → 1.0.7

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.
@@ -0,0 +1,385 @@
1
+ $ErrorActionPreference = 'Stop'
2
+
3
+ $ProjectName = 'agentic-skill-mill'
4
+ $CliBinName = 'skillmill'
5
+ $ManagedMarker = 'managed_by: agentic-skill-mill'
6
+ $Skills = @('agentic-skill-mill')
7
+ $SkillDir = Split-Path -Parent $MyInvocation.MyCommand.Path
8
+ $UserHome = [Environment]::GetFolderPath('UserProfile')
9
+ $AppData = [Environment]::GetFolderPath('ApplicationData')
10
+ $CodeXHomeDir = if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $UserHome '.codex' }
11
+
12
+ $ClaudeSkillsDir = Join-Path $UserHome '.claude\skills'
13
+ $CursorRulesDir = Join-Path $UserHome '.cursor\rules'
14
+ $CursorSkillsDir = Join-Path $UserHome '.cursor\skills'
15
+ $WindsurfRulesDir = Join-Path $UserHome '.windsurf\rules'
16
+ $WindsurfSkillsDir = Join-Path $UserHome '.codeium\windsurf\skills'
17
+ $OpenCodeAgentsDirs = @(
18
+ Join-Path $AppData 'opencode\agents',
19
+ Join-Path $UserHome '.opencode\agents'
20
+ )
21
+ $CodeXSkillsDir = Join-Path $CodeXHomeDir 'skills'
22
+ $CompiledDir = Join-Path $SkillDir 'compiled'
23
+
24
+ function Show-Help {
25
+ Write-Host 'Usage: powershell -ExecutionPolicy Bypass -File .\install-local.ps1 [options]'
26
+ Write-Host ''
27
+ Write-Host 'Options:'
28
+ Write-Host ' --claude Install skills for Claude Code'
29
+ Write-Host ' --cursor Install skills for Cursor'
30
+ Write-Host ' --windsurf Install skills for Windsurf'
31
+ Write-Host ' --opencode Install skills for OpenCode'
32
+ Write-Host ' --codex Install skills for Codex'
33
+ Write-Host ' --all Install for all five tools'
34
+ Write-Host ' --skills-only Skip npm install/build/link (just copy skills)'
35
+ Write-Host ' --uninstall Remove installed skills from target tools'
36
+ Write-Host ' --compile-only Generate compiled/ output directory (no install)'
37
+ Write-Host ' -h, --help Show this help'
38
+ Write-Host ''
39
+ Write-Host 'No flags = auto-detect installed tools.'
40
+ }
41
+
42
+ function Invoke-Step {
43
+ param(
44
+ [Parameter(Mandatory = $true)][string]$FilePath,
45
+ [string[]]$Arguments = @(),
46
+ [string]$WorkingDirectory = $SkillDir,
47
+ [switch]$AllowFailure
48
+ )
49
+
50
+ $argText = if ($Arguments.Count -gt 0) { ' ' + ($Arguments -join ' ') } else { '' }
51
+ Write-Host ("> {0}{1}" -f $FilePath, $argText)
52
+ Push-Location $WorkingDirectory
53
+ try {
54
+ & $FilePath @Arguments
55
+ if (-not $AllowFailure -and $LASTEXITCODE -ne 0) {
56
+ throw "Command failed with exit code $LASTEXITCODE: $FilePath$argText"
57
+ }
58
+ }
59
+ finally {
60
+ Pop-Location
61
+ }
62
+ }
63
+
64
+ function Ensure-Directory {
65
+ param([Parameter(Mandatory = $true)][string]$Path)
66
+ New-Item -ItemType Directory -Force -Path $Path | Out-Null
67
+ }
68
+
69
+ function Remove-ManagedFiles {
70
+ param([Parameter(Mandatory = $true)][string]$Path)
71
+
72
+ if (-not (Test-Path -LiteralPath $Path -PathType Container)) {
73
+ return
74
+ }
75
+
76
+ Get-ChildItem -LiteralPath $Path -Recurse -File | ForEach-Object {
77
+ $file = $_
78
+ $matches = Select-String -Path $file.FullName -SimpleMatch -Pattern $ManagedMarker -Quiet -ErrorAction SilentlyContinue
79
+ if ($matches) {
80
+ Remove-Item -LiteralPath $file.FullName -Force
81
+ Write-Host " Removed: $($file.FullName)"
82
+ $parent = Split-Path -Parent $file.FullName
83
+ if ($parent -and ([IO.Path]::GetFullPath($parent) -ne [IO.Path]::GetFullPath($Path))) {
84
+ try {
85
+ Remove-Item -LiteralPath $parent -Force -ErrorAction Stop
86
+ }
87
+ catch {
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+
94
+ function Install-Claude {
95
+ param([Parameter(Mandatory = $true)][string]$SkillName)
96
+ $src = Join-Path $CompiledDir "claude\$SkillName\SKILL.md"
97
+ $destDir = Join-Path $ClaudeSkillsDir $SkillName
98
+ Ensure-Directory -Path $destDir
99
+ Copy-Item -LiteralPath $src -Destination (Join-Path $destDir 'SKILL.md') -Force
100
+ Write-Host " Claude: $(Join-Path $destDir 'SKILL.md')"
101
+ }
102
+
103
+ function Install-Cursor {
104
+ param([Parameter(Mandatory = $true)][string]$SkillName)
105
+ $srcRule = Join-Path $CompiledDir "cursor\rules\$SkillName.mdc"
106
+ Ensure-Directory -Path $CursorRulesDir
107
+ Copy-Item -LiteralPath $srcRule -Destination (Join-Path $CursorRulesDir "$SkillName.mdc") -Force
108
+ Write-Host " Cursor (rule): $(Join-Path $CursorRulesDir "$SkillName.mdc")"
109
+ $srcSkill = Join-Path $CompiledDir "cursor\skills\$SkillName\SKILL.md"
110
+ $destDir = Join-Path $CursorSkillsDir $SkillName
111
+ Ensure-Directory -Path $destDir
112
+ Copy-Item -LiteralPath $srcSkill -Destination (Join-Path $destDir 'SKILL.md') -Force
113
+ Write-Host " Cursor (skill): $(Join-Path $destDir 'SKILL.md')"
114
+ }
115
+
116
+ function Install-Windsurf {
117
+ param([Parameter(Mandatory = $true)][string]$SkillName)
118
+ $srcRule = Join-Path $CompiledDir "windsurf\rules\$SkillName.md"
119
+ Ensure-Directory -Path $WindsurfRulesDir
120
+ Copy-Item -LiteralPath $srcRule -Destination (Join-Path $WindsurfRulesDir "$SkillName.md") -Force
121
+ Write-Host " Windsurf (rule): $(Join-Path $WindsurfRulesDir "$SkillName.md")"
122
+ $srcSkill = Join-Path $CompiledDir "windsurf\skills\$SkillName\SKILL.md"
123
+ $destDir = Join-Path $WindsurfSkillsDir $SkillName
124
+ Ensure-Directory -Path $destDir
125
+ Copy-Item -LiteralPath $srcSkill -Destination (Join-Path $destDir 'SKILL.md') -Force
126
+ Write-Host " Windsurf (skill): $(Join-Path $destDir 'SKILL.md')"
127
+ }
128
+
129
+ function Install-OpenCode {
130
+ param([Parameter(Mandatory = $true)][string]$SkillName)
131
+ $src = Join-Path $CompiledDir "opencode\$SkillName.md"
132
+ $destRoot = $OpenCodeAgentsDirs[0]
133
+ Ensure-Directory -Path $destRoot
134
+ Copy-Item -LiteralPath $src -Destination (Join-Path $destRoot "$SkillName.md") -Force
135
+ Write-Host " OpenCode: $(Join-Path $destRoot "$SkillName.md")"
136
+ }
137
+
138
+ function Install-Codex {
139
+ param([Parameter(Mandatory = $true)][string]$SkillName)
140
+ $src = Join-Path $CompiledDir "codex\$SkillName\SKILL.md"
141
+ $destDir = Join-Path $CodeXSkillsDir $SkillName
142
+ Ensure-Directory -Path $destDir
143
+ Copy-Item -LiteralPath $src -Destination (Join-Path $destDir 'SKILL.md') -Force
144
+ Write-Host " Codex: $(Join-Path $destDir 'SKILL.md')"
145
+ }
146
+
147
+ function Uninstall-Claude {
148
+ foreach ($skill in $Skills) {
149
+ $path = Join-Path $ClaudeSkillsDir $skill
150
+ if (Test-Path -LiteralPath $path) {
151
+ Remove-Item -LiteralPath $path -Recurse -Force
152
+ }
153
+ }
154
+ Write-Host ' Claude: removed'
155
+ }
156
+
157
+ function Uninstall-Cursor {
158
+ foreach ($skill in $Skills) {
159
+ $rulePath = Join-Path $CursorRulesDir "$skill.mdc"
160
+ $skillPath = Join-Path $CursorSkillsDir $skill
161
+ if (Test-Path -LiteralPath $rulePath) {
162
+ Remove-Item -LiteralPath $rulePath -Force
163
+ }
164
+ if (Test-Path -LiteralPath $skillPath) {
165
+ Remove-Item -LiteralPath $skillPath -Recurse -Force
166
+ }
167
+ }
168
+ Write-Host ' Cursor: removed'
169
+ }
170
+
171
+ function Uninstall-Windsurf {
172
+ foreach ($skill in $Skills) {
173
+ $rulePath = Join-Path $WindsurfRulesDir "$skill.md"
174
+ $skillPath = Join-Path $WindsurfSkillsDir $skill
175
+ if (Test-Path -LiteralPath $rulePath) {
176
+ Remove-Item -LiteralPath $rulePath -Force
177
+ }
178
+ if (Test-Path -LiteralPath $skillPath) {
179
+ Remove-Item -LiteralPath $skillPath -Recurse -Force
180
+ }
181
+ }
182
+ Write-Host ' Windsurf: removed'
183
+ }
184
+
185
+ function Uninstall-OpenCode {
186
+ foreach ($root in $OpenCodeAgentsDirs) {
187
+ foreach ($skill in $Skills) {
188
+ $path = Join-Path $root "$skill.md"
189
+ if (Test-Path -LiteralPath $path) {
190
+ Remove-Item -LiteralPath $path -Force
191
+ }
192
+ }
193
+ }
194
+ Write-Host ' OpenCode: removed'
195
+ }
196
+
197
+ function Uninstall-Codex {
198
+ foreach ($skill in $Skills) {
199
+ $path = Join-Path $CodeXSkillsDir $skill
200
+ if (Test-Path -LiteralPath $path) {
201
+ Remove-Item -LiteralPath $path -Recurse -Force
202
+ }
203
+ }
204
+ Write-Host ' Codex: removed'
205
+ }
206
+
207
+ function Get-DetectedEditors {
208
+ $detected = New-Object System.Collections.Generic.List[string]
209
+ if (Test-Path -LiteralPath (Join-Path $UserHome '.claude')) { $detected.Add('claude') }
210
+ if (Test-Path -LiteralPath (Join-Path $UserHome '.cursor')) { $detected.Add('cursor') }
211
+ if ((Test-Path -LiteralPath (Join-Path $UserHome '.windsurf')) -or (Test-Path -LiteralPath (Join-Path $UserHome '.codeium\windsurf'))) { $detected.Add('windsurf') }
212
+ foreach ($root in $OpenCodeAgentsDirs) {
213
+ $parent = Split-Path -Parent $root
214
+ if (Test-Path -LiteralPath $parent) {
215
+ $detected.Add('opencode')
216
+ break
217
+ }
218
+ }
219
+ if ($env:CODEX_HOME -or (Test-Path -LiteralPath $CodeXHomeDir)) { $detected.Add('codex') }
220
+ return $detected.ToArray()
221
+ }
222
+
223
+ $targets = New-Object System.Collections.Generic.List[string]
224
+ $doBuild = $true
225
+ $doUninstall = $false
226
+ $doCompileOnly = $false
227
+
228
+ for ($i = 0; $i -lt $args.Count; $i++) {
229
+ switch ($args[$i]) {
230
+ '--claude' { $targets.Add('claude'); continue }
231
+ '--cursor' { $targets.Add('cursor'); continue }
232
+ '--windsurf' { $targets.Add('windsurf'); continue }
233
+ '--opencode' { $targets.Add('opencode'); continue }
234
+ '--codex' { $targets.Add('codex'); continue }
235
+ '--all' {
236
+ $targets.Clear()
237
+ @('claude', 'cursor', 'windsurf', 'opencode', 'codex') | ForEach-Object { $targets.Add($_) }
238
+ continue
239
+ }
240
+ '--skills-only' { $doBuild = $false; continue }
241
+ '--uninstall' { $doUninstall = $true; continue }
242
+ '--compile-only' { $doCompileOnly = $true; continue }
243
+ '--help' { Show-Help; exit 0 }
244
+ '-h' { Show-Help; exit 0 }
245
+ default {
246
+ Write-Error "Unknown option: $($args[$i])`nRun: powershell -ExecutionPolicy Bypass -File .\install-local.ps1 --help"
247
+ }
248
+ }
249
+ }
250
+
251
+ if ($doCompileOnly) {
252
+ Write-Host '==> Delegating to compile.mjs...'
253
+ Invoke-Step -FilePath 'node' -Arguments @((Join-Path $SkillDir 'skill\build\compile.mjs'))
254
+ exit 0
255
+ }
256
+
257
+ if ($targets.Count -eq 0) {
258
+ (Get-DetectedEditors) | ForEach-Object { $targets.Add($_) }
259
+ }
260
+
261
+ if ($targets.Count -eq 0) {
262
+ throw 'ERROR: No supported tools detected. Use --claude, --cursor, --windsurf, --opencode, or --codex.'
263
+ }
264
+
265
+ Write-Host "==> $ProjectName setup"
266
+ Write-Host " Project: $SkillDir"
267
+ Write-Host " Targets: $($targets -join ' ')"
268
+ Write-Host ''
269
+
270
+ if ($doUninstall) {
271
+ Write-Host "==> Uninstalling $ProjectName"
272
+ Write-Host " Targets: $($targets -join ' ')"
273
+ Write-Host ''
274
+
275
+ foreach ($target in $targets) {
276
+ switch ($target) {
277
+ 'claude' { Uninstall-Claude }
278
+ 'cursor' { Uninstall-Cursor }
279
+ 'windsurf' { Uninstall-Windsurf }
280
+ 'opencode' { Uninstall-OpenCode }
281
+ 'codex' { Uninstall-Codex }
282
+ }
283
+ }
284
+
285
+ Write-Host "--> Removing $CliBinName CLI..."
286
+ Invoke-Step -FilePath 'npm' -Arguments @('unlink', $ProjectName) -AllowFailure
287
+ $skillmillCmd = Get-Command $CliBinName -ErrorAction SilentlyContinue
288
+ if ($skillmillCmd) {
289
+ Write-Host " WARNING: $CliBinName still in PATH at $($skillmillCmd.Source)"
290
+ }
291
+ else {
292
+ Write-Host " $CliBinName removed"
293
+ }
294
+
295
+ Write-Host ''
296
+ Write-Host '==> Done. Skills and CLI removed.'
297
+ exit 0
298
+ }
299
+
300
+ if ($doBuild) {
301
+ Write-Host '--> Installing dependencies...'
302
+ Invoke-Step -FilePath 'npm' -Arguments @('install')
303
+
304
+ Write-Host '--> Cleaning previous build...'
305
+ $distDir = Join-Path $SkillDir 'dist'
306
+ if (Test-Path -LiteralPath $distDir) {
307
+ Remove-Item -LiteralPath $distDir -Recurse -Force
308
+ }
309
+
310
+ Write-Host '--> Building TypeScript...'
311
+ Invoke-Step -FilePath 'npm' -Arguments @('run', 'build')
312
+
313
+ Write-Host '--> Compiling skills...'
314
+ Invoke-Step -FilePath 'npm' -Arguments @('run', 'compile')
315
+
316
+ Write-Host "--> Installing $CliBinName CLI globally..."
317
+ Invoke-Step -FilePath 'npm' -Arguments @('link')
318
+
319
+ $npmPrefix = (& npm prefix -g).Trim()
320
+ if ($LASTEXITCODE -ne 0) {
321
+ throw 'Failed to determine npm global prefix.'
322
+ }
323
+ $candidateBins = @(
324
+ Join-Path $npmPrefix "$CliBinName.cmd",
325
+ Join-Path $npmPrefix $CliBinName,
326
+ Join-Path (Join-Path $npmPrefix 'bin') "$CliBinName.cmd",
327
+ Join-Path (Join-Path $npmPrefix 'bin') $CliBinName
328
+ )
329
+ $cliPath = $candidateBins | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
330
+ if ($cliPath) {
331
+ Write-Host " $CliBinName: $cliPath"
332
+ $cliVersion = (& $cliPath --version 2>$null)
333
+ if ($LASTEXITCODE -eq 0 -and $cliVersion) {
334
+ Write-Host " version: $cliVersion"
335
+ }
336
+ else {
337
+ Write-Host ' version: unknown'
338
+ }
339
+ }
340
+ else {
341
+ Write-Host " WARNING: $CliBinName not found under npm global prefix after npm link."
342
+ Write-Host ' Try running: npm link'
343
+ }
344
+ }
345
+
346
+ Write-Host "--> Cleaning stale $ProjectName files..."
347
+ foreach ($target in $targets) {
348
+ switch ($target) {
349
+ 'claude' { Remove-ManagedFiles -Path $ClaudeSkillsDir }
350
+ 'cursor' {
351
+ Remove-ManagedFiles -Path $CursorRulesDir
352
+ Remove-ManagedFiles -Path $CursorSkillsDir
353
+ }
354
+ 'windsurf' {
355
+ Remove-ManagedFiles -Path $WindsurfRulesDir
356
+ Remove-ManagedFiles -Path $WindsurfSkillsDir
357
+ }
358
+ 'opencode' {
359
+ foreach ($root in $OpenCodeAgentsDirs) {
360
+ Remove-ManagedFiles -Path $root
361
+ }
362
+ }
363
+ 'codex' { Remove-ManagedFiles -Path $CodeXSkillsDir }
364
+ }
365
+ }
366
+
367
+ Write-Host '--> Installing skills...'
368
+ foreach ($skill in $Skills) {
369
+ Write-Host " ${skill}:"
370
+ foreach ($target in $targets) {
371
+ switch ($target) {
372
+ 'claude' { Install-Claude -SkillName $skill }
373
+ 'cursor' { Install-Cursor -SkillName $skill }
374
+ 'windsurf' { Install-Windsurf -SkillName $skill }
375
+ 'opencode' { Install-OpenCode -SkillName $skill }
376
+ 'codex' { Install-Codex -SkillName $skill }
377
+ }
378
+ }
379
+ }
380
+
381
+ Write-Host ''
382
+ Write-Host '==> Done.'
383
+ Write-Host ''
384
+ Write-Host "Skills installed for: $($targets -join ' ')"
385
+ Write-Host "CLI available as: $CliBinName"
package/install-local.sh CHANGED
File without changes
package/install.ps1 ADDED
@@ -0,0 +1,48 @@
1
+ $ErrorActionPreference = 'Stop'
2
+
3
+ $PackageName = if ($env:SKILLMILL_PACKAGE_NAME) { $env:SKILLMILL_PACKAGE_NAME } else { 'agentic-skill-mill' }
4
+ $PackageVersion = if ($env:SKILLMILL_PACKAGE_VERSION) { $env:SKILLMILL_PACKAGE_VERSION } else { 'latest' }
5
+
6
+ if ($args.Count -gt 0 -and ($args[0] -eq '--help' -or $args[0] -eq '-h')) {
7
+ Write-Host 'Usage: powershell -ExecutionPolicy Bypass -File .\install.ps1 [tool flags]'
8
+ Write-Host ''
9
+ Write-Host "This script installs ${PackageName}@${PackageVersion} globally and then"
10
+ Write-Host 'runs install-local.ps1 --skills-only with the flags you provide.'
11
+ Write-Host ''
12
+ Write-Host 'Examples:'
13
+ Write-Host ' powershell -ExecutionPolicy Bypass -File .\install.ps1 --all'
14
+ Write-Host ' powershell -ExecutionPolicy Bypass -File .\install.ps1 --cursor'
15
+ Write-Host ''
16
+ Write-Host 'Environment overrides:'
17
+ Write-Host ' SKILLMILL_PACKAGE_NAME Package to install (default: agentic-skill-mill)'
18
+ Write-Host ' SKILLMILL_PACKAGE_VERSION Version tag (default: latest)'
19
+ exit 0
20
+ }
21
+
22
+ Write-Host "==> Installing utility library: ${PackageName}@${PackageVersion}"
23
+ & npm install -g "${PackageName}@${PackageVersion}"
24
+ if ($LASTEXITCODE -ne 0) {
25
+ throw 'npm install -g failed.'
26
+ }
27
+
28
+ $globalNodeModules = (& npm root -g).Trim()
29
+ if ($LASTEXITCODE -ne 0 -or -not $globalNodeModules) {
30
+ throw 'Failed to resolve npm global node_modules directory.'
31
+ }
32
+
33
+ $packageDir = Join-Path $globalNodeModules $PackageName
34
+ $localInstaller = Join-Path $packageDir 'install-local.ps1'
35
+
36
+ if (-not (Test-Path -LiteralPath $localInstaller -PathType Leaf)) {
37
+ throw "ERROR: Could not find install-local.ps1 at: $localInstaller`nCheck the package 'files' list to ensure install-local.ps1 is published."
38
+ }
39
+
40
+ Write-Host '==> Installing skills via local installer (skills-only mode)'
41
+ & powershell -ExecutionPolicy Bypass -File $localInstaller --skills-only @args
42
+ if ($LASTEXITCODE -ne 0) {
43
+ throw 'The local PowerShell installer failed.'
44
+ }
45
+
46
+ Write-Host ''
47
+ Write-Host '==> Done.'
48
+ Write-Host 'Utility and skills installed.'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-skill-mill",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Forge and refine agent skill projects -- fragment-composed skills compiled to 7 IDE targets with a companion CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,7 +20,9 @@
20
20
  "skill",
21
21
  "README.md",
22
22
  "install.sh",
23
- "install-local.sh"
23
+ "install-local.sh",
24
+ "install.ps1",
25
+ "install-local.ps1"
24
26
  ],
25
27
  "scripts": {
26
28
  "build": "tsc -p tsconfig.build.json",
@@ -31,8 +33,12 @@
31
33
  "typecheck": "tsc --noEmit",
32
34
  "setup": "bash install-local.sh",
33
35
  "setup:all": "bash install-local.sh --all",
36
+ "setup:windows": "powershell -ExecutionPolicy Bypass -File ./install-local.ps1",
37
+ "setup:windows:all": "powershell -ExecutionPolicy Bypass -File ./install-local.ps1 --all",
34
38
  "install-skills": "bash install-local.sh --skills-only",
39
+ "install-skills:windows": "powershell -ExecutionPolicy Bypass -File ./install-local.ps1 --skills-only",
35
40
  "uninstall-skills": "bash install-local.sh --uninstall",
41
+ "uninstall-skills:windows": "powershell -ExecutionPolicy Bypass -File ./install-local.ps1 --uninstall",
36
42
  "compile": "node skill/build/compile.mjs",
37
43
  "compile:validate": "node skill/build/compile.mjs --validate",
38
44
  "compile:watch": "node skill/build/compile.mjs --watch"
@@ -13,6 +13,7 @@
13
13
  "source": "skills/agentic-skill-mill/agentic-skill-mill.md",
14
14
  "fragments": [
15
15
  "meta/architecture-overview.md",
16
+ "meta/distribution-and-ci.md",
16
17
  "meta/research-to-code.md",
17
18
  "meta/core-module-pattern.md",
18
19
  "meta/cli-command-pattern.md",
@@ -6,9 +6,15 @@ Skills (what to do) CLI Companion (tools to do it with)
6
6
  skill/fragments/*.md src/core/*.ts
7
7
  | |
8
8
  v v
9
- compiled/ (7 IDE formats) dist/ (npm link -> global CLI)
9
+ compiled/ (7 IDE formats) dist/ (npm -> npx or global CLI)
10
10
  | |
11
11
  +---------> Agent <----------+
12
+ ^
13
+ |
14
+ Distribution: npm publish + agenticskillmill.com
15
+ .github/workflows/release.yml (build, test, version, publish)
16
+ .github/workflows/deploy-pages.yml (site/ -> GitHub Pages)
17
+ site/install.sh (curl-friendly bootstrap)
12
18
  ```
13
19
 
14
20
  **Skills** are step-by-step runbooks in markdown with YAML frontmatter. They tell the agent *what* to do. Skills reference the CLI by name so the agent can invoke structured commands.
@@ -34,4 +40,7 @@ Skills (what to do) CLI Companion (tools to do it with)
34
40
  | Add a CLI command | `src/core/<name>.ts`, `src/cli/commands/<name>.ts`, `src/cli/index.ts`, `src/index.ts` |
35
41
  | Add a fragment | `skill/fragments/<category>/<name>.md`, `skill/build/manifest.json`, skill source |
36
42
  | Add a skill | `skill/skills/<name>/<name>.md`, `skill/build/manifest.json`, `install-local.sh` SKILLS array |
43
+ | Change installer behavior | `install.sh` (repo root) then copy to `site/install.sh` |
44
+ | Update the landing page | `site/index.html`, `site/style.css` |
45
+ | Change CI secrets or workflow | `.github/workflows/release.yml` or `deploy-pages.yml`, repo settings |
37
46
  | Rename the project | See the rename workflow |
@@ -0,0 +1,77 @@
1
+ ### Distribution model
2
+
3
+ The project is published to npmjs as a public package and hosted at `https://agenticskillmill.com`. There are three ways users consume it:
4
+
5
+ | Method | Command | Who uses it |
6
+ |--------|---------|-------------|
7
+ | Remote install (no clone) | `bash <(curl -fsSL https://agenticskillmill.com/install.sh) --all` | End users who want skills installed into their IDE tools |
8
+ | npx (no install) | `npx --yes agentic-skill-mill@latest <command>` | Users running CLI commands without global install |
9
+ | Local development | `git clone` then `bash install-local.sh --all` | Contributors working on the project itself |
10
+
11
+ ### Two installer scripts
12
+
13
+ **`install-local.sh`** is the full local installer. It runs from a cloned repo and handles:
14
+ - `npm install` + `npm run build` + `npm run compile`
15
+ - `npm link` to make `skillmill` available globally
16
+ - Copies compiled skill outputs to IDE-specific directories (~/.claude/skills, ~/.cursor/rules, etc.)
17
+ - Supports `--skills-only` (skip build, just copy), `--uninstall`, `--compile-only`, and per-tool flags (`--cursor`, `--claude`, etc.)
18
+ - Auto-detects installed tools when no flags are provided
19
+
20
+ **`install.sh`** is the remote bootstrap installer. It is hosted at `https://agenticskillmill.com/install.sh` (source: `site/install.sh`) and bundled in the npm package. It:
21
+ 1. Runs `npm install -g agentic-skill-mill@latest`
22
+ 2. Locates `install-local.sh` inside the globally installed package
23
+ 3. Delegates to `install-local.sh --skills-only` with the user's flags
24
+
25
+ Both scripts respect environment overrides `SKILLMILL_PACKAGE_NAME` and `SKILLMILL_PACKAGE_VERSION`.
26
+
27
+ ### npm package contents
28
+
29
+ The `files` array in `package.json` controls what ships to npm:
30
+
31
+ | Entry | Purpose |
32
+ |-------|---------|
33
+ | `dist` | Compiled TypeScript CLI and library |
34
+ | `compiled` | Pre-compiled skill outputs for all 7 IDE targets |
35
+ | `skill` | Skill sources, fragments, compiler, and manifest |
36
+ | `README.md` | Package documentation |
37
+ | `install.sh` | Bootstrap installer (bundled for remote delegation) |
38
+ | `install-local.sh` | Full local installer (used by bootstrap in --skills-only mode) |
39
+
40
+ The `bin` field maps `skillmill` to `dist/cli/index.js`, so `npx agentic-skill-mill` and global install both expose the `skillmill` command.
41
+
42
+ ### GitHub Actions workflows
43
+
44
+ **Release to npm** (`.github/workflows/release.yml`):
45
+ - Triggers on push to `main` or `workflow_dispatch`
46
+ - Skips runs caused by its own release commits (loop guard via `chore(release):` in commit message)
47
+ - Steps: `npm ci` -> `npm run build` -> `npm run test -- --passWithNoTests` -> `npm run compile` -> `npm run compile:validate` -> version bump -> `git push --follow-tags` -> `npm publish --access public`
48
+ - Version bump finds the next available patch tag to avoid collisions with existing tags
49
+ - Required secrets: `AGENT_TOKEN` (PAT with repo scope for push), `AGENT_NPM_TOKEN` (npm automation token for publish)
50
+
51
+ **Deploy GitHub Pages** (`.github/workflows/deploy-pages.yml`):
52
+ - Triggers on push to `main` when files in `site/` change, or `workflow_dispatch`
53
+ - Uploads `site/` directory as the Pages artifact
54
+ - Deploys to the `github-pages` environment at `agenticskillmill.com`
55
+
56
+ ### The `site/` directory
57
+
58
+ Static site served via GitHub Pages at `https://agenticskillmill.com`:
59
+
60
+ | File | Purpose |
61
+ |------|---------|
62
+ | `site/CNAME` | Custom domain binding |
63
+ | `site/index.html` | Landing page with architecture, CLI commands, and install instructions |
64
+ | `site/style.css` | Site styles |
65
+ | `site/install.sh` | Bootstrap installer served at `https://agenticskillmill.com/install.sh` |
66
+
67
+ When updating the bootstrap installer logic, edit `install.sh` at the repo root and copy it to `site/install.sh` to keep both in sync. The release workflow publishes the repo-root copy to npm; the Pages workflow serves the site copy to the domain.
68
+
69
+ ### Modifying distribution touchpoints
70
+
71
+ | Change | Files to update |
72
+ |--------|----------------|
73
+ | Add a new skill | `install-local.sh` SKILLS array, `skill/build/manifest.json` |
74
+ | Change package name | `package.json` name + bin, `install.sh` default, `site/install.sh` default, `install-local.sh` PROJECT_NAME + CLI_BIN_NAME + MANAGED_MARKER, `site/index.html`, README |
75
+ | Change bootstrap behavior | `install.sh` (repo root), then copy to `site/install.sh` |
76
+ | Add a GitHub Actions secret | Repo settings, document in README |
77
+ | Update domain | `site/CNAME`, README, skill source, architecture fragment |
@@ -22,17 +22,23 @@ When the project, skill, or CLI needs a new name, update all touchpoints in one
22
22
 
23
23
  4. **Compiler marker** (`skill/build/compile.mjs`) -- update the `MANAGED_BY` constant
24
24
 
25
- 5. **Installer** (`install-local.sh`) -- update `PROJECT_NAME`, `CLI_BIN_NAME`, `MANAGED_MARKER`, `SKILLS` array
25
+ 5. **Local installer** (`install-local.sh`) -- update `PROJECT_NAME`, `CLI_BIN_NAME`, `MANAGED_MARKER`, `SKILLS` array
26
26
 
27
- 6. **Package metadata** (`package.json`) -- update `name` and `bin` key
27
+ 6. **Bootstrap installer** (`install.sh`) -- update the default `PACKAGE_NAME`, then copy to `site/install.sh`
28
28
 
29
- 7. **CLI metadata** (`src/cli/index.ts`) -- update `.name()` and `.description()` calls
29
+ 7. **Package metadata** (`package.json`) -- update `name`, `bin` key, and `description`
30
30
 
31
- 8. **README** -- update title, CLI references, project layout example
31
+ 8. **CLI metadata** (`src/cli/index.ts`) -- update `.name()` and `.description()` calls
32
32
 
33
- 9. **Any docs** referencing the old name (translation-map, lessons-learned, etc.)
33
+ 9. **README** -- update title, CLI references, project layout, npx examples, install URLs
34
34
 
35
- 10. **Regenerate everything:**
35
+ 10. **Landing page** (`site/index.html`) -- update title, CLI references, install commands, GitHub link
36
+
37
+ 11. **GitHub Actions secrets** -- if the npm package name changed, verify `AGENT_NPM_TOKEN` still works for the new package scope
38
+
39
+ 12. **Any docs** referencing the old name (translation-map, lessons-learned, etc.)
40
+
41
+ 13. **Regenerate everything:**
36
42
  ```bash
37
43
  rm -rf compiled
38
44
  npm install # regenerates package-lock.json
@@ -45,7 +51,7 @@ When the project, skill, or CLI needs a new name, update all touchpoints in one
45
51
  After renaming, run this sweep to confirm no stale references remain:
46
52
 
47
53
  ```bash
48
- grep -r "<old-name>" --include="*.md" --include="*.json" --include="*.mjs" --include="*.ts" --include="*.sh" .
54
+ grep -r "<old-name>" --include="*.md" --include="*.json" --include="*.mjs" --include="*.ts" --include="*.sh" --include="*.html" --include="*.yml" .
49
55
  ```
50
56
 
51
57
  The grep should return zero results (excluding node_modules and dist).
@@ -15,6 +15,12 @@ Forge and refine skill projects that follow the skill-system-template architectu
15
15
 
16
16
  ---
17
17
 
18
+ ## Distribution and CI
19
+
20
+ {{include:meta/distribution-and-ci.md}}
21
+
22
+ ---
23
+
18
24
  ## Workflow
19
25
 
20
26
  ### Step 1: Understand the Goal