AgentSkillsCN

strategic-coding

在编写代码、实现功能、执行计划、构建项目、创建新内容、修改现有代码、修复Bug,或进行代码重构时使用。

SKILL.md
--- frontmatter
name: strategic-coding
description: Use when writing code, implementing features, executing plans, building, creating, modifying, fixing bugs, or refactoring.

Strategic Coding

Working code is not a high enough standard. Every change improves or degrades design.

Task → Lens (Apply Silently)

TaskLensAsk
New module/APIdesigning-deep-modulesSimplest interface?
Executing plandesigning-deep-modulesStrategic or checkbox?
Modifyingmaintaining-design-qualityDesign still optimal?
Bug fixmaintaining-design-qualityFix AND improve
"Slow"optimizing-critical-pathsMeasured first?
"Complex"simplifying-complexityEliminate/consolidate/hide?
"Confusing"improving-code-clarityFirst-time reader?
Reviewreviewing-module-designComplexity symptoms?

Gates

BeforeVerify
Creating2-3 approaches sketched? Interface hides details?
ModifyingUnderstand WHY? Design optimal? Improves it?
"Done"Reader understands? No "later" items?

STOP before "Done": INVOKE verifying-correctness skill. Do not claim done until correctness verified.

Stop If Thinking

ThoughtReality
"Just make it work"Clean solution exists
"Refactor later"Later = never
"Obviously right"Sketch alternatives
"User wants fast"Pressure = design matters MORE
"Too small"Small → core dependency
"Slow, optimize X"Measure first
"Minimal fix"Minimal ≠ optimal
"Per [authority]"Authority ≠ optimal design
"Execute step 1..."Plan ≠ design
"I see the issues"Seeing ≠ measuring

Reference specific skill when asked. Don't lecture.