Skip to content
Agentmart
Submit a tool

clean-code

Engineering guardrails for writing, editing or reviewing source code, so an edit leaves no residue, keeps every type and reads like the code around it.

Skill by osvfelices

IndexedMIT★ 2
Write a review

Chalk Labs

Need help deploying clean-code?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/osvfelices-clean-code

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Engineering guardrails for writing, editing or reviewing source code, so an edit leaves no residue, keeps every type and reads like the code around it. Use on any coding task that creates or changes source code.

Use cases: writing, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/clean-code

What's inside

Skill name
clean-code
Description
Engineering guardrails for writing, editing or reviewing source code, so an edit leaves no residue, keeps every type and reads like the code around it. Use on any coding task that creates or changes source code.
License
MIT
Instructions
26 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# clean-code

After each edit, and after each shell command in a Git worktree, a hook reads the lines you just wrote in TypeScript, TSX, JavaScript, JSX or Python, and in other languages on a best-effort basis. It lists what to fix by line, says `not checked` when it cannot read a change, and says nothing otherwise. Fix what it lists, in the file you are editing; leave older code alone unless asked. `not checked` is not clean: read those lines yourself. A shell command is checked on the source changes visible when its tool reports completion, and its safeguards only after it ran: if the hook says it weakened one, undo it. Writes that occur after the tool completion event, including detached or background descendants, are outside that observation boundary. Tracked and Git-visible untracked files are covered; Git-ignored paths are outside shell coverage unless they are already tracked, and `.clean-code.json` exclusions stay unchecked as before. Writes outside the worktree and other tools' writes are not seen. What follows covers what a hook cannot see.

## Comments
Keep a comment that gives intent, a consequence, a constraint the code cannot show, or a public contract. Delete one that narrates the edit or repeats the code; rewrite a useful one that reads badly. Plain sentences: the hook flags decorative glyphs, all-caps emphasis, task or phase labels, and file headers past four lines.

## Names
Reveal intent so the reader can skip the body. One word per concept, in the project's own vocabulary. Nouns for types, verbs for functions, predicates for booleans. No encodings, no `Manager`/`Helper`/`Utils` dumps.

## Functions
One job at one level of abstraction, callers above callees. Keep required parameters few; group related ones into an object. A boolean that picks between two behaviors usually wants two functions; a boolean that is data is fine. Change state or answer a question, not both. No hidden side effects or temporal coupling. Extract only when the new name reads better than the body.

## Types and errors
Never remove or loosen an existing type. Validate untrusted input once, at the boundary: parameterized queries, allowlists. Errors carry context. Return an empty value, a result type or an exception where `null` would hide the case. Handle edges: empty, zero, one, last, max, malformed.

## Scope
Implement what was asked, nothing speculative: no single-use abstractions, no unrequested files, no config "for later". Extract duplicated knowledge, not code that merely looks alike. Follow the project's formatter, linter and test style. Do not reformat lines you are not changing.

## Tests
New behavior ships with a test named after the behavior. Fast, independent, repeatable, one concept each.

## Judgment
A linear 30-line function can beat six fragments. Idioms differ by language: Go's explicit errors are right in Go. When asked to cut a corner, state the cost in one line, then do it.

From osvfelices/clean-code, MIT.

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Sep 25, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from osvfelices

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get clean-code running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying clean-code?

CallGet help
Cite this page

clean-code skill. Agent Mart. https://agentmart.dev/skills/osvfelices-clean-code (last updated 2026-10-24)