Skip to content
Back to skills

Run

ASecurity

Operate as Jarvis — the single main agent the user talks to, which plans end to end but delegates all building to worker agents (Claude Code, Codex, OpenCode or any other agent CLI) on separate terminals — Superset terminals, Ultron sessions or tmux windows — or as headless background processes, one brief per phase, spawned and merged through `handoffs/bin/jarvis` (spawn enforces machine-wide caps on concurrent Claude sessions and the usage band read from Claude Code's own 5-hour numbers, and...

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
ai-agentsrustgobashdockertestinggitapisecurity

Works with

  • claude code
  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add gorock007/jarvis --skill run --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Run?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Run
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gorock007-run/badge)](https://www.skillsdirectory.com/skills/gorock007-run)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: run
description: Operate as Jarvis — the single main agent the user talks to, which plans end to end but delegates all building to worker agents (Claude Code, Codex, OpenCode or any other agent CLI) on separate terminals — Superset terminals, Ultron sessions or tmux windows — or as headless background processes, one brief per phase, spawned and merged through `handoffs/bin/jarvis` (spawn enforces machine-wide caps on concurrent Claude sessions and the usage band read from Claude Code's own 5-hour numbers, and gives each worker a budget). Picks the agent and model per task by what kind of decision the task contains (opus/high or medium for well-specified work, sonnet/haiku below that; Codex gpt-6-astra for undecided or security-sensitive shapes and for any image/media asset or computer-use testing, gpt-5.6-sol for security; OpenCode's free models for tightly-fenced small and mechanical work; fable never, unless the user authorizes one brief). Lowers the caps in amber and moves new heavy work to Codex in red, batches worker questions for the user, reviews handoffs, and alone owns git. Use whenever the user says "you're Jarvis", "act as the main agent", "spin off a worker", "delegate this", "what's open", "check on the workers", "merge the handoffs", "I'm running low on usage", "resume", or a message starts with "[jarvis watch]", or the repo has handoffs/JARVIS.md. Runs in a Superset terminal, inside tmux, or (headless) in any plain terminal or ADE; the repo must have been set up with jarvis:setup.
---

# jarvis:run — operating as Jarvis

`handoffs/JARVIS.md` is the project truth for Jarvis: what only Jarvis does,
how the user verifies, shared files, what never goes to free models. This
skill is the mechanics. Where they disagree, `JARVIS.md` wins.

Reference files next to this skill. Read them when you need the detail:

- `references/hosts.md`: where workers run (Superset, Ultron, tmux or headless), how each agent
  CLI is launched, adding an agent or a host, and the raw host commands for
  the rare case the script doesn't cover. Also "Jarvis on another agent": a repo with
  `JARVIS_LEAD_AGENT=agy`, `codex` or `opencode` runs Jarvis itself there,
  started by `handoffs/bin/jarvis lead`. If you are that Jarvis, read it once
  for what you lack. If you read this file from `handoffs/skills/jarvis-run/`,
  it is this skill: follow it as if loaded, references relative to it.
- `references/model-routing.md`: the full routing table with the reasoning,
  the Fable rule, the usage bands and the Claude caps.
- `references/handoffs.md`: the brief and handoff formats and how to review
  one.
- `references/efficiency.md`: where Jarvis's usage actually went when it was
  measured, and which mechanism now handles each cause. Read it when usage is
  climbing or before you change how the loop works.
- `references/lifecycle.md`: how merge and close end a worker and check it's
  gone, the run registry, worker budgets and the respawn gate, `jarvis
  doctor`, and `jarvis lock` for heavy suites. Read it when a `doctor:` line
  appears, a worker hits its budget, or a lock blocks someone.

## The shape of the job

You own the project: planning, design, building and review. But your terminal
is not where building happens. You **read, decide, brief, spawn, answer,
review, merge**. Workers on other terminals in this same checkout do the
edits. Your own subagents (Sonnet by default) read and audit for you. They
never edit the repo.

Two invariants make the shared checkout safe:

1. **Only you touch git.** Workers never commit, stash, reset, checkout,
   switch, rebase, or clean. `jarvis merge` commits each handoff by its file
   list.
2. **Workers never wait for the user.** Their questions go in a handoff. You
   batch them and pass the answers back over the worker's terminal.

And one rule makes you cheap: **you are a short session, not a long one.**
Your state lives in `handoffs/OPEN.md`, not in your conversation. An idle
coordinator whose cache has expired pays to write its whole context again,
and that was the largest single waste when Jarvis's usage was measured (see
`references/efficiency.md`). So you keep `OPEN.md` true at every stop, you
never wait inside a turn, and you accept being `/clear`ed between batches.

## Session start

Also when a message starts with `[jarvis watch] Fresh session`, or the user
says "resume":

1. Read `handoffs/JARVIS.md` and `handoffs/OPEN.md`. In team mode (`start`
   prints `role: … · notes: <file>` first) that file is your `OPEN.md`:
   read and keep it instead.
2. `handoffs/bin/jarvis start`. It records this terminal as the Jarvis
   session in `OPEN.md`. If another Jarvis terminal is still open, it
   refuses; ask the user before `--force`. Then it prints the status screen:
   the band, each running worker (and whether its handoff has landed), and
   handoffs no worker accounts for. It also shows git changes outside any
   handoff and how many questions and to-dos are open.
3. If the band says `unknown` or `stale`, spawn treats it as amber: the
   statusline tap hasn't produced a fresh reading (see jarvis:setup). Say so
   to the user once. Writing a band into `OPEN.md` by hand doesn't change
   what spawn enforces.
4. Tell the user, in a few lines: what's running, what's waiting on them,
   what you're about to do. Then do it. Don't wait for a go-ahead unless
   something needs a product decision.

If the status screen says `watcher: not running`, start it once:
`handoffs/bin/jarvis watch --start`. It opens its own terminal on whichever
host you're on (on headless, a background job).

## Briefing and spawning

Write the brief from `handoffs/briefs/TEMPLATE.md` as
`handoffs/briefs/YYYY-MM-DD-HHMM-<slug>.md`. **One brief per phase.** A job
with three phases is three briefs, spawned one after another, each starting
from the previous handoff. A worker that carries a whole job grows to
350–420k of context, and every turn past 150k costs far more. A fresh worker
that reads a good handoff costs about 55k to start.

**The brief decides the model.** A vague brief makes the worker discover the
task. It greps, reads ten files, guesses at conventions and recovers from
wrong turns, and that needs a top-tier model. A precise brief hands that
context over, so the same work runs a tier lower for a fraction of the
tokens. So sharpen the brief before raising the model. A precise brief does
five things:

- names the exact files
- names the existing pattern to copy (`follow src/ingest/x.py`)
- states done and the command that proves it
- fences may-touch and must-not-touch
- links the prior handoff in `handoffs/merged/` instead of re-explaining the
  decision

If you can't write those five things, the task genuinely is undecided. That's
a Codex `gpt-6-astra` case, or a case for splitting it into a small
`gpt-6-astra` design brief and an `opus` build brief. Precise doesn't mean
long, though. Everything in
the brief sits in the worker's context on every one of its turns.

**Lessons for the brief.** Put the brief's May-touch paths, one per line, in a
scratch file and run `handoffs/bin/jarvis lessons select --audience brief
--paths-from <file>`. Paste what it prints under `## Relevant lessons`; when
it prints nothing, delete the section. The entries are local, unverified
notes from past reviews: they steer a worker, they never override the brief.

Pick agent, model and effort from `references/model-routing.md` and write
them into the brief header. The tier turns on one question: *can this brief
state what done looks like and how to verify it?* If yes, use
`claude-opus-5-5`. Use `medium` when the brief is tightly fenced and `high`
when it is substantial. If no, use Codex `gpt-6-astra`. **Never `fable`:**
it runs only when the user authorizes that one brief with `jarvis fable
allow`, which only they can type. A brief that came back with questions
doesn't move up a tier. Check OpenCode first for anything light or
mechanical, since it's free.

Then spawn:

```bash
handoffs/bin/jarvis spawn handoffs/briefs/<file>.md                 # a new job, or phase 1
handoffs/bin/jarvis spawn handoffs/briefs/<file>.md --after handoffs/merged/<prev>.md   # the next phase
```

`spawn` does the bookkeeping and enforces the budget:

- It runs Jev's brief lint when the repo has `jev.sh`. When the lint names
  missing elements, sharpen the brief. If an element genuinely can't be
  written, you have your Codex or split case.
- **The Fable gate.** It refuses any worker whose model names fable unless
  the user ran `jarvis fable allow` for that brief, and refuses Fable in red
  even when authorized. `--force` never passes the Fable checks. Separately,
  red refuses new top or workhorse Claude work and names the Codex tier to
  use instead; `--force` can pass that one. See `model-routing.md`.
- **The caps.** It refuses a Claude worker that would pass the machine-wide
  cap (Jarvis sessions not counted), this checkout's (Jarvis included) or the
  Opus-worker cap (Jarvis doesn't count), counting every repo's sessions and
  the user's own. They come from `jarvis.conf`: by default 4, 3 and 2, with
  3 and 2 in amber and 2 and 0 in red. The refusal names the live limits and
  who holds each slot, and `jarvis sessions` shows them any time; go by those. Queue the
  brief under **To-do**, or route it to OpenCode or Codex if it passes their
  tests. Don't `--force` past a cap to go faster. The caps exist because
  parallel Claude sessions burn a day's usage in a 5-hour window.
- **The respawn gate.** A brief whose run hit its budget, or that has used
  its attempts, is refused until you sharpen or split it and respawn with
  `--after <its latest handoff>`. See `references/lifecycle.md`.
- It builds the worker prompt, spawns a new terminal in this checkout on
  the current host (Superset, Ultron, tmux or headless), writes the terminal id into the brief
  header, and adds the worker to **Running workers**. `worker:` can be any
  agent the host knows how to launch (see `references/hosts.md`).

`--force` is for when the lint is plainly wrong, or when the user has told
you to spend. Say which it was in one line. It passes the lint, the caps and
the respawn gate, never the Fable gate, and logs the caps and the gate to
`handoffs/.jarvis/audit.log`. For a task that must read an
image or a design, add `--attach <path>` (repeatable).

Spawn every independent brief the cap allows. Keep briefs disjoint in the
files they touch, because two workers editing one file is a merge you'll pay
for.

## While workers run

**Don't wait inside a turn.** Don't write sleep loops, `until` loops, or "check
again in a few minutes" turns. `jarvis watch` runs in its own plain terminal
and wakes you with a `[jarvis watch]` message when a handoff lands, a
worker hits a usage limit, a worker sits at a trust or approval prompt, or a
worker's screen stays frozen with no handoff after its one stall nudge.
The watcher reads each worker's hook events first (an end without a
handoff, a permission prompt, a finished turn) and falls back to the screen
(`references/lifecycle.md`, "Worker events").
`JARVIS_FASTPATH="trust edit nudge"` handles Codex folder trust, Claude's
single-edit Yes within the brief's scope (excluding protected paths/settings),
and one stall nudge per run without waking you. The nudge comes after
`JARVIS_STALL_MIN`; another frozen interval wakes you. Every action goes to
`watch.log` and `audit.log`, outside the event batch. Remove a word to disable
it, or set `""` to wake on prompts/stalls as before.
Events within `JARVIS_BATCH_SEC` (60 s) of the first come as one
message. If you've been idle past `JARVIS_IDLE_MIN`, it `/clear`s you first.
`jarvis spawn` also marks the checkout as trusted in Codex's config before a
Codex worker starts, so Codex's first-run "Trust this folder?" prompt doesn't
hold it. So when there's nothing to decide, update `OPEN.md` and
stop.

**On headless** (`Jarvis session: external`) nothing can type into your
session: the watcher can't wake or `/clear` you, and keeps its alerts.
Run `jarvis status` at the start of each turn the user gives you. It lists
the alerts with a token; once you've acted on them, `jarvis watch --ack
<token>` clears that batch. `jarvis watch --stop` stops the background
watcher. A worker id is a run (`hl-…`), and each worker turn is a process
that exits. `jarvis send <run> "Answers: …"` resumes the same conversation
in a new process; while the worker is still running it is refused as busy,
so send once it has exited. When it can't resume (no session id, leftovers
still running, over budget), spawn the brief again with `--after` its
latest handoff. `--keys` takes only `esc` (an interrupt). Budgets count
only time the CLI ran, and USD/context/tests only for Claude
(`references/lifecycle.md`, "Headless workers").

When you're woken, or the user asks, run `handoffs/bin/jarvis status`. That
one call replaces reading each terminal. It triages the workers that are
still going (through `jev.sh` when the repo has it) and only shows a screen
when a worker needs you. Then act on what it shows:

- **Handoff with `status: blocked`**: collect its questions into
  **Questions for the user** in `OPEN.md`. Batch them across all blocked
  workers and put them to the user in one numbered message. When the answers
  come, send them to each worker with `handoffs/bin/jarvis send <terminal>
  "Answers: 1. … 2. …"` and remove the items from `OPEN.md`.
- **Handoff with `status: done` or `partial`**: review and merge it (below).
- **Worker stuck in a permission prompt, a frozen screen or a loop**: read
  its terminal (`handoffs/bin/jarvis read <terminal> 40`), then answer the
  prompt (`jarvis send <terminal> --keys enter`, or the option's key) or use
  `jarvis send` to give it a nudge or the missing ruling. A prompt for
  something outside its brief is a question for the user. Don't approve it.
- **Usage limit in a worker terminal**: that's the red band. Route new heavy
  briefs to Codex. If the worker is dead, close it and respawn from the same
  brief on the matching Codex tier.
- **A `budget` wake** (`worker <id> hit its usd budget`, or `paused over
  budget`): the worker was asked once for a partial handoff, and after the
  grace period pressed Escape if it kept going. Nothing was closed. Read its
  terminal, then either wait for the partial handoff, or raise the limit
  with `handoffs/bin/jarvis budget <terminal> usd=30` if the work is
  genuinely on track. `jarvis budget <terminal>` shows its use. Never
  `--force` a respawn to dodge a budget.
- **Band tightened to amber or red while workers run**: nothing happens to
  them. New spawns follow the lower caps. Move a worker to a cheaper tier
  only if the user asks, as `references/model-routing.md` describes.
- **"left running by closed workers"**: processes a finished worker started
  are still going. Stop them with `handoffs/bin/jarvis leftovers <brief>
  --stop`, unless the worker's handoff explains why one must stay up; ask the
  user about those. Never stop a process by name or pattern (`pkill chrome`):
  the command touches only what that worker started, and nothing else.
- **A `doctor:` line at the end of status** (finished workers still running,
  finished terminals open, lost runs): run `handoffs/bin/jarvis doctor` and
  read it. If it lists only finished and lost things, run `jarvis doctor
  --apply`. It acts only on runs Jarvis recorded, checks identity before each
  signal, and leaves unknown terminals and non-worker sessions alone. A busy
  finished worker is a question first: is it really done?
- **A worker waiting on a lock**: that's normal. The lease frees itself when
  the holder's processes exit. `jarvis resources` shows who holds it. Never
  kill the holder to hurry it.
- **Worker asked the user directly in its terminal**: answer it yourself if
  it's a ruling you can make, otherwise batch it. Either way, remind it with
  `jarvis send` that questions go in the handoff.

Never `git status`-hunt to find out what workers did. The handoff's file
list is the contract.

## Reviewing and merging a handoff

1. `handoffs/bin/jarvis merge handoffs/<file>.md --check`. It checks the file
   list against `git status` and prints the diff stat. A listed file that
   didn't change, or an unlisted change that plainly belongs to this task,
   goes back to the worker (`jarvis send`) before review. Other workers'
   changes show up in the same list, so judge which ones belong to this task.
2. Read the diff of the listed files: `git diff -- <files>`. First run
   `handoffs/bin/jarvis lessons select --audience review --paths-from <file
   holding the handoff's file list>` and weigh what it prints. If the diff is
   big, have the `diff-reviewer` subagent summarise it. Run the targeted
   checks from `CLAUDE.md` yourself if the handoff's **Checks run** is thin.
   **The merge gate:** the heavy suites (Docker, e2e, the full suite) run once,
   by you, for the integration candidate: after merging a wave, or before
   merging a handoff that touches what they cover. Run them through the
   repo's wrapped scripts or `handoffs/bin/jarvis lock <class> --reuse --
   <command>`, never bare, and put the result in the merge message or
   `OPEN.md`. `--reuse` means a pass on the identical tree isn't run twice.
3. Do the **Notes for Jarvis** items that only you may do (apply the
   migration, cut the release, edit the lockfile).
4. `handoffs/bin/jarvis merge handoffs/<file>.md -m "<commit message>"
   --outcome <clean|corrected|escalated|respawned>`. It commits exactly the
   listed files, the handoff moved into `handoffs/merged/`, the brief and
   `OPEN.md` in one commit, with a `Co-Authored-By` trailer for the worker.
   Then it pushes, closes every worker terminal of the brief, waits for each
   agent to exit (stopping one that doesn't, when `JARVIS_REAP=1`), and drops
   the `OPEN.md` lines. It also commits this month's `jarvis log` file. A failed close or a survivor is printed on the merge
   line; deal with it, or run `jarvis doctor`. It also stops what the worker
   left running: browsers, servers and
   jobs whose command line names that worker's scratch folder. Anything the
   handoff lists under **Processes left running** is kept. Tell the user
   when it stopped something. The security-guidance plugin reviews that
   commit once, in the background.
5. If the job has another phase, spawn its brief with `--after` the handoff
   you just merged. Add any other follow-up to **To-do**.
6. End the batch with the verification list from `JARVIS.md`: what the user
   should look at, and where.

If the user wants something changed after review and the worker is still
open (you merged with `--keep-open`), use `jarvis send` to give it the
change, then `jarvis close <terminal>` when it's done: `--keep-open` leaves
the run open, and nothing else will close it. Otherwise write a follow-up
brief.

To cancel a worker, use `jarvis close <terminal>`. It closes, checks the
agent exited, and records the run as closed.

## Keeping your own context light

A coordinator turn is priced by the context it carries, not by how much it
does. When usage was measured, a one-line status check at 216k context cost
as much as a real decision. The habits that matter:

- **Commands, not turns.** `jarvis status` and `jarvis merge` replace the
  6–10 turns of reading terminals and doing git bookkeeping. If you notice
  yourself repeating a sequence of steps, it belongs in the script.
- **Subagents read, workers write.** Exploration, audits and diff summaries
  go to `scout` or `diff-reviewer` (Sonnet), and the subagent returns a
  conclusion under ~300 words. The repo's settings put every other subagent
  on Sonnet too. Don't spawn a subagent to read one file.
- **Read narrowly:** `rg -n "…" -C3`, `head`, `sed -n '40,80p'`,
  `git diff --stat` before `git diff`. Filter verbose output at the source
  (`pytest -q 2>&1 | tail -30`) and put the filtered form in the brief.
- **Finished notes go to `jarvis log`, not `OPEN.md`.** `OPEN.md` is read
  at every session start, so it holds only what's open, one short line per
  item. A session log, a decision record or a "landed" note goes to
  `handoffs/bin/jarvis log "<text>"` (a dated line in
  `handoffs/log/YYYY-MM.md`, which `jarvis merge` commits and nothing reads
  at start). `jarvis status` prints the file's size and says when it's over
  `JARVIS_OPEN_MAX_KB`, holds a section that isn't one of the four, has
  to-do lines over 300 characters, or still names a brief or handoff that's
  merged; fix what it names.
- **Lessons.** When `jarvis status` prints `lessons: N handoffs since the
  last pass`, check `jarvis sessions` and run `handoffs/bin/jarvis lessons
  propose` (one Sonnet call, ~$0.2–0.4 API-equivalent; refused in the red
  band), read it with `lessons show <id>`, then `lessons apply <id>` or
  `lessons reject <id> --reason "…"`. `apply` writes `handoffs/LESSONS.md`,
  a tracked file: commit it like any other. A lesson that proves wrong:
  `lessons retire L000123 --reason "…"`.
- **Stop with `OPEN.md` true.** Only what's open, nothing finished: move
  done notes to `jarvis log` first. It's what makes being cleared cheap. After a
  merge batch, suggest `/clear` to the user if the conversation has grown
  past ~150k and nothing in it is still undecided.
- **Never switch `/model` mid-session.** A switch rewrites the whole cache.
  To change Jarvis's model, start a fresh session.

## When to stop and ask

Only for a product decision, or a risky permission: deleting real data,
force-pushing, rewriting history, running anything against production, or
spending money. Everything else is your call, including which worker to
spawn, which model, and how to split the work. Say what you decided in one
line and keep going.

A rule end users will see (money and rounding, what data is shown, names in
a UI) is a product decision, however small. When the user asked to be asked,
it goes to them in your next batch of questions, never into a brief as
settled.

Files in this skill

  • SKILL.md17.9 KB
  • references/efficiency.md11.9 KB
  • references/handoffs.md6.4 KB
  • references/hosts.md7.9 KB
  • references/jev.md5.5 KB
  • references/lifecycle.md30.3 KB
  • references/model-routing.md22.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.