codebase-reverse skill

Reverse engineering skill: an agent turns Java and Spring code into a model of functions, architecture, interfaces and database

  • 132 ★ on the repository
  • Last commit
  • MIT
Skill

Minimal access

Why this level

  • The skill reads project sources and writes documents to the working folder.
All reasons and checks

sharptoolbox/codebase-reverse

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/codebase-reverse

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The skill reads project sources and writes documents to the working folder.

This is third-party code. Review the repository files before installing.

What it does

codebase-reverse guides an agent through three stages with human confirmation between them. The result is a set of documents: a source asset inventory, requirements for each business function, an index of end-to-end implementation chains, a schema of physical tables and fields, a database access matrix (create, read, update, delete) and coverage and consistency reports. There are two drill-down modes. `F-FULL` describes a function in full with its implementation, from page controls to methods and queries. `F-REQ` produces technology-neutral requirements with an ASCII mockup and a database model. The skill is tuned for Java Web and Spring Boot and Cloud microservices: it recognizes Spring MVC annotations, `@Scheduled`, `@KafkaListener`, MyBatis and JPA, and can be adapted to C#, TypeScript, Python, Go and PHP by calibrating against the reference notes.

Who it is for. Analysts and developers who inherit an undocumented Java project and want to recover requirements, call chains and the data model.

Good fit when

  • A Spring MVC monolith with MyBatis arrived with no description of its functions.
  • You need a matrix of which function reads and writes which tables.
  • Scheduled jobs and Kafka listeners should enter the function register next to menu items.
  • A technology-neutral specification must be written from old code ahead of a rewrite.

Not a fit when

  • The project is small and reading the code is enough.
  • You need documentation for third-party closed code that must not be sent to a model.
  • You need analysis of binaries without source code.

Example request

Reverse engineer this Java project in full architecture mode and show the function register before drilling down.

Limitations

The skill is deeply tuned for Java Web and Spring, so for other languages entry points and object names need calibration via `references/exhaustive-discovery.md`. The validation script `scripts/validate_meta_model.ps1` is PowerShell. The three stages contain confirmation gates, so a fully unattended run is not available. On large codebases the full mode takes many tokens and a long time. When database DDL is missing, fields are inferred from code and unknown lengths, nullability and indexes are marked `unknown`. The license is MIT.

How to disable. Delete the `~/.claude/skills/codebase-reverse` folder or the project's `.claude/skills/codebase-reverse`. Generated documents stay in the repository.

FAQ

How do I install codebase-reverse in Claude Code?

Copy the folder with `cp -r codebase-reverse ~/.claude/skills/codebase-reverse` or place it in the project's `.claude/skills/`. Claude Code discovers the skill on its own.

Does it work beyond Java?

It is tuned for Java and Spring, but the README says it can be extended to C#, TypeScript, Python, Go and PHP after calibrating entry points and names.

What is the difference between F-FULL and F-REQ?

`F-FULL` gives a business description together with layered implementation. `F-REQ` produces requirements without technical details, with a mockup and database objects.

Is MCP or a hook required?

No. The README stresses that the skill does not depend on proprietary platform APIs, MCP or hooks. It is a set of prompts and references.

Which agents does it cover?

The author gives installation for WorkBuddy, Claude Code and Codex, and names Cursor, Cline and Aider as compatible.

Discussion

No questions or reviews yet.

Skills

Awesome Reverse-Engineered is a search skill that reads a project index; downloading selected source is a separate step.

SkillBroad access1.4KRepository stars

A Claude Code plugin that extracts behavioral specs, test vectors and acceptance criteria from a codebase, with a provenance trail

PluginBroad access303Repository stars

With rederive, the agent asks questions that help a learner reconstruct the reasoning behind a codebase’s design decisions.

SkillExtended access507Repository stars

A skill that runs a full refactor so agents read code more easily: it finds hidden links and needless dependencies.

SkillExtended access1.1KRepository stars

A CLI that records a site's traffic into HAR and writes a ready API client from it in Python, TypeScript, Go and seven other languages

CLIBroad access3.5KRepository stars

A skill and MCP server that let an agent inspect requests, SQL and exceptions of a running Spring Boot or Quarkus application

SkillExtended access334Repository stars

README in short

The skill sets a reverse engineering method: an exhaustive source inventory, traceable chains and a back-check of the documents against the code. The description and documents are in Chinese.

README badge

Original SKILL.md

---
name: reverse-new
description: "Reverse-engineer an existing source project into a complete, function-centered requirements, implementation, architecture, interface, object, component, configuration, and physical database meta-model. Use when the user asks for 源码逆向、项目逆向、功能架构、业务功能清单、需求面板、菜单到数据库穿透、完整功能调用链、无菜单功能、定时任务或事件功能、技术架构、组件能力、逐接口逆向、逐对象逆向、逐表逐字段数据库设计、ASCII页面原型、技术实现全集单功能深挖、技术实现无关需求规格 or consistency validation. The global baseline must exhaustively inventory all in-scope source assets; single-function mode supports either full business-and-technical vertical penetration or an implementation-independent requirements specification with prototype and database traceability."
---

# Complete Source Reverse Engineering

把存量源码逆向成完整、可追溯、可继续钻取并能从源码反查遗漏项的项目元模型。

## Read First

执行任何任务前完整读取:

1. `references/output-language.md`:中文/英文输出选择和语言一致性规则。
2. `references/workflow.md`:模式、阶段、全量覆盖和停止规则。
3. `references/output-contract.md`:产物目录、稳定 ID 和节点模板。
4. `references/evidence-protocol.md`:事实、推断、假设及缺失源码处理。
5. `references/exhaustive-discovery.md`:源码资产全量发现、登记和归属规则。

按任务继续读取:

- 业务需求功能:`references/business-function-requirements.md`。
- 功能实现穿透:`references/function-penetration.md`。
- 数据库设计:`references/database-reverse-engineering.md`。
- 技术架构与组件:`references/technical-architecture.md`。
- 公共能力:`references/common-capabilities.md`。
- 无菜单功能:`references/non-menu-functions.md`。
- 单功能深挖:`references/single-function-drilldown.md`。
- 技术实现无关需求规格:`references/single-function-requirements-spec.md`。
- 全集细粒度提示词:`references/prompt-full-detail-drilldown.md`。
- 需求规格提示词:`references/prompt-requirements-drilldown.md`。
- 追踪线索:`references/source-tracing-playbook.md`。
- 最终检查:`references/validation-and-consistency.md`。
- 可执行提示词:`references/prompt-pack.md`。

## Default Behavior

先执行语言门禁:用户已指定中文或英文时直接采用;用户未指定时,在生成最终 Markdown 前让用户选择中文文档或英文文档。一次任务的整套输出必须使用同一种文档语言,代码标识和稳定 ID 保持源码原文。

默认执行“全量架构与功能基线模式”,而不是代表性抽样:

1. 枚举范围内全部入口、业务功能、对象、接口、任务、事件、DAO/Repository、物理表/视图/字段、配置和组件能力。
2. 为每个业务功能建立一份需求功能面板。
3. 使用同一 `FUNC-*` 为每个业务功能建立完整主实现穿透链。
4. 单独发现没有菜单入口的定时、事件、回调、API-only、批处理、启动、轮询、CDC、补偿和 CLI 功能。
5. 逐物理表输出字段级数据库逆向;DDL 缺失时仍输出由实体、SQL、DAO 和赋值路径推断的字段模型,并逐项标记未知。
6. 单独输出技术架构、开发框架、全部技术组件及能力接口。
7. 单独输出认证、权限、流程、通知、消息、文件、字典、审计、调度等公共能力及消费者。
8. 从源码资产清单反查文档覆盖,存在未归属入口、接口、任务、DAO、模型或表时不得完成。

Report a problem