@gobing-ai/superskill 0.1.2 → 0.1.4
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 +236 -0
- package/dist/index.js +82389 -78094
- package/package.json +8 -6
- package/rubrics/agent.yaml +52 -0
- package/rubrics/command.yaml +52 -0
- package/rubrics/hook.yaml +42 -0
- package/rubrics/magent.yaml +52 -0
- package/rubrics/skill.yaml +53 -0
- package/templates/agent/default.md +8 -0
- package/templates/command/default.md +16 -0
- package/templates/hook/default.md +8 -0
- package/templates/magent/default.md +22 -0
- package/templates/skill/default.md +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# superskill
|
|
2
|
+
|
|
3
|
+
Multi-agent skill, command, subagent, hook, and MCP config distribution and authoring CLI — install a Claude Code plugin to any coding agent, and create/validate/evaluate/refine/evolve agent-facing content from the command line.
|
|
4
|
+
|
|
5
|
+
## Why
|
|
6
|
+
|
|
7
|
+
Coding agents (Claude Code, Codex, Pi, OpenCode, Antigravity, Hermes, omp) each use different config formats for skills, slash commands, subagents, hooks, and MCP servers. Maintaining hand-synced copies across agents is error-prone and doesn't scale.
|
|
8
|
+
|
|
9
|
+
**superskill** solves this with two layers:
|
|
10
|
+
|
|
11
|
+
1. **Distribution** — `superskill install` takes a Claude Code plugin as the single source of truth and distributes it to any target agent, using [rulesync](https://www.npmjs.com/package/rulesync) as the format-conversion engine.
|
|
12
|
+
2. **Authoring + quality** — Five type commands (`agent`, `skill`, `command`, `hook`, `magent`) provide scaffold → validate → evaluate → refine → evolve workflows with persistent quality data in SQLite.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm i -g @gobing-ai/superskill
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
From source (contributors):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
proto use # install pinned tool versions (Bun, etc.)
|
|
24
|
+
bun install
|
|
25
|
+
bun run build
|
|
26
|
+
cd apps/cli && bun link
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Requires [Bun](https://bun.sh/) ≥ 1.3.14. See [`docs/help/installation.md`](docs/help/installation.md) for details and troubleshooting.
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Distribute a plugin to every supported target
|
|
35
|
+
superskill install my-plugin --targets all
|
|
36
|
+
|
|
37
|
+
# Author a skill: scaffold → validate → evaluate → refine
|
|
38
|
+
superskill skill scaffold my-skill --description "Deploy a Cloudflare Worker"
|
|
39
|
+
superskill skill validate my-skill
|
|
40
|
+
superskill skill evaluate my-skill --save
|
|
41
|
+
superskill skill refine my-skill --auto
|
|
42
|
+
|
|
43
|
+
# Package a skill for distribution, or merge skills
|
|
44
|
+
superskill skill package my-skill
|
|
45
|
+
superskill skill migrate ./source-skill-1 ./source-skill-2 ./dest-skill
|
|
46
|
+
|
|
47
|
+
# Emit a hook to a single target agent
|
|
48
|
+
superskill hook emit my-hook --target pi
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Full walkthrough: [`docs/help/quick_start.md`](docs/help/quick_start.md).
|
|
52
|
+
|
|
53
|
+
## Commands
|
|
54
|
+
|
|
55
|
+
| Command | What it does | Docs |
|
|
56
|
+
|---------|--------------|------|
|
|
57
|
+
| `install` | Distribute a plugin's skills, commands, subagents, hooks, MCP to target agents | [`cmd_install.md`](docs/help/cmd_install.md) |
|
|
58
|
+
| `agent` | Manage subagent definitions (scaffold/validate/evaluate/refine/evolve) | [`cmd_agent.md`](docs/help/cmd_agent.md) |
|
|
59
|
+
| `skill` | Manage skill definitions (+ `package`, `migrate`) | [`cmd_skill.md`](docs/help/cmd_skill.md) |
|
|
60
|
+
| `command` | Manage slash command definitions | [`cmd_command.md`](docs/help/cmd_command.md) |
|
|
61
|
+
| `hook` | Manage hook definitions (+ `emit`) | [`cmd_hook.md`](docs/help/cmd_hook.md) |
|
|
62
|
+
| `magent` | Manage main-agent configurations | [`cmd_magent.md`](docs/help/cmd_magent.md) |
|
|
63
|
+
|
|
64
|
+
The five type commands share a common five-operation lifecycle (scaffold → validate → evaluate → refine → evolve) with type-specific quality dimensions and rubrics. Each command doc includes usage, architecture diagrams, sequence diagrams, and source-file references.
|
|
65
|
+
|
|
66
|
+
**Help docs index:** [`docs/help/index.md`](docs/help/index.md)
|
|
67
|
+
|
|
68
|
+
### Operation lifecycle
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
scaffold → validate → evaluate → refine → evolve
|
|
72
|
+
↑ │
|
|
73
|
+
└─── longitudinal ───────┘
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
| Operation | Purpose | Quality gate |
|
|
77
|
+
|-----------|---------|-------------|
|
|
78
|
+
| `scaffold` | Create new entity from template | Structure validation |
|
|
79
|
+
| `validate` | Check structure and frontmatter | Pre-check spur rules |
|
|
80
|
+
| `evaluate` | Score quality across dimensions | Rubric-weighted scoring (Scorer persona) |
|
|
81
|
+
| `refine` | Apply low-risk fixes automatically | Fix classification (auto-apply / suggest / flag) |
|
|
82
|
+
| `evolve` | Propose longitudinal improvements | Double-loop gate (Author → Skeptic → Judge) |
|
|
83
|
+
|
|
84
|
+
Extra operations by type:
|
|
85
|
+
|
|
86
|
+
| Type | Extra operation | What it does |
|
|
87
|
+
|------|----------------|-------------|
|
|
88
|
+
| `skill` | `package` | Bundle a skill + companion files into a distributable archive |
|
|
89
|
+
| `skill` | `migrate` | Merge one or more source skills into a destination skill |
|
|
90
|
+
| `hook` | `emit` | Emit a hook definition to a single target agent |
|
|
91
|
+
|
|
92
|
+
## Quality system
|
|
93
|
+
|
|
94
|
+
### Rubric-driven evaluation
|
|
95
|
+
|
|
96
|
+
`evaluate` scores entities across type-specific quality dimensions using YAML rubrics. Ships with 5 package-default rubrics (`agent`, `skill`, `command`, `hook`, `magent`) — load custom ones with `--rubric <path>`.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Heuristic evaluation (built-in checks)
|
|
100
|
+
superskill skill evaluate my-skill --save
|
|
101
|
+
|
|
102
|
+
# Rubric evaluation — emit scoring brief for an external model
|
|
103
|
+
superskill skill evaluate my-skill --rubric --json > scoring-brief.json
|
|
104
|
+
|
|
105
|
+
# Ingest scored result and persist
|
|
106
|
+
superskill skill evaluate my-skill --ingest scored-result.json --save
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Two-call seam (Scorer / Author / Skeptic / Judge)
|
|
110
|
+
|
|
111
|
+
The CLI never scores or generates inline. Quality operations drive four personas via a two-call seam — the CLI emits envelopes, personas process offline, the CLI ingests results.
|
|
112
|
+
|
|
113
|
+
| Persona | Role | Input | Output |
|
|
114
|
+
|---------|------|-------|--------|
|
|
115
|
+
| **Scorer** | Rubric judge | Envelope from `evaluate --rubric --json` | `{ rubric_version, dimensions: { score, note } }` |
|
|
116
|
+
| **Author** | Rewriter | Envelope from `evolve --propose-only --json` | `ProposedChange[]` with `anchor_hash` |
|
|
117
|
+
| **Skeptic** | Refuter | Proposal + verbatim goal anchor | `{ ok, violations[] }` |
|
|
118
|
+
| **Judge** | Tournament selector | Multiple candidate proposals | Winning proposal ID |
|
|
119
|
+
|
|
120
|
+
### Double-loop gate for `evolve`
|
|
121
|
+
|
|
122
|
+
`evolve --ingest <file>` applies authored proposals through a four-gate quality control:
|
|
123
|
+
|
|
124
|
+
1. **Deterministic validate** — 0 errors required
|
|
125
|
+
2. **Δ-margin** — score must improve by ≥ `--margin` (default 0.05)
|
|
126
|
+
3. **Anchor hash** — goal anchor unchanged (hash-gated)
|
|
127
|
+
4. **Skeptic review** — regressive merges rejected and restored
|
|
128
|
+
|
|
129
|
+
Version-aware trends partition by `rubric_version`, preventing false regression signals when rubrics are updated.
|
|
130
|
+
|
|
131
|
+
## Supported targets
|
|
132
|
+
|
|
133
|
+
| Target | Engine | Output location |
|
|
134
|
+
|--------|--------|-----------------|
|
|
135
|
+
| `claude` | Direct `claude plugin install` | Claude Code marketplace |
|
|
136
|
+
| `codex` | rulesync | `~/.agents/skills/` |
|
|
137
|
+
| `pi` | rulesync + superskill hook shim | Pi native format |
|
|
138
|
+
| `omp` | superskill copy (via `pi` surrogate) | `~/.omp/agent/skills/` |
|
|
139
|
+
| `opencode` | rulesync | `~/.agents/skills/` |
|
|
140
|
+
| `antigravity-cli` | rulesync | `~/.gemini/antigravity-cli/skills/` |
|
|
141
|
+
| `antigravity-ide` | rulesync | `~/.gemini/config/skills/` |
|
|
142
|
+
| `hermes` | superskill copy (via `opencode` surrogate) | `~/.hermes/skills/` |
|
|
143
|
+
|
|
144
|
+
Since ts-ai-runner 0.3.21, `omp`, `hermes`, and `antigravity-cli` are canonical `AgentName` values — slash-command dialect translation maps 1:1. Only `antigravity-ide` still bridges through `opencode`.
|
|
145
|
+
|
|
146
|
+
## Bundled `cc` plugin
|
|
147
|
+
|
|
148
|
+
superskill ships with a Claude Code plugin at [`plugins/cc/`](plugins/cc/) (marketplace name: `cc`, version `0.1.1`) that demonstrates the full authoring lifecycle and provides the meta-agent skills the expert personas reference:
|
|
149
|
+
|
|
150
|
+
| Entity | Count | Purpose |
|
|
151
|
+
|--------|-------|---------|
|
|
152
|
+
| **skills** | 6 | `anti-hallucination`, `cc-agents`, `cc-commands`, `cc-hooks`, `cc-magents`, `cc-skills` — domain knowledge for each entity type |
|
|
153
|
+
| **commands** | 16 | 4 operations × 4 entity types — thin slash-command wrappers that delegate to skills |
|
|
154
|
+
| **agents** | 5 | `expert-agent`, `expert-command`, `expert-hook`, `expert-magent`, `expert-skill` — specialist subagents that route to skills |
|
|
155
|
+
| **hooks** | 1 | `Stop` hook running the anti-hallucination guard |
|
|
156
|
+
| **scripts** | 3 | `ah_guard.ts`, `validate_response.ts`, `logger.ts` — deterministic enforcement for the anti-hallucination protocol |
|
|
157
|
+
|
|
158
|
+
The plugin follows a three-tier delegation pattern: **Commands/Agents → Skills → `superskill` CLI**. See [`plugins/cc/README.md`](plugins/cc/README.md) for the full entity design and relationship diagram.
|
|
159
|
+
|
|
160
|
+
## Development
|
|
161
|
+
|
|
162
|
+
### Stack
|
|
163
|
+
|
|
164
|
+
| Concern | Tool |
|
|
165
|
+
|---------|------|
|
|
166
|
+
| Runtime / package manager | Bun 1.3.14 |
|
|
167
|
+
| Language | TypeScript 5.x |
|
|
168
|
+
| CLI framework | Commander.js |
|
|
169
|
+
| Lint + format | Biome 2.4.16 |
|
|
170
|
+
| Test runner | `bun:test` |
|
|
171
|
+
| Format conversion | rulesync (npm) |
|
|
172
|
+
| Quality store | SQLite via `@gobing-ai/ts-db` |
|
|
173
|
+
| Constraint rules | Spur (`spur rule run`) |
|
|
174
|
+
| Git hooks | Lefthook |
|
|
175
|
+
| Conventional commits | cocogitto (`cog`) |
|
|
176
|
+
| Tool versions | proto (`.prototools`) |
|
|
177
|
+
|
|
178
|
+
### Workspace layout
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
apps/cli/ # Commander-based CLI entry (the binary); imports @gobing-ai/superskill-core
|
|
182
|
+
packages/core/ # reusable domain logic and no-app operation APIs
|
|
183
|
+
tooling/typescript/ # shared tsconfig presets
|
|
184
|
+
plugins/cc/ # bundled Claude Code plugin
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Commands
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
bun run lint # biome check + typecheck
|
|
191
|
+
bun run format # biome check --write (autofix)
|
|
192
|
+
bun run autofix # format then typecheck
|
|
193
|
+
bun run test # bun test with coverage
|
|
194
|
+
bun run build # compile to standalone binary
|
|
195
|
+
bun run dev # watch mode
|
|
196
|
+
bun run check # lint + test (CI gate)
|
|
197
|
+
bun run spur-check # lint + pre-check rules + test + post-check rules
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Verification gate
|
|
201
|
+
|
|
202
|
+
All must pass before a change is considered done:
|
|
203
|
+
|
|
204
|
+
1. `bun run lint` — Biome and typecheck clean.
|
|
205
|
+
2. `bun run test` — all tests pass, no `.skip` or commented-out tests. Coverage ≥ 90% lines + functions.
|
|
206
|
+
3. `bun run build` — standalone binary compiles.
|
|
207
|
+
4. `git status` — only intentional changes.
|
|
208
|
+
5. `bun run spur-check` — pre-check rules (22) + post-check rules (coverage-gate + tsdoc-export) all green.
|
|
209
|
+
|
|
210
|
+
### Code style
|
|
211
|
+
|
|
212
|
+
Enforced by [biome.json](biome.json): 4-space indent, 120-char width, single quotes, semicolons, trailing commas. `interface` for object shapes, `type` for unions. `any` is an error. Workspace imports use `@<scope>/*` aliases.
|
|
213
|
+
|
|
214
|
+
### Commits
|
|
215
|
+
|
|
216
|
+
[Conventional Commits](https://www.conventionalcommits.org/) enforced by cocogitto: `feat:`, `fix:`, `docs:`, `chore:`, etc.
|
|
217
|
+
|
|
218
|
+
## Documentation
|
|
219
|
+
|
|
220
|
+
**Help docs** (usage + implementation diagrams): [`docs/help/`](docs/help/index.md)
|
|
221
|
+
|
|
222
|
+
**Authoritative project docs:**
|
|
223
|
+
|
|
224
|
+
| Doc | Covers |
|
|
225
|
+
|-----|--------|
|
|
226
|
+
| [00_ADR](docs/00_ADR.md) | Architecture decisions (authoritative) |
|
|
227
|
+
| [01_PRD](docs/01_PRD.md) | Product scope (authoritative) |
|
|
228
|
+
| [02_ROADMAP](docs/02_ROADMAP.md) | Phase sequencing |
|
|
229
|
+
| [03_ARCHITECTURE](docs/03_ARCHITECTURE.md) | Module boundaries, data flow, invariants |
|
|
230
|
+
| [04_DESIGN](docs/04_DESIGN.md) | CLI surface — commands, flags, schemas |
|
|
231
|
+
| [05_FEATURES](docs/05_FEATURES.md) | Feature status tracker |
|
|
232
|
+
| [99_PROJECT_CONSTITUTION](docs/99_PROJECT_CONSTITUTION.md) | Process rules for maintaining docs |
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
[Apache 2.0](LICENSE)
|