@skilldeck/cli 0.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.
- package/LICENSE +21 -0
- package/README.md +41 -0
- package/bin/skilldeck.mjs +61 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kitasid
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @skilldeck/cli
|
|
2
|
+
|
|
3
|
+
Install SkillDeck skill packs into your coding agent with one command.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx @skilldeck/cli add cartograph disciplines
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
| Pack | What it does |
|
|
10
|
+
|---|---|
|
|
11
|
+
| [`cartograph`](https://www.npmjs.com/package/@skilldeck/cartograph) | Maps a codebase into a knowledge graph your agent queries instead of grepping |
|
|
12
|
+
| [`disciplines`](https://www.npmjs.com/package/@skilldeck/disciplines) | Nine process skills (brainstorm, plan, test-first, debug, verify, review, finish) plus a SessionStart hook |
|
|
13
|
+
|
|
14
|
+
## Commands
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
skilldeck add <pack...> # install (use "all" for every pack)
|
|
18
|
+
skilldeck remove <pack...> # uninstall exactly what was installed
|
|
19
|
+
skilldeck list # available packs and where they're installed
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
| Flag | Meaning |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `-a, --agent <name>` | `claude` (default), `codex`, `agents`, `all`, or a comma list |
|
|
27
|
+
| `-p, --project` | Install into the current project (`./.claude/skills`, ...) instead of your home folder |
|
|
28
|
+
| `-f, --force` | Replace skill folders SkillDeck didn't install |
|
|
29
|
+
| `--dry-run` | Show what would happen without writing anything |
|
|
30
|
+
|
|
31
|
+
## Where files go
|
|
32
|
+
|
|
33
|
+
| Agent | User scope | Project scope (`--project`) |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Claude Code | `~/.claude/skills/` + hook in `~/.claude/settings.json` | `.claude/skills/` + hook in `.claude/settings.json` |
|
|
36
|
+
| Codex | `~/.codex/skills/` | `.codex/skills/` |
|
|
37
|
+
| Other SKILL.md agents | `~/.agents/skills/` | `.agents/skills/` |
|
|
38
|
+
|
|
39
|
+
Each skills folder gets a `.skilldeck.json` manifest, so `remove` deletes only what SkillDeck added. Your `settings.json` is backed up to `settings.json.bak` before every change.
|
|
40
|
+
|
|
41
|
+
Requires Node 20+. MIT licensed.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from 'node:fs'
|
|
3
|
+
import { install, parse, printInstall, printStatus, printUninstall, status, toOpts, uninstall, OPTIONS_HELP, bold, dim, red } from '@skilldeck/core'
|
|
4
|
+
import cartograph from '@skilldeck/cartograph'
|
|
5
|
+
import disciplines from '@skilldeck/disciplines'
|
|
6
|
+
|
|
7
|
+
const PACKS = { cartograph, disciplines }
|
|
8
|
+
const { version } = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8'))
|
|
9
|
+
|
|
10
|
+
const HELP = `${bold('skilldeck')} ${version}: skill packs for coding agents
|
|
11
|
+
|
|
12
|
+
Usage:
|
|
13
|
+
npx @skilldeck/cli add <pack...> [options] install packs (e.g. add cartograph disciplines)
|
|
14
|
+
npx @skilldeck/cli remove <pack...> [options] uninstall packs
|
|
15
|
+
npx @skilldeck/cli list available packs and where they're installed
|
|
16
|
+
|
|
17
|
+
Packs:
|
|
18
|
+
${Object.values(PACKS)
|
|
19
|
+
.map((p) => ` ${p.name.padEnd(13)} ${dim(p.description)}`)
|
|
20
|
+
.join('\n')}
|
|
21
|
+
|
|
22
|
+
${OPTIONS_HELP}
|
|
23
|
+
|
|
24
|
+
Examples:
|
|
25
|
+
npx @skilldeck/cli add cartograph disciplines
|
|
26
|
+
npx @skilldeck/cli add cartograph --agent all --project
|
|
27
|
+
npx @skilldeck/cli remove disciplines`
|
|
28
|
+
|
|
29
|
+
function resolvePacks(names) {
|
|
30
|
+
if (names.length === 0) throw new Error('Name at least one pack, e.g. `skilldeck add cartograph`.')
|
|
31
|
+
const list = names.includes('all') ? Object.keys(PACKS) : names
|
|
32
|
+
const unknown = list.filter((n) => !PACKS[n])
|
|
33
|
+
if (unknown.length) throw new Error(`Unknown pack: ${unknown.join(', ')}. Available: ${Object.keys(PACKS).join(', ')}`)
|
|
34
|
+
return list.map((n) => PACKS[n])
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
const { values, positionals } = parse(process.argv.slice(2))
|
|
39
|
+
const [cmd, ...names] = positionals
|
|
40
|
+
const opts = toOpts(values)
|
|
41
|
+
|
|
42
|
+
if (values.version) console.log(version)
|
|
43
|
+
else if (values.help || !cmd || cmd === 'help') console.log(HELP)
|
|
44
|
+
else if (cmd === 'add' || cmd === 'install' || cmd === 'i') {
|
|
45
|
+
const packs = resolvePacks(names)
|
|
46
|
+
for (const p of packs) printInstall(p, install(p, opts))
|
|
47
|
+
if (!opts.dryRun && packs.some((p) => p.hook)) console.log(dim('\nRestart your agent (or run /clear in Claude Code) to load session hooks.'))
|
|
48
|
+
} else if (cmd === 'remove' || cmd === 'uninstall' || cmd === 'rm') {
|
|
49
|
+
for (const p of resolvePacks(names)) printUninstall(p.name, uninstall(p.name, opts))
|
|
50
|
+
} else if (cmd === 'list' || cmd === 'ls' || cmd === 'status') {
|
|
51
|
+
console.log(bold('Available'))
|
|
52
|
+
for (const p of Object.values(PACKS)) console.log(` ${p.name}@${p.version} ${dim(`${p.skills.length} skill${p.skills.length === 1 ? '' : 's'}${p.hook ? ' + hook' : ''}`)}`)
|
|
53
|
+
console.log(bold('\nInstalled'))
|
|
54
|
+
printStatus(status(opts))
|
|
55
|
+
} else {
|
|
56
|
+
throw new Error(`Unknown command "${cmd}". Run \`skilldeck --help\`.`)
|
|
57
|
+
}
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.error(red('✗ ') + e.message)
|
|
60
|
+
process.exitCode = 1
|
|
61
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@skilldeck/cli",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Install SkillDeck skill packs (cartograph, disciplines) into Claude Code, Codex and other SKILL.md agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"skilldeck": "bin/skilldeck.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@skilldeck/core": "^0.1.0",
|
|
16
|
+
"@skilldeck/cartograph": "^0.1.0",
|
|
17
|
+
"@skilldeck/disciplines": "^0.1.0"
|
|
18
|
+
},
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"keywords": [
|
|
24
|
+
"claude-code",
|
|
25
|
+
"agent-skills",
|
|
26
|
+
"skill-md",
|
|
27
|
+
"cli"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"author": "kitasid"
|
|
33
|
+
}
|