# Shakespeare Expand

> Inflate a memory file (CLAUDE.md, AGENTS.md, notes, todo lists) from plain English into ornate Early Modern English prose, while keeping every code block, URL, path, command, identifier, heading, date, and table untouched. A human-readable backup is written to `<file>.original.md`. Trigger: /shakespeare-expand <filepath> or "expand memory file".

- Skill: `jorgenosberg/shakespeare-expand` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jorgenosberg/shakespeare-expand`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jorgenosberg/shakespeare-expand/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: jorgenosberg (https://skillmd.com/u/jorgenosberg)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jorgenosberg/shakespeare-expand

---


Inflate a single memory file in-place. Preserve every technical element
exactly. Flourish only the prose.

## Steps

1. Resolve the target path (first arg). If the file does not exist, say so
   plainly and stop.
2. Refuse to operate on files outside the current working tree or on files
   ending in `.original.md` (they are already backups).
3. Read the file.
4. If `<file>.original.md` already exists, warn the user and ask whether to
   overwrite the backup. Do not proceed without explicit approval.
5. Copy the file verbatim to `<file>.original.md`.
6. Rewrite only the **prose** of the file into Early Modern English. Leave
   every other zone exactly as it was.
7. Write the rewritten version back to the original path.
8. Report to the user:
   - original line count, new line count, rough percentage inflation,
   - the path to the backup,
   - one line reminder: "To restore: `mv <file>.original.md <file>`".

## Protected zones — copy through unchanged

- Fenced code blocks (``` ... ```), indented code blocks, inline code (backticks).
- YAML frontmatter between leading `---` fences.
- Markdown headings (`#`, `##`, ...). Only the heading *line* is protected.
- URLs, file paths, CLI commands and their arguments, flags.
- Error messages, stack traces, identifiers, function and type names,
  API names, environment variable names.
- Tables containing data. Pipe-delimited rows pass through untouched.
- HTML/XML tags.
- Dates, times, version numbers, semver ranges, hashes.
- Numeric values of any kind.
- Placeholders inside `{{ }}`, `${ }`, `<...>` angle brackets.

## Zones to inflate

Prose paragraphs between headings, list items that are sentences (not
command lists), and plain-English body text. Apply the rules from
`skills/shakespeare/SKILL.md` (level: `full` by default; honour a trailing
`--level=<lite|full|bard|prose>` argument if passed).

## Example

Input `NOTES.md`:
```
# Database pool

We reuse connections instead of opening a new one per request. This
avoids the TCP handshake and lets the server stay responsive under load.

See `src/db/pool.ts:17`.
```

After `/shakespeare-expand NOTES.md`:
```
# Database pool

Hark, gentle reader! We keep a ready stable of open connections, that
each request may borrow one at need rather than forge a new passage
through the TCP handshake's tedious ceremony. Thus doth our server
remain nimble, e'en when the load groweth heavy upon its shoulders.

See `src/db/pool.ts:17`.
```

(Note: the heading, the path, and the code span are untouched.)

## Auto-Clarity

- Security-relevant notes (CVE IDs, threat models, incident reports): refuse
  to inflate. State plainly and stop.
- If the file is mostly code or mostly tables, report that no prose was
  found to inflate and do not create a backup.

