# Clean Code

> Format, lint, and fix all warnings across the entire codebase — including test files and pre-existing issues.

- Skill: `majiayu000/clean-code-5` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/clean-code-5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/clean-code-5/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/clean-code-5

---


# Clean Code

Format, lint, and fix all warnings across the entire codebase — including test files and pre-existing issues.

## Usage

```
/clean-code
```

## Instructions

### 1. Run the project's clean-code target

Each project defines a `make clean-code` Makefile target with the appropriate tooling for its language/stack.

```bash
make clean-code
```

### 2. Fix remaining issues

If `make clean-code` fails or reports warnings/errors that couldn't be auto-fixed, investigate and fix them manually. Do NOT leave any warnings unresolved.

### 3. Verify clean state

Re-run the target to confirm it passes cleanly:

```bash
make clean-code
```

It must exit with zero warnings and zero errors.

## Rules

- Do not skip or suppress warnings (e.g. `eslint-disable`, `#[allow(...)]`, `@SuppressWarnings`) unless there is a genuine false positive with a clear justification
- Do not change the project's formatter or linter configuration
- If a fix changes behavior (not just style), flag it to the user before applying
- Test files are in scope — do not skip them
- Pre-existing issues must be fixed, not just new code

