new-execution
Skill12 starsChanged 18 days agoMITView on GitHub
Declare a one-off run as code in outputs/, previewed on the pull request and run exactly once by the merge. Use whenever something should happen once rather than keep running: enroll a list into a play, run a tool over some accounts, backfill a field. Writes the entry's .ts, its data, and a README with a pending outcome, then fills the outcome once the run finishes.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/manifest-guardrails.mdcCursor rule
- llms.txtllms.txt
- cadenceSkill
- capture-feedbackSkill
- context-hygieneSkill
- new-motionSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Pick what runs: Import it from infra/ by handle, never by UUID.
- Distinctive: line 82
If the check says the execution was held (its records grew past the preview, or nothing approved it), it did not run and is still pending.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
A one-off run, declared in outputs/
A play keeps running. An execution happens once: the pull request shows
what it will do, the merge does it, and Cargo's ledger makes sure it never
happens twice. It lives in outputs/ because it is history from the moment
it merges.
Step 0: is it really one-off?
| The user wants | Use |
| Something that keeps happening (every new lead, every week) | The new-motion skill: a play, tool, or agent in infra/ |
| A run, once, over records or on one input | This skill |
Steps
- Name it. The id is
YYYY-MM-DD-<slug>: today's absolute date and a kebab-case, verb-first slug (2026-10-14-enroll-expansion-pilot). The entry directory isoutputs/<id>/, and the id inside the code is the same string. The outputs linter fails the PR otherwise. Pick what runs. Import it from
infra/by handle, never by UUID. If it does not exist yet, add it in the same PR (new-motionfor a play): the merge deploys it before the execution starts.Workflow defineBatch(once per record)defineRun(once)A play Any data but a file; the model must be the play's own No A tool Any data Yes defineWorkflow(...)inline, for logic not worth deployingAny data Yes Enrolling into an outreach play is that motion's campaign. Its
context/motion/file must exist with its hypothesis, and the entry'sserves:names the outcome it moves.Pick the data (a batch only). Prefer data already in Cargo over a file.
Kind When { kind: "segment", segment }A list someone built in Cargo { kind: "filter", model, filter, limit }Records matching a condition. limitis required{ kind: "recordIds", model, ids }A handful of known records { kind: "form", records }A few rows written in the code, checked against the workflow's form { kind: "file", path, mappings }A CSV in the entry, at most 50 MB. pathis relative toinfra/("../outputs/<id>/accounts.csv"), andmappingsrenames its columns to the workflow's inputsWrite
outputs/<id>/<slug>.ts.import { defineBatch } from "@cargo-ai/cdk"; import { contacts } from "../../infra/models"; import { expansion } from "../../infra/plays/expansion"; export const pilot = defineBatch("2026-10-14-enroll-expansion-pilot", { workflow: expansion, data: { kind: "filter", model: contacts, filter, limit: 50 }, });One execution per entry. Never put one in
_template/or any other_-prefixed directory: the CDK finds executions anywhere, and would run it.- Write
outputs/<id>/README.mdfromoutputs/_template/README.md, withoutcome: pending. Fill "What ran" now (link the.tsand what it runs). "Headline result" waits for the run. - Verify.
npm run typecheck, thennpm run lint, then open the PR. In the Cargo plan comment, the "Runs once" row should match the intent: the record count, what it sends, what it costs. If it needs approval, say so and stop. A human addscargo:approve-impact; never add it yourself. After the merge, fill the outcome. The deploy check names the batch or run it started. Once it finishes, read its result (the Cargo MCP's
get_batch/get_run) and replaceoutcome: pendingwith what it produced, in numbers, plus the headline. This is the one edit an entry gets after it merges; anything later is a dated addendum.If the check says the execution was held (its records grew past the preview, or nothing approved it), it did not run and is still pending. Tell the user why. The next pull request previews it again.
Rules
- Once merged, the code is history. Editing or deleting the
.tsafter the merge changes nothing: the ledger keyed on the id has it. To run something again, or differently, write a new entry with a new id. - Executions run only from Cargo's deploy, once the repository is connected to the workspace. Local deploys are denied here, as for everything else.
- Absolute dates, and no em dashes, as everywhere in this repo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

