# Simplify Codebase

Removes accidental complexity such as dead code, duplicate state and redundant layers.

- Repository: https://github.com/tt-a1i/archify (92371 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add tt-a1i/archify --skill simplify-codebase -g -a claude-code -y`
Codex: `npx skills add tt-a1i/archify --skill simplify-codebase -g -a codex -y`
Cursor: `npx skills add tt-a1i/archify --skill simplify-codebase -g -a cursor -y`
Gemini CLI: `npx skills add tt-a1i/archify --skill simplify-codebase -g -a gemini-cli -y`

## Description

Simplification audit or authorized codebase simplification whose stated objective is to remove accidental complexity. Use for evidence-backed deletion or consolidation of dead code, duplicate state, redundant APIs or layers, ownerless abstractions, obsolete compatibility or design records, and over-engineering in any language; also use for 代码简化 or 熵回收. Do not use for general code review, onboarding, style-only refactoring, or performance tuning.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Simplify Codebase

Reduce the number of concepts and obligations a codebase must keep coherent. Line-count reduction is supporting evidence, not the objective. A successful run may conclude that the inspected surface is already justified.

## Select mode and scope

First choose the authority mode:

- **Survey** for simplification audit, investigation, or candidate-finding requests. Remain read-only and return ranked evidence.
- **Change** for explicit simplify, remove, consolidate, refactor, or repository-documentation edit requests. Prove each cut, implement it within the authorized scope, and validate the surviving contract.

Then choose the coverage scope:

- **Focused** when the user names a subsystem, symbol, state machine, dependency, or suspected duplication. Cover that boundary thoroughly before expanding outward.
- **Broad** when the request spans the repository or asks for multiple candidates. Partition the system and account for every in-scope domain.

Deleting a reachable capability, supported interface, stored representation, or compatibility path is a product decision. Describe the consequence and obtain direction unless the user has already chosen it.

## Establish the contract

1. Read the repository's instructions, architecture and decision records, manifests, test guidance, and generated-file conventions.
2. Inspect version-control state and preserve unrelated work. Identify vendored, generated, migration, fixture, and public-package surfaces before classifying them.
3. Trace the runtime path from entrypoints through configuration, registration, dispatch, persistence, processes, and wire boundaries. Record public, dynamic, persisted, generated, and compatibility-sensitive contracts.
4. In Change mode, discover the repository's real verification commands and capture a proportional baseline when feasible. A failing baseline narrows what the final checks can prove.

The rest: https://github.com/tt-a1i/archify/blob/HEAD/.agents/skills/simplify-codebase/SKILL.md
