AgentSkillsCN

quick-change

简单改动,却做到精益求精。完成变更后,务必做好善后清理,并如实汇报所发生的一切。

SKILL.md
--- frontmatter
name: quick-change
description: Simple changes done right. Make the change, clean up after yourself, report what happened.

/quick-change [description]

For simple changes that don't warrant full planning — with a built-in cleanup pass.

No arguments? Describe this skill and stop. Do not execute.

What Is This?

/quick-change is the light workflow: make a small change carefully, then clean up what you wrote. One command instead of two.

Use this when:

  • Add a field to a model/DTO
  • Rename something
  • Add a parameter
  • Small bug fix
  • Add a button/link
  • Update a constant

If the change touches 5+ files or has design decisions → use /build or /improve instead.

Canon Skills (Auto-Invoke)

Always Active

SkillWhy
/clarityKernighan - naming, simplicity
/refactoringFowler - safe small changes
/styleGoogle - match existing patterns

By Change Type

Change TypeInvokeWhy
Rename/clarityKernighan naming principles
Bug fix/legacyFeathers' characterization before change
Validation/owaspInput validation is security
Database/sqlCelko's column design

By Language

TypeScript/JavaScript:

PatternInvoke
*.ts, *.tsx/typescript, /cherny
*.js, *.jsx/js-safety, /crockford
*.spec.ts, *.test.ts/dodds, /test-doubles

Java:

PatternInvoke
*.java/java (Bloch's field/API design)
*Test.java/test-doubles

Python:

PatternInvoke
*.py/python-idioms, /python-patterns
test_*.py/test-doubles

C#:

PatternInvoke
*.cs/csharp-depth

Go:

PatternInvoke
*.go/simplicity (Pike's Go proverbs)

Process

Step 1: Understand

Read the existing code around the change. Check how similar things are done nearby.

Step 2: Make the Change

Follow existing patterns. Complete the circuit — if you add a field, update everywhere it matters.

Step 3: Verify Checklist

Run the checklist for your change type (see below). Don't skip items.

Step 4: Clean What You Wrote

Review every file you just touched against the cleanup tables below. Fix issues inline — don't leave them for a separate pass.

Step 5: Build + Test

Confirm build passes and tests pass.

Step 6: Report

List what was changed and what was cleaned.


Checklists (Step 3)

For Adding a Field/Property

  • Added to model/entity
  • Added to DTO (if separate)
  • Added to API request/response
  • Added to UI form (if user-facing)
  • Added to UI display (if displayed)
  • Added to validation
  • Added to tests
  • Added to any mappings/transformers
  • Database migration (if persisted)

For Renaming

  • Renamed in definition
  • Renamed in ALL usages (grep to verify)
  • Renamed in tests
  • Renamed in comments/docs
  • API backwards compatibility considered

For Adding a Parameter

  • Added to function signature
  • Updated all call sites
  • Updated tests
  • Updated docs/JSDoc
  • Default value if appropriate

For Bug Fix

  • Root cause identified (not just symptom)
  • Fix is minimal (not refactoring in disguise)
  • Test added to prevent regression
  • Related code checked for same bug

Cleanup Tables (Step 4)

AI-Generated Antipatterns

SmellWhat to Look ForFix
Over-abstractionFactory/Builder/Wrapper used only onceInline it
Defensive paranoiaif (x != null) when x can never be nullRemove check
Reimplementing stdlibCustom deepClone, isEmpty, capitalizeUse library
Comment spam// loop through users above for...ofDelete comment
Speculative featuresConfig option with only one value usedRemove option
Enterprise namingAbstractUserFactoryManagerSimplify name
Wrapper classesClass that just delegates to anotherInline or remove
Unused parametersfunction foo(a, b, c) but c never usedRemove parameter
Over-generic typesResult<T, E, M, C> for simple returnSimplify type

Common Problems

ProblemThresholdFix
Vague namesdata, result, temp, item, infoRename to intent
Magic numbersHardcoded valuesExtract to constant
Dead codeUnused imports, unreachable codeDelete
Redundant codeDuplicate logicExtract or remove

Naming Smells

SmellExampleFix
Generic -erProcessor, Handler, ManagerName for what it does
Impl suffixUserServiceImplUserService if only one
I- prefixIUserServiceUserService (TS isn't C#)
Type in nameuserString, countIntuser, count
Negative booleansisNotValid, hasNoErrorsisValid, hasErrors

Self-Test Questions

  1. Would I mass-delete this in code review? → Delete it
  2. Does this abstraction have more than one use? → If no, inline it
  3. Would a new team member understand this name? → If no, rename it
  4. Is this check possible to fail? → If no, remove it
  5. Did I write this or did I request it? → If not requested, remove it

Output Format

markdown
## Quick Change: [description]

CHANGE_TYPE: [add-field | rename | add-param | bug-fix | other]

### Changed

| File:Line | What Changed |
|-----------|-------------|
| src/user.ts:12 | Added `email` field to User model |
| src/user.dto.ts:8 | Added `email` to UserDTO |

### Checklist

- [x] Model updated
- [x] DTO updated
- [x] Tests updated
- [ ] N/A: No UI for this field

### Cleaned

| File:Line | Issue | What Was Done |
|-----------|-------|---------------|
| src/user.ts:45 | Defensive paranoia | Removed null check on required field |
| src/user.ts:23 | Comment spam | Deleted `// Get the user` above `getUser()` |

### Summary

| | Count |
|---|-------|
| Files changed | N |
| Checklist items | N/N |
| Issues cleaned | N |

BUILD: pass
TESTS: pass

QUICK_CHANGE_COMPLETE

What NOT to Fix

Leave these for dedicated skills:

IssueUse Instead
Long functions (>30 lines)/improve
Deep nesting (>3 levels)/improve
Complex refactoring/improve
Security issues/security-review
Static analysis/qodana-review

Common Mistakes to Avoid

MistakeExampleDo This Instead
Incomplete circuitAdded field to model, forgot DTOGrep for the type name, update all
Inconsistent naminguser_name in DB, userName in code, name in UIMatch existing pattern exactly
Speculative additions"Added createdAt while I was there"Only what was requested
Missing validationAdded email field with no format checkAdd validation if the field has constraints
No test"It's just a field"Add test, especially for validation

When to Escalate

Use /build or /improve instead if:

  • You're touching 5+ files
  • There are design decisions to make
  • You're unsure about the right approach
  • The "simple" change is revealing complexity

vs Other Workflows

WorkflowWhen to UseOverhead
/buildNew feature from scratchFull pipeline
/improveRefine existing codeFull pipeline
/quick-changeAdd field, rename, small fixLight (checklist + cleanup)