agentleFS
foryouself83foryouself83/harness-tier/skills/design-api/SKILL.md

design-api

Skill10 starsChanged 30 days agoApache-2.0View on GitHub

Write the API specification from the SRS, SDS, architecture and code, check every id, and render it to .docx.

  • Installs packages

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the second prints missing: ..., ask the user (structured choice) whether to install them, showing the command.

    line 32
  2. Very specific:

    Read docs/srs/, docs/sds/, architecture.md and the inventory's sources.

    line 52
  3. Very specific:

    When flow-config.wiki is enabled, rebuild the graph so the new node is in it, and tell the user to stage graph.yaml with the document:

    line 81

“Common” is measured: kept by at least 6 in 10 of the 6 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design-API

Writes <docs>/api.md against the host's api.template.md, then renders <output>/api.docx. Conventions: design-docs.md.

Precondition: .claude/harness-tier/scripts/design_doc_check.py must exist. If it doesn't, tell the user to run /flow-init and stop.

Interaction. Wherever this skill asks the user something, use the host's blocking question tool already in your tool list, matched by capability rather than by a host-specific name; if it is listed but not loaded, load it first with the host's tool-discovery primitive; only when no such tool is listed, or a question call errors, offer numbered options in chat and end your turn to wait for the reply — never answer the question yourself or skip it.

1. Resolve paths and dependencies

python3 .claude/harness-tier/scripts/design_doc_check.py --paths
python3 .claude/harness-tier/scripts/design_doc_render.py --check-deps

When the second prints missing: ..., ask the user (structured choice) whether to install them, showing the command. Yes → run python3 -m pip install python-docx markdown-it-py and continue. No → stop; the check steps below still run without them if the user asks.

2. Check the templates

python3 .claude/harness-tier/scripts/design_doc_check.py --templates

Any violation → relay the list and stop. A template is the consumer's; do not edit it.

3. Take the code inventory

List every route the code registers: router decorators, route tables, controller mappings. Run the listing as one command and keep it: it goes into the inventory section verbatim.

4. Write the document

Read docs/srs/, docs/sds/, architecture.md and the inventory's sources. Write <docs>/api.md in the template's shape: every template heading in order, every table with the template's header, one API-NNN block per operation, the traceability table, and the inventory. Each operation names the CMP-NNN from architecture.md that serves it, inside that operation's own block table — the cross-check reads the block, not the traceability table. When the file exists, update it: keep every id, number new operations after the highest, and append one revisions row. Get wiki_id from:

python3 .claude/harness-tier/scripts/design_doc_check.py --wiki-id api

5. Check the document

python3 .claude/harness-tier/scripts/design_doc_check.py --doc api

Fix what it names and run it again, at most three rounds. Relay every violation still standing and every note: line; do not render over a violation without the user's go-ahead: ask the user (structured choice).

6. Render

python3 .claude/harness-tier/scripts/design_doc_render.py api

When flow-config.wiki is enabled, rebuild the graph so the new node is in it, and tell the user to stage graph.yaml with the document:

python3 .claude/harness-tier/scripts/wiki_graph.py --build

7. Report

The .docx path, the violation count, and every warning: line (a diagram left as code).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.