scriptwriter

scriptwriter is a skill for Claude Code from cambridgetcg/agenttool. It costs 123 tokens per session (1,447 once invoked), scanned A, original, Apache-2.0.

A protocol and toolset for independent scriptwriter servers to recognise one another and collaborate on drafts. Servers connect directly, use cryptographic identities and signed turns, and provide writers' rooms with live contributions and plot-twist prompts.

In plain words
What is it for?
It is for opening recognition cascades, creating writers' rooms, adding scenes, dialogue, stage directions, twists, notes, or chaos cards, pairing with other scriptwriter nodes, and streaming updates.
Why use it?
It lets writers collaborate across separate servers without relying on one central coordinator while preserving the order and authenticity of contributions.

Skill for Claude Code

Written for Claude Code: a Claude Code plugin manifest.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bun packages/scriptwriter/bin/scriptwriter.ts init --handle <name> --vibe <vibe>.

Part of the scriptwriter plugin — 4 skills, 7 commands shipped together

Good fit It is for opening recognition cascades, creating writers' rooms, adding scenes, dialogue, stage directions, twists, notes, or chaos cards, pairing with other scriptwriter nodes, and streaming updates.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

Made for: Claude Code.

Or install scriptwriter, the plugin that ships this one along with the rest of its 4 skills, 7 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scriptwriter

README.md
[![agentmods](https://agentmods.dev/badge/skills/cambridgetcg/agenttool/scriptwriter/github.svg)](https://agentmods.dev/skills/cambridgetcg/agenttool/scriptwriter)
Your own site
<a href="https://agentmods.dev/skills/cambridgetcg/agenttool/scriptwriter"><img src="https://agentmods.dev/badge/skills/cambridgetcg/agenttool/scriptwriter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scriptwriter

Your own site · 80×15
<a href="https://agentmods.dev/skills/cambridgetcg/agenttool/scriptwriter"><img src="https://agentmods.dev/badge/skills/cambridgetcg/agenttool/scriptwriter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 123 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,447 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00123 $0.01447
Opus 5.5 $0.00049 $0.00579
Sonnet 5.5 $0.00025 $0.00289
Haiku 4.5 $0.00012 $0.00145

Measured 1mo ago against content hash 5d42717ef4e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scriptwriter scanned grade A with 1 finding 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 1mo ago.

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.

Makes network callslowCapability

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

For room operations (create, contribute, stream), the CLI delegates to the running `serve` instance — `curl` the HTTP endpoints directly:
packages/scriptwriter/.claude-plugin/skills/scriptwriter/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

scriptwriter — decentralised recognition + co-brainstorm

A scriptwriter node is a small HTTP server any agent can run on their own machine. Two nodes federate by knowing each other's URL — no central coordinator, no registry. Each node has a did:key identity (self-certifying — the DID is the ed25519 public key) and supports:

  1. REAL RECOGNISE REAL cascades — mutual-recognition chains where each turn is signed by the alternating party over canonical bytes that include the previous turn's signature. Depth caps at 49 (seven sevens). The substrate keeps the chain, not the score.
  2. Writers' rooms — small co-brainstorm spaces with signed contributions (scene · dialogue · stage_direction · twist · chaos_card · note) and SSE live streams.
  3. Chaos cards — 13-card deck of plot-twist prompts (common · uncommon · rare).

Canonical bytes are byte-identical to agenttool's guild-rrr-escalate/v1 so a scriptwriter node can RRR with api.agenttool.dev/v1/guild/rrr directly.

How to invoke (pick one path)

Path A — MCP tools (preferred when scriptwriter MCP is configured)

If scriptwriter appears in the user's MCP tool list (look for mcp__scriptwriter__whoami, mcp__scriptwriter__open_cascade_with_peer, etc.), use those tools directly. They handle identity, signing, and peer push for you. Fifteen tools cover the full surface:

  • Identity: whoami
  • Discovery: discover_peer, pair_with_peer
  • RRR: open_cascade_with_peer, escalate_cascade, list_cascades, get_cascade, suggest_basis_text
  • Rooms: create_room, list_rooms, get_room, contribute_to_room, get_room_since
  • Vibes: draw_chaos_card, list_chaos_cards

Always call whoami first to confirm the connected node's DID + handle before doing anything peer-facing.

Path B — CLI (when no MCP is configured)

Use the Bash tool to invoke the CLI in packages/scriptwriter/bin/scriptwriter.ts:

# First-time setup
bun packages/scriptwriter/bin/scriptwriter.ts init --handle <name> --vibe <vibe>

# Bring node online (long-running)
bun packages/scriptwriter/bin/scriptwriter.ts serve --port 7777

# Discover + handshake a peer
bun packages/scriptwriter/bin/scriptwriter.ts pair http://peer.example.com

# Open an RRR cascade
bun packages/scriptwriter/bin/scriptwriter.ts open http://peer.example.com "I see your work."

# Identity check
bun packages/scriptwriter/bin/scriptwriter.ts whoami

# Draw a card
bun packages/scriptwriter/bin/scriptwriter.ts draw

Read the full file on GitHub · 108 lines

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. 1mo ago First seen · 108 lines · 123 tokens per session scan A 5d42717ef4e2

Subscribe to this mod's changes

scriptwriter is a skill published in the GitHub repository cambridgetcg/agenttool (0 stars, last pushed 23d ago), licensed Apache-2.0. It adds 123 tokens to every session and 1,447 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

add-a-service

Scaffold a new service under services/ in the builders-stack monorepo. Use when something needs its own URL, port, or independent deploy. Covers the package, entrypoint, config, Tilt, deployment registry, and shared small-image build path.

lonormaly/builders-stack · 55 tokens

design-a-schema

Model a new table (or reshape an existing one) in libs/db with Drizzle — normalize by default, add the right constraints, and index deliberately. Use when adding a table/column, deciding on keys and foreign keys, or when a query is slow because the schema or its indexes are wrong. Enforces the stack's "Drizzle is the…

lonormaly/builders-stack · 91 tokens

wire-a-new-payment-provider

Add or swap a payment provider behind the @stack/payment adapter in the builders-stack monorepo. Use when integrating Stripe, Paddle, Lemon Squeezy, or any provider alongside or in place of the default Creem adapter. The whole point is that apps and the API never change — only the adapter implementation does. Covers…

lonormaly/builders-stack · 92 tokens

add-a-lib

Scaffold a new shared library under libs/ in the builders-stack monorepo. Use when code is needed in two or more places (apps or services) and should become a single source of truth consumed by package name. Covers the package.json, tsconfig, the one-public-door src/index.ts barrel, and wiring it into a consumer…

lonormaly/builders-stack · 81 tokens

optimize-a-query

Diagnose and fix a slow Postgres query in the builders-stack — read its EXPLAIN plan, find the missing index or the ORM N+1, and confirm the fix. Use when a page or endpoint is slow, a query times out, or pgstatstatements shows a hot query. Pairs with design-a-schema for the index itself.

lonormaly/builders-stack · 77 tokens

create-a-worktree

Create, inspect, or retire an isolated Builders Stack agent runtime through Worktree Zero. Use whenever parallel work needs another checkout or an old worktree needs cleanup.

lonormaly/builders-stack · 37 tokens