Concepts
Scripts
A registry so agents search, keep, document and test scripts instead of rewriting them.
The scripts skill runs every time an agent is about to write a script:
- Necessity — one command,
grep, an existing CLI or apackage.jsonscript is enough → no script. - Search —
agent-kit scripts find <words>searches project scripts, scratch, the global library and skills. - Build — throwaway:
scripts new <area>/<name>.mjs --scratch(in.agent-kit/scratch/, gitignored, still searchable); kept:scripts new <area>/<name>.<ext> --summary "…"(header + test stub + index). - Document —
@summary,@usage,@tags,@testheader;scripts/README.mdis generated. - Test — a ZOMBIES test next to the script.
- Run —
agent-kit scripts run <name>returns the exit code and only the relevant lines; the full log stays in.agent-kit/runs/.
A scratch script needed a second time is promoted to scripts/<area>/; one useful across projects goes to the kit's global library. Preflight blocks kept scripts without a header, and a hook reminds the agent when a script is written where it would be lost (/tmp, the project root).