The Testing Academy · AI for QA

Command Code:
The One Dollar Coding Agent Every QA Should Know

A terminal coding agent in the same shape as Claude Code: skills, slash commands, MCP, plan mode, worktrees. The difference is the entry price. The Go plan is one dollar a month and includes ten dollars of credits, roughly 15K requests on open-source models. This guide covers the CLI, the slash command catalogue, building your own skills, and how to make those credits go furthest.

Install and first run CLI reference Slash commands Custom skills Credit strategy QA workflow

Every tester has seen the "$1 AI agent" claims by now. Here is the version with receipts: what Command Code actually is, what a dollar actually buys, and how to reach your first session without guessing.

cmd_

CommandCode

The one dollar terminal coding agent

One command line, grounded in your repo. Same shape as Claude Code: skills, slash commands, MCP, plan mode, managed worktrees. The difference is the entry price, and the fact that your QA playbooks live in the repo instead of in your head.

💰

One dollar a month

Go plan: $10 of credits, about 15K requests

🧩

Skills and commands

Markdown files the whole team can commit

📜

Plan mode

Read only thinking, no edit turns spent

🌿

Managed worktrees

-w isolates a risky refactor from your branch

How a Command Code session works

1. INSTALL
One global package
npm i -g command-code@latest

Binary is cmd, or cmdc on native Windows.

2. AUTHENTICATE
Link the account
cmd login

Confirm with cmd whoami.

3. TRUST
Approve the repo
cmd -t

Or trust it when prompted on first run.

4. GROUND IT
Teach your rules
/init

Writes AGENTS.md so it follows repo conventions.

5. EXTEND
Commands and skills
.commandcode/

Slash commands and SKILL.md playbooks, discovered at launch.

6. RUN
Interactive or CI
cmd -p "..."

One shot, JSON out, capped with --max-turns.

Describe the job in plain language → the right command or skill resolves → you review the diff

A session, end to endIllustration

What the agent can see

AGENTS.mdrules
.commandcode/commands/3
.commandcode/skills/4
.agents/skills/1
~/.commandcode/skills/6
~/.agents/skills/2
MCP servers2

Permission mode

plan

Session

effortlow

session › plan mode › skill match › answer

What should we test in checkout v2, and where do the flaky specs sit?
Command CodePLAN
  • Matched the test-plan skill on your description, no slash needed.
  • Read AGENTS.md, then the specs under tests/checkout/.
  • Drafted smoke, happy path, negative, edge and regression coverage.
  • Flagged the retry-heavy specs for the flaky-triage skill.
  • Plan mode is read only, so nothing was written yet.

Resolved from

[1]Built-in/plan1st
[2]Custom.commandcode/commands/flaky.md3rd
[3]Skill.commandcode/skills/test-plan/SKILL.md4th
[4]Skill~/.commandcode/skills/flaky-triage/SKILL.md4th
type a task, or / for commands and skills

What ships in the box

cmd

The CLI, modes and flags

/slash

Eight groups of built-ins

SKILL.md

Your QA playbooks

MCP

External tools and data

-w

Managed git worktrees

--plan

Read only thinking

Key capabilities

  • Resume, fork, or clone any past session
  • Compact context so you stop resending the bloat
  • Custom slash commands from plain markdown files
  • Skills load progressively, so idle ones stay cheap
  • Pull request duty with /review and /pr-comments
  • Non-interactive one shot for CI, with JSON output

Quickstart (local)

# 1. in your shell
npm i -g command-code@latest
cmd login
cd your-test-repo

# 2. start it (Windows: cmdc)
cmd

# 3. at the prompt
/init                 # write AGENTS.md
/test-plan checkout-v2
/usage                # credits and plan

# 4. in CI, back in the shell
cmd -p "triage the failures" --output-format json --max-turns 10

Why this matters for QA

Your test conventions, bug format and triage runbook stop living in one senior tester's head. They become files in the repo that every agent reads, on a plan a whole team can afford to try.

$1Go plan per month
$10Included credits
~15KRequests a month
4Skill discovery paths
8Slash command groups

What Command Code is (and what $1 buys)

$1 per monththe Go plan$10 in creditsincluded monthlyabout 15K requeststypical volumeOpen-source modelsno premium tier
The dollar plan is real credits with real caps, not unlimited usage

Install, login, first session

  1. Install. One global npm package: npm i -g command-code@latest.
  2. Log in. Run cmd login, then confirm the account with cmd whoami.
  3. Start in your repo. cd into the project you test and run cmd (on native Windows, cmdc).
  4. Trust the project. Trust the project when prompted, or launch with -t, --trust to auto-trust a repo you already know.
  5. Give it a first job. Start with a message on the command line: cmd "map the test suites in this repo and how to run them".
  6. Watch the meter. Inside the session, /usage shows credits, plan and usage metrics. Check it before any big run.
npm i -g command-code@latest
cmd login
cmd whoami
cd your-test-repo
cmd "map the test suites in this repo and how to run them"

# native Windows: same steps, the binary is cmdc
cmdc login
npm installone global packagecmd loginauthenticateTrust the projectapprove the repoFirst sessionask it anything
Zero to a working agent in four moves
PlanCost per monthMonthly creditsApprox requestsModels
Go$1$10about 15Kopen-source models only
Pro$15$30about 25Kopen-source plus premium
Provider$15pay as you govariesall models
Max 10x$100$150about 110Kopen-source plus premium
Max 20x$200$300about 200Kopen-source plus premium
No plan is unlimited. The docs state it plainly: no plan offers unlimited usage. If a thumbnail sold you "unlimited tokens for $1", this is the correction: $1 buys $10 of credits, about 15K requests on open-source models, governed by the rolling limits above.

That is the deal with no asterisks: $1 -> $10 of credits -> about 15K requests on open-source models, Team Pro at $40 per month with pooled credits (about 35K requests), and Enterprise from $5,000 plus. Next tab: the CLI that makes those credits count.

You already live in a terminal, and you already automate other people's tools. This tab treats cmd itself as the system under test: the flag groups you will reach for daily, the subcommands, and a CI-ready one-shot run at the end.

The cmd binary: flags that matter

planread only, no editsdefaultasks before actingauto-acceptedits flow freelydont-askno prompts at all
The --permission-mode autonomy dial, least to most autonomous

Worked example: one-shot flaky triage in CI

  1. Go non-interactive. Use -p, --print: the agent answers once and exits, exactly what a CI step wants.
  2. Ask for JSON. Add --output-format json so the next stage parses a verdict instead of scraping text.
  3. Cap the loop. Set --max-turns 10 to cap agentic turns, so a stuck run fails fast instead of eating credits.
  4. Spend less per run. Drop to --effort low for mechanical triage, and pick a cheap engine with --list-models plus -m (selected models are free).
  5. Leave no residue. --no-session keeps hundreds of CI invocations from piling up in your resume history.
  6. Debug when the step flakes. Re-run with --verbose to see everything; locally, --ide-setup connects your IDE to share the open file.
# see what models your plan can run (Go = open-source only)
cmd --list-models

# CI step: one-shot flaky triage, machine-readable output
cmd -p "read playwright-report/results.json and list the top 3 suspect flaky specs" --output-format json --max-turns 10 --effort low --no-session > flaky-triage.json

# machine-readable health check for the pipeline
cmd status --json
CI job startspipeline step runscmd -p one shotanswer and exitJSON on stdout--output-format jsonPipeline parsesgate the build
Print mode plus JSON output turns the agent into an ordinary pipeline step
SubcommandWhat it is forFlags worth knowing
cmd login / cmd logoutSign in to your plan, sign out-
cmd whoamiShow which account is active-
cmd helpThe built-in help outputalso -h
cmd infoInfo about your install--verbose, --text
cmd statusCurrent status--json
cmd updateUpdate the CLI--check-only
cmd feedback "message"Send feedback without leaving the terminal-
cmd tasteCommand Code's taste learning layer-
cmd mcpMCP servers-
cmd skillsManage skillsadd <owner/repo>, list, remove, --global
cmd modsManage mods-
Windows readers. Use cmdc wherever this page writes cmd, and keep every command on one line: the backslash line continuation is a bash habit, and PowerShell will not read it. Redirecting with > works in both shells.
Yolo means yolo. --yolo bypasses all permission prompts, and --permission-mode dont-ask stops the asking too. Before reaching for either on a repo you care about, add -w, --worktree so the agent operates in an isolated managed git worktree instead of your live checkout.

Interactive for exploration, -p for pipelines, --max-turns on anything unattended, and /usage as the referee: learn those once and cmd behaves like every other tool in your kit, scriptable and accountable.

Your working day is drive the session, guard the context, pick the model, watch the spend: slash commands are the cockpit switches for all of it, and Command Code groups them so a tester can find the right one mid-run.

The built-in catalogue, grouped for scanning

Built-in/clear, /usage, /modelModshipped by a modCustomyour markdown fileSkilla SKILL.md folder
Dispatch precedence when a name collides, matched case-insensitively
GroupBuilt-in commandsTester's pick
Sessions /clear (/new), /resume (/sessions), /rename [name], /name, /fork [name], /clone, /tree, /rewind, /session, /session-file, /export [html|jsonl|md], /share, /unshare, /exit (/quit), /reload /export md turns the session into evidence you can attach to a bug ticket or PR.
Context /compact, /compact-mode, /context, /memory, /init /context before you blame the model: see what is actually filling the window.
Modes and planning /mode [default|auto-accept|plan], /mode:default, /mode:auto-accept, /mode:plan, /plan [task], /plans [name], /plan-review, /goal <objective>|clear|status, /todos, /review [pr-number], /pr-comments /mode:plan is read only, so you can think through a test approach without burning edit turns.
Models /model [id], /effort [level], /provider, /login, /logout /effort [level]: higher effort buys more reasoning, so keep it low for mechanical checks.
GroupBuilt-in commandsTester's pick
Extensibility /skills, /agents, /mcp, /design [mode], /import [claude|codex|cursor|pi|opencode|gemini], /taste, /learn-taste, /ide, /terminal-setup /import claude brings an existing Claude Code setup across in one move.
Workspace /add-dir <directory>, /worktree [name|list|remove <name>] /worktree isolates a risky refactor in a managed git worktree.
Billing /usage, /upgrade, /extra /usage shows credits, plan, and usage metrics: check it before a big regression run.
Utilities /help, /hotkeys, /config [query], /theme, /status, /changelog, /courses, /update, /feedback, /trace, /copy /help and /hotkeys on day one, /status when something feels off.

Build your own: custom slash commands

  1. Pick a scope. Team commands live in .commandcode/commands/ and show as (project) in the menu; personal ones live in ~/.commandcode/commands/ and show as (user).
  2. Name the file. A command is just a markdown file and the file name is the command: commit.md answers to /commit, bug.md to /bug.
  3. Write the prompt as the body. The full trimmed body IS the prompt that runs, no wrapper or config needed; the menu shows the first meaningful line, so open with a crisp summary.
  4. Slot in arguments. $1 and $2 take positionals (counted from 1), ${1:-fix} adds a fallback, $@ or $ARGUMENTS takes everything, and ${@:2} takes everything from the second argument on.
  5. Quote multi-word values. Arguments split on whitespace but respect single and double quotes, so /bug "Cart total wrong" high keeps the whole title in $1.
  6. Verify the expansion. Run /commit once and read the prompt it produces, the same way you review a generated test before trusting it.
File: .commandcode/commands/commit.md

Write a commit of type "${1:-fix}" with message: ${@:2}

Invoke:     /commit feat add slash command reference
Expands to: Write a commit of type "feat" with message: add slash command reference
Type /bug with argsone line in the promptSplit on whitespacequotes stay intactFill the placeholders$1, ${1:-fix}, ${@:2}Body runs as promptthe file is the command
A custom slash command is one markdown file, and its body is the prompt
TokenExpands to
$ARGUMENTS or $@every argument the caller typed
$1, $2positional arguments, counted from 1
${1}braced positional, same value as $1
${N:-default}argument N, or default when it is missing
${@:-default}all arguments, or default when none were given
${@:N}arguments from position N to the end
${@:N:L}L arguments starting at position N
"quoted text"splitting respects single and double quotes, so a quoted phrase stays one argument
File: .commandcode/commands/bug.md

Write a bug report titled "${1:-untitled bug}" with severity "${2:-medium}".
Observed behavior: ${@:3}
Format it with: steps to reproduce, expected vs actual, environment,
and the evidence a reviewer should attach.

Invoke:     /bug "Cart total wrong" high add items, apply coupon, total ignores discount
Expands to: Write a bug report titled "Cart total wrong" with severity "high".
            Observed behavior: add items, apply coupon, total ignores discount
Mind the pecking order. Dispatch runs built-in -> mod -> custom -> skills with case-insensitive lookup, so a custom review.md (or Review.md) never runs: the built-in /review wins every time. Give your QA commands unclaimed names like /bug or /flaky.

The catalogue drives the tool, and any prompt your team retypes weekly (commit style, bug format, flaky triage) belongs in .commandcode/commands/ as a file. When one prompt file needs templates and scripts around it, that is a skill: next tab.

A slash command carries one prompt; a skill carries a whole QA playbook: instructions, templates, and scripts in a folder that Command Code discovers cheaply and loads only when the task matches.

What a skill is and how it loads

Discoveryname, description, pathActivationthe full SKILL.mdExecutionreferenced scripts and files
Progressive disclosure: idle skills cost almost nothing until one matches
PriorityLocationLevelBadge
1.commandcode/skills/project-
2.agents/skills/project[.agents]
3~/.commandcode/skills/user, all projects-
4~/.agents/skills/user[.agents]
.commandcode/skills/
├── code-review/
│   └── SKILL.md
└── my-skill/
    ├── SKILL.md
    ├── scripts/
    ├── references/
    └── assets/

Build it, invoke it, install it

  1. Scaffold the folder. For a repo-shared skill create .commandcode/skills/test-plan/SKILL.md; for a personal one use ~/.commandcode/skills/. The directory name and the name field must match exactly.
  2. Write the frontmatter. Set name: test-plan and a description that spells out when to use it: discovery only sees name and description, so the description is what requests get matched against. Optional fields like argument-hint and when_to_use can ride along.
  3. Write the body with substitutions. $ARGUMENTS pulls everything the caller typed, ${0} the first argument (skills count from 0), $name reads a declared named argument, and ${COMMANDCODE_SKILL_DIR} points at the skill's own folder for files under references/.
  4. Inject live context. Inline backtick shell such as !`git status --short` runs the command and drops its output into the prompt; a fenced block starting with ```! does the same for several commands. Kill switch: disableSkillShellExecution: true in settings.json.
  5. Invoke it three ways. Start a prompt with /test-plan checkout-v2 guest flows, drop /test-plan inline anywhere in a sentence, or just describe the job and let Command Code suggest the matching skill.
  6. Install team packs. cmd skills add <owner/repo> pulls skills in (-s <skill-name> to pick one, --global), cmd skills list shows them (--debug), cmd skills remove <skill-name> uninstalls (--global --yes), and /skills browses from inside a session.
File: .commandcode/skills/test-plan/SKILL.md

---
name: test-plan
description: Generate a risk-based test plan for a feature, story, or
  pull request. Use when asked what to test, for coverage ideas, or
  for a test plan before build, review, or release.
argument-hint: <feature> <extra context>
when_to_use: Coverage planning for features, PRs, and releases.
---

# Test plan generator

Repo state right now:
!`git status --short`

Write a risk-based test plan for: $ARGUMENTS
Feature under test: ${0}

1. Follow the house template in ${COMMANDCODE_SKILL_DIR}/references/template.md
2. Cover smoke, happy path, negative, edge, and regression risks.
3. Save the finished plan to ${COMMANDCODE_PROJECT_DIR}/docs/test-plans/${0}.md

Invoke:  /test-plan checkout-v2 guest and logged-in flows
Here:    ${0} is "checkout-v2", $ARGUMENTS is the whole argument line
Start the prompt with it/test-plan checkout-v2 guest flowsDrop it inlinemention /test-plan mid sentenceLet it matchdescribe the job, Command Code suggests the skill
Three ways into the same SKILL.md
PlaceholderWhat it injects
$ARGUMENTSeverything the caller passed to the skill
$ARGUMENTS[N] or ${N}argument N, counted from 0
$namea declared named argument
${COMMANDCODE_SKILL_DIR}the skill's own folder: templates, scripts, references
${COMMANDCODE_PROJECT_DIR}the project directory you are working in
${COMMANDCODE_SESSION_ID}the current session id
${COMMANDCODE_EFFORT}the current effort level
!`git status --short`inline shell: the command runs and its output lands in the prompt
```! fenced blocka whole block of shell commands, injected the same way
TaskCommand or settingFlags and knobs
Install skills from a repocmd skills add <owner/repo>-s <skill-name> to pick one, --global
List installed skillscmd skills list--debug
Remove a skillcmd skills remove <skill-name>--global --yes
Browse inside a session/skills-
Load or skip at launchcmd --skill <path>--no-skills skips skill discovery entirely
Tune in settings.jsonskills array adds extra locationsdisabledSkills turns off individual skills, disableSkillShellExecution: true blocks shell injection
Off-by-one trap. Custom slash commands count arguments from 1 ($1 is the first) but skills count from 0 (${0} is the first). Port a prompt from .commandcode/commands/ into a skill and every positional shifts: re-run the invocation and eyeball the expansion before the team adopts it.

Skills are how a QA team stops re-teaching the agent every morning: the playbook lives in the repo, the priority order decides which copy wins, and the agent only reads the full instructions when a task actually matches.

Kill the myth first: no Command Code plan offers unlimited usage, so the real skill is spending a metered credit pool deliberately instead of hoping it never runs out.

The honest math behind the dollar plan

Model pricefree up to $10 perMtokEffort levellow, medium, highContext resentcompact it awayAgent turnscap with --max-turnsCredits spentwhat the fourdecide
Four things decide the spend, and every lever in this tab pulls on one of them

The $10 routine, step by step

  1. Set cheap defaults. Run cmd --list-models, pick a free or low-cost open-source model, and launch with cmd -m <model-id> --effort low. On Go you are on open-source models anyway, and selected models cost nothing.
  2. Check the meter before a big run. /usage shows credits, plan, and usage metrics, so you know what a long triage session can afford before you start it, not after.
  3. Think in plan mode. Start risky work with cmd --plan or switch with /mode:plan. Plan mode is read only, so you settle the approach without burning edit turns on a direction you will throw away.
  4. Stop paying for the bloat. When /context shows the window stuffed with old tool output, run /compact. Otherwise every new message pays to resend the whole bloated transcript.
  5. Cap the loop. Add --max-turns 10 to anything unattended: it is the simplest guard against a confused agent looping through your pool.
  6. One-shot your scripts. In CI use cmd -p "query": it prints the answer and exits, so nothing is left waiting for input that never comes.
# --- in your shell ---
# pick the cheapest model that can do the job
cmd --list-models
cmd -m <free-model-id> --effort low --plan

# --- at the Command Code prompt, inside a session ---
/usage      # credits, plan, usage metrics
/context    # what is filling the window
/compact    # stop resending the bloat

# --- back in your shell: guard-railed one-shot for CI ---
cmd -p "summarize the failing specs in the junit report" --max-turns 10
Included creditsreset monthly, capped at 30 percent per 5 hours and 60 percent per weekOn-demand top-upsroll over, never expire, never throttledFree or balance-onlyno rolling caps apply
Two pools with different rules, so buy top-ups for the weeks that spike
LeverWhereWhat it saves
Model choice--list-models, -m, /modelThe biggest lever: pricing spans free (selected models) to $10.00 per million input tokens
Reasoning effort--effort low, /effortHigher effort means more reasoning to pay for, so keep mechanical work on low
Compact context/context, /compactStops paying to resend a bloated transcript with every single message
Plan mode--plan, /mode:planRead-only thinking: no edit turns spent while the approach is still in doubt
Turn cap--max-turns <number>Kills a runaway agent loop before it drains the pool
One-shot mode-p, --printCI answers and exits instead of leaving an interactive session waiting
Usage check/usageShows credits, plan, and usage metrics before you commit to a heavy run
No unlimited, ever. No Command Code plan offers unlimited usage. Included credits reset monthly and carry the rolling 5-hour (30 percent) and weekly (60 percent) caps. On-demand top-ups bought with /extra are never throttled and never expire, but they are additional spend, not free headroom.

A realistic month on the dollar plan: treat the $10 as about 15K requests on open-source models, default to a free model at --effort low, compact before long sessions, keep any single 5-hour push under 30 percent of the pool and any week under 60 percent, and bank an /extra top-up for release week, since it rolls over, never expires, and is never throttled.

One pass, end to end: a flaky login spec goes from triage to merged fix using the CLI, one custom slash command, one skill, an isolated worktree, and a CI one-shot.

The pieces you will chain

/initAGENTS.mdconventionsPlan modescope beforeeditingCommand plusskillthe repeatable fixWorktreeisolate the riskReview and CIclose the loop
One pass from flaky spec to merged fix

Run it: flaky spec to green PR

  1. Teach the repo. In the project root run cmd, then /init: it writes AGENTS.md with your conventions. Commit that file so the agent, and every teammate's agent, plays by the same rules.
  2. Scope the fix in plan mode. Start cmd --plan "login.spec.ts is flaky: find the root cause and propose a fix". Read the plan, then switch to /mode:default only when you approve it.
  3. Script the repetitive part. Save .commandcode/commands/flaky.md with a triage prompt using ${1:-login.spec.ts} and ${@:2}; from then on /flaky checkout.spec.ts attach traces reruns the same triage on any spec.
  4. Carry the playbook as a skill. Create .commandcode/skills/flaky-triage/SKILL.md (frontmatter needs name and description, and the directory name must match), or install a shared one with cmd skills add <owner/repo> -s flaky-triage. Invoke it with /flaky-triage.
  5. Refactor in a worktree. Launch the risky cleanup with cmd -w login-fix: the agent works in an isolated managed worktree, and /worktree list shows what exists when you want to inspect or remove it.
  6. Review, then wire CI. On the pull request run /review 42 and sweep /pr-comments; in the pipeline call cmd -p with --max-turns so the job answers, exits, and never hangs.
# --- at the Command Code prompt, once ---
# teach the repo its own rules
/init

# --- in your shell: scope the fix without spending edit turns ---
cmd --plan "login.spec.ts is flaky: find the root cause and propose a fix"

# reusable triage command: .commandcode/commands/flaky.md
#   Rerun and triage flaky spec "${1:-login.spec.ts}", then draft a bug report: ${@:2}
/flaky checkout.spec.ts attach traces

# the QA playbook skill: .commandcode/skills/flaky-triage/SKILL.md
/flaky-triage login.spec.ts

# risky refactor in an isolated managed worktree
cmd -w login-fix

# close the loop: PR review, then a CI one-shot
/review 42
cmd -p "run the login suite and summarize failures" --max-turns 10
AGENTS.mdthe conventions contract /init writes.commandcode/commands/your slash commands.commandcode/skills/your QA playbooksCI jobcmd -p with --max-turns
Where each piece lives, all of it committed with the repo
StageToolWhy it is there
Onboard/init -> AGENTS.mdRepo conventions the agent follows in every session
Scope--plan, /mode:planRead-only planning: no edits until you approve the approach
Repeat work.commandcode/commands/flaky.mdOne markdown file becomes /flaky with $1 arguments
Playbook.commandcode/skills/flaky-triage/SKILL.md loads on match: name and description at startup, full body on activation
Risky changecmd -w login-fixManaged git worktree keeps your checkout clean
Ship/review, /pr-comments, cmd -pPR review in session, one-shot non-interactive runs in CI
Reality check. AGENTS.md and skills steer the agent, they do not guarantee correctness: read the plan before approving it, review every diff before merging, and keep --max-turns on anything unattended. Every step in this loop spends credits from the same monthly pool, so the tab-five habits apply here too.

That is the whole loop: conventions written once, a plan approved per task, the repetitive parts turned into a command and a skill, the scary parts isolated in a worktree, and cmd -p holding the line in CI.