lld
Skill0 starsChanged 9 months agoMITView on GitHub
Generate a Low Level Design (LLD) document from a freeform description and write it to a markdown file in the design/ directory. Use when the user wants to document the low-level implementation details of a component.
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- action-itemsSkill
- add-spikeSkill
- changelogSkill
- commitSkill
- create-branchSkill
- create-issue-branch-githubSkill
- create-issue-githubSkill
- create-mr-gitlab-gitSkill
- create-pr-github-gitSkill
- create-pr-githubSkill
- decisionSkill
- emailSkill
- fix-issue-github-autoSkill
- fix-issue-githubSkill
- hldSkill
- implement-lldSkill
- jira-ticket-gitSkill
- jira-ticketSkill
- prSkill
- reconcileSkill
- resolve-conflictsSkill
- resolve-open-questionsSkill
- reviewSkill
- spikeSkill
- standup-gitSkill
- standupSkill
- syncSkill
- tag-release-ansibleSkill
- tag-release-npmSkill
- tag-releaseSkill
- tldrSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 2 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
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 15
If $ARGUMENTS is empty, ask the user to provide a description or an HLD path and stop.
- Very specific: line 23
Check whether design/<slug>.md already exists.
- Very specific: line 28
Only add new requirements (next sequential ID, e.g.
- Very specific: line 53
If an HLD was provided, reference its requirement where applicable using a dotted sub-ID (REQ-1.1, REQ-1.2 for HLD REQ-1).
- Very specific: line 56
Create a design/ directory in the current working directory if it does not already exist.
- Very specific: line 63
If a path is present after --amend, use it.
- Very specific: line 65
Check that the file at <path> exists.
- Very specific: line 66
Read the file. This is a targeted edit to the ## Requirements section only — do not touch any other section.
- Distinctive: line 89
Do not add sections not listed above.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Generate a Low Level Design (LLD) document from a freeform description and write it to a markdown file.
$ARGUMENTS may include:
- A freeform description of the feature, component, or system, or
--hld <path>followed by an optional extra description (e.g./lld --hld design/hld-user-auth.md focus on the token refresh flow). When--hldis provided, read the file at<path>and use its content as the primary source of context. The extra description, if present, narrows the scope.--mode living|strict— sets the doc'sMode. If--hldwas provided and--modewas not, inherit the HLD'sModefield. Otherwise defaults tostrict.--amend [path] <change description>— targeted edit to an existing doc's## Requirementssection only.<path>may be omitted if it's already clear from this conversation — see the Amend Mode steps below, which are skipped entirely when this flag isn't present.
If $ARGUMENTS is empty, ask the user to provide a description or an HLD path and stop.
Normal generation
- Parse $ARGUMENTS. If
--hld <path>is present, read the file at<path>. Use the HLD content (plus any extra description) as the source for all sections below. If the path does not exist, tell the user and stop. If no--hldflag is present, use $ARGUMENTS as the description directly. - Derive a filename slug from the description or HLD title: lowercase, replace spaces and special characters with hyphens, truncate to ~5 words, and prefix with
lld-(e.g./lld user auth service→lld-user-auth-service.md). Check whether
design/<slug>.mdalready exists.- If it exists, this run is an edit, not a fresh overwrite:
- Preserve existing
REQ-*rows and their checked/unchecked state exactly. - Preserve the existing
Mode,Last Reconciled, andLast Amendedvalues unless--modewas explicitly passed on this run. - Only add new requirements (next sequential ID, e.g.
REQ-1.1if the parent HLD requirement isREQ-1) or update non-Requirements sections as directed by the new input — do not regenerate sections that aren't affected by it. - If this run supplies the actual design (API / Interface Design, Data Models, etc.) for a row currently marked
_(Needs Review — ...)_, clear that annotation once the design is filled in — the row reverts to a plain- [ ] **REQ-N**line, unblocking it for/implement-lld. Only clear the annotation on rows this run actually addresses; leave every otherNeeds Reviewrow untouched.
- Preserve existing
- If it does not exist, generate fresh per the Output structure below.
- If it exists, this run is an edit, not a fresh overwrite:
Generate or update the LLD document with the following sections. Populate every section from the available context. If a section cannot be inferred, include it as a stub with a short prompt in italics (e.g.
_TODO: list the error codes this endpoint returns._). If an HLD was provided, add a link to it in the Overview section.Output structure:
# LLD: <title derived from the description or HLD>**Date:** <today's date in YYYY-MM-DD format>**Status:** Draft**Author:** <!-- your name -->**Mode:** Living | Strict— from--mode, inherited from the linked HLD, orStrictif neither applies.**Last Reconciled:** <date> @ <short-sha>— leave blank until the first/reconcilerun.**Last Amended:** <date>— leave blank until the first--amendrun.## Overview— 2-3 sentences describing what this component does at the implementation level. If an HLD was provided, include a line:**HLD:** [<hld title>](<relative path to hld file>).## Scope— what is covered in this document. List the specific classes, modules, endpoints, or functions in scope.## API / Interface Design— the public interface: function signatures, REST endpoints, event schemas, or method contracts. Use code blocks where appropriate. In Living mode, tag genuinely uncertain low-level detail inline with[PENDING SPIKE VALIDATION]instead of inventing content.## Data Models— the data structures in use: fields, types, constraints, and relationships. Use tables or code blocks. In Living mode, tag genuinely uncertain fields/types with[PENDING SPIKE VALIDATION]rather than guessing.## Component Interactions— how this component calls and is called by others. Include sequence steps or a numbered interaction flow.## Error Handling— what can go wrong, how errors are detected, and how they are surfaced to callers or users.## Edge Cases— non-obvious inputs or states that require special handling.## Testing Considerations— what unit, integration, or contract tests are needed. List the key scenarios to cover.## Requirements— one row per requirement:- [ ] **REQ-N** — <requirement statement> _(optional: Blocked/In Progress/Needs Review/Needs Spike — reason)_If an HLD was provided, reference its requirement where applicable using a dotted sub-ID (REQ-1.1,REQ-1.2for HLDREQ-1). IDs are assigned sequentially per document and are permanent — never renumber or reuse an ID, even after a row is struck through.## Open Questions— unchecked checkboxes for implementation decisions that need to be resolved before coding begins.
- Create a
design/directory in the current working directory if it does not already exist. Write the document todesign/<slug>.md. - Tell the user the file path (
design/<slug>.md) and confirm it was written. List any sections that were left as stubs. If## Open Questionshas any unchecked items, mention that/resolve-open-questions design/<slug>.mdcan walk through them.
Amend mode (--amend [path] <change description>)
- Determine
<path>:- If a path is present after
--amend, use it. - If not, look back through this conversation for an LLD path already established (created via
/lld, or referenced by an earlier/spike,/add-spike,/resolve-open-questions,/implement-lld, or/reconcilecall in this session). If exactly one is found, confirm it with the user before proceeding rather than silently assuming. If more than one is found, list them and ask which to use. If only an HLD path was referenced with no LLD yet, tell the user and stop — don't guess an LLD that doesn't exist. If none is found, ask the user to provide a path and stop. - Check that the file at
<path>exists. If it does not, tell the user and stop.
- If a path is present after
- Read the file. This is a targeted edit to the
## Requirementssection only — do not touch any other section. - Apply the change described using these lifecycle rules. Never delete or silently rewrite a row:
Changed requirement — strike the old row, append a new row with a successor ID:
~~- [ ] REQ-1.1 — old requirement text~~ _(superseded by REQ-1.2, <date>)_ - [ ] **REQ-1.2** — new requirement text- New requirement — append with the next sequential ID.
Descoped requirement — strike the row and keep it, noting why:
~~- [ ] REQ-2 — old requirement text~~ _(Descoped <date>: reason)_
- Stamp
**Last Amended:** <date>in the frontmatter. - Report a summary: rows changed/added/descoped.
Rules:
- Be specific — do not write generic filler. Every sentence must be grounded in the description or HLD content provided.
- The output must be ready to share or commit with no editing required, except for the stub sections.
- Do not add sections not listed above.
$ARGUMENTS
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.

