Runcastle

Cold Email Sequence Drafter

MIT0 downloads

by runcastle

v1.0.0
Homepage ↗

A single Claude Code agent reads your offer and ideal-customer notes and writes a complete 5-touch cold email sequence — subject-line options, tight bodies, send timing, one clear CTA per email, and personalization tokens ready to merge at send time.

Topology

Disclosures

Disclosures — declared side-effect surface

Everything below runs on your machine or inside the sandbox when you use this workflow. Mismatches between these declarations and the actual code block publishing.

Host hooks

Commands executed on YOUR host machine by Sandcastle lifecycle hooks.

None declared.

Sandbox hooks

Commands executed inside the sandbox container.

None declared.

Network access

None. The agent operates only on the local repository inside the sandbox.

Shell expansion

No shell-expansion blocks in prompt files.

Files

Diff vs the stock Sandcastle 0.12.0 template Dockerfile — green lines were added by the author, red lines were removed from stock.

+# Sandbox image for the Cold Email Sequence Drafter workflow.
+# Mirrors the stock Sandcastle template: Node 22, git, and the Claude Code CLI,
+# running as a non-root `agent` user. Pure text — no project runtime needed.
FROM node:22-bookworm
# System dependencies.
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
jq \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Claude Code CLI (the agent runtime).
RUN npm install -g @anthropic-ai/claude-code
# Non-root agent user. `sandcastle docker build-image` aligns AGENT_UID/GID to
# the host user via --build-arg to avoid permission errors on bind mounts.
ARG AGENT_UID=1000
ARG AGENT_GID=1000
RUN groupadd --gid ${AGENT_GID} agent \
&& useradd --uid ${AGENT_UID} --gid ${AGENT_GID} --create-home --shell /bin/bash agent
USER agent
WORKDIR /workspace
Show full Dockerfile (highlighted)
# Sandbox image for the Cold Email Sequence Drafter workflow.
# Mirrors the stock Sandcastle template: Node 22, git, and the Claude Code CLI,
# running as a non-root `agent` user. Pure text — no project runtime needed.
FROM node:22-bookworm

# System dependencies.
RUN apt-get update && apt-get install -y --no-install-recommends \
      git \
      curl \
      jq \
      ca-certificates \
 && rm -rf /var/lib/apt/lists/*

# Claude Code CLI (the agent runtime).
RUN npm install -g @anthropic-ai/claude-code

# Non-root agent user. `sandcastle docker build-image` aligns AGENT_UID/GID to
# the host user via --build-arg to avoid permission errors on bind mounts.
ARG AGENT_UID=1000
ARG AGENT_GID=1000
RUN groupadd --gid ${AGENT_GID} agent \
 && useradd --uid ${AGENT_UID} --gid ${AGENT_GID} --create-home --shell /bin/bash agent

USER agent
WORKDIR /workspace

README

Cold Email Sequence Drafter

Most cold sequences fail the same way: they open by talking about the sender, cram three asks into one email, and hide the outcome behind feature-speak. This workflow writes the opposite — five short, relevant, human touches that read like one busy person emailing another, from a single pass over your own notes.

What it does

You keep two short files in your repo:

  • offer.md — what you sell, the concrete outcome it delivers, your proof, your differentiation, and the next step.
  • icp.md — who you're targeting: their role, company profile, the pain they feel, the trigger events worth referencing, and the objections they'll raise.

A Claude Code (Opus) agent reads both and writes a complete 5-touch sequence to outreach/sequence.md. Each email gets send timing and a stated purpose, three subject-line options, a tight 50–125 word body, and exactly one low-friction CTA. Every touch adds a new angle — trigger, proof point, objection reframe, value-add, respectful break-up — instead of just bumping the thread. Personalization tokens like {{first_name}}, {{company}}, and {{trigger}} are left in place, with a legend at the top telling you what to fill each with at send time.

How it works

main.ts runs one agent for a single pass (maxIterations: 1) inside a Docker sandbox, committing the sequence to the current branch. The topology is a single node: read offer + ICP → 5-touch sequence. It is pure text — no dependencies to install, no network access, no hooks, and nothing invented that isn't supported by your offer.md and icp.md.

Requirements

Set CLAUDE_CODE_OAUTH_TOKEN in .sandcastle/.env (run claude setup-token). Add offer.md and icp.md to your repo root. Build the image once with npx @ai-hero/sandcastle docker build-image, then run npx tsx .sandcastle/main.ts. Your sequence lands at outreach/sequence.md, ready to drop into your sending tool once you fill the tokens.