A structured, multi-pass code refinement skill that transforms complex, verbose, or tangled code into clean, idiomatic, maintainable implementations — without changing what the code does.
The goal is not fewer lines. The goal is code that a tired engineer at 2am can read, understand, and safely modify. Every change must pass three tests:
When clarity and brevity conflict, clarity wins. When idiom and explicitness conflict, consider the team's experience level. When DRY and locality conflict, prefer locality for code read more than modified.
深度代码简化、重构和质量细化。分析结构复杂性、反模式和可读性债务,然后应用有针对性的重构来保留准确的行为。与语言无关:Python、Go、TypeScript/JavaScript、Rust。当目标是简化和清晰而不是查找错误时,请使用此技能。触发条件:“简化此代码”、“清理我的代码”、“为了清晰而重构”、“降低复杂性”、“使其更具可读性”、“代码质量通过”、“技术债务清理”、“运行代码优化器”、“简化最近的更改”、“此代码很混乱”、“嵌套太多”、“此函数太长”、“在 PR 之前清理它”、“整理我的代码”、圈复杂度、认知复杂性、代码异味。 来源:mathews-tom/praxis-skills。