|
| 1 | +# Skillforge |
| 2 | + |
| 3 | +Skillforge turns successful agent traces into reusable skills. |
| 4 | + |
| 5 | +It compiles a source run into: |
| 6 | + |
| 7 | +- a portable `skill.contract.json` |
| 8 | +- an OpenClaw-friendly `SKILL.md` |
| 9 | +- a `verification.report.json` |
| 10 | +- example inputs for reuse |
| 11 | + |
| 12 | +The goal is simple: stop losing good agent work in transcripts. Capture what worked, parameterize it, attach approval gates, and make it reusable across OpenClaw or your own agent stack. |
| 13 | + |
| 14 | +## Why it exists |
| 15 | + |
| 16 | +Most agent tooling can execute one-off tasks, but successful runs usually die as logs. Skillforge promotes a successful trace into a reusable asset: |
| 17 | + |
| 18 | +- extract inputs like paths, URLs, repositories, dates, and emails |
| 19 | +- convert raw steps into a reusable execution plan |
| 20 | +- infer tool requirements and approval gates |
| 21 | +- export an installable markdown skill plus a portable JSON contract |
| 22 | +- statically verify that the generated skill can be re-rendered safely |
| 23 | + |
| 24 | +## Install |
| 25 | + |
| 26 | +```bash |
| 27 | +npm install |
| 28 | +npm run build |
| 29 | +``` |
| 30 | + |
| 31 | +Or run the CLI directly in development: |
| 32 | + |
| 33 | +```bash |
| 34 | +npm run dev -- inspect examples/fix-flaky-test.trace.json |
| 35 | +``` |
| 36 | + |
| 37 | +## CLI |
| 38 | + |
| 39 | +Compile a trace into a skill bundle: |
| 40 | + |
| 41 | +```bash |
| 42 | +npm run dev -- compile examples/fix-flaky-test.trace.json --out generated-skills |
| 43 | +``` |
| 44 | + |
| 45 | +Inspect a trace without writing files: |
| 46 | + |
| 47 | +```bash |
| 48 | +npm run dev -- inspect examples/publish-weekly-report.trace.json |
| 49 | +``` |
| 50 | + |
| 51 | +Verify a generated contract: |
| 52 | + |
| 53 | +```bash |
| 54 | +npm run dev -- verify generated-skills/fix-flaky-auth-test/skill.contract.json |
| 55 | +``` |
| 56 | + |
| 57 | +List a local skill registry: |
| 58 | + |
| 59 | +```bash |
| 60 | +npm run dev -- list generated-skills |
| 61 | +``` |
| 62 | + |
| 63 | +## Supported input shapes |
| 64 | + |
| 65 | +Skillforge accepts: |
| 66 | + |
| 67 | +- normalized trace JSON with `objective` + `steps` |
| 68 | +- objects containing `messages` |
| 69 | +- objects containing `events`, `entries`, or `trace` |
| 70 | +- JSONL event streams |
| 71 | + |
| 72 | +The compiler is intentionally conservative. It aims to create a useful reusable skill from incomplete data without executing any part of the source trace. |
| 73 | + |
| 74 | +## Output structure |
| 75 | + |
| 76 | +Each compiled skill bundle contains: |
| 77 | + |
| 78 | +- `skill.contract.json`: portable contract for any agent runtime |
| 79 | +- `SKILL.md`: Markdown skill for OpenClaw-style skill registries |
| 80 | +- `verification.report.json`: static verification result |
| 81 | +- `inputs.example.json`: extracted example values |
| 82 | + |
| 83 | +## Development |
| 84 | + |
| 85 | +```bash |
| 86 | +npm run check |
| 87 | +npm test |
| 88 | +npm run build |
| 89 | +``` |
| 90 | + |
| 91 | +## Roadmap |
| 92 | + |
| 93 | +- adapter plugins for more agent trace formats |
| 94 | +- richer policy engines for command risk classification |
| 95 | +- replay-backed verification harnesses |
| 96 | +- registry publishing and trust receipts |
0 commit comments