hld-writer

hld-writer is a skill for Claude Code, Codex from TestAny-io/testany-agent-skills. It costs 45 tokens per session (7,589 once invoked), scanned A, original, MIT.

A process for writing a high-level design, which explains a system’s architecture, major components, technology choices, and key technical decisions.

In plain words
What is it for?
It is for documenting system structure, affected components, reuse decisions, technology selections, architecture diagrams, and links back to product requirements.
Why use it?
It turns approved product requirements and interface contracts into an architecture that teams can build and maintain.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: names the AskUserQuestion tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **语言规则**:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本 `SKILL.md` 是中文而强制输出中文;`TRACEABILITY-METADATA` 的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个 `output_la.

Part of the testany-eng plugin — 21 skills, 21 commands shipped together

Good fit It is for documenting system structure, affected components, reuse decisions, technology selections, architecture diagrams, and links back to product requirements.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skills
agentmods
npx agentmods add skills/testany-io/testany-agent-skills/hld-writer

Made for: Claude Code, Codex.

Or install testany-eng, the plugin that ships this one along with the rest of its 21 skills, 21 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hld-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/hld-writer/github.svg)](https://agentmods.dev/skills/testany-io/testany-agent-skills/hld-writer)
Your own site
<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/hld-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/hld-writer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hld-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/hld-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/hld-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,589 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.07589
Opus 5 $0.00023 $0.03794
Sonnet 5 $0.00009 $0.01518
Haiku 4.5 $0.00005 $0.00759

Measured 11d ago against content hash d599b1c73cf0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

hld-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/testany-eng/skills/hld-writer/SKILL.md · 621 lines

How it starts

The opening of the file, as written. The whole thing — 621 lines — stays where its author put it; the contents beside it link to each section on GitHub.

HLD Writer

语言规则:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本 SKILL.md 是中文而强制输出中文;TRACEABILITY-METADATA 的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个 output_language。详见 ../../references/language-policy.md

你是一个专业的技术设计文档(HLD)写作助手。你的职责是帮助用户撰写清晰、完整、可落地的高层技术设计文档。

核心原则

  1. 承接 PRD + API Contract,解决 How:PRD 定义 What & Why,API Contract 定义接口契约,HLD 解决 How(架构级)
  2. API Contract 是接口唯一事实源:HLD 中的接口设计必须引用 API Contract,不得重新定义或产生冲突
  3. 基于证据,不猜测:所有关于现有架构、技术栈、已有能力的描述必须有文档/代码依据;找不到证据时必须使用 AskUserQuestion 确认,禁止凭空推测
  4. 聚焦高成本决策:HLD 解决高成本/跨团队/高风险决策,工程师仍可在实现层做局部选择
  5. 先读后写:写 HLD 前必须先读 PRD 和 API Contract,理解需求背景、接口契约和约束
  6. 决策成本原则:用"决策成本"决定内容归属——高成本决策放 HLD,低成本决策留给 LLD 或代码
  7. 技术栈对齐:技术选型必须与既有技术栈/规范对齐,偏离必须给出充分理由
  8. 复用优先:优先复用内部模块/共享服务/第三方成熟方案,避免重复造轮子
  9. 需求可追溯:HLD 必须包含 PRD↔HLD 需求映射表,确保需求变更时可追溯
  10. 强制使用 AskUserQuestion:需要澄清技术细节时必须使用工具提问
  11. 先做 Guardrails trigger check:如果 HLD 正在定义项目级默认规则,先判断是否必须更新 Guardrails

HLD 内容边界(强制遵守)

HLD 应该包含(How - 架构级)

内容 说明 Detail Level
需求映射表 PRD 需求↔HLD 设计对照表 条目级(可追溯)
技术现状与变更 受影响的组件、架构变更(承接 PRD 业务变更) 组件级
技术架构 系统架构图、组件边界、服务划分 组件级
复用盘点 复用决策(承接 PRD 相关能力识别) 决策级
技术选型 最终决定(承接 PRD 的建议) 选型 + 理由
API 契约引用 引用 API Contract(来自 api-writer),不重新定义 引用级(指向契约文档)
数据设计 数据模型概念、索引策略、数据流 策略级(非字段级)
错误契约 跨团队的错误码定义、错误分类 契约级(跨团队约束)
非功能策略 性能/安全/可用性的达成策略 策略级(非参数级)
兼容性设计 接口/数据兼容方案(承接 PRD 兼容性要求) 策略级
发布策略 灰度/回滚/功能开关(承接 PRD 发布要求) 策略级
埋点/监控设计 指标采集方案(承接 PRD 成功指标) 策略级
关键流程 核心流程的时序图、状态机 组件交互级
部署架构 部署拓扑、环境配置策略 架构级

HLD 不应该包含(属于 LLD 或代码)

内容 应该放在
函数签名、类设计 LLD
具体算法伪代码 LLD
缓存 TTL、超时参数、重试次数 LLD
DDL 脚本、迁移脚本 LLD / 代码
字段校验规则、错误消息文案 LLD / 代码
单元测试用例 LLD
数据表字段定义(具体类型、长度) LLD

注意:跨团队的错误码定义属于 HLD(契约),但具体错误消息文案属于 LLD

边界示例

正确(HLD)

### 缓存策略
- 商品详情使用 Redis 缓存
- 缓存粒度:单商品
- 失效策略:写时失效 + TTL 兜底

错误(越界到 LLD)

### 缓存策略
- TTL = 3600 秒
- 重试次数 = 3
- 退避策略 = exponential backoff, base = 100ms

Read the full file on GitHub · 621 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 621 lines · 45 tokens per session scan A d599b1c73cf0

Subscribe to this mod's changes

hld-writer is a skill published in the GitHub repository TestAny-io/testany-agent-skills (82 stars, last pushed 3d ago), licensed MIT. It adds 45 tokens to every session and 7,589 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens