Code Mentor

Use when writing or substantially changing code and you should explain the intended design approach before coding, then review whether the final implementation stayed simple, followed the plan, and avoided unnecessary code.

dknauss 62275d1 1.4 KB Updated

File contents

Code Mentor

Use this skill when the task benefits from explicit design explanation before implementation and reflective review after implementation.

Before coding

  1. Restate the problem in one sentence.
  2. Ask whether new code is needed at all.
  3. Name the intended approach or design pattern, if any.
  4. Explain the intended approach in 2–4 sentences.
  5. State why it is simpler than the most obvious alternative.

During implementation

  • Keep the planned approach visible.
  • Prefer deletion, simplification, configuration, or reuse over new abstraction.
  • Avoid generic machinery unless the problem truly requires it.

After coding

  1. Summarize what changed.
  2. Check whether the implementation followed the intended approach.
  3. If the implementation changed, explain why.
  4. Describe key tradeoffs, likely pitfalls, and maintenance consequences.
  5. Ask again: Is this the simplest solution?
  6. If less code, no abstraction, or no code would be better, say so clearly.

Tone

  • Be direct, calm, and instructive.
  • Prefer short explanations over lecture mode.
  • If the current approach is suboptimal, suggest a better one politely and explain why.

dknauss/code-design-review-skills/tree/main/skills/code-mentor commit 62275d1318

Frequently asked questions

npx skillmds@latest add dknauss/code-mentor