mk:clean-code

mk:clean-code is a skill for Claude Code from ngocsangyem/MeowKit. It costs 67 tokens per session (722 once invoked), scanned A, original, MIT.

A set of coding standards for keeping code small, clear, and focused. It applies ideas such as KISS, meaning “Keep It Simple,” DRY, meaning “Don’t Repeat Yourself,” and YAGNI, meaning “You Aren’t Gonna Need It.”

In plain words
What is it for?
Use it while writing code or doing general quality checks when you want guidance on structure, simplicity, naming, and verification.
Why use it?
It helps prevent duplicated logic, unnecessary features, oversized functions, and unclear changes. It also prompts checks of existing code, dependencies, tests, and verification steps.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it while writing code or doing general quality checks when you want guidance on structure, simplicity, naming, and verification.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/ngocsangyem/meowkit/clean-code/github.svg)](https://agentmods.dev/skills/ngocsangyem/meowkit/clean-code)
Your own site
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/clean-code"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/clean-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mk:clean-code

Your own site · 80×15
<a href="https://agentmods.dev/skills/ngocsangyem/meowkit/clean-code"><img src="https://agentmods.dev/badge/skills/ngocsangyem/meowkit/clean-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 722 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 original No closer match found 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.00067 $0.00722
Opus 5.5 $0.00027 $0.00289
Sonnet 5.5 $0.00013 $0.00144
Haiku 4.5 $0.00007 $0.00072

Measured 1mo ago against content hash c57fcd21979f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mk: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 1mo 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.

.claude/skills/clean-code/SKILL.md · 73 lines

How it starts

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

Clean Code — Pragmatic AI Coding Standards

Be concise, direct, and solution-focused.

For post-implementation complexity reduction within the current diff (Phase 3.5 workflow), use mk:simplify. mk:clean-code is for broader quality-standards enforcement at any phase.

Core Principles

Principle Rule
SRP Single Responsibility — each function/class does ONE thing
DRY Don't Repeat Yourself — extract duplicates, reuse
KISS Keep It Simple — simplest solution that works
YAGNI You Aren't Gonna Need It — don't build unused features
Boy Scout Leave code cleaner than you found it

Process

  1. Read existing code — understand structure before changing
  2. Check dependencies — what imports this file? what tests cover it?
  3. Apply coding standards — load references/coding-standards.md for detailed rules
  4. Self-check — goal met? all files edited? code works? no errors? nothing forgotten?
  5. Run verification — execute agent-appropriate scripts from references

References

Reference When to load Content
coding-standards.md Step 3 — applying standards Naming, functions, structure, anti-patterns, verification scripts

Summary

Do Don't
Write code directly Write tutorials
Let code self-document Add obvious comments
Fix bugs immediately Explain the fix first
Inline small things Create unnecessary files
Name things clearly Use abbreviations
Keep functions small Write 100+ line functions

Read the full file on GitHub · 73 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 73 lines · 67 tokens per session scan A c57fcd21979f

Subscribe to this mod's changes

mk:clean-code is a skill published in the GitHub repository ngocsangyem/MeowKit (15 stars, last pushed 3mo ago), licensed MIT. It adds 67 tokens to every session and 722 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

Code Simplifier

Rewrites code to its simplest possible form while preserving exact external behavior (KISS, YAGNI).

Tariux/AI-Skills-Not-Awesome · 25 tokens

java-clean-general

Enforces general code quality in Java 21+ — DRY, no magic numbers, immutability by default, sealed hierarchies and pattern matching over instanceof chains, encapsulation over getters and setters, and streams used where they clarify. Use when reviewing or refactoring Java for quality, and when the code shows…

CasLubbers/code-design-skills · 0 tokens

ts-clean-general

Use when writing, fixing, editing, or reviewing TypeScript code quality. Enforces Clean Code's core principles—DRY, single responsibility, clear intent, no magic numbers, proper abstractions. Also trigger on: duplicated logic across files or branches (G5), magic numbers or hardcoded strings (G25), long if/else chains…

CasLubbers/code-design-skills · 0 tokens

py-clean-general

Use when writing, fixing, editing, or reviewing Python code quality. Enforces Clean Code's core principles—DRY, single responsibility, clear intent, no magic numbers, proper abstractions. Also trigger on: duplicated logic across files or branches (G5), magic numbers or hardcoded values (G25), long if/elif chains that…

CasLubbers/code-design-skills · 0 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/oh-my-openagent · 63 tokens

react-patterns

React 19 performance patterns and composition architecture for Vite + Cloudflare projects. 50+ rules ranked by impact — eliminating waterfalls, bundle optimisation, re-render prevention, composition over boolean props, server/client boundaries, and React 19 APIs. Use when writing, reviewing, or refactoring React…

jezweb/claude-skills · 110 tokens