repo-industrialize

repo-industrialize is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 169 tokens per session (3,221 once invoked), scanned A, original, MIT.

A structured process for cleaning up and standardizing a long-lived code repository. It records the repository's real build, test, and lint checks, removes obsolete material, and turns recurring corrections into checks, scripts, or CI rules.

In plain words
What is it for?
It helps inventory a codebase, establish a working baseline, remove outdated files, create a single source of truth, and document or automate the repository's development process.
Why use it?
Repositories can accumulate duplicate documentation, dead code, conflicting instructions, and unwritten assumptions. Making important rules executable helps prevent the same problems from returning and makes changes easier for people without an agent.

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 It helps inventory a codebase, establish a working baseline, remove outdated files, create a single source of truth, and document or automate the repository's development process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic3007/dotfiles/repo-industrialize
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 magic3007/dotfiles --skill repo-industrialize
Clone the repo
git clone --depth 1 https://github.com/magic3007/dotfiles

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 repo-industrialize

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic3007/dotfiles/repo-industrialize"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/repo-industrialize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,221 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.00169 $0.03221
Opus 5.5 $0.00068 $0.01288
Sonnet 5.5 $0.00034 $0.00644
Haiku 4.5 $0.00017 $0.00322

Measured 16d ago against content hash 526b01661b78, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

repo-industrialize 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 16d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (assets/templates/check_example.py, evals/fixture.py, evals/grade.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/repo-industrialize/SKILL.md · 150 lines

How it starts

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

Repo Industrialize

把一个长期有人用、但积累了重复文档、死代码和口头约定的仓库,整理成"新人不靠 agent 也能改对"的状态。

核心判断:约定只写进文档就等于没有。文档会漂、会被绕过、不会在改坏时报警。所以本 skill 的产物重心不是更多文字,而是一组会失败的检查,加上一份不复述代码的索引型规范。

产物层级(先定这个,后面每一步都靠它防止双真相源)

层 位置 只放什么 禁止
强制层 .repo-std/checks/ + CI 能跑、能失败的检查 无法执行的建议
台账层 .repo-std/corrections.yml 每条纠正 → 哪个检查守它 以"写进文档了"结案
规范层 docs/REPO_GUIDE.md 流程、spec、决策理由、改动路径 复述代码里已有的事实
索引层 AGENTS.md、本地 skill 指针与命令 规范正文的第二份副本

同一事实只在一层出现。规范层要陈述代码事实时,写路径指过去,不抄内容。

适用与不适用

适用:有真实历史、有人继续维护、已经出现"同一件事两种说法"的仓库。 不适用:一次性脚本、临时实验目录、vendored 的第三方源码树(只管边界,不整改内部)。

按规模裁剪,不要对小仓库做大阵仗:百来个文件的仓库,阶段 1 与 2 合成一轮(盘点报告直接读、不落盘),检查先做三五条最常犯的;上千文件的仓库按 references/edge-cases.md 分片,并且先把闸门接上再整改,防止一边整理一边回潮。阶段 5 的纠正台账在任何规模下都不省——它是这套流程唯一不可替代的部分。


阶段 0:建立绿基线

没有可复现的绿状态,后面每一次删除都是赌博。

  • 输入:仓库根目录、README/CI 配置里的构建与测试命令。
  • 操作:找出构建、测试、lint 的真实命令并实跑一次;记录耗时与失败项;确认工作区干净(git status)、确认当前分支与远端关系。命令跑不起来时,先修到能跑,这本身就是第一批整改。
  • 产物:一行可复制的基线命令清单(后面写进 docs/REPO_GUIDE.md 的"验证"节);基线运行结果。
  • 验收:基线命令全绿,或已明确记录"原本就红"的用例清单;工作区干净。

阶段 1:仓库现状盘点

  • 输入:阶段 0 的干净工作区。

  • 操作:

    python <skill-dir>/scripts/inventory.py --root . \
        --out .tmp/docs/repo-inventory.md --json .tmp/docs/repo-inventory.json
    

    脚本给出:分类统计、体量离群、内容完全重复、同名不同路径、文档标题跨文件重复、悬挂引用、无人引用文件、陈旧标记。它只产生线索,不产生结论。把线索逐条读完,并补上脚本看不到的东西:谁在用这个仓库、哪些目录是生成物、哪些是 vendored。

  • 产物:.tmp/docs/repo-inventory.md(临时工作文档,整理结束即删)。

  • 验收:报告里每个非空小节都被人读过,并在清理计划里有对应裁决或显式"保留"。

阶段 2:过时内容清理与单一真相源

  • 输入:盘点报告。
  • 操作:对每个候选走 references/ssot.md 的三问判据(谁在引用、哪份更新、删掉会不会有人发现)。文档冲突时按该文件的仲裁顺序定唯一真相源,其余改成指针或删除。删除走独立提交,与功能改动分开,便于回滚。
  • 产物:一组"只删不改"的提交;被选定的真相源文件;指针替换后的文档。
  • 验收:阶段 0 的基线命令仍全绿;inventory.py 重跑后重复项、悬挂引用归零或每项有记录的豁免理由。

阶段 3:工业级代码整改

  • 输入:清理后的代码树。
  • 操作:按 references/quality-bar.md 逐条对照:错误处理、边界与失败路径、命名、模块职责与体量、依赖收敛、测试是否覆盖会出事的分支。先修"会让人改错"的结构问题,再修风格问题。每修一类问题立刻问:这类问题能不能变成检查?能就进阶段 5。
  • 产物:结构整改提交(每个提交单一关切、可独立回滚、可编译可运行)。
  • 验收:基线命令全绿;新增或修改的行为有对应测试;没有留下 TODO 占位、注释掉的旧实现、被绕过的兼容分支。

Read the full file on GitHub · 150 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. 16d ago First seen · 150 lines · 169 tokens per session scan A 526b01661b78

Subscribe to this mod's changes

repo-industrialize is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 5d ago), licensed MIT. It adds 169 tokens to every session and 3,221 once invoked, about $0.0007 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-11-14.

Related

repo-industrialize compared with skills from other repositories

repo-industrialize next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
repo-industrializemagic3007/dotfilesSkill115d agoMITA169Claude Code, Codex
assess-qualityurmzd/dotfilesSkill64d agoApache-2.0A120Claude Code
merge-readyurmzd/dotfilesSkill64d agoApache-2.0A208Claude Code
check-projecturmzd/dotfilesSkill64d agoApache-2.0A82Claude Code
review-diffurmzd/dotfilesSkill64d agoApache-2.0A170Claude Code
sync-ecosystemurmzd/dotfilesSkill64d agoApache-2.0A101Claude Code
review-designurmzd/dotfilesSkill64d agoApache-2.0A102Claude Code