super-skill-cli 0.9.2__tar.gz

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 (68) hide show
  1. super_skill_cli-0.9.2/.claude-plugin/marketplace.json +20 -0
  2. super_skill_cli-0.9.2/.claude-plugin/plugin.json +12 -0
  3. super_skill_cli-0.9.2/.gitignore +45 -0
  4. super_skill_cli-0.9.2/CHANGELOG.md +170 -0
  5. super_skill_cli-0.9.2/LICENSE +21 -0
  6. super_skill_cli-0.9.2/PKG-INFO +213 -0
  7. super_skill_cli-0.9.2/README.md +192 -0
  8. super_skill_cli-0.9.2/README.zh-CN.md +169 -0
  9. super_skill_cli-0.9.2/codex/README.md +43 -0
  10. super_skill_cli-0.9.2/codex/install.sh +23 -0
  11. super_skill_cli-0.9.2/codex/skills/super-skill/SKILL.md +38 -0
  12. super_skill_cli-0.9.2/commands/candidates.md +11 -0
  13. super_skill_cli-0.9.2/commands/doctor.md +10 -0
  14. super_skill_cli-0.9.2/commands/mine.md +10 -0
  15. super_skill_cli-0.9.2/commands/seed.md +9 -0
  16. super_skill_cli-0.9.2/commands/status.md +9 -0
  17. super_skill_cli-0.9.2/evals/test-fix-family/README.md +55 -0
  18. super_skill_cli-0.9.2/evals/test-fix-family/cases/case1/PROMPT.md +5 -0
  19. super_skill_cli-0.9.2/evals/test-fix-family/cases/case1/broken.py +6 -0
  20. super_skill_cli-0.9.2/evals/test-fix-family/cases/case1/fixed.py +6 -0
  21. super_skill_cli-0.9.2/evals/test-fix-family/cases/case1/verify_test.py +8 -0
  22. super_skill_cli-0.9.2/evals/test-fix-family/cases/case2/PROMPT.md +5 -0
  23. super_skill_cli-0.9.2/evals/test-fix-family/cases/case2/broken.py +5 -0
  24. super_skill_cli-0.9.2/evals/test-fix-family/cases/case2/fixed.py +5 -0
  25. super_skill_cli-0.9.2/evals/test-fix-family/cases/case2/verify_test.py +8 -0
  26. super_skill_cli-0.9.2/evals/test-fix-family/cases/case3/PROMPT.md +5 -0
  27. super_skill_cli-0.9.2/evals/test-fix-family/cases/case3/broken.py +11 -0
  28. super_skill_cli-0.9.2/evals/test-fix-family/cases/case3/fixed.py +11 -0
  29. super_skill_cli-0.9.2/evals/test-fix-family/cases/case3/verify_test.py +7 -0
  30. super_skill_cli-0.9.2/evals/test-fix-family/gate2_report.py +96 -0
  31. super_skill_cli-0.9.2/evals/test-fix-family/grader.py +48 -0
  32. super_skill_cli-0.9.2/evals/test-fix-family/handwritten/SKILL.md +38 -0
  33. super_skill_cli-0.9.2/evals/test-fix-family/results.template.json +17 -0
  34. super_skill_cli-0.9.2/hooks/hooks.json +23 -0
  35. super_skill_cli-0.9.2/pyproject.toml +62 -0
  36. super_skill_cli-0.9.2/skills/super-skill/SKILL.md +45 -0
  37. super_skill_cli-0.9.2/super_skill/__init__.py +9 -0
  38. super_skill_cli-0.9.2/super_skill/candidate.py +213 -0
  39. super_skill_cli-0.9.2/super_skill/capture.py +76 -0
  40. super_skill_cli-0.9.2/super_skill/cli.py +381 -0
  41. super_skill_cli-0.9.2/super_skill/config.py +25 -0
  42. super_skill_cli-0.9.2/super_skill/doctor.py +119 -0
  43. super_skill_cli-0.9.2/super_skill/evallite.py +93 -0
  44. super_skill_cli-0.9.2/super_skill/gate.py +102 -0
  45. super_skill_cli-0.9.2/super_skill/hooks.py +33 -0
  46. super_skill_cli-0.9.2/super_skill/mine.py +101 -0
  47. super_skill_cli-0.9.2/super_skill/minestate.py +57 -0
  48. super_skill_cli-0.9.2/super_skill/redact.py +95 -0
  49. super_skill_cli-0.9.2/super_skill/registry.py +221 -0
  50. super_skill_cli-0.9.2/super_skill/schemas.py +207 -0
  51. super_skill_cli-0.9.2/super_skill/seed.py +75 -0
  52. super_skill_cli-0.9.2/super_skill/skillmd.py +61 -0
  53. super_skill_cli-0.9.2/tests/test_candidate.py +153 -0
  54. super_skill_cli-0.9.2/tests/test_capture.py +110 -0
  55. super_skill_cli-0.9.2/tests/test_cli.py +321 -0
  56. super_skill_cli-0.9.2/tests/test_codex_package.py +57 -0
  57. super_skill_cli-0.9.2/tests/test_doctor.py +106 -0
  58. super_skill_cli-0.9.2/tests/test_evallite.py +41 -0
  59. super_skill_cli-0.9.2/tests/test_gate.py +54 -0
  60. super_skill_cli-0.9.2/tests/test_gate2_harness.py +77 -0
  61. super_skill_cli-0.9.2/tests/test_hooks.py +35 -0
  62. super_skill_cli-0.9.2/tests/test_minestate.py +48 -0
  63. super_skill_cli-0.9.2/tests/test_plugin_manifest.py +73 -0
  64. super_skill_cli-0.9.2/tests/test_redact.py +71 -0
  65. super_skill_cli-0.9.2/tests/test_registry.py +85 -0
  66. super_skill_cli-0.9.2/tests/test_seed.py +66 -0
  67. super_skill_cli-0.9.2/tests/test_skillmd.py +46 -0
  68. super_skill_cli-0.9.2/uv.lock +534 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "super-skill",
3
+ "owner": {
4
+ "name": "sdsrss",
5
+ "email": "sammuaicode@gmail.com"
6
+ },
7
+ "metadata": {
8
+ "description": "super-skill: personal Agent-Skill package manager (versioned registry, rollback, mining).",
9
+ "version": "0.9.2"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "super-skill",
14
+ "source": "./",
15
+ "description": "Git-backed versioned registry for your Claude Code skills: seed import, explain/provenance, one-command rollback, integrity doctor, and opportunity mining. Wraps the `super-skill` CLI (pip/uv installable as super-skill-cli).",
16
+ "version": "0.9.2",
17
+ "category": "development"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "super-skill",
3
+ "version": "0.9.2",
4
+ "description": "Personal Agent-Skill package manager: a git-backed, versioned registry for your Claude Code skills with seed import, provenance/explain, one-command rollback, integrity doctor, and opportunity mining from captured sessions.",
5
+ "author": {
6
+ "name": "sdsrss",
7
+ "url": "https://github.com/sdsrss"
8
+ },
9
+ "repository": "https://github.com/sdsrss/super-skill",
10
+ "license": "MIT",
11
+ "keywords": ["claude-code", "agent-skills", "skill-manager", "registry", "package-manager"]
12
+ }
@@ -0,0 +1,45 @@
1
+ # Project-local docs & AI assistant config (not committed)
2
+ docs/
3
+ CLAUDE.md
4
+ .claude/
5
+ .code-graph/
6
+ tasks/
7
+ MEMORY.md
8
+
9
+ # Python
10
+ __pycache__/
11
+ *.py[cod]
12
+ *.egg-info/
13
+ build/
14
+ dist/
15
+ .venv/
16
+ venv/
17
+ .python-version
18
+ .uv-cache/
19
+ .pytest_cache/
20
+ .mypy_cache/
21
+ .ruff_cache/
22
+ .coverage
23
+ htmlcov/
24
+
25
+ # Environment & secrets
26
+ .env
27
+ .env.*
28
+ *.local
29
+
30
+ # IDE / editor
31
+ .idea/
32
+ .vscode/
33
+ *.swp
34
+ *.swo
35
+
36
+ # OS
37
+ .DS_Store
38
+ Thumbs.db
39
+
40
+ # Node (tooling, if any)
41
+ node_modules/
42
+
43
+ # Logs & temp
44
+ *.log
45
+ tmp/
@@ -0,0 +1,170 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. Format follows
4
+ [Keep a Changelog](https://keepachangelog.com/); this project uses semantic versioning.
5
+
6
+ ## [0.9.2] - 2026-07-12
7
+
8
+ ### Changed
9
+ - **README rewritten and aligned to shipped features** — bilingual (English
10
+ default + `README.zh-CN.md`), with install (Claude Code plugin / CLI / Codex),
11
+ a feature table, a differentiation comparison, usage, configuration, an honest
12
+ scope note, and an FAQ. Corrected the write-path description: the host skills
13
+ directory is written by `approve` / `rollback` / `doctor --fix` (`seed` is
14
+ read-only on the host). Added a GitHub repo description and topics.
15
+
16
+ ## [0.9.1] - 2026-07-12
17
+
18
+ ### Fixed
19
+ - **`codex/install.sh` now ships executable** — it was committed with mode 100644,
20
+ so a fresh clone could only run it as `bash codex/install.sh`, not `./codex/install.sh`
21
+ as the README shows. Set the git exec bit (100755). The guard test now checks the
22
+ git-tracked mode (`git ls-files --stage`) instead of the working-tree mode, which
23
+ some filesystems report as executable regardless.
24
+
25
+ ## [0.9.0] - 2026-07-12
26
+
27
+ ### Added
28
+ - **Codex install package** (`codex/`) — Codex has no marketplace; it reads
29
+ open-standard `SKILL.md` from `~/.agents/skills`. Ships a portable `super-skill`
30
+ meta-skill (name+description only, no Claude-specific slash commands) plus an
31
+ idempotent `codex/install.sh` that drops it into `~/.agents/skills/super-skill/`,
32
+ and `codex/README.md`. The CLI is host-agnostic — Codex users `pipx install
33
+ super-skill-cli` the same way and point it at the Codex dir with
34
+ `SUPER_SKILL_HOST_SKILLS=~/.agents/skills`.
35
+
36
+ ### Notes
37
+ - No `agents/openai.yaml` is shipped — that Codex host-extension's exact schema is
38
+ Codex-version-specific; the package ships only the open-standard SKILL.md every
39
+ Codex version reads. A Codex Target Adapter inside the CLI (docs/01 FR-PUB-2)
40
+ remains P1. PyPI publish is still a separate credentialed step.
41
+
42
+ ## [0.8.0] - 2026-07-12
43
+
44
+ ### Added
45
+ - **Claude Code plugin** — install via `/plugin marketplace add sdsrss/super-skill`
46
+ then `/plugin install super-skill`. Ships slash commands (`/super-skill:status`,
47
+ `:mine`, `:doctor`, `:candidates`, `:seed`), a `super-skill` meta-skill Claude
48
+ invokes when you ask to version/explain/roll back a skill, and `hooks/hooks.json`
49
+ wiring the six host events to `super-skill capture`. If your Claude Code build
50
+ doesn't auto-load plugin hooks, `super-skill hooks-config` remains the reliable
51
+ manual path.
52
+ - **PyPI-installable CLI** — packaging metadata (MIT license, classifiers, URLs)
53
+ so the CLI installs with `uv tool install super-skill-cli` / `pipx install
54
+ super-skill-cli`. The command stays `super-skill`.
55
+
56
+ ### Changed
57
+ - **Distribution renamed to `super-skill-cli`** on PyPI — the bare `super-skill`
58
+ name is held by an unrelated package. No action needed for anyone: prior
59
+ releases were git tags only, never published to a package registry. The
60
+ installed command name is unchanged (`super-skill`).
61
+
62
+ ### Notes
63
+ - Codex plugin packaging stays a deferred P1 (per docs/01 FR-PUB-2). PyPI publish
64
+ is a separate credentialed step, not performed by this release.
65
+
66
+ ## [0.7.0] - 2026-07-12
67
+
68
+ ### Added
69
+ - **Mine reminder** — `status` now nudges (`reminder : N distinct sessions
70
+ unmined — run mine`) once enough new sessions have accumulated since the last
71
+ mine. A watermark (`mine_state.json`) records the distinct-session count at the
72
+ last mine, so "unmined" is honest: it clears when you mine and only fires again
73
+ as new sessions pile up. Threshold defaults to 3 (`SUPER_SKILL_MINE_REMINDER`
74
+ overrides). `mine` also reports the distinct-session count when nothing yet
75
+ clears the recurrence threshold, and both `mine` and `candidate draft` reset
76
+ the watermark.
77
+
78
+ ## [0.6.0] - 2026-07-12
79
+
80
+ ### Added
81
+ - **Candidate visibility** — `status` now reports a candidate count with a
82
+ per-status breakdown, and `list` appends a "pending candidates" section so
83
+ drafts awaiting approval are visible without a separate command.
84
+
85
+ ## [0.5.0] - 2026-07-12
86
+
87
+ ### Added
88
+ - **`doctor --fix`** — mechanical repair. Restores tampered/missing versions from
89
+ git HEAD (the committed, correct content) and re-materializes host drift, then
90
+ **re-verifies**: the exit status reflects what remains after the fix, not what
91
+ was attempted. Issues needing judgment (a dangling active pointer, a name
92
+ mismatch) are reported for manual resolution rather than auto-changed.
93
+
94
+ ## [0.4.0] - 2026-07-12
95
+
96
+ Hardens the v1 package manager.
97
+
98
+ ### Added
99
+ - **`doctor`** — read-only registry integrity check. Re-hashes every stored
100
+ version against the `artifact_hash` recorded at promotion (catching tampering,
101
+ corruption, or a hand-edit that bypassed the registry), checks the active
102
+ pointer resolves, and reports host drift. Exits 1 on an integrity error;
103
+ remediation (`rollback` / `seed` / re-approve) is left to the user.
104
+
105
+ ## [0.3.0] - 2026-07-12
106
+
107
+ Closes out the walking skeleton: `candidate approve` now runs two hard gates
108
+ before it writes anything, and real sessions can be wired into capture.
109
+
110
+ ### Added
111
+ - **Instruction-layer adversarial gate** (docs/04 §2.4bis) — v1's only mandatory
112
+ security gate. Rule-scans a candidate's body + description for external-action
113
+ imperatives (`curl|bash`, network fetch, credential access, `ignore previous`
114
+ overrides, run-undeclared-script) and blocks `approve` before any write. v1
115
+ candidates are pure text the host Agent runs as trusted instructions, so a
116
+ poisoned imperative is the code×instruction seam single-tool scanners miss.
117
+ - **Deterministic eval-lite hard gate** (docs/04 §1.6) — schema, zero
118
+ credential/PII leak, and the agentskills token budget, checked before promote.
119
+ The No Skill / Skill two-arm is labelled *Insufficient Evidence* at personal
120
+ scale (no corpus/harness) rather than faked.
121
+ - **`hooks-config`** — prints the `settings.json` hooks block wiring the six host
122
+ events to `super-skill capture`, so real sessions accumulate into the WAL.
123
+ Print-only; you merge it into `~/.claude/settings.json` yourself.
124
+
125
+ ## [0.2.0] - 2026-07-12
126
+
127
+ Completes the walking-skeleton loop: mined opportunity families can now become
128
+ human-approved skills, still routed through candidate → gate → promote (no
129
+ component writes the production skill set except on approve).
130
+
131
+ ### Added
132
+ - **Candidate approval loop** — `candidate draft` scaffolds a skill from a mined
133
+ family (an honest TODO-stub; coarse mining can name a recurring family, not
134
+ author its procedure), `candidate list/show` review it, and `candidate approve`
135
+ promotes the (human-editable) draft: registers an immutable ACTIVE version and
136
+ materializes it to the host skills dir. Drafts live as pre-promotion scratch,
137
+ git-ignored by the registry — only `approve` writes tracked state (One Writer
138
+ Rule). `candidate reject` records a decision without promoting.
139
+
140
+ ### Fixed
141
+ - **Mining noise** — coarse mining no longer treats the hook envelope as content:
142
+ the event type is no longer seeded into the token stream, envelope keys
143
+ (`hook_event_name` / `session_id` / `cwd` / …) are skipped, and `[REDACTED:kind]`
144
+ placeholders are stripped. These had produced junk families (`userpromptsubmit-*`,
145
+ cwd-derived slugs, redaction kind names).
146
+
147
+ ## [0.1.0] - 2026-07-12
148
+
149
+ First release: the **M0+WS package-manager** scope. A GATE-1 measurement of the
150
+ author's own history showed the candidate opportunity flow does not yet clear the
151
+ threshold that would justify the self-learning loop (M2–M5), so v1 is deliberately
152
+ the package manager, not the factory.
153
+
154
+ ### Added
155
+ - **Git-backed registry** — per-skill `meta.json` (Skill pointer + SkillVersion DAG
156
+ + audit trail); git provides integrity, audit and rollback.
157
+ - **Seed import** — bring existing `~/.claude/skills` under version control,
158
+ read-only on the host, idempotent by content hash.
159
+ - **CLI** — `seed`, `status`, `list`, `show`, `explain`, `rollback`.
160
+ - **WS capture pipeline** — append-only JSONL event WAL with regex redaction that
161
+ runs before any write (secret values never reach disk; only kind + field location
162
+ are recorded), plus coarse opportunity mining that surfaces task families
163
+ recurring across ≥3 sessions. Exposed via `capture` (host hook, never fails the
164
+ session) and `mine`.
165
+ - Strict typing (mypy) and lint (ruff) across the package; 41 tests.
166
+
167
+ ### Notes
168
+ - Deferred to a research track: candidate generation/approval loop, optimization,
169
+ external distillation, dynamic sandbox, signed Publisher, and the runtime Router
170
+ (milestones M1–M5). Not published to any package registry.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 sdsrss
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.
@@ -0,0 +1,213 @@
1
+ Metadata-Version: 2.4
2
+ Name: super-skill-cli
3
+ Version: 0.9.2
4
+ Summary: Personal Agent-Skill package manager: versioned registry, seed import, explain, rollback (M0+WS scope).
5
+ Project-URL: Homepage, https://github.com/sdsrss/super-skill
6
+ Project-URL: Repository, https://github.com/sdsrss/super-skill
7
+ Author-email: sdsrss <sammuaicode@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Keywords: agent-skills,claude-code,package-manager,registry,skill-manager
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Requires-Python: >=3.12
17
+ Requires-Dist: pydantic>=2.6
18
+ Requires-Dist: pyyaml>=6.0
19
+ Requires-Dist: typer>=0.12
20
+ Description-Content-Type: text/markdown
21
+
22
+ <!-- SEO: Claude Code Agent Skills package manager — version control, rollback, provenance, integrity checks for ~/.claude/skills and ~/.agents/skills (Codex). -->
23
+
24
+ # super-skill
25
+
26
+ **Version control, rollback, and provenance for your Claude Code and Codex Agent Skills.**
27
+ super-skill is a git-backed package manager for the skills in `~/.claude/skills`
28
+ (and Codex's `~/.agents/skills`): it puts every skill under version history,
29
+ tells you where each one came from, rolls any skill back with one command, and
30
+ checks the registry for tampering — with secret-redacted session capture and
31
+ safety-gated promotion built in.
32
+
33
+ **English** · [简体中文](README.zh-CN.md)
34
+
35
+ ---
36
+
37
+ ## Why super-skill
38
+
39
+ Agent Skills are just Markdown files in a directory. That directory has no
40
+ history: edit a `SKILL.md` and the previous version is gone; you can't tell which
41
+ skill came from where, why it's there, or whether one was quietly changed. There
42
+ is no undo.
43
+
44
+ super-skill treats your skills like packages: **versioned, auditable, reversible.**
45
+
46
+ ## Highlights
47
+
48
+ - **One-command rollback** — a skill regressed? `super-skill rollback <id>` switches
49
+ the active version and re-materializes it to your skills directory.
50
+ - **Provenance & audit** — `super-skill explain <id>` answers *why does this skill
51
+ exist, where did it come from, how do I undo it* from an immutable audit trail.
52
+ - **Tamper detection** — `super-skill doctor` re-hashes every stored version against
53
+ the hash recorded at promotion; `--fix` restores git-recoverable versions.
54
+ - **Redaction before disk** — session capture strips secrets and private paths
55
+ *before* anything is written; secret values never reach the log.
56
+ - **Safety-gated promotion** — a candidate becomes a skill only through two hard
57
+ gates (an instruction-layer adversarial scan + a deterministic eval-lite).
58
+ - **Runs where your agent runs** — a Claude Code plugin, a Codex install package,
59
+ and a host-agnostic CLI, all driven by the same `super-skill` command.
60
+
61
+ ## Install
62
+
63
+ ### Claude Code (plugin)
64
+
65
+ ```
66
+ /plugin marketplace add sdsrss/super-skill
67
+ /plugin install super-skill
68
+ ```
69
+
70
+ Adds slash commands (`/super-skill:status`, `:mine`, `:doctor`, `:candidates`,
71
+ `:seed`), a `super-skill` skill Claude invokes when you ask to version, explain,
72
+ or roll back a skill, and capture hooks. The plugin drives the CLI, so install
73
+ that too:
74
+
75
+ ### CLI
76
+
77
+ ```bash
78
+ uv tool install super-skill-cli # or: pipx install super-skill-cli
79
+ super-skill status # the command is `super-skill`
80
+ ```
81
+
82
+ The PyPI distribution is **`super-skill-cli`** (the bare `super-skill` name
83
+ belongs to an unrelated package); the installed command is `super-skill`.
84
+ One-shot, no install: `uvx --from super-skill-cli super-skill status`.
85
+
86
+ ### Codex
87
+
88
+ Codex reads open-standard `SKILL.md` from `~/.agents/skills` — no marketplace
89
+ needed:
90
+
91
+ ```bash
92
+ pipx install super-skill-cli
93
+ codex/install.sh # drops the meta-skill into ~/.agents/skills
94
+ ```
95
+
96
+ Point the CLI at the Codex directory with `SUPER_SKILL_HOST_SKILLS=~/.agents/skills`.
97
+ See [`codex/README.md`](codex/README.md).
98
+
99
+ ## Features
100
+
101
+ | Command | What it does |
102
+ |---|---|
103
+ | `seed` | Import existing `~/.claude/skills` under version control — read-only on the host, idempotent by content hash. |
104
+ | `status` / `list` | Registry summary (skills, versions, events, candidates) and the skill list. |
105
+ | `show <id>` | Frontmatter, version history, and content hashes for one skill. |
106
+ | `explain <id>` | Provenance chain + audit trail + the exact rollback command. |
107
+ | `rollback <id> [--to vN]` | Switch the active version and re-materialize it to the host. |
108
+ | `doctor` / `doctor --fix` | Integrity check (hashes, active pointer, host sync); `--fix` restores git-recoverable versions and re-materializes drift, then re-verifies. |
109
+ | `capture` | Append a host event to the redacted WAL — reads hook JSON on stdin, never fails the session. |
110
+ | `mine` | Surface task families recurring across ≥3 distinct sessions; nudges you once enough new sessions accumulate. |
111
+ | `candidate draft/show/approve/reject` | Turn a mined family into a skill: draft → review → two hard gates → promote & materialize. |
112
+ | `hooks-config` | Print the `settings.json` hooks block that wires session capture. |
113
+
114
+ State lives in `~/.super-skill/` — a real git repository, so **audit and rollback
115
+ are git.**
116
+
117
+ ## How it's different
118
+
119
+ | | Plain `~/.claude/skills` | super-skill |
120
+ |---|:---:|:---:|
121
+ | Version history per skill | ✗ | ✓ (git-backed DAG) |
122
+ | One-command rollback | ✗ | ✓ |
123
+ | Provenance / "why is this here" | ✗ | ✓ |
124
+ | Tamper / drift detection | ✗ | ✓ (`doctor`) |
125
+ | Secret redaction on capture | ✗ | ✓ (before disk) |
126
+ | Safety-gated promotion | ✗ | ✓ (two hard gates) |
127
+ | Claude Code **and** Codex | manual | ✓ one CLI |
128
+
129
+ super-skill is a **package manager, not a skill generator**: it manages, versions,
130
+ and audits the skills you already have or approve — it does not write skills for
131
+ you or change their behavior behind your back. Every write path is explicit and
132
+ reversible; your skills directory is only ever written on `approve`, `rollback`,
133
+ or `doctor --fix` (`seed` reads it but never modifies it).
134
+
135
+ ## Usage
136
+
137
+ ```bash
138
+ # Bring your current skills under version control
139
+ super-skill seed
140
+ super-skill status
141
+
142
+ # See where a skill came from and how to undo it
143
+ super-skill explain my-skill
144
+
145
+ # Undo a bad change
146
+ super-skill rollback my-skill
147
+
148
+ # Check nothing was tampered with; repair recoverable drift
149
+ super-skill doctor
150
+ super-skill doctor --fix
151
+
152
+ # Turn recurring work into a skill (capture must be wired first — see hooks-config)
153
+ super-skill mine
154
+ super-skill candidate draft
155
+ super-skill candidate show <id> # edit the draft, then:
156
+ super-skill candidate approve <id>
157
+ ```
158
+
159
+ ## Configuration
160
+
161
+ | Env var | Default | Purpose |
162
+ |---|---|---|
163
+ | `SUPER_SKILL_HOME` | `~/.super-skill` | Registry + control state (a git repo). |
164
+ | `SUPER_SKILL_HOST_SKILLS` | `~/.claude/skills` | Skills directory to seed/materialize (set to `~/.agents/skills` for Codex). |
165
+ | `SUPER_SKILL_MINE_REMINDER` | `3` | Distinct unmined sessions before `status` nudges you to mine. |
166
+
167
+ ## Scope
168
+
169
+ super-skill is deliberately the **package-manager** form (milestones M0 + WS). The
170
+ self-learning loop — automatically optimizing, distilling, and promoting skills
171
+ (milestones M1–M5) — is a **deferred research track**: a measurement of real usage
172
+ did not clear the threshold that would justify building it, so v1 is frozen as a
173
+ package manager with audit and rollback. It does not self-evolve your skills, and
174
+ this README does not imply it does.
175
+
176
+ ## FAQ
177
+
178
+ **Does super-skill run or change my skills' behavior?**
179
+ No. It manages the files (version, audit, rollback, integrity) and never edits a
180
+ skill's content on its own. Approving a candidate promotes a draft *you* reviewed.
181
+
182
+ **Will it touch `~/.claude/skills` without asking?**
183
+ Three commands write there — `approve` (promote a reviewed candidate), `rollback`,
184
+ and `doctor --fix`. `seed` reads your skills into the registry but never modifies
185
+ them; `status`/`list`/`show`/`explain`/`doctor` are read-only.
186
+
187
+ **Are my secrets safe in captured sessions?**
188
+ Redaction runs *before* any write: secret values and private paths never reach the
189
+ log. Capture is off until you wire it (`super-skill hooks-config`).
190
+
191
+ **Do I need PyPI for the plugin to work?**
192
+ The plugin calls the `super-skill` CLI on your PATH. Until the PyPI release,
193
+ install the CLI from source: `uv tool install git+https://github.com/sdsrss/super-skill`.
194
+
195
+ **Does it support Codex?**
196
+ Yes — the same CLI plus a `codex/` install package for `~/.agents/skills`. A Codex
197
+ *Target Adapter inside the CLI* is a later item; distributing skills to Codex needs
198
+ no extra step since they already live in `~/.agents/skills`.
199
+
200
+ ## Develop
201
+
202
+ Uses [uv](https://docs.astral.sh/uv/). Python 3.12.
203
+
204
+ ```bash
205
+ uv sync # venv + deps
206
+ uv run pytest # tests
207
+ uv run ruff check . # lint
208
+ uv run mypy super_skill/ # typecheck
209
+ ```
210
+
211
+ ## License
212
+
213
+ [MIT](LICENSE) © sdsrss
@@ -0,0 +1,192 @@
1
+ <!-- SEO: Claude Code Agent Skills package manager — version control, rollback, provenance, integrity checks for ~/.claude/skills and ~/.agents/skills (Codex). -->
2
+
3
+ # super-skill
4
+
5
+ **Version control, rollback, and provenance for your Claude Code and Codex Agent Skills.**
6
+ super-skill is a git-backed package manager for the skills in `~/.claude/skills`
7
+ (and Codex's `~/.agents/skills`): it puts every skill under version history,
8
+ tells you where each one came from, rolls any skill back with one command, and
9
+ checks the registry for tampering — with secret-redacted session capture and
10
+ safety-gated promotion built in.
11
+
12
+ **English** · [简体中文](README.zh-CN.md)
13
+
14
+ ---
15
+
16
+ ## Why super-skill
17
+
18
+ Agent Skills are just Markdown files in a directory. That directory has no
19
+ history: edit a `SKILL.md` and the previous version is gone; you can't tell which
20
+ skill came from where, why it's there, or whether one was quietly changed. There
21
+ is no undo.
22
+
23
+ super-skill treats your skills like packages: **versioned, auditable, reversible.**
24
+
25
+ ## Highlights
26
+
27
+ - **One-command rollback** — a skill regressed? `super-skill rollback <id>` switches
28
+ the active version and re-materializes it to your skills directory.
29
+ - **Provenance & audit** — `super-skill explain <id>` answers *why does this skill
30
+ exist, where did it come from, how do I undo it* from an immutable audit trail.
31
+ - **Tamper detection** — `super-skill doctor` re-hashes every stored version against
32
+ the hash recorded at promotion; `--fix` restores git-recoverable versions.
33
+ - **Redaction before disk** — session capture strips secrets and private paths
34
+ *before* anything is written; secret values never reach the log.
35
+ - **Safety-gated promotion** — a candidate becomes a skill only through two hard
36
+ gates (an instruction-layer adversarial scan + a deterministic eval-lite).
37
+ - **Runs where your agent runs** — a Claude Code plugin, a Codex install package,
38
+ and a host-agnostic CLI, all driven by the same `super-skill` command.
39
+
40
+ ## Install
41
+
42
+ ### Claude Code (plugin)
43
+
44
+ ```
45
+ /plugin marketplace add sdsrss/super-skill
46
+ /plugin install super-skill
47
+ ```
48
+
49
+ Adds slash commands (`/super-skill:status`, `:mine`, `:doctor`, `:candidates`,
50
+ `:seed`), a `super-skill` skill Claude invokes when you ask to version, explain,
51
+ or roll back a skill, and capture hooks. The plugin drives the CLI, so install
52
+ that too:
53
+
54
+ ### CLI
55
+
56
+ ```bash
57
+ uv tool install super-skill-cli # or: pipx install super-skill-cli
58
+ super-skill status # the command is `super-skill`
59
+ ```
60
+
61
+ The PyPI distribution is **`super-skill-cli`** (the bare `super-skill` name
62
+ belongs to an unrelated package); the installed command is `super-skill`.
63
+ One-shot, no install: `uvx --from super-skill-cli super-skill status`.
64
+
65
+ ### Codex
66
+
67
+ Codex reads open-standard `SKILL.md` from `~/.agents/skills` — no marketplace
68
+ needed:
69
+
70
+ ```bash
71
+ pipx install super-skill-cli
72
+ codex/install.sh # drops the meta-skill into ~/.agents/skills
73
+ ```
74
+
75
+ Point the CLI at the Codex directory with `SUPER_SKILL_HOST_SKILLS=~/.agents/skills`.
76
+ See [`codex/README.md`](codex/README.md).
77
+
78
+ ## Features
79
+
80
+ | Command | What it does |
81
+ |---|---|
82
+ | `seed` | Import existing `~/.claude/skills` under version control — read-only on the host, idempotent by content hash. |
83
+ | `status` / `list` | Registry summary (skills, versions, events, candidates) and the skill list. |
84
+ | `show <id>` | Frontmatter, version history, and content hashes for one skill. |
85
+ | `explain <id>` | Provenance chain + audit trail + the exact rollback command. |
86
+ | `rollback <id> [--to vN]` | Switch the active version and re-materialize it to the host. |
87
+ | `doctor` / `doctor --fix` | Integrity check (hashes, active pointer, host sync); `--fix` restores git-recoverable versions and re-materializes drift, then re-verifies. |
88
+ | `capture` | Append a host event to the redacted WAL — reads hook JSON on stdin, never fails the session. |
89
+ | `mine` | Surface task families recurring across ≥3 distinct sessions; nudges you once enough new sessions accumulate. |
90
+ | `candidate draft/show/approve/reject` | Turn a mined family into a skill: draft → review → two hard gates → promote & materialize. |
91
+ | `hooks-config` | Print the `settings.json` hooks block that wires session capture. |
92
+
93
+ State lives in `~/.super-skill/` — a real git repository, so **audit and rollback
94
+ are git.**
95
+
96
+ ## How it's different
97
+
98
+ | | Plain `~/.claude/skills` | super-skill |
99
+ |---|:---:|:---:|
100
+ | Version history per skill | ✗ | ✓ (git-backed DAG) |
101
+ | One-command rollback | ✗ | ✓ |
102
+ | Provenance / "why is this here" | ✗ | ✓ |
103
+ | Tamper / drift detection | ✗ | ✓ (`doctor`) |
104
+ | Secret redaction on capture | ✗ | ✓ (before disk) |
105
+ | Safety-gated promotion | ✗ | ✓ (two hard gates) |
106
+ | Claude Code **and** Codex | manual | ✓ one CLI |
107
+
108
+ super-skill is a **package manager, not a skill generator**: it manages, versions,
109
+ and audits the skills you already have or approve — it does not write skills for
110
+ you or change their behavior behind your back. Every write path is explicit and
111
+ reversible; your skills directory is only ever written on `approve`, `rollback`,
112
+ or `doctor --fix` (`seed` reads it but never modifies it).
113
+
114
+ ## Usage
115
+
116
+ ```bash
117
+ # Bring your current skills under version control
118
+ super-skill seed
119
+ super-skill status
120
+
121
+ # See where a skill came from and how to undo it
122
+ super-skill explain my-skill
123
+
124
+ # Undo a bad change
125
+ super-skill rollback my-skill
126
+
127
+ # Check nothing was tampered with; repair recoverable drift
128
+ super-skill doctor
129
+ super-skill doctor --fix
130
+
131
+ # Turn recurring work into a skill (capture must be wired first — see hooks-config)
132
+ super-skill mine
133
+ super-skill candidate draft
134
+ super-skill candidate show <id> # edit the draft, then:
135
+ super-skill candidate approve <id>
136
+ ```
137
+
138
+ ## Configuration
139
+
140
+ | Env var | Default | Purpose |
141
+ |---|---|---|
142
+ | `SUPER_SKILL_HOME` | `~/.super-skill` | Registry + control state (a git repo). |
143
+ | `SUPER_SKILL_HOST_SKILLS` | `~/.claude/skills` | Skills directory to seed/materialize (set to `~/.agents/skills` for Codex). |
144
+ | `SUPER_SKILL_MINE_REMINDER` | `3` | Distinct unmined sessions before `status` nudges you to mine. |
145
+
146
+ ## Scope
147
+
148
+ super-skill is deliberately the **package-manager** form (milestones M0 + WS). The
149
+ self-learning loop — automatically optimizing, distilling, and promoting skills
150
+ (milestones M1–M5) — is a **deferred research track**: a measurement of real usage
151
+ did not clear the threshold that would justify building it, so v1 is frozen as a
152
+ package manager with audit and rollback. It does not self-evolve your skills, and
153
+ this README does not imply it does.
154
+
155
+ ## FAQ
156
+
157
+ **Does super-skill run or change my skills' behavior?**
158
+ No. It manages the files (version, audit, rollback, integrity) and never edits a
159
+ skill's content on its own. Approving a candidate promotes a draft *you* reviewed.
160
+
161
+ **Will it touch `~/.claude/skills` without asking?**
162
+ Three commands write there — `approve` (promote a reviewed candidate), `rollback`,
163
+ and `doctor --fix`. `seed` reads your skills into the registry but never modifies
164
+ them; `status`/`list`/`show`/`explain`/`doctor` are read-only.
165
+
166
+ **Are my secrets safe in captured sessions?**
167
+ Redaction runs *before* any write: secret values and private paths never reach the
168
+ log. Capture is off until you wire it (`super-skill hooks-config`).
169
+
170
+ **Do I need PyPI for the plugin to work?**
171
+ The plugin calls the `super-skill` CLI on your PATH. Until the PyPI release,
172
+ install the CLI from source: `uv tool install git+https://github.com/sdsrss/super-skill`.
173
+
174
+ **Does it support Codex?**
175
+ Yes — the same CLI plus a `codex/` install package for `~/.agents/skills`. A Codex
176
+ *Target Adapter inside the CLI* is a later item; distributing skills to Codex needs
177
+ no extra step since they already live in `~/.agents/skills`.
178
+
179
+ ## Develop
180
+
181
+ Uses [uv](https://docs.astral.sh/uv/). Python 3.12.
182
+
183
+ ```bash
184
+ uv sync # venv + deps
185
+ uv run pytest # tests
186
+ uv run ruff check . # lint
187
+ uv run mypy super_skill/ # typecheck
188
+ ```
189
+
190
+ ## License
191
+
192
+ [MIT](LICENSE) © sdsrss