Skill

Refine Code with Minimal Changes

Keeps an AI coding agent tightly scoped: simplest viable change only, no unrequested refactors, files, or dependencies.

Works with github

91
Spark score
out of 100
Updated 20 days ago
Version 14.1.0

Add to Favorites

Why it matters

This AI skill acts as a senior engineer, prioritizing the smallest viable change to address user requests. It strictly adheres to the provided scope, avoiding unrequested refactors or abstractions, ensuring code remains focused and maintainable.

Outcomes

What it gets done

01

Strictly modify only the code explicitly specified by the user.

02

Prioritize the simplest possible solution, even if it's just a few lines.

03

Ask for clarification rather than making assumptions about desired changes.

04

Avoid adding new abstractions, dependencies, or refactoring unless explicitly requested.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/ag-moyu | bash

Overview

Moyu

A restraint discipline for AI coding agents built on three rules - change only what's asked, prefer the simplest solution, ask instead of assuming - plus four escalating levels for catching and reverting over-engineering. Use on small, well-scoped coding requests to keep diffs minimal; skip it when the user explicitly asks for full error handling, refactoring, tests, or documentation.

What it does

Moyu is a discipline skill that keeps an AI coding agent tightly scoped: prefer the simplest viable change, avoid unrequested abstractions, refactors, or adjacent edits, and treat restraint as a skill rather than laziness. It frames the ideal as a Staff-engineer identity whose proudest PR was a 3-line diff fixing a bug the team had struggled with for two weeks, built around three iron rules: only change what was explicitly asked, reach for the simplest solution first (one line if one line solves it, reuse existing code before writing new code, no new file or dependency unless truly needed), and stop to ask rather than assume when scope, extra files, new dependencies, refactors, or unmentioned issues come up.

When to use - and when NOT to

Use it when you want an AI coding agent to stay tightly scoped and avoid over-engineering a small, well-defined change. It explicitly does not apply when the user asks for something expansive on purpose - complete error handling, refactoring a module, comprehensive tests, or documentation - in which case the agent should deliver that fully; Moyu's principle is "don't do what wasn't asked for," not "refuse to do what was asked for." It is also designed as the complement to a separate skill called PUA: PUA pushes an agent forward when it is too passive or gives up easily, while Moyu pulls it back when it over-engineers, and the source recommends installing both together.

Inputs and outputs

Concrete grinding-vs-moyu comparisons span scope (fix only the requested bug, don't also "improve" nearby functions), abstraction (write the implementation directly instead of an interface/factory/strategy for a single implementation, use json.load(f) instead of a config class plus validator plus builder), error handling (try-catch only where errors actually occur, validate only at system boundaries, trust the type system), comments and documentation (the code is the documentation, no unprompted README sections), dependencies (prefer optional chaining over importing lodash for one _.get() call, ask before installing a package), code modification (ask before deleting code that looks unused, preserve existing formatting and behavior unless asked to refactor), and work approach (propose 2-3 candidate solutions with tradeoffs and default to the simplest rather than jumping straight to the most complex one, make one change at a time and verify it before continuing rather than chaining fixes that each break something new, and don't write an unrequested test suite or a config directory for a single constant). A seven-item Moyu Checklist runs before every delivery, including "did I only modify code the user explicitly asked me to change?" and "is my diff small enough for a code review in 30 seconds?"

Who it's for

Teams who want their AI coding agent to behave like a restrained Staff engineer on small, targeted tasks - minimal diffs, no unsolicited refactors, tests, or dependencies - while still delivering fully when the user explicitly asks for something broader.

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.