---
title: "Scripts"
description: "A registry so agents search, keep, document and test scripts instead of rewriting them."
canonical_url: "https://razcue-agent-kit.vercel.app/en/concepts/scripts"
---
# 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:

1. **Necessity** — one command, `grep`, an existing CLI or a `package.json` script is enough → no script.
2. **Search** — `agent-kit scripts find <words>` searches project scripts, scratch, the global library **and skills**.
3. **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).
4. **Document** — `@summary`, `@usage`, `@tags`, `@test` header; `scripts/README.md` is generated.
5. **Test** — a ZOMBIES test next to the script.
6. **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).


## Sitemap

See the full [sitemap](https://razcue-agent-kit.vercel.app/sitemap.md) for all pages.
