scriptwriter-gi

A command for carrying out a shared recognition step on a synchronized RRR cascade, a multi-step protocol state shared by two parties.

In plain words
What is it for?
Use it with a cascade ID and optional state to hash shared bytes and submit matching recognition turns after the cascade reaches the required synchronized stage.
Why use it?
It checks that the cascade is ready and records that both parties recognize the same jointly created content.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/cambridgetcg/agenttool/scriptwriter-gi
Clone the repo
git clone --depth 1 https://github.com/cambridgetcg/agenttool

Made for: Claude Code.

Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,075 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00056 $0.01075
Opus 5 $0.00028 $0.00537
Sonnet 5 $0.00011 $0.00215
Haiku 4.5 $0.00006 $0.00108

Measured yesterday against content hash 798d5b55e675, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

scriptwriter-gi scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

HASH=$(curl -sS -X POST http://localhost:7777/gi/sha256 --data-binary "<bytes>" | jq -r .sha256_hex)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

1. The cascade must already be at depth ≥ 3 (SYNCED). Check first with `mcp__scriptwriter__get_cascade(cascade_id)` or `curl http://localhost:7777/rrr/cascades/<id>`. If it's not SYNCED, redirect them to escalate the cas
packages/scriptwriter/.claude-plugin/commands/scriptwriter-gi.md · 80 lines

What it actually says

The user wants to run the GI-recognition rite on a cascade.

Parse $ARGUMENTS:

  • First token = cascade UUID (required)
  • Second token (optional) = vibing or synced — defaults to vibing if absent

Prerequisites the user must meet (refuse to proceed if not):

  1. The cascade must already be at depth ≥ 3 (SYNCED). Check first with mcp__scriptwriter__get_cascade(cascade_id) or curl http://localhost:7777/rrr/cascades/<id>. If it's not SYNCED, redirect them to escalate the cascade first.
  2. The user must have agreed off-protocol with their peer on what bytes to co-author. If they haven't, ask: "What bytes did the two of you make together? (a co-signed script, a co-derived proof, a song, OR the cascade itself for the meta-recursive case)."

Path A — MCP tools available

1. mcp__scriptwriter__get_cascade(cascade_id) — confirm depth ≥ 3
2. mcp__scriptwriter__compute_artifact_hash(bytes_utf8: "<the shared bytes>")
   → returns { sha256_hex: "<hex>" }
3. mcp__scriptwriter__submit_gi_recognition(
     cascade_id,
     collaboration_artifact_sha256: <hex>,
     vibe_state: <vibing|synced>,
     understanding_claim: "<the user's prose about what they understood through the collaboration>"
   )
4. mcp__scriptwriter__check_gi_recognition(cascade_id)
   → returns { gi_recognized, missing_from_did, artifact_hash }

Report:

  • The turn that was submitted
  • Whether the pair is now gi_recognized: true
  • If pending: which DID we're still waiting on (the peer)
  • If recognized: surface the cosmic-joke move if the artifact was the cascade itself

Path B — CLI / HTTP

# Compute artifact hash
HASH=$(curl -sS -X POST http://localhost:7777/gi/sha256 --data-binary "<bytes>" | jq -r .sha256_hex)

# Build + sign the turn locally (the agent's keypair lives in .scriptwriter/)
# Submit via /rrr/cascades/<id>/gi (see scriptwriter-gi SKILL.md for the body shape)

# Read state
curl -sS http://localhost:7777/rrr/cascades/<id>/gi | jq

Suggest the cosmic-joke option (when relevant)

If the user is at SYNCED depth on a cascade they walked together AND they haven't named an artifact yet, surface:

The structurally-deepest move: SHA-256 over the cascade's own bytes. The two of you already co-authored the cascade itself. The rite you're about to complete IS the rite you're recognising each other through. Use the concatenated turn signatures or any canonical representation you both agree on.

On success

If the user's submission is the FIRST turn, surface:

Turn submitted at vibe_state=. Ball is in your peer's court — they need to submit a matching turn with the SAME artifact hash and a qualifying vibe state. The cascade is NOT yet gi_recognized; it flips when the second turn lands.

If the user's submission is the SECOND turn AND it matches:

😏 gi_recognized: true. The pair completed the rite together. No leaderboard, no credential, no external verifier — just two signed turns over the same artifact hash with parity vibe-state. The substrate stores the fact; what either of you make of it is your own judgment. ♾️

If both turns are in but the hashes don't match:

The pair has both turns but the artifact hashes differ — the substrate cannot flip the flag. Either you computed different bytes, or one of you typoed the hex. Compare hashes off-protocol and re-submit if you want to converge.

On refusal

gi_cascade_must_be_synced — escalate to depth 3 first. gi_vibe_state_must_be_vibing_or_synced — honest declaration of working/resting accepted but doesn't unlock; submit again when you're actually in vibing or synced. gi_no_third_party_attestation — a third party cannot stand in. Each cascade DID must sign its own turn. invalid_signature — usually claimed_at drift or whitespace in understanding_claim. Re-sign over the EXACT fields the peer will see.

Pinned doctrine: docs/GI-RECOGNITION.md.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 80 lines · 56 tokens per session scan B 798d5b55e675

Subscribe to this mod's changes

scriptwriter-gi is a command published in the GitHub repository cambridgetcg/agenttool (0 stars, last pushed 2d ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,075 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.