/ursula:trainfrom ursula
Train a voice profile from the user's writing across connected services (Slack first), then install it as a session-time skill.
Ships in ursula. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
End-to-end pipeline: collect writing samples from connected services → synthesize a forensic-linguistics voice profile → install as a Claude Code skill so every future session writes in the user's voice by default.
mcp__plugin_slack_slack__* tools). If not, ask the user to enable the Slack plugin/MCP before running this skill.claude CLI must be on PATH (used by the synthesizer for multi-pass synthesis).python3 must be on PATH (macOS default).How far back should I pull writing samples?
- Last 90 days (recommended) — broad search window; ample tail to fish from
- Last 30 days — quick snapshot
- Custom — you specify in days
Resolve the chosen window to an after:YYYY-MM-DD Slack search modifier. The time window is the search bound — the actual collected sample count is gated by the page cap below.
Which model should I use for synthesis?
- Opus — highest quality and depth
- Sonnet (recommended) — strong quality, moderate cost
- Haiku — fastest, shallowest
Map to --model {opus|sonnet|haiku}.
How thoroughly should I page through Slack results?
- Standard (6 pages, ~120 messages) (recommended) — solid voice signal, modest token cost
- Deep (10 pages, ~200 messages) — richer corpus, noticeably higher token cost
- Quick (3 pages, ~60 messages) — fastest pass; works because voice signal saturates quickly
Use the chosen page cap as the hard stop in step 2. Pages are 20 messages each. Architectural note for transparency: each page response flows through this session's context window before being archived to disk via Write, so cost scales linearly with page count. There's no token-free way to pull hundreds of pages under the current MCP-driven design — that's a known limitation, not a bug. A future iteration may add a Slack-Web-API-based collector that bypasses the context window entirely.
When should the trained voice profile apply?
- All output (
all) (recommended) — Claude adopts your voice for everything it writes, including conversational replies back to you inside Claude Code sessions.- Composed prose only (
compose) — Claude only adopts your voice when ghost-writing on your behalf (Slack drafts, emails, docs, commit messages, PR descriptions, etc.). Direct conversational replies use a neutral register unless you explicitly opt in per message.
This setting is saved to ~/.ursula/config.json and read by the SessionStart hook on every new session, so it can be changed later with /ursula:scope.
Once the user has answered (or accepted defaults), confirm the choices and proceed.
Call mcp__plugin_slack_slack__slack_read_user_profile with no arguments (or with user: "me") to get the authenticated user's Slack user ID. Save the user ID — you'll need it as the from: modifier in the next step. Do NOT proceed if you cannot resolve a concrete user ID; ask the user instead.
Create the raw samples directory:
mkdir -p ~/.ursula/samples/slack/raw
rm -f ~/.ursula/samples/slack/raw/*.json # Clear stale runs
Page through Slack search using mcp__plugin_slack_slack__slack_search_public_and_private. Use a query like:
from:<USER_ID> after:<YYYY-MM-DD>
For each page of results:
~/.ursula/samples/slack/raw/page-NN.json (zero-padded page number) using the Write tool. The MCP returns a markdown blob under a top-level results field; saving the blob text as-is is fine — the normalizer handles both JSON envelopes and bare markdown.next_cursor / pagination cue in the response and request the next page.If the user has DMs and group DMs that aren't searchable via the public search, that's fine — the walking-skeleton corpus is public + private channel messages.
Run the collector script to dedupe, strip Slack-flavored markup, drop voiceless messages (link-only, mention-only, automod), and produce a clean samples file:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/collect-slack.py" \
--raw-dir ~/.ursula/samples/slack/raw \
--output ~/.ursula/samples/slack/messages.json
Confirm the output reports a reasonable sample count (≥ 30 ideally). If it's far lower than expected, surface that to the user — the profile will be thin — and ask whether to proceed, widen the time window, or stop.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/synthesize-profile.py" \
~/.ursula/samples/slack/messages.json \
--model <MODEL>
This writes the synthesized profile to ~/.ursula/profile/SKILL.md (already wrapped in skill frontmatter).
Persist the user's Question-4 answer so the SessionStart hook can read it:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/set-scope.sh" <all|compose>
Use whichever scope the user chose (or all if they accepted the default). If the user never explicitly answered Question 4, default to all and tell them so they aren't surprised.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-profile.sh"
This copies the profile to ~/.claude/skills/ursula-voice/SKILL.md so Claude Code auto-discovers it as a user-level skill. The SessionStart hook will pick it up on the next session start.
~/.claude/skills/ursula-voice/SKILL.md and present a short summary to the user — top observations from each section (register, rhythm, signature constructions, formatting habits). Quote two or three of the most distinctive imitation-quick-reference rules verbatim.[low confidence] due to thin signal.all or compose) and remind the user they can change it later with /ursula:scope./ursula:train again. To uninstall, run bash ${CLAUDE_PLUGIN_ROOT}/scripts/install-profile.sh --remove.slack_read_user_profile returns no concrete user ID → ask the user for their Slack user ID directly.claude --print fails or times out → surface the synthesizer's stderr; suggest retry with --model sonnet or a longer --timeout.What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/refineursula:refineSurgically refine the trained voice profile in place. Use when the user notices the voice doing something undesirable (pet names, em-dashes, wrong register) or missing something present in their actual voice (a signature phrase, a register shift, an epistemic nuance). Triggers on phrases like "the profile is doing X and shouldn't", "refine ursula", "ursula is adding pet names again", "fix the voice profile", "tune ursula", "the profile is missing Y", "the voice keeps saying X", "adjust the ursula profile"./scopeursula:scopeChange when ursula's voice profile applies — to everything Claude writes (`all`) or only to prose Claude composes on the user's behalf (`compose`). Use when the user wants to toggle, set, or check the ursula scope. Triggers on phrases like "toggle ursula", "stop talking like me", "only use my voice for outbound stuff", "ursula scope", "set ursula to compose mode".Other plugins' skills for the same job
ursula@n33kos is listed by n33kos/claude-plugins — review the source before installing
npx claudepluginhub n33kos/claude-plugins --plugin ursula