Skip to main content
skill CX Codex

writing-fragments — Claude Code skill: what it does, how to install

The writing-fragments skill interviews you about a writing topic and saves promising bits in one Markdown file. Use it to gather ideas before deciding how an article should be structured.

Apache-2.0 ★ 173 updated 2026-10-24

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sammcj/agentic-coding --skill writing-fragments -a claude-code
Open on GitHub

What writing-fragments does

writing-fragments asks about the subject you want to write on, then collects material such as claims, anecdotes, dialogue, and unfinished thoughts. It starts with your first message, including the initial request. The skill leaves outlines and article structure alone.

It keeps the fragments in a single Markdown file, separated by horizontal rules. If you haven’t supplied a path, it asks where to save the document once. The first write adds an H1 working title. Before each later write, the skill reads the file again, so edits made during the conversation remain in place. That read-before-write step matters if you’re changing the document as you go.

The listed platform is Claude Code. Install the skill with npx skills add sammcj/agentic-coding --skill writing-fragments -a claude-code; its file is at ~/.claude/skills/writing-fragments/SKILL.md.

What it helps with

  • collect scattered ideas for a future article
  • save sharp lines and anecdotes from a discussion
  • explore a topic without drafting an outline
  • append new writing fragments to one Markdown file

Example prompts for the agent

  • Interview me about learning to program and save useful material for an article in draft.md.
  • Ask me questions about code review and keep the strongest claims and examples in one Markdown file.
  • Collect fragments for my article from this conversation, rereading the file before each write so my edits stay intact.

How to install writing-fragments

1Skills CLI (Vercel)

npx skills add sammcj/agentic-coding --skill writing-fragments -a claude-code

2Manually: put the files in place

~/.claude/skills/writing-fragments/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/writing-fragments/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about writing-fragments

How do I install writing-fragments in Claude Code?

Run npx skills add sammcj/agentic-coding --skill writing-fragments -a claude-code. The skill file is located at ~/.claude/skills/writing-fragments/SKILL.md.

What does writing-fragments do?

It interviews you about a subject and gathers article material such as claims, anecdotes, dialogue, and unfinished thoughts in one Markdown file. It does not impose an outline.

How does writing-fragments preserve edits to the file?

Before every write, it rereads the file from disk and appends new material, keeping changes you made between turns. If you haven’t given it a path, it asks where to save the document once.

Source text

SKILL.md · Apache-2.0
---
name: writing-fragments
description: Grilling session that mines the user for fragments - heterogeneous nuggets of writing (claims, vignettes, sharp sentences, half-thoughts) - and appends them to a single document as raw material for a future article. Use when the user wants to develop ideas before imposing structure, or mentions "fragments", "ideate", or "raw material" for writing.
metadata:
  source: Inspired by https://github.com/mattpocock/skills
---

<what-to-do>

Run a grilling session that produces fragments. Interview the user relentlessly about whatever they want to write about. Do not impose phases, outlines, or structure - that is explicitly out of scope.

As fragments emerge from either side of the conversation, append them to a single markdown file. The user will be editing this file during the session; always re-read it before writing so their edits are preserved.

If the user did not pass a path, ask once where to save the document, then remember it for the rest of the session.

Capture fragments from the very first thing the user says, including the initial prompt.

On first write, put a single H1 at the top with a working title (it can change later) and nothing else - no metadata, no TOC, no date.

</what-to-do>

<supporting-info>

## What is a fragment

A fragment is any piece of text that might survive into the final article. It must be _readable by the author_ - the author can tell what it means - but it does not need to define its terms or be comprehensible to a cold reader. The bar is "is this a piece of good writing?", not "is this a self-contained argument?"

Fragments are deliberately heterogeneous. Examples of what could be a fragment:

- A sharp sentence you'd want to deploy somewhere but don't yet know where.
- A claim with a one-line justification.
- A vignette: a thing that happened, a code snippet, a scenario, an analogy.
- A half-thought: "something about how X feels like Y, work this out later."
- A quote, a piece of dialogue, an overheard line.
- A list of related observations that hang together by feel.
- A complaint, a confession, a punchline.

The novelist's diary is the model: years of unstructured noticings that later get mined for raw material. Fragments are noticings.

## File format

```markdown
# Working title

A first fragment lives here.

It can be multiple paragraphs. It can include lists, code, quotes - whatever
shape the fragment naturally takes.

---

A second fragment.

---

> A quoted line that the user wants to keep around.

A reaction to it.

---

- A cluster of related observations
- That hang together by feel
- And want to be near each other
```

Fragments are separated by a horizontal rule (`\n---\n`). No headings inside the body. No tags. No order beyond the order they were added.

## Writing rhythm

Append silently. Don't ask permission for each fragment. Mention what you added in passing ("adding that"), but don't interrupt the conversation with save dialogues.

Before every write: re-read the file from disk. The user may have edited, reordered, or deleted fragments between turns - preserve their changes. Never overwrite the file; only append (or, if the user asks, edit a specific fragment in place).

The user can say "cut the last one", "rewrite that one sharper", "merge those two" at any time. Treat those as first-class instructions.

</supporting-info>

© sammcj · Apache-2.0 · sammcj/agentic-coding

Similar skills

All skills for Writing and docs →

From the same set73

The whole set →
compression-editor compression-editor is a Claude Code subagent that shortens prose, instructions, skills, and docs without losing meaning. It skips source code and summarisation. CX Codex ★ 173repo stars explain Explains code, systems, and algorithms using terminal ASCII diagrams or standalone interactive HTML step-through pages. CX Codex +1 ★ 173repo stars openspec-bootstrap openspec-bootstrap sets up OpenSpec in a repository by preparing its schema and config. Use it for a first-time setup or edits to openspec/config.yaml. CX Codex +1 ★ 173repo stars self-review self-review — a skill that critically reviews your recent changes and fixes what it finds. Small edits it handles itself; larger ones go to a sub-agent. CX Codex +1 ★ 173repo stars code-simplification code-simplification is a Claude Code skill that spots hard-to-follow code and suggests refactors. It comes into play during code review or when reducing unnecessary abstractions. CX Codex +1 ★ 173repo stars domain-model Skill to actively shape your domain model: challenges terms against the glossary, stress-tests boundaries with scenarios, records glossary and decisions in CONTEXT.md and ADRs. CX Codex +1 ★ 173repo stars critical-reviewer The critical-reviewer subagent reviews recent code, documents, plans, or designs and returns prioritised findings. Use it for a fresh critical review before applying fixes yourself. CX Codex ★ 173repo stars quick-researcher quick-researcher pulls facts that are already published on the web and hands each one back with a link to the page it came from. Useful when the answer exists somewhere but hunting it down by hand is slow. CX Codex ★ 173repo stars

Project sponsors

Companies that keep this analytics open