clean-code

clean-code is a skill for Claude Code from bugrabilge/bilge-development-kit. It costs 45 tokens per session (1,113 once invoked), scanned A, a copy of clean-code, MIT.

A code-quality guide applies Clean Code principles to naming, function design, reviews, refactoring, and maintainability. Clean Code means code that other developers can read and safely change.

In plain words
What is it for?
Use it when writing code, reviewing pull requests, refactoring older code, or setting shared coding standards.
Why use it?
It helps reduce confusing code, duplicated logic, and maintenance problems while making reviews and future changes easier.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Use it when writing code, reviewing pull requests, refactoring older code, or setting shared coding standards.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bugrabilge/bilge-development-kit/clean-code
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 bugrabilge/bilge-development-kit --skill clean-code
Clone the repo
git clone --depth 1 https://github.com/bugrabilge/bilge-development-kit

Made for: Claude Code.

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 clean-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/clean-code.svg)](https://agentmods.dev/skills/bugrabilge/bilge-development-kit/clean-code)
Your own site
<a href="https://agentmods.dev/skills/bugrabilge/bilge-development-kit/clean-code"><img src="https://agentmods.dev/badge/skills/bugrabilge/bilge-development-kit/clean-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,113 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 95% copy Near-identical to another mod 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.00045 $0.01113
Opus 5 $0.00023 $0.00557
Sonnet 5 $0.00009 $0.00223
Haiku 4.5 $0.00005 $0.00111

Measured 4d ago against content hash cf87f3558c78, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

clean-code 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 4d ago.

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.

Origin

This is a copy

95% identical to clean-code — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/clean-code/SKILL.md · 95 lines

How it starts

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

Clean Code Skill

This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."

🧠 Core Philosophy

"Code is clean if it can be read, and enhanced by a developer other than its original author." — Grady Booch

When to Use

Use this skill when:

  • Writing new code: To ensure high quality from the start.
  • Reviewing Pull Requests: To provide constructive, principle-based feedback.
  • Refactoring legacy code: To identify and remove code smells.
  • Improving team standards: To align on industry-standard best practices.

1. Meaningful Names

  • Use Intention-Revealing Names: elapsedTimeInDays instead of d.
  • Avoid Disinformation: Don't use accountList if it's actually a Map.
  • Make Meaningful Distinctions: Avoid ProductData vs ProductInfo.
  • Use Pronounceable/Searchable Names: Avoid genymdhms.
  • Class Names: Use nouns (Customer, WikiPage). Avoid Manager, Data.
  • Method Names: Use verbs (postPayment, deletePage).

2. Functions

  • Small!: Functions should be shorter than you think.
  • Do One Thing: A function should do only one thing, and do it well.
  • One Level of Abstraction: Don't mix high-level business logic with low-level details (like regex).
  • Descriptive Names: isPasswordValid is better than check.
  • Arguments: 0 is ideal, 1-2 is okay, 3+ requires a very strong justification.
  • No Side Effects: Functions shouldn't secretly change global state.

3. Comments

  • Don't Comment Bad Code—Rewrite It: Most comments are a sign of failure to express ourselves in code.
  • Explain Yourself in Code:
    # Check if employee is eligible for full benefits
    if employee.flags & HOURLY and employee.age > 65:
    
    vs
    if employee.isEligibleForFullBenefits():
    
  • Good Comments: Legal, Informative (regex intent), Clarification (external libraries), TODOs.
  • Bad Comments: Mumbling, Redundant, Misleading, Mandated, Noise, Position Markers.

Read the full file on GitHub · 95 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. 4d ago First seen · 95 lines · 45 tokens per session scan A cf87f3558c78

Subscribe to this mod's changes

clean-code is a skill published in the GitHub repository bugrabilge/bilge-development-kit (10 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 1,113 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to clean-code, differing in 2 lines, and is treated as a copy.