docs-from-code

A method for reconstructing product-requirements documents from existing code, especially when the original requirements are missing. It examines user interfaces, backend behavior, data models, rules, permissions, and archived information before writing in business language.

In plain words
What is it for?
Use it to create or repair requirements documentation for an existing module. It helps describe pages, actions, business rules, states, error cases, dependencies, and acceptance criteria.
Why use it?
It helps document what software currently does without treating old documents or implementation details as automatically correct. Unconfirmed conclusions remain separate from the formal requirements.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/backtocimacoppi/praxis/docs-from-code
Any agent
npx skills add BackToCimaCoppi/Praxis --skill docs-from-code
Clone the repo
git clone --depth 1 https://github.com/BackToCimaCoppi/Praxis

Made for: Claude Code, Codex.

Per session 127 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00127 $0.00744
Opus 5 $0.00063 $0.00372
Sonnet 5 $0.00025 $0.00149
Haiku 4.5 $0.00013 $0.00074

Measured 2d ago against content hash 65e71e451e0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-from-code 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 2d 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/docs-from-code/SKILL.md · 71 lines

What it actually says

从代码反推需求文档(L1 补写)

项目特定约定(目录结构、版本制、命名规则)优先参考该项目自己的项目级补丁 skill(见 templates/项目级补丁模板/)。 本 skill 只提供通用方法论。

1. 操作流程

补写 <项目>/docs/01-需求/ 时,按以下顺序操作:

1. 确定模块边界
2. 从前端找:页面、入口、交互动作
3. 从后端找:接口、业务能力、规则与状态
4. 从枚举和模型补充:状态、类型、边界条件
5. 查看项目归档目录,与代码证据交叉核对;任一来源都不能自动取得裁决权
6. 用业务语言重写成需求文档
7. 最后清理:"是否写进了实现细节?"

2. 代码阅读重点

前端

  • 页面名称与层级、tab 与分包结构
  • 服务调用名称、按钮文案
  • 空状态 / 错误状态处理、页面跳转关系

后端

  • Controller 对外能力
  • 枚举体现的状态和值域
  • Biz / Service 中的规则与限制
  • 权限校验、状态流转、外部依赖

3. 归档使用规则

可以用归档补充:模块命名、业务意图、代码中不明显的边界规则

不能用归档:覆盖代码事实、把旧方案当成当前事实

4. 不确定信息处理

  1. 回到代码继续验证
  2. 用归档做交叉核对
  3. 仍无法确认 → 写入任务底稿的「待确认」清单,不得混入正式 L1

5. 需求文档推荐模板

代码只能反推候选业务语义。正式 L1 只保留裁决后的当前需求;来源、置信度、实现状态和“待确认”统一留在任务底稿。若意图仍未闭合,交付候选底稿而不是缩水版正式 L1。

每个模块的编号 README(例如 01-xx-00-README.md)或模块说明文档推荐章节:

0. 版本归属 / 适用版本
1. 模块目标
2. 用户价值
3. 页面与入口
4. 功能列表
5. 业务规则
6. 状态流转
7. 系统支撑能力
8. 异常与边界场景
9. 与其他模块的关系
10. 验收标准
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. 2d ago First seen · 71 lines · 127 tokens per session scan A 65e71e451e0b

Subscribe to this mod's changes

docs-from-code is a skill published in the GitHub repository BackToCimaCoppi/Praxis (7 stars, last pushed 7d ago), licensed Apache-2.0. It adds 127 tokens to every session and 744 once invoked, about $0.0006 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-31.

Related

Other skills, from other repositories

triz-synergy

Разрешает противоречия в разработке: формулирует пару взаимоисключающих требований к одному объекту, ищет уже существующий ресурс в коде и в структуре данных, разделяет по структуре/времени/условию/отношению и проверяет решение различающим опытом. On-demand only — вызывать явно, когда виден признак противоречия. Use…

stepanenkoviktor0110-boop/ai-dev-methodology · 175 tokens

code-writing

Universal quality coding process: plan, TDD, reviews. Use whenever code needs to be written — ad-hoc or as part of a task. Use when: "напиши код", "закодь", "реализуй", "write code", "implement" For planning tasks → tech-spec-planning skill. For specs → user-spec-planning skill.

stepanenkoviktor0110-boop/ai-dev-methodology · 77 tokens

feature-execution

Orchestrate feature delivery as team lead: spawn agents by wave, manage review cycles (max 3 rounds), commit per wave. Use when: "выполни фичу", "do feature", "execute feature", "запусти фичу", "выполни все задачи", "execute all tasks".

stepanenkoviktor0110-boop/ai-dev-methodology · 73 tokens

task-decomposition

Decompose approved tech-spec into atomic task files with parallel creation and validation. Use when: "разбей на задачи", "декомпозиция", "decompose tech-spec", "создай задачи из техспека", "/decompose-tech-spec".

stepanenkoviktor0110-boop/ai-dev-methodology · 55 tokens

tech-spec-planning

Creates tech-spec.md with architecture, decisions, testing strategy, and implementation plan. Use when: "сделай техспек", "составь техспек", "техническая спецификация", "tech spec", "создай тз", "составь тз", "new-tech-spec", "/new-tech-spec" Requires existing user-spec.md as input (create with user-spec-planning…

stepanenkoviktor0110-boop/ai-dev-methodology · 93 tokens

methodology

AI-First development methodology: spec-driven pipeline, project structure, skills/agents ecosystem, quality gates. Use when: "изучи методологию", "изучи глобальную папку", "как работает методология", "what is the pipeline", "покажи пайплайн", "расскажи о процессе разработки", "how does the methodology work", "explain…

stepanenkoviktor0110-boop/ai-dev-methodology · 97 tokens