From fslzrr
Drafts a Nygard-format ADR or a style guide entry from a TASK issue, presents it for human confirmation, writes it to the appropriate docs/ directory, and handles supersession. TRIGGER when: user says 'document this decision', 'write an ADR', 'draft an ADR', 'create an ADR', 'write a style guide entry', or /implement is working on an ADR-labeled or style-guide-labeled TASK.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fslzrr:documentThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Draft documentation from a TASK issue, present it for human confirmation, write it to the appropriate `docs/` directory, and update any superseded document.
Draft documentation from a TASK issue, present it for human confirmation, write it to the appropriate docs/ directory, and update any superseded document.
This skill is typically invoked from /implement with the TASK already in context. If invoked standalone, you need the TASK issue number — ask for it if not provided.
Before any other step, check the TASK's labels:
adr label → follow the ADR flow (Steps A1–A5 below).style-guide label → follow the Style guide entry flow (Steps S1–S8 below).If neither label is present, ask the human which flow to use before continuing.
adr)The TASK issue body is already in context. Extract from it:
Supersedes: 003)If the TASK body is not in context, fetch it with gh issue view <number> --json title,body,labels.
If any of these fields are absent or ambiguous, ask the human one targeted question before continuing. Do not guess.
List the files in docs/adr/:
ls docs/adr/ 2>/dev/null
001.003-some-title.md → 003) and increment by one. The next number must always be zero-padded to three digits (e.g. 004).Load the skeleton from templates/adr.md, populate each field using the values extracted in Step A1 and the number from Step A2, and use today's date for the Date field.
Date field.## Alternatives Considered section after Consequences. If the pointer is a link or issue reference, include it as-is. If the pointer is inline content in the TASK body, summarise it. Do not invent alternatives that are not present in the TASK body.Status as Accepted and add Supersedes [NNN-old-slug](NNN-old-slug.md) on a second line under Status. The old ADR is updated in Step A5.Present the full draft to the human. Say: "Here is the ADR draft. Confirm to write it, or request changes."
Wait for explicit confirmation. If the human requests changes, apply them and show the updated draft. Repeat until confirmed.
If docs/adr/ does not exist, create it:
mkdir -p docs/adr/
Derive the kebab-case slug from the decision name (lowercase, spaces and special characters replaced with hyphens). For example, Use PostgreSQL for Storage → use-postgresql-for-storage.
Write the confirmed ADR content to:
docs/adr/NNN-kebab-slug.md
Confirm the file was written by showing its path to the human.
If a Supersession pointer was found in Step A1:
docs/adr/ by its number (e.g. Supersedes: 003 → find docs/adr/003-*.md).## Status section.Superseded by [NNN-new-slug](NNN-new-slug.md)
where NNN and new-slug refer to the ADR just written in Step A4.style-guide)The TASK issue body is already in context. Extract from it:
Supersedes: button)If the TASK body is not in context, fetch it with gh issue view <number> --json title,body,labels.
If any of these fields are absent or ambiguous, ask the human one targeted question before continuing. Do not guess.
Inspect the TASK body for a reference to a linked implementation TASK (e.g. "See TASK #N", "Parent implementation: #N", or a GitHub issue link). If such a reference exists:
gh issue view <N> --json title,body.If no linked implementation TASK is referenced, or if the TASK is decision-only with no prototype, omit the HTML example section entirely — do not invent one.
Derive the kebab-case slug from the entry name (lowercase, spaces and special characters replaced with hyphens). For example, Primary Button → primary-button.
The target file is:
docs/style-guide/[slug]/index.md
Load the skeleton from templates/style-guide.md and populate each section using the values extracted in Steps S1–S2 and the slug from Step S3:
Date field.Supersedes [old-slug](../old-slug/index.md) on a second line under ## Status. The old entry is updated in Step S8.## HTML example section with the extracted code block. If no prototype was found, omit the ## HTML example section entirely.Present the full draft to the human. Say: "Here is the style guide entry draft. Confirm to write it, or request changes."
Wait for explicit confirmation. If the human requests changes, apply them and show the updated draft. Repeat until confirmed.
If docs/style-guide/[slug]/ does not exist (whether because the top-level directory is missing or the slug subdirectory has not been created yet), run:
mkdir -p docs/style-guide/[slug]/
Before writing, verify that the confirmed draft contains both of the following required sections:
## Status## OverviewAll other sections (Design tokens, States, Usage rules, HTML example) are optional and may be omitted when they do not apply to the entry.
Also verify:
## HTML example is present only if an approved prototype was found in Step S2. If an HTML example section appears but no prototype was found, surface the error and do not write.Write the confirmed draft to:
docs/style-guide/[slug]/index.md
Confirm the path to the human.
If a Supersession pointer was found in Step S1:
docs/style-guide/[old-slug]/index.md.## Status section.Superseded by [new-slug](../new-slug/index.md)
where new-slug is the slug of the entry just written in Step S7.docs/adr/ contains files that do not follow the NNN-slug.md naming pattern, ignore them when determining the next number.npx claudepluginhub fslzrr/skills --plugin fslzrrCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.