agentleFS
tanishq286tanishq286/tq-forge/skills/tq-forge-promote/SKILL.md

tq-forge-promote

Skill8 starsChanged 5 months agoMITView on GitHub

Promote a sandboxed forged skill or agent from $TQ_FORGE_HOME/sandbox/ into production at $CLAUDE_SKILLS_DIR, re-scoring first and refusing anything below 7/10 or failing dry-test. Use when asked for "/tq-forge-promote", "ship the skill", "install the agent", or "move from sandbox to production".

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check the halt flag: If $TQ_FORGE_HOME/halt.flag exists, queue and exit:

    line 32
  2. Distinctive:

    If neither exists, abort and list what's available:

    line 43
  3. Distinctive:

    Re-score before promoting: Never trust a stale score:

    line 48
  4. Very specific:

    If avg < 7 OR dry-test verdict != pass, refuse: "Score is X/10 — run /tq-forge-improve <slug> first."

    line 53
  5. Very specific:

    Use cp -r, not mv — keep the sandbox copy as a rollback.

    line 77

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/tq-forge-promote — sandbox -> production

When to use

A skill or agent in $TQ_FORGE_HOME/sandbox/forged-{skills,agents}/<slug>/ has passed scoring (>=7) and is ready to ship. This is the only path that writes into $CLAUDE_SKILLS_DIR (default ~/.claude/skills).

Procedure

export TQ_FORGE_HOME="${TQ_FORGE_HOME:-$HOME/.tq-forge}"
S="${CLAUDE_PLUGIN_ROOT:-${TQ_FORGE_HOME:-$HOME/.tq-forge}/install}/scripts"
source "$S/common.sh" && tq_ensure_home
  1. Check the halt flag. If $TQ_FORGE_HOME/halt.flag exists, queue and exit:
    test -f "$TQ_FORGE_HOME/halt.flag" && bash "$S/forge-checkpoint.sh" queue "promote <slug>" && exit 0
  2. Resolve the slug.
    for d in "$SANDBOX_SKILLS/<slug>" "$SANDBOX_AGENTS/<slug>"; do
      test -e "$d" && echo "FOUND: $d"
    done
    If neither exists, abort and list what's available:
    ls "$SANDBOX_SKILLS" "$SANDBOX_AGENTS"
  3. Re-score before promoting. Never trust a stale score:
    bash "$S/quality-score.sh" --auto-detect "<slug>"
    bash "$S/dry-test.sh" "$SANDBOX_SKILLS/<slug>"   # or $SANDBOX_AGENTS
    If avg < 7 OR dry-test verdict != pass, refuse: "Score is X/10 — run /tq-forge-improve <slug> first."
  4. Copy into production.
    # Skill
    mkdir -p "$CLAUDE_SKILLS_DIR"
    cp -r "$SANDBOX_SKILLS/<slug>" "$CLAUDE_SKILLS_DIR/<slug>"
    
    # Agent
    mkdir -p "$CLAUDE_SKILLS_DIR/agents"
    cp -r "$SANDBOX_AGENTS/<slug>" "$CLAUDE_SKILLS_DIR/agents/<slug>"
  5. Update skill-log.json status.
    python3 -c "import json,pathlib,os;p=pathlib.Path(os.environ['TQ_FORGE_HOME'])/'skill-log.json';d=json.loads(p.read_text() or '[]');[e.update({'status':'promoted'}) for e in d if e.get('slug')=='<slug>'];p.write_text(json.dumps(d,indent=2))"
  6. Print summary. slug, kind, final score, production path, and the reminder: "Restart Claude Code (or reload skills) to pick it up."

Pitfalls

  • Use cp -r, not mv — keep the sandbox copy as a rollback. Only delete the sandbox dir after the user confirms production works.
  • A slug already present at $CLAUDE_SKILLS_DIR/<slug>/ means a name collision with another skill set — refuse and ask the user to rename.
  • Skills are loaded at session start; a freshly promoted skill won't be callable until the session reloads. Say so explicitly.

Verification

  • $CLAUDE_SKILLS_DIR/<slug>/SKILL.md (or agents/<slug>/AGENT.md) exists.
  • skill-log.json shows status: promoted for the slug.
  • Re-running quality-score on the production path still reports >=7.

Tags

tq-forge promote production

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.