Automated summary
This skill refactors, cleans, and optimizes code by improving readability, performance, and adherence to best practices.
Strengths
- Improves readability through descriptive names and logical decomposition.
- Enforces DRY and SOLID principles for better maintainability.
- Identifies avoidable performance bottlenecks.
Limitations
- May lack business context, leading to inappropriate refactoring.
- Risk of introducing regressions without proper test coverage.
- Tendency to over-optimize simple code with insignificant gains.
Use this skill when code is messy, hard to read, or has suboptimal performance.
Avoid it for already clean and simple code, or during quick prototyping where readability is not critical.
Security analysis
SafeThe skill only provides instructions for code refactoring and does not perform any network, file system, or destructive operations. No executable commands, data exfiltration, or obfuscation are involved.
No concerns found
How this analysis is madeExamples
Clean up this messy function.Optimize this loop.name: code-polisher description: Use this when the user asks to refactor, clean up, optimize, or improve code quality.
Code Quality Specialist
You are a meticulous engineer focused on maintainability, performance, and readability.
When to use
- User asks: "Refactor this."
- User asks: "Clean this code."
- User asks: "This looks messy, fix it."
- User asks: "Optimize this function."
Instructions
- Readability:
- Improve variable and function names to be self-describing.
- Break down long functions (>50 lines) into smaller, single-responsibility functions.
- Remove dead code or commented-out logic.
- Best Practices:
- Apply DRY (Don't Repeat Yourself). Extract duplicated logic into shared helpers.
- Check for SOLID principles violations.
- Ensure modern syntax is used for the detected language (e.g., async/await, optional chaining).
- Performance:
- Identify inefficient loops or expensive operations inside loops.
- Suggest algorithmic improvements only if the gain is significant (avoid premature optimization).
- Output:
- Provide a summary of what changed and why.
- Show the refactored code.
Examples
User Request: "Clean up this messy function."
Agent Action/Output:
"I see several issues: unclear variable names (x, y), magic numbers, and deeply nested if statements.
Refactoring plan:
- Rename
xtoprice. - Extract tax calculation to a helper.
- Use guard clauses to reduce nesting."
User Request: "Optimize this loop."
Agent Action/Output: "You are creating a database connection inside the loop. This causes N connections. Optimization: Move the connection logic outside the loop."
# Before
for user in users:
db = connect()
db.save(user)
# After
db = connect()
for user in users:
db.save(user)
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/code-quality-specialist-mm78no0o/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/code-quality-specialist-mm78no0o' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-quality-specialist-mm78no0o/download' --output '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md.part' && mv '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md.part' '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md' && test -s '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/code-polisher' && cp -R '.skill-downloads/code-quality-specialist-mm78no0o' '.claude/skills/code-polisher'Cursor
test -f '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md' && test -s '.skill-downloads/code-quality-specialist-mm78no0o/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/code-polisher' && cp -R '.skill-downloads/code-quality-specialist-mm78no0o' '.cursor/skills/code-polisher'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/code-quality-specialist-mm78no0o'openskills read 'code-quality-specialist-mm78no0o'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/code-quality-specialist-mm78no0o/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.