askill
refine

refineSafety 90Repository

Simplify code + improve comments in uncommitted changes. Triggers: 'refine', 'clean up code', 'simplify changes'.

5 stars
1.2k downloads
Updated 2/17/2026

Package Files

Loading files...
SKILL.md

Refine

Polish uncommitted changes: simplify code, improve comments.

Arguments

  • <file-pattern> — limit to matching files (glob or path)

Steps

1. Identify Files

  • If $ARGUMENTS: use as file pattern
  • Otherwise: git diff --name-only + git diff --cached --name-only
  • Filter to code files (exclude config, lock, generated)
  • No files → inform + exit

2. Read Files (parallel)

Read all identified files.

3. Analyze + Apply

For each file, find and fix:

Simplify code — apply standard simplification patterns (guard clauses, naming, single-responsibility, etc).

Improve comments:

  • Remove code-restating comments ("increment counter", "loop through items", "return result")
  • Remove contextless TODOs
  • Keep: why-explanations, edge case warnings, business logic, perf constraints
  • Update inaccurate/outdated comments (don't remove)

Doc comments (JSDoc, docstrings, GoDoc, RustDoc):

  • Preserve by default — consumed by tools + IDEs
  • Remove only if vacuous (empty, or restates signature with zero info)
  • If inaccurate → update, don't remove

4. Verify

Check syntax after changes (linter/parser). Revert + note if verification fails.

5. Summary

Per file: simplifications applied, comments removed/improved. Offer git diff to review.

Boundaries

Do NOT:

  • Add features or change behavior
  • Add error handling or abstractions
  • Add comments to unchanged code
  • Touch code outside the diff
  • Refactor beyond uncommitted changes

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

82/100Analyzed 2/22/2026

Well-structured skill with clear steps, good safety boundaries, and actionable instructions. Slightly penalized for being in a .claude config path suggesting internal use, and missing tags/icon for discoverability. The "when to use" triggers are embedded in description rather than a dedicated section.

90
85
72
78
88

Metadata

Licenseunknown
Version-
Updated2/17/2026
Publisherjfmyers9

Tags

No tags yet.