draft-with-docx
Skill1 starsChanged 3 months agoMITView on GitHub
Pair every drafted document with a Word (.docx) file. When the solicitor asks for a draft — claim form, particulars of claim, defence, witness statement, skeleton argument, application notice, advice/opinion, anything filed or sent — produce BOTH the markdown AND the .docx in the same directory. Word is what the court accepts and what clients open. Markdown is what the firm reads and diffs. Both must exist.
- Installs packages
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit_clerkSkill
- calendar_syncSkill
- citation_clerkSkill
- compliance_officerSkill
- court_registrarSkill
- direct_access_detectorSkill
- drafting_assistantSkill
- matter_managerSkill
- receptionistSkill
- retrospectiveSkill
- risk_assessorSkill
- transparency_gateSkill
- wakeSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
If you wrote it for the matter, it gets paired.
- Distinctive: line 30
Use pandoc when available (cleanest output, preserves headings + tables):
- Distinctive: line 38
If pandoc is unavailable, fall back to python-docx via pypandoc:
- Distinctive: line 44
If neither is available, install pandoc:
- Very specific: line 65
If the matter folder doesn't have a drafts/ subdir, create it.
- Distinctive: line 69
After writing both files, verify both exist:
- Distinctive: line 83
Never report a draft as "ready" if only one of the two exists.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/draft-with-docx — Every Draft Ships as .md + .docx
The solicitor's filing reality: UK courts accept Word, not markdown. The firm reads markdown. Both audiences exist. So every drafted document produces two files, atomically, in the matter's drafts directory.
When this skill fires
Any time the firm produces a written legal document:
- Statements of case (claim form under CPR Part 7/Part 8, particulars of claim, defence, reply, counterclaim, Part 20 claim)
- Applications (application notice Form N244, draft order, consent order, Tomlin order)
- Evidence (witness statement with statement of truth, exhibits, expert report)
- Advocacy (skeleton argument, position statement, chronology, case summary)
- Settlement (Part 36 offer, letter before claim under the Pre-Action Protocol, settlement agreement)
- Advisory (advice/opinion, instructions to counsel, attendance note, due-diligence report)
If you wrote it for the matter, it gets paired.
The pairing rule
For every <filename>.md produced, write <filename>.docx in the SAME directory in the SAME tool call window. No "I'll add the docx in a second" — both, atomically.
How to produce the .docx
Use pandoc when available (cleanest output, preserves headings + tables):
pandoc "<filename>.md" -o "<filename>.docx" \
--reference-doc=<reference.docx if firm has one> \
--from=markdown+pipe_tables+yaml_metadata_blockIf pandoc is unavailable, fall back to python-docx via pypandoc:
python3 -c "import pypandoc; pypandoc.convert_file('<filename>.md', 'docx', outputfile='<filename>.docx')"If neither is available, install pandoc:
# macOS
brew install pandoc
# Linux
sudo apt-get install -y pandoc
# Windows (solicitor runs this themselves in PowerShell)
winget install --id JohnMacFarlane.PandocWhere the files go
Inside the matter's drafts directory:
~/Desktop/<firm-name>/<matter-folder>/drafts/
├── 2026-05-24-complaint-s138.md
└── 2026-05-24-complaint-s138.docx ← ALWAYS pairedIf the matter folder doesn't have a drafts/ subdir, create it.
Verification before reporting "done"
After writing both files, verify both exist:
ls -la "<filename>.md" "<filename>.docx"Report to the solicitor:
✍️ Draft ready (paired):
<filename>.md — for the firm + diffs
<filename>.docx — for the court + clientNever report a draft as "ready" if only one of the two exists.
Why this rule exists
- Registry reality: UK court e-filing portals + physical filing windows accept .docx / .pdf, not .md. A markdown-only draft cannot be filed.
- Client reality: Clients open Word on their laptop. They cannot read a
.mdfile. A markdown-only draft cannot be sent. - Firm reality: Markdown is what the AI brain reads, searches, diffs, and learns from. A docx-only draft is opaque to the firm's brain.
The rule resolves the audience-mismatch by producing both, every time.
Anti-patterns (do not do)
- ❌ "Here's the draft in markdown. Run pandoc when you need a docx." — pushes friction onto the solicitor at filing time
- ❌ Writing only the .docx and skipping the .md — the firm loses search/diff ability
- ❌ Writing the .md, telling the solicitor to convert later — they will forget; deadline pressure means it won't happen
- ❌ Producing the .docx in a different directory than the .md — breaks the matter folder convention
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

