CO

code-refinement

Automatically reviews staged code to ensure adherence to clean code principles and linting standards.

Install

mkdir -p .claude/skills/code-refinement && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13060" && unzip -o skill.zip -d .claude/skills/code-refinement && rm skill.zip

Installs to .claude/skills/code-refinement

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Review staged files for code quality (KISS, DRY, YAGNI, Clean Code) and fix linting issues.
91 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Review staged files for code quality.
  • Fix linting issues.
  • Check for opportunities to use established framework utilities.
  • Verify project's UI framework components are used.
  • Run the project's linting command.
  • Review tests and code coverage.

How it works

The skill reviews staged files against quality principles, checks for framework utility usage, runs linters, and assesses test coverage to ensure high-quality code.

Inputs & outputs

You give it
Staged files with code changes.
You get back
Code adhering to quality principles, fixed linting issues, and adequate test coverage.

When to use code-refinement

  • Check code before committing
  • Refactor redundant functions
  • Fix linting errors

About this skill

Code Refinement

Review the staged files to ensure the changes adhere to the KISS, DRY, and YAGNI principles. Confirm that Clean Code standards are met (including clear, consistent naming and comments where needed).

Check for opportunities to use established framework utilities, composables, or library functions instead of hand-rolled logic. If the staged code reimplements behavior that the project's framework or core libraries already provide, flag it and suggest the existing alternative.

Verify that the project's UI framework components and utility classes are used where appropriate instead of custom CSS or HTML elements. Flag any custom styling that duplicates what the framework already provides.

Run the project's linting command and fix all reported errors and warnings. Discover the command from package scripts, a Makefile, CI config, or pre-commit config; if the project has no linter, note that and move on. Avoid using lint-suppression comments (e.g., eslint-disable, noqa, @ts-ignore) to make the lint pass unless absolutely necessary, and only with a clear justification in the code.

Review tests and code coverage: check whether existing tests adequately cover the new or modified code, add tests for any gaps you find, and update any existing tests that must change to handle the new behavior correctly. When finished, ensure everything is ready for a high-quality code review.

When not to use it

  • When lint-suppression comments are used without clear justification.
  • When the project has no linter and no code quality review is needed.
  • When custom styling duplicates framework provisions.

Limitations

  • It avoids using lint-suppression comments unless absolutely necessary.
  • It flags custom styling that duplicates framework provisions.
  • It notes if the project has no linter and moves on.

How it compares

This skill provides a structured and automated approach to code refinement, including linting, adherence to quality principles, and test coverage checks, ensuring a higher quality code review than manual inspection.

Compared to similar skills

code-refinement side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
code-refinement (this skill)05moNo flagsIntermediate
qlty-check57moReviewBeginner
solid56moNo flagsAdvanced
code-refactor37moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry