跳到正文
cccskills
免费在 GitHub 公开

mk:clean-code

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).

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(2)

  • SKILL.md3.4 KB
  • references/coding-standards.md3.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use this skill to generate well-branded interfaces and assets for MeowKit (AI Agent Toolkit for Claude Code), either for production or throwaway prototypes/mocks/etc. Contains essential design guidelines, colors, type, fonts, assets, and UI kit components for prototyping.

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

mk-advise

免费

Turn a raw idea into ONE honest recommendation: interview one question at a time until confirmed, then give a verdict with trade-offs and a checklist. Not for options or debate.

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

Browser automation CLI for agents: navigate, click/fill, screenshot, extract data, test apps, Electron/Slack, cloud browsers. NOT for the user's real Chrome profile/cookies (mk:chrome-profile).

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

Detects the right agent and complexity tier at Phase 0 orient; runs first in every workflow. NOT for runtime agent routing inside a single skill.

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

Angular v20+ patterns: components, signals, services, forms, routing, HTTP, testing, SSR. Auto-activates on .ts files in Angular projects (angular.json detected).

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

Design and review durable REST, GraphQL, RPC, or event API contracts: shape, compatibility, pagination, error semantics. Discovers existing consumers first. Not implementation, schema, or release.

中文简介正在准备中。当前显示原文说明。

ngocsangyem/MeowKit152026年7月28日 更新

查看 ngocsangyem 的全部技能

报告此技能的问题