agentsclimarketplace

Clean code

Skill ngocsangyem/MeowKit/.claude/skills/clean-code

Production ready. AI Agent Workflow System for Claude Code

Install
npx -y skills add ngocsangyem/MeowKit --skill clean-code

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Enforces KISS/DRY/YAGNI during authoring and ad-hoc quality reviews. Pragmatic standards: concise, direct, no unnecessary comments. NOT for post-hoc diff/PR review (see mk:review); NOT for behavior-preserving simplification passes (see mk:simplify).

SKILL.md

3.4 KB, as published. Nobody here has run it

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

PrincipleRule
SRPSingle Responsibility — each function/class does ONE thing
DRYDon't Repeat Yourself — extract duplicates, reuse
KISSKeep It Simple — simplest solution that works
YAGNIYou Aren't Gonna Need It — don't build unused features
Boy ScoutLeave 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

ReferenceWhen to loadContent
coding-standards.mdStep 3 — applying standardsNaming, functions, structure, anti-patterns, verification scripts

Summary

DoDon't
Write code directlyWrite tutorials
Let code self-documentAdd obvious comments
Fix bugs immediatelyExplain the fix first
Inline small thingsCreate unnecessary files
Name things clearlyUse abbreviations
Keep functions smallWrite 100+ line functions

The user wants working code, not a programming lesson.

Gotchas

  • Over-abstracting simple code: Creating helpers for one-time operations violates YAGNI → Three similar lines are better than a premature abstraction
  • Removing error handling deemed unnecessary: Stripping try-catch from system boundaries loses resilience → Only remove error handling for internal calls with guaranteed contracts

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.