write-guide
Skill574 starsChanged 14 days agoBSD-3-ClauseView on GitHub
Use this skill to write user guides about features in the Readium Swift Toolkit.
We split this skill into the rules it gives an agent
20 rules. 0 are common, 13 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before writing, gather what you need:
- Very specific: line 18
Identify relevant source files: Read the Swift interfaces (protocols, public types) for the feature — not the implementation, just the …
- Very specific: line 22
Read related existing guides: Check docs/Guides/ for any guide that overlaps with the topic.
- Distinctive: line 29
Every guide follows this shape:
- Distinctive: line 57
Explain the why: When the API requires a non-obvious approach, explain the reason: "Readium does not have a concept of pages — instead, …
- Distinctive: line 60
Set expectations early: Use "You are responsible for..." to clarify what the framework doesn't do, so developers aren't surprised:
- Distinctive: line 64
Avoid filler: Don't pad with "In this guide, we will..." — the heading and first paragraph already tell the reader what's covered.
- Very specific: line 69
Use fenced Swift code blocks: `swift
- Distinctive: line 74
Don't explain what the code does in comments — let the surrounding prose do that.
- Distinctive: line 75
Only add a comment if it highlights a non-obvious subtlety.
- Very specific: line 78
SwiftUI only: When code examples involve UI, use SwiftUI — never UIKit directly.
- Very specific: line 81
Do not show raw UIKit view controller presentation patterns (e.g., present(_:animated:)).
- Distinctive: line 85
Use GitHub-flavored alert syntax:
- Distinctive: line 101
Use these sparingly — one to three per guide is normal.
- Distinctive: line 122
When you mention a concept that is covered in depth elsewhere, add a short cross-reference rather than re-explaining it.
- Distinctive: line 136
Before writing the guide files, confirm the structure and outline of all the produced files with the users, and ask if changes are required.
- Very specific: line 139
After confirmation, write the guides to the appropriate path under docs/Guides/.
- Distinctive: line 150
After writing all files, review every guide you created or modified:
- Very specific: line 151
Verify that every type, method, and property name mentioned in prose or code actually exists in the current source files (search Sources/ …
- Distinctive: line 153
Check that code examples are syntactically plausible and use the API correctly.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Readium Guide Writer
This skill produces user guides for the Readium Swift Toolkit that match the style and
quality of the existing guides in docs/Guides/.
Research first
Before writing, gather what you need:
- Identify relevant source files. Read the Swift interfaces (protocols, public types)
for the feature — not the implementation, just the public API surface. Start in
Sources/and look for types whose names match the feature. Also look at the files changed in the current branch, compared to thedevelopbranch. - Read related existing guides. Check
docs/Guides/for any guide that overlaps with the topic. These tell you what's already explained and where to cross-reference. - Confirm the output path. For example, guides for navigator topics go in
docs/Guides/Navigator/. Ask the user if the right location is unclear.
Structure
Every guide follows this shape:
# Feature Name
[One-paragraph summary of what this guide covers and what the reader will be able to do.]
> [!NOTE / IMPORTANT / WARNING / TIP as appropriate]
> Any critical caveats, prerequisites, or "read this before you start" points.
## First major concept (how to set up / what the API is)
### Sub-topic
## Second major concept (how to use the API)
### Sub-topic
## [Optional] Complete example
[Full, copy-pasteable working code that brings everything together]Writing style
Tone: Professional and direct, but approachable. Respect the reader's intelligence. Address them as "you". Use "we" only when explaining Readium's own design decisions.
Explain the why. When the API requires a non-obvious approach, explain the reason: "Readium does not have a concept of pages — instead, positions are used because..."
Set expectations early. Use "You are responsible for..." to clarify what the framework doesn't do, so developers aren't surprised:
"You are responsible for creating the view controller and adding it to your hierarchy."
Avoid filler. Don't pad with "In this guide, we will..." — the heading and first paragraph already tell the reader what's covered.
Code examples
- Use fenced Swift code blocks:
```swift - Show complete, runnable snippets — not pseudo-code or fragments with
...unless a longer example truly needs ellipsis to stay focused. - Include realistic variable names, error handling (
try/catch), and optional chaining where the real code would need them. - Don't explain what the code does in comments — let the surrounding prose do that. Only add a comment if it highlights a non-obvious subtlety.
- For a feature that has several steps, show each step as its own snippet, then provide a "Complete example" section at the end that combines them.
- SwiftUI only. When code examples involve UI, use SwiftUI — never UIKit directly.
The Readium Navigator is UIKit-based internally, but bridging code (e.g.,
UIViewControllerRepresentable) is acceptable when needed to host the navigator. Do not show raw UIKit view controller presentation patterns (e.g.,present(_:animated:)).
Callout blocks
Use GitHub-flavored alert syntax:
> [!NOTE]
> Additional clarification that helps but isn't blocking.
> [!IMPORTANT]
> Something the developer must know to avoid a broken integration.
> [!WARNING]
> A gotcha that could cause subtle bugs or unexpected behavior.
> [!TIP]
> A helpful suggestion or recommended pattern.Use these sparingly — one to three per guide is normal.
Formatting conventions
| Element | Convention |
| API type names, method names | Publication, navigator.go(to:) — bold + backtick |
| Parameters and property names | locator, readingProgression — backtick only |
| UI concepts and user-facing terms | plain bold: reading position |
| File names and paths | backtick: TTSView.swift |
| Tables | Pad cells with whitespaces to vertically align the columns |
| No horizontal rules | Never use --- to separate sections |
Cross-references
Link to related guides using relative paths:
See the [Navigator guide](Navigator/Navigator.md) for details on positioning.When you mention a concept that is covered in depth elsewhere, add a short cross-reference rather than re-explaining it. Don't assume the reader has read other guides — give a one- sentence summary and point them there.
Terminology
Capitalize these terms consistently:
- Navigator — the Readium component/protocol (always capitalized)
- Publication — the API type (
Publication) capitalized; "publication" lowercase when referring to the content generically - Locator — the type; "location" when speaking generically
Output
Before writing the guide files, confirm the structure and outline of all the produced files with the users, and ask if changes are required.
After confirmation, write the guides to the appropriate path under docs/Guides/. Then add
links to them in these two index files:
README.md— under the appropriate section in the "User Guides" list. Match the existing bullet format:* [Title](docs/Guides/Path/To/Guide.md) – one-line description.- The appropriate DocC root file under
docs/— read the.mdfiles at the root ofdocs/to identify which one covers the topic area (e.g. a Navigator overview file for navigator guides). Add a- <doc:Guide-Name>entry under the matching### Topicgroup. The DocC slug is the filename with spaces replaced by hyphens and the.mdextension removed.
After writing all files, review every guide you created or modified:
- Verify that every type, method, and property name mentioned in prose or code actually
exists in the current source files (search
Sources/to confirm). - Check that code examples are syntactically plausible and use the API correctly.
- Flag any discrepancy to the user rather than silently guessing.
Finally, briefly tell the user what you wrote and which existing guides you linked to, in case they want to update those guides to add a reciprocal link.
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- vercel/next.js★ 143ksame name
- runpod/runpod-plugins-official★ 47same name
- sethsontech-max/claudeSkills★ 1same name
- henrymbuguak/claude-with-the-anthropic-api★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- update-changelogSkill
- write-release-announcementSkill
- write-testsSkill
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.

