hld
Skill0 starsChanged 9 months agoMITView on GitHub
Generate a High Level Design (HLD) document from a freeform description and write it to a markdown file in the design/ directory. Use when the user wants to design a feature, system, or component at a high level.
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
- implement-lldSkill
- jira-ticket-gitSkill
- jira-ticketSkill
- lldSkill
- 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
8 rules. About 0 are common, 2 are distinctive, and 6 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.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If $ARGUMENTS is empty, ask the user to provide a description and stop.
- Very specific: line 20
Check whether design/<slug>.md already exists.
- Very specific: line 25
Only add new requirements (next sequential REQ-N) or update non-Requirements sections as directed by the new input — do not regenerate …
- Very specific: line 52
Create a design/ directory in the current working directory if it does not already exist.
- Very specific: line 59
If a path is present after --amend, use it.
- Very specific: line 61
Check that the file at <path> exists.
- Very specific: line 62
Read the file. This is a targeted edit to the ## Requirements section only — do not touch any other section of the HLD itself.
- Distinctive: line 88
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 High Level Design (HLD) document from a freeform description and write it to a markdown file.
$ARGUMENTS may include:
- A freeform description of the feature, system, or component.
--mode living|strict— sets the doc'sMode. Defaults tostrictif omitted (no behavior change from before this flag existed).--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 and stop.
Normal generation
- Derive a filename slug from $ARGUMENTS: lowercase the description, replace spaces and special characters with hyphens, truncate to ~5 words, and prefix with
hld-(e.g./hld user auth service→hld-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
REQ-N) or update non-Requirements sections as directed by the new input — do not regenerate sections that aren't affected by it.
- 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 HLD document with the following sections. Populate every section from the description. If a section cannot be inferred, include it as a stub with a short prompt in italics (e.g.
_TODO: describe the external systems this component interacts with._).Output structure:
# HLD: <title derived from the description>**Date:** <today's date in YYYY-MM-DD format>**Status:** Draft**Author:** <!-- your name -->**Mode:** Living | Strict— from--mode, orStrictif not passed.**Last Reconciled:** <date> @ <short-sha>— leave blank until the first/reconcilerun.**Last Amended:** <date>— leave blank until the first--amendrun.## Overview— 2-4 sentences describing what this system or feature does and why it exists. Write as if the reader has no prior context.## Goals— what this design must achieve, as bullet points.## Non-Goals— what is explicitly out of scope. At least one item.## System Context— where this component fits in the broader system. What calls it? What does it call? List known external dependencies.## Proposed Design— the core design in plain English. Include key decisions and reasoning, how the main flow works end to end, and any important constraints or assumptions. In Living mode, tag genuinely uncertain low-level detail inline with[PENDING SPIKE VALIDATION]instead of inventing content — high-level system boundaries, goals, and data contracts must still be fully populated.## Components— a two-column markdown table with Component and Responsibility columns.## Data Flow— the flow of data through the system as a numbered list.## Alternatives Considered— each alternative as a bullet with 1-2 sentences on the trade-off that led to it being rejected.## Requirements— one row per requirement:- [ ] **REQ-1** — <requirement statement> _(optional: Blocked/In Progress/Needs Review/Needs Spike — reason)_IDs are assigned sequentially and are permanent — never renumber or reuse an ID, even after a row is struck through. New requirements always get the next unused sequential ID.## Open Questions— unchecked checkboxes for questions that need answers before implementation 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 HLD path already established (created via
/hld, or referenced by an earlier/lld --amend,/add-spike,/resolve-open-questions, 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 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 of the HLD itself. - 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 (e.g. old
REQ-3→ newREQ-3.1):~~- [ ] REQ-3 — old requirement text~~ _(superseded by REQ-3.1, <date>)_ - [ ] **REQ-3.1** — 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)_
- Scan for any LLDs that reference this HLD (via a
**HLD:**link in their Overview, orREQ-N.xsub-IDs matching this doc'sREQ-NIDs). Cascade into each one found, still touching only its## Requirementssection:- Changed or descoped requirement — for each existing LLD row referencing the affected
REQ-N, mark it_(Needs Review — parent REQ changed <date>)_rather than assuming it's still valid. Never touch the row's existing design content — only the annotation. - New requirement — no existing LLD row references it yet, so there's nothing to flag. Instead, append a new stub row to the LLD with the next sequential sub-ID, marked
_(Needs Review — new parent REQ-N, flowed from HLD amend <date>; needs LLD design)_. This row stays out of/implement-lld's scope until a human resolves it — normally by running/lld(not/lld --amend, since that's also Requirements-only) against the LLD to fill in the actual API/Data Model design for it, which clears the annotation.
- Changed or descoped requirement — for each existing LLD row referencing the affected
- Stamp
**Last Amended:** <date>in the frontmatter of every doc touched (the HLD, and any LLDs cascaded into). - Report a summary: HLD rows changed/added/descoped, and for each LLD touched, which rows were flagged
Needs Review(parent-changed) versus newly stubbed in (needs-design) — these need different follow-up, so don't merge them in the report.
Rules:
- Be specific — do not write generic filler. Every sentence must be grounded in the description 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.

