Skip to content
Back to skills

Verify Traj

ASecurity

Drive the worktree's own traj CLI build the way a user does, against a scratch ledger: prove a CLI change, reproduce a bug report, or carry out a brief that says 'verify with verify-traj'. Launch, doctor, drive a mapped feature, capture evidence, clean up.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
ai-agentsrustgobashdatabase

Works with

  • cli

Security analysis

A100/100

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

Scanned November 29, 2026

npx -y skills add trajectonomics/trajectonomics --skill verify-traj --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Verify Traj?

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

Security grade badge for Verify Traj
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/trajectonomics-verify-traj/badge)](https://www.skillsdirectory.com/skills/trajectonomics-verify-traj)

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: verify-traj
description: "Drive the worktree's own traj CLI build the way a user does, against a scratch ledger: prove a CLI change, reproduce a bug report, or carry out a brief that says 'verify with verify-traj'. Launch, doctor, drive a mapped feature, capture evidence, clean up."
---

# Verify traj

The surface is the `traj` CLI in `apps/cli`: a compiled binary at `apps/cli/dist/traj`, built with `bunx turbo run build --filter=@trajectonomics/cli --concurrency=2` (wrapped in `systemd-run --user --scope -q -p MemoryMax=6G` when available). A CLI run is short-lived: launch builds once, then each step is its own process with a scratch data directory. Read the [feature map](features/README.md) before driving — it is the maintained list of user paths, and proving one convenient entry point is incomplete when the map lists others.

## Safety

The helper enforces these; never work around them by calling the binary yourself.

- Every `traj` run carries `DO_NOT_TRACK=1`, so an agent's test never counts as a person using `traj`.
- Every run carries `TRAJ_HOME` set to a scratch `home/` the launch made, checked non-empty and never `$HOME/.traj`. An unset or empty `TRAJ_HOME` falls back to the owner's real ledger (`apps/cli/src/data-directory.ts`); an empty value is a refusal, not a default. A development build also refuses the default home (`defaultHomeRefusal`).
- The binary is invoked by absolute path from this worktree. Never a `traj` from `PATH`: that is a different build.
- Scratch lives under `~/.cache/traj-verify`, never `/tmp`. Cleanup removes only the `home/` directory this run created, and only when launch's marker says which one it was.
- Fictional data only. No real person's financial data enters a scratch home.

## Launch

```bash
export VERIFY_TRAJ_RUN="$(skills/internal/skills/verify-traj/scripts/verify-traj.sh launch | sed -n 's/^RUN=//p')"
RUN="$VERIFY_TRAJ_RUN"
```

Builds the CLI, then creates `~/.cache/traj-verify/run.XXXXXX/` with `home/` (the scratch `TRAJ_HOME`) and `evidence/`. It writes a marker naming the home it made, sends progress to stderr, and prints `RUN=<absolute path>` on its last line. Capture the path without the `RUN=` prefix, as above (`--run "RUN=/..."` is refused): every later subcommand takes `--run <path>` or `VERIFY_TRAJ_RUN`. Use `launch --no-build` only when the binary is already the current worktree build. Ready means the binary exists, is executable, resolves to this worktree's path, and `home/` is a launch-made directory — not merely that a process answers. The first drive calls `traj init` to create the empty ledger.

## Doctor

```bash
skills/internal/skills/verify-traj/scripts/verify-traj.sh doctor --run "$RUN"
```

Read-only, run first whenever anything looks off. It prints `ROOT`, `BIN`, `traj --version`, `TRAJ_HOME` and `DO_NOT_TRACK`, and checks each against the run directory. It deliberately omits `traj doctor`: that command writes a probe file (`apps/cli/src/doctor/directory.ts`) and opens, possibly migrating, the store (`apps/cli/src/doctor/database.ts`), so it belongs in a drive rather than a read-only check. A failed check says what to do (rebuild with `launch`, or make a fresh run) and exits non-zero.

## Drive

```bash
skills/internal/skills/verify-traj/scripts/verify-traj.sh run --run "$RUN" --name record-transaction -- tx add --from Cash --to Food --amount 120.50 --date 2026-03-01
```

One process per step, all sharing the same `RUN`. The helper applies the safe env, prints stdout and stderr, writes the transcript to `evidence/NN-<slug>.txt`, and exits with `traj`'s exit code. Use the commands in the feature files verbatim; a step whose output you need to assert is easier to read with `--json`. After a write, the next step reads the stored value back — `traj balance --as-of <date> --trial-balance`, `traj tx list --json` — because the write's own reply is not proof that it persisted.

## Evidence

`evidence/NN-<slug>.txt` holds the command line, `TRAJ_HOME`, `DO_NOT_TRACK`, stdout, stderr and exit code. Proof standards:

- Exercise the real user path: a documented command or a help example from `apps/cli/src`, not an internal setter or a test fixture.
- Capture the action and the resulting state, not just the final output. For a mutation, include the second read of the stored value; for a ledger write, the `traj.db` under `RUN/home/` read back through `traj balance` or `traj tx list`.
- When the safe path is `--dry-run`, verify what it skipped by observing the ledger before and after (`traj tx list --json`), not by trusting the flag's name.
- Report the feature ID and the entry point used alongside the evidence path in the pull request's `## Verification` section. A precondition you could not meet is `inconclusive` with the attempted command and the reason; a path you skipped is never reported as verified through a different one.

## Cleanup

```bash
skills/internal/skills/verify-traj/scripts/verify-traj.sh cleanup --run "$RUN"
```

Removes only `RUN/home/`, prints the surviving evidence path, and leaves the marker and transcripts in place. Run it after every failed iteration too, so a broken attempt does not strand a scratch home. There is no server to stop, so never kill by process name. After cleanup, confirm the evidence files still exist: a cleanup that eats the proof fails the run.

## Helpers

- [`scripts/verify-traj.sh`](scripts/verify-traj.sh) (executable): `launch [--no-build]`, `doctor [--run PATH]`, `run [--name SLUG] -- <traj args...>`, `cleanup [--run PATH]`. Each subcommand's invocation appears above.
- [`features/README.md`](features/README.md): index, baseline preconditions and proof conventions. One file per feature uses exactly four H2s: `Sub-features`, `How to get to it (user POV)`, `Driving it with verify-traj`, `Gotchas`.

## Other surfaces

The Dashboard (`traj dashboard`) is a read-only Svelte app that renders a Snapshot of `traj --json` on `127.0.0.1`. It is noted here, not driven by this skill: its headless browser checks walk every Demo page at 360px and 1280px in both themes (`apps/web/AGENTS.md` rule 8; `bunx turbo run @trajectonomics/web#build`, then `bun run test:browser` in `apps/web`).

Files in this skill

  • SKILL.md6.1 KB
  • features/README.md4 KB
  • features/fixtures/statement.csv95 B
  • features/import-statement.md2.9 KB
  • features/plan-and-tax.md4.1 KB
  • features/record-transactions.md3.1 KB
  • features/reports.md2.9 KB
  • features/setup-and-accounts.md2.5 KB
  • scripts/verify-traj.sh6.3 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.