tq-forge-agent
Skill8 starsChanged 5 months agoMITView on GitHub
Force-agent mode — bypass /tq-forge's auto-classification and scaffold a 5-file agent in the sandbox. Picks a base template (researcher, coder, business-analyst, ops-manager, scraper, reviewer, sales-agent, custom) and injects your domain context from $TQ_FORGE_HOME/context.md. Use when asked for "/tq-forge-agent", "make an agent that...", or "scaffold an agent".
In this repository17 other files it gives its agents.
- handoffSkill
- keep-warmSkill
- savingsSkill
- switchboardSkill
- tq-forge-agentsSkill
- tq-forge-improve-allSkill
- tq-forge-improveSkill
- tq-forge-learnSkill
- tq-forge-listSkill
- tq-forge-promoteSkill
- tq-forge-queueSkill
- tq-forge-resumeSkill
- tq-forge-scanSkill
- tq-forgeSkill
- tq-forge-skillSkill
- tq-forge-statusSkill
- tq-forge-testSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Check the halt flag: If $TQ_FORGE_HOME/halt.flag exists, queue and exit:
- Very specific: line 59
If the user wants a native Claude Code subagent (one .claude/agents/<name>.md file) instead of the 5-file agent, scaffold it and skip step …
- Very specific: line 73
Write each file, basing persona/output-format/NEVER on the template:
- Very specific: line 109
If system-prompt.md has neither the {{CONTEXT}} substitution nor a ## Domain context section, scoring drops completeness.
- Very specific: line 114
If context.md is still the placeholder, the agent will be generic.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
/tq-forge-agent — force-agent scaffold
When to use
You want a multi-turn, persona-driven agent with a rigid output format — not a
one-shot procedural skill. The agent lives as a 5-file directory under
$TQ_FORGE_HOME/sandbox/forged-agents/<slug>/: AGENT.md, system-prompt.md,
tools.json, trigger-conditions.md, example-tasks.md. /tq-forge-promote
is the only path that moves it into production.
Procedure
export TQ_FORGE_HOME="${TQ_FORGE_HOME:-$HOME/.tq-forge}"
S="${CLAUDE_PLUGIN_ROOT:-${TQ_FORGE_HOME:-$HOME/.tq-forge}/install}/scripts"; T="${CLAUDE_PLUGIN_ROOT:-${TQ_FORGE_HOME:-$HOME/.tq-forge}/install}/templates/agent-templates"
source "$S/common.sh" && tq_ensure_home- Check the halt flag. If
$TQ_FORGE_HOME/halt.flagexists, queue and exit:test -f "$TQ_FORGE_HOME/halt.flag" && bash "$S/forge-checkpoint.sh" queue "<intent>" && exit 0 - Pick the agent kind via AskUserQuestion (default to the closest match by
the intent's verbs — search -> researcher, build -> coder, monitor ->
ops-manager):
researcher,coder,business-analyst,ops-manager,scraper,reviewer,sales-agent,custom. - Pick a slug. Lowercase, hyphenated, <=32 chars. Confirm if ambiguous.
- Check for collisions.
for d in "$SANDBOX_AGENTS/<slug>" "$CLAUDE_SKILLS_DIR/agents/<slug>"; do test -e "$d" && echo "EXISTS: $d" done Read the template + your context.
cat "$T/<kind>.md" cat "$TQ_FORGE_HOME/context.md"If the user wants a native Claude Code subagent (one
.claude/agents/<name>.mdfile) instead of the 5-file agent, scaffold it and skip step 6:bash "$S/scaffold.sh" list bash "$S/scaffold.sh" agent --template code-reviewer --out . bash "$S/scaffold.sh" agent "<intent>" --model fable --effort high --isolated--isolatedsetsisolation: worktree; the worktree starts from the default branch, so commit the work the subagent must see first.- Create the directory + 5 files.
Write each file, basing persona/output-format/NEVER on the template:mkdir -p "$SANDBOX_AGENTS/<slug>"AGENT.md— kind, slug, one-paragraph mission, default_tools,dry_test_score_target,hand_off_tolist.system-prompt.md— 500-1500 words. Sections:## Persona,## Operating principles,## Output format(fenced block),## NEVER, and## Domain contextwith the fullcontext.mdsubstituted in wherever the template had{{CONTEXT}}.tools.json—{"tools": [...], "hand_off_to": [...]}from the template'sdefault_tools.trigger-conditions.md— 3-6 intent patterns that should route here.example-tasks.md— at least 3## Task Nentries showing input -> expected output shape, drawn from your domain context.
- Score it.
bash "$S/quality-score.sh" "$SANDBOX_AGENTS/<slug>" bash "$S/dry-test.sh" "$SANDBOX_AGENTS/<slug>" - If quality score < 7, rewrite the lowest-scoring dimension once (usually
system-prompt.mdlength or output-format rigidity), re-score. If still <7:bash "$S/forge-checkpoint.sh" review "<slug>" "<weak-dim>" "<score>" - Append to skill-log.json.
python3 -c "import json,datetime,pathlib,os;p=pathlib.Path(os.environ['TQ_FORGE_HOME'])/'skill-log.json';d=json.loads(p.read_text() or '[]');d.append({'slug':'<slug>','kind':'agent','score':<S>,'at':datetime.datetime.now(datetime.timezone.utc).isoformat(),'intent':'<intent>','status':'sandbox'});p.write_text(json.dumps(d,indent=2))" - Print summary. slug, kind, score, sandbox path, and
/tq-forge-promote <slug>.
Pitfalls
- An agent missing any of the 5 files fails dry-test. Don't ship 4-of-5 — write the missing file (even a stub) and re-run.
- If
system-prompt.mdhas neither the{{CONTEXT}}substitution nor a## Domain contextsection, scoring dropscompleteness. Always injectcontext.md. tools.jsonmust be valid JSON withtoolsandhand_off_tokeys. A trailing comma breaks dry-test.- If
context.mdis still the placeholder, the agent will be generic. Tell the user to fill in$TQ_FORGE_HOME/context.mdfirst.
Verification
$SANDBOX_AGENTS/<slug>/contains all 5 files.dry-test.shreturns verdictpass(>=85% checks).quality-score.shreports avg >=7.skill-log.jsonhas a new entry withkind: agent, status: sandbox.
Tags
tq-forge force-agent sandbox agent-factory
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.

