Amplifier skill forge
Cross-harness Agent Skill: terminal & coding-agent orchestration via the forge PTY daemon — Claude Code, Codex, Gemini, OpenCode, and Amplifier, with an artifact-gated multi-agent relay controller
npx -y skills add michaeljabbour/amplifier-skill-forgeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 22 days oldThe repository was created 22 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Spin up, fan out, drive, and test terminal apps in persistent PTY sessions via the forge terminal daemon — including orchestrating coding agents (Claude Code, Codex, Gemini, OpenCode) and Microsoft Amplifier. Use when asked to launch or test an app in a terminal, drive a TUI, run terminal sessions in parallel, operate Claude Code / Codex / OpenCode / amplifier programmatically, spawn or delegate to another coding agent, coordinate multiple agents through shared artifacts, babysit long-running pipelines, or when you need to launch, drive, or test Amplifier itself in a real terminal session (interactive runs, or supervising attractor / evaluation / resolve / superpowers jobs via their file ledgers).
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
10.6 KB, ~2.5k tokens by cl100k_base, as published. Nobody here has run it
Amplifier + Forge: Terminal & Agent Orchestration
All commands below use the helper at tools/forge.py relative to this skill's
directory (the folder containing this SKILL.md — resolve it first and export
FORGE=<skill-dir>/tools/forge.py). It is stdlib-only python3; it talks to the
forge daemon over HTTP, so it works even where forge's MCP tools are not
connected.
For artifact-gated multi-agent work, also resolve
RELAY=<skill-dir>/tools/relay.py. It maintains a private, resumable ledger and
drives forge.py; use it instead of reconstructing relay state in chat.
Before the first Forge operation
Run doctor before creating or driving a Forge session. Skip it when only
reading this skill's references or reviewing source files.
python3 "$FORGE" doctor # starts daemon if down; auto-fixes node-pty spawn-helper exec bit
doctor may start a local daemon and write its MCP session cache under the
user's cache directory. If Codex blocks localhost access or an out-of-workspace
repair, request only the permission needed for that operation. Do not bypass
the Codex sandbox globally.
Core loop: spawn → drive → observe → assert → teardown
SID=$(python3 "$FORGE" new --name myapp --cwd /repo --tag batch1) # sleep 2 before first cmd
python3 "$FORGE" run "$SID" "npm run dev" --wait 5 # type + enter + cleaned output
python3 "$FORGE" screen "$SID" # rendered viewport — TUIs
python3 "$FORGE" read "$SID" # incremental stream — logs
python3 "$FORGE" wait "$SID" "Ready in" --timeout 29000 # regex; exit 1 on timeout
python3 "$FORGE" grep "$SID" "error" --max 20 # single words only: ANSI can
# split phrases in the buffer
python3 "$FORGE" close "$SID" # or: close-tag batch1
Rules:
waittimeouts are capped ~30s server-side — loopwaitcalls for longer waits.- One-shot build/test commands: use
exec(real exit code, auto-cleanup), not a session:python3 "$FORGE" exec "pytest -q" --cwd /repo --timeout 300000 - TUIs: drive with
type+key(enter,escape,ctrl+c,up,down,tab...).keyhas a fixed list; other control chars viatyperaw bytes:"$(printf '\x11')". - Fan-out: tag every session in a batch; give each parallel worker one session id;
reap the whole batch with
close-tag.
Orchestrating coding agents
Forge natively wraps Claude Code, Codex, and Gemini (interactive or one-shot, optional isolated git worktrees). OpenCode is driven as a generic PTY.
Inside Codex, prefer native subagents for ordinary parallel code work. Use
Forge when the task specifically needs persistent PTYs, TUI interaction,
cross-harness agents, isolated terminal sessions, or processes that must
survive a turn. Loading this skill alone does not authorize delegation; follow
the user's request and the active AGENTS.md delegation policy.
# Fire-and-collect (blocks up to --timeout, returns output + sessionId):
python3 "$FORGE" delegate claude "fix the failing test" --cwd /repo --model haiku
python3 "$FORGE" delegate codex "review this diff" --cwd /repo # permissions not explicit
python3 "$FORGE" codex-exec "fix the failing test" --cwd /repo --sandbox workspace-write
python3 "$FORGE" delegate claude "start refactor" --cwd /repo --mode interactive
AGENT_SID=SESSION_ID # copy sessionId from the JSON result above
python3 "$FORGE" delegate claude "now add tests" --session "$AGENT_SID" # follow-up
# Long-lived interactive agents (returns session id immediately):
SID=$(python3 "$FORGE" spawn-claude --cwd /repo --prompt "audit this repo" --tag agents)
python3 "$FORGE" submit "$SID" "focus on the auth module" # Claude: Escape+Enter
SID=$(python3 "$FORGE" new --cwd /repo --program "$(command -v codex)" \
--arg=--sandbox --arg=workspace-write --tag agents) # explicit Codex permissions
python3 "$FORGE" history "$SID" # agent tool-call history
# Isolated parallel work: --worktree --branch feature/x (per agent git worktree)
# OpenCode (generic PTY; headless run is simplest):
python3 "$FORGE" exec "opencode run 'explain this codebase'" --cwd /repo --timeout 300000
Gotchas (verified):
- Forge 0.9.0's native Codex wrappers do not expose Codex sandbox flags; the
interactive wrapper has been observed launching in
YOLO mode. Do not use those wrappers when the permission boundary matters. Usecodex-exec, a generic PTY with literal--arg=--sandbox, orrelay start ... --sandbox; reservedanger-full-accessfor an externally isolated environment. - Inspect
screenafter spawning an interactive agent. First-run trust, auth, update, or hook-review gates can consume the initial prompt; resolve the gate and resubmit only when the prompt is absent. codex execrefuses to run outside a git repo (--skip-git-repo-checkor use a repo cwd).- Claude one-shot prompts:
delegateis more reliable than screen-scrapingspawn --one-shot. - Idle/busy detection and full flag references: see references/driving-claude-code.md and references/driving-codex-opencode.md.
Coordinating a real multi-agent relay
When the user asks agents to work together, use artifact-gated handoffs rather than marker-only demos or independent fan-out. Read references/multi-agent-relay.md and follow its planner → implementer → reviewer → resolver → acceptor protocol.
Initialize the controller with the exact files and test command, then retain the printed state path across turns:
STATE=$(python3 "$RELAY" init --cwd /repo --tag ticket-123 --goal "build X" \
--implementation-artifact src/x.py --implementation-artifact tests/test_x.py \
--test-command "python3 -m unittest discover -s tests -v")
python3 "$RELAY" preflight --state "$STATE" --harness claude --harness codex
python3 "$RELAY" start planner --state "$STATE" --harness claude
python3 "$RELAY" send planner --state "$STATE"
python3 "$RELAY" wait planner --state "$STATE" --attempts 10
python3 "$RELAY" gate planner --state "$STATE"
Repeat start → send → wait → gate for each role and harness. Codex
starts require an explicit --sandbox value; use workspace-write only for
authorized implementation roles and read-only for review. Use
status to resume after interruption, cost for provider charges, evidence
for the final report, and close unless the user wants dashboard sessions left
open. Inspect the initial and post-send screens; resolve first-run gates before
continuing. Never advance when gate exits nonzero.
Use a shared Git workspace for sequential roles and isolated worktrees for
concurrent editors. Advance only when all three gates pass: the expected file
exists, the agent emitted its completion marker, and an independent command
verified the artifact. Freeze specifications with a hash, pass raw files rather
than summaries, require a written review verdict and resolution, and leave a
final acceptance ledger. A timeout is an observation point, not permission to
advance: inspect screen, then continue waiting or intervene explicitly.
Driving Amplifier
SID=$(python3 "$FORGE" new --name amp --cwd /project); sleep 2
python3 "$FORGE" type "$SID" "amplifier"; python3 "$FORGE" key "$SID" enter
# boot composes bundles: 1-3 min cold
for i in 1 2 3 4 5 6; do python3 "$FORGE" wait "$SID" "Amplifier Interactive Session" --timeout 29000 && break; done
python3 "$FORGE" type "$SID" "/status"; python3 "$FORGE" key "$SID" enter
python3 "$FORGE" wait "$SID" 'Turn: \$' --timeout 29000 # cost footer = turn complete
# Scriptable (two separate examples, not a pipe):
# amplifier run --output-format json "prompt"
# amplifier run --bundle ./bundle.md "smoke"
Watch costs: heavy bundles can reach 100k+ token system prompts (>$1/turn uncached; the
footer prints per-turn and session cost). Multi-line input: Ctrl-J newline,
Enter submits. Long-running processes (attractor pipelines, evaluation batches,
resolve instances): poll their file ledgers (checkpoint.json, state.json,
events.jsonl) with exec, not the screen.
Reference library (load on demand)
| Topic | File |
|---|---|
| Amplifier CLI: install, run/continue/resume, sessions, bundles, settings, JSON output | references/using-amplifier.md |
| Building bundles/agents/skills/modes/tools, mount plans, conformance | references/building-with-amplifier.md |
| Condensed expert-verified builder reference (exact schemas + CLI) | references/expert-bundle-reference.md |
| Long-running loops: evaluation, attractor, resolve | references/long-running-processes.md |
| Superpowers workflow: brainstorm→plan→execute→verify→finish, debug | references/superpowers-lifecycle.md |
| Claude Code CLI: headless flags, TUI keys, state detection, sessions | references/driving-claude-code.md |
| Codex CLI + OpenCode: exec/run modes, TUI keys, auth, comparison table | references/driving-codex-opencode.md |
| Multi-agent coordination: shared-artifact relay, gates, review, resolution, acceptance | references/multi-agent-relay.md |
| Deep orchestration playbook: TUI testing method, failure modes, ledger babysitting | references/orchestration-playbook.md |
Fresher ground truth for Amplifier lives in ~/.amplifier/cache/amplifier-foundation-*/docs/
and the in-app experts (amplifier:amplifier-expert, foundation:foundation-expert,
core:core-expert).
What ships with it: 20 files
272.7 KB alongside SKILL.md, 6 of them executable
agents/
- openai.yaml273 B
references/
- building-with-amplifier.md31.5 KB
- driving-claude-code.md23.8 KB
- driving-codex-opencode.md20.6 KB
- expert-bundle-reference.md17.4 KB
- long-running-processes.md27.5 KB
- multi-agent-relay.md9.6 KB
- orchestration-playbook.md10.8 KB
- superpowers-lifecycle.md24.8 KB
- using-amplifier.md14.5 KB
scripts/
- install.shruns3.8 KB
tests/
- test_forge.pyruns5.0 KB
- test_relay.pyruns12.9 KB
- test_skill_contract.pyruns4.3 KB
- AGENTS.md1.9 KB
- .gitignore82 B
- LICENSE1.0 KB
- README.md13.9 KB
Gives 0 of the 12 instructions most context ai engineering skills give in ~2.5k tokens
Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-07
- Dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
- Dispatch a final code reviewer after all tasksin 33 of 1193, across 8 files
- Provide full task text to the subagentin 30 of 1193, across 9 files
- Review spec compliance before code qualityin 27 of 1193, across 10 files
- Make the hook script executablein 26 of 1193, across 8 files
- Re-snapshot after navigation or DOM changesin 25 of 1193, across 19 files
- Read files before editing themin 22 of 1193, across 11 files
- Answer subagent questions before proceedingin 22 of 1193, across 7 files
- Mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
- Merge hook into existing settingsin 21 of 1193, across 3 files
- Ask if installation is global or projectin 20 of 1193, across 2 files
- Copy the hook script to target locationin 20 of 1193, across 2 files
Said here and by no other author read
- resolve skill directory and export FORGE variable
- run doctor before any forge operation
- use exec for one-shot build or test commands
- use wait to observe terminal output
- use grep for single words only
- request only needed permissions; never bypass sandbox globally
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.