sop-design

sop-design is a skill for Claude Code, Codex from yugef3h/leo-skills. It costs 93 tokens per session (2,338 once invoked), scanned A, original, MIT.

A development workflow that makes an AI write a specification, plan, and task list before writing code, then checks the result automatically.

In plain words
What is it for?
Use it to start features or projects, organize AI-generated work into small tasks, and set up automated checks for code quality and consistency.
Why use it?
It reduces the risk of getting working code that does not match the design or is difficult to maintain. It also keeps project rules from growing without control.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it to start features or projects, organize AI-generated work into small tasks, and set up automated checks for code quality and consistency.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yugef3h/leo-skills/sop-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add yugef3h/leo-skills --skill sop-design
Clone the repo
git clone --depth 1 https://github.com/yugef3h/leo-skills

Made for: Claude Code, Codex.

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 sop-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/yugef3h/leo-skills/sop-design/github.svg)](https://agentmods.dev/skills/yugef3h/leo-skills/sop-design)
Your own site
<a href="https://agentmods.dev/skills/yugef3h/leo-skills/sop-design"><img src="https://agentmods.dev/badge/skills/yugef3h/leo-skills/sop-design/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 sop-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/yugef3h/leo-skills/sop-design"><img src="https://agentmods.dev/badge/skills/yugef3h/leo-skills/sop-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,338 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.
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.00093 $0.02338
Opus 5 $0.00046 $0.01169
Sonnet 5 $0.00019 $0.00468
Haiku 4.5 $0.00009 $0.00234

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

Security

Grade A, and why

sop-design 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 12d 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.

skills/sop-design/SKILL.md · 166 lines

How it starts

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

SOP Design — Spec + Harness 双支柱开发流程

Overview

将 AI 辅助开发工程化为两个支柱:Spec(文档先行,定义"做什么")Harness(质量保障,验证"做对了没")。核心理念:让 AI 自己写 spec、自己拆 task、自己写代码,Harness 自动化验收——人只做 review 和方向引导。

技术栈: React 前端 + Python/Go 后端


🚨 五大风险警告

以下风险必须在每个生成的 spec 文档中引用并评估等级。忽视任何一项都将导致项目失控。

# 风险 根因 应对
🔴 1 AGENTS.md 过大 = 无规则 规则越多,AI 越容易跑偏,等同于没有规则 三次原则写入 + 大小监控(>200 行必须压缩)+ 按需加载。见 references/claude-setup.md
🔴 2 先代码后文档 = 浪费时间 直接让 AI 写代码,功能可能对但架构全错,无法维护 Spec→Plan→Task→Code 绝对顺序,写入 AGENTS 强制执行。违反时 Harness 拒绝通过
🟡 3 AI 写测试需分层对待 AI 生成的单元/集成测试已足够可靠,但 E2E 测试仍不稳定 分层策略:静态分析 + 单测默认开启,集成测试关键行为开启,E2E 默认关闭。见 references/testing-trophy.md
🟡 4 巨型 Task → 难以 review Task 太粗,一次生成太多代码,review 困难,改错成本高 每个 Task 应在 50-150 行代码量,一个 Task 一次 Conventional Commit
🟡 5 功能都对/架构全错 AI 生成的代码能跑,但不符合架构设计,维护成本飙升 Harness 审查必须核对 spec 一致性(不只是功能正确);定期触发架构重构

核心铁律(写入 AGENTS.md)

1. 文档先行:Spec → Plan → Task → Code,不可逆。任何代码生成前必须先有对应 spec。
2. 三次原则:同一问题/模式出现 ≥3 次,才写入 AGENTS.md。杜绝一次教训就上规则。
3. 测试分层:静态分析始终开启,单元测试默认开启,集成测试关键行为开启,E2E 默认关闭。
4. 即改即提:一个 Task 完成 → 一个 Conventional Commit。不要把对的改错了。
5. 不写自然语言:生成代码时只输出代码,不在代码中夹杂解释性自然语言。

模块路由

先判断用户意图,再加载对应 reference:

用户说什么 激活模块 加载文件
"新项目""没有 CLAUDE.md""/init""初始化" 项目初始化 references/claude-setup.md
"新功能""写个 spec""需求文档""技术方案" Spec 支柱 references/spec-pillar.md + references/bdd-gherkin.md
"审查""测试""重构""AGENTS 太大了""加个规则" Harness 支柱 references/harness-pillar.md + references/testing-trophy.md
"提交""commit""task 拆完了" 交付节奏 references/conventional-commits.md
不确定 先问:要写 spec 定义"做什么",还是用 Harness 验证"做对了没"?

双支柱总览

用户需求
    │
    ├── Spec 支柱(文档先行)──────────────────────┐
    │   Requirements Spec ──▶ Design Spec           │
    │   (BDD/Gherkin)         (C4/架构图)           │
    │        │                     │                │
    │        └──────┬──────────────┘                │
    │               ▼                               │
    │       Implementation Spec                     │
    │       (Task 拆解 + 依赖 + Checklist)           │
    │               │                               │
    │               ▼                               │
    │         AI 生成代码                            │
    │               │                               │
    └───────────────┼───────────────────────────────┘
                    ▼
    ┌── Harness 支柱(质量保障)────────────────────┐
    │                                               │
    │   TDD ──▶ Code Review ──▶ Refactor            │
    │   (分层)   (Spec一致性)    (人工引导)           │
    │                                               │
    │   AGENTS.md 维护(三次原则 + 压缩)             │
    │                                               │
    │   反馈 ──▶ 更新 Spec(形成闭环)               │
    └───────────────────────────────────────────────┘

Read the full file on GitHub · 166 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. 12d ago First seen · 166 lines · 93 tokens per session scan A f24866a8287e

Subscribe to this mod's changes

sop-design is a skill published in the GitHub repository yugef3h/leo-skills (11 stars, last pushed 5d ago), licensed MIT. It adds 93 tokens to every session and 2,338 once invoked, about $0.0005 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.