docs-from-code

docs-from-code is a skill for Claude Code, Codex from BackToCimaCoppi/Praxis. It costs 127 tokens per session (744 once invoked), scanned A, original, Apache-2.0.

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

Written for no agent in particular: nothing here depends on one.

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/backtocimacoppi/praxis/docs-from-code
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 BackToCimaCoppi/Praxis --skill docs-from-code
Clone the repo
git clone --depth 1 https://github.com/BackToCimaCoppi/Praxis

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 docs-from-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/backtocimacoppi/praxis/docs-from-code/github.svg)](https://agentmods.dev/skills/backtocimacoppi/praxis/docs-from-code)
Your own site
<a href="https://agentmods.dev/skills/backtocimacoppi/praxis/docs-from-code"><img src="https://agentmods.dev/badge/skills/backtocimacoppi/praxis/docs-from-code/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 docs-from-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/backtocimacoppi/praxis/docs-from-code"><img src="https://agentmods.dev/badge/skills/backtocimacoppi/praxis/docs-from-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00127 $0.00744
Opus 5.5 $0.00051 $0.00298
Sonnet 5.5 $0.00025 $0.00149
Haiku 4.5 $0.00013 $0.00074

Measured 1mo ago against content hash 65e71e451e0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 127 tokens to every session and 744 once invoked, about $0.0005 per session on Opus 5.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

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

browser-tools

Safety rules over the upstream agent-browser skill (scraping ethics, auth, request pacing, local URLs). URL policy is the Claude Code sandbox's job when the operator enables it. Use for browser automation.

yonatangross/orchestkit · 44 tokens

rag-retrieval

Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.

yonatangross/orchestkit · 58 tokens

architecture-patterns

Architecture validation and patterns for clean architecture, backend structure enforcement, project structure validation, test standards, and context-aware sizing. Use when designing system boundaries, enforcing layered architecture, validating project structure, defining test standards, or choosing the right…

yonatangross/orchestkit · 56 tokens

auto

Intent-classified router, the front door to OrchestKit and the DEFAULT entry point for any goal-shaped request. Classifies a plain-English goal and routes it to the right specialist skill. Routing is never overhead, so use it even when the target skill seems obvious; skip only when already executing inside another…

yonatangross/orchestkit · 99 tokens

langgraph

LangGraph 1.x (LTS) Python workflow patterns for state management, delta channels, resilience (node timeouts, error handlers, graceful drain), routing, parallel execution, supervisor-worker, tool calling, checkpointing, human-in-loop, streaming (v2 format), subgraphs, and functional API. Use when building LangGraph…

yonatangross/orchestkit · 80 tokens