Agent skill

Clean Code Refactorer

by fike in fike/fastapi-blog

Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles.

MITAuto-check passedDevelopment

Install Clean Code Refactorer

skills CLI
$ npx skills add fike/fastapi-blog --skill clean-code-refactorer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install fike/fastapi-blog clean-code-refactorer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/fike/fastapi-blog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills-packages/clean-code-refactorer .claude/skills/clean-code-refactorer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clean-code-refactorer
GitHub stars
101
Token cost
~402 tokens
SKILL.md length
164 words
Files
3 (incl. scripts, references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles.

  • Works in 5 steps: Observe: Identify code smells (long… → Orient: Read the Clean Code Rules to… → Validate (Pre): Run existing tests to… → …
  • Requested to clean up
  • SKILL.md covers Overview, Refactoring Workflow, Standards & Principles and Examples, plus 1 more section
  • Runs Shell scripts from its folder

What it does

Clean Code Refactorer is an agent skill from fike/fastapi-blog. Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles. Use when requested to "clean up", "refactor", or "improve quality" of backend code.

Its SKILL.md is about 400 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and reference files (for example `references/clean-code-rules.md` and `scripts/check_quality.sh`).

It sits in Development, covering Refactoring, Code quality and Backend development. It works with pytest, FastAPI, Docker and OpenTelemetry. The repository describes itself as: A FastAPI backend for blog with OpenTelemtry and Jaeger. The licence is MIT.

When your agent uses it

  • Requested to clean up
  • Improve quality of backend code

Example prompts

  • “clean up”
  • “refactor”
  • “improve quality”
  • “/clean-code-refactorer”

Requirements

  • A Bash shell

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Observe: Identify code smells (long functions, duplication, tight coupling).
  2. Orient: Read the Clean Code Rules to determine the best pattern to apply.
  3. Validate (Pre): Run existing tests to ensure the current state is stable.
  4. Act: Apply surgical changes (extract method, rename variable, etc.).
  5. Validate (Post): Execute the scripts/check_quality.sh to verify linters and tests.

What it can do on your machine

Read from SKILL.md and the folder at commit f8be702. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clean Code Refactorer loads about 402 tokens when it runs, and up to ~802 if it reads all its reference files. Until then it costs about 51 tokens; SKILL.md has 164 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~402
With references · SKILL.md plus every file in references/, read only if the agent opens them
~802

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from fike/fastapi-blog at commit f8be702, republished under its MIT licence (© fike). 164 words, ~402 tokens.

Download SKILL.mdSave it as .claude/skills/clean-code-refactorer/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
clean-code-refactorer
description
Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles. Use when requested to "clean up", "refactor", or "improve quality" of backend code.

Clean Code Refactorer

Overview

This skill provides a systematic approach to improving code quality without changing external behavior. It enforces SOLID principles and project-specific FastAPI standards.

Refactoring Workflow

Follow this cycle for every refactoring task:

  1. Observe: Identify code smells (long functions, duplication, tight coupling).
  2. Orient: Read the Clean Code Rules to determine the best pattern to apply.
  3. Validate (Pre): Run existing tests to ensure the current state is stable.
  4. Act: Apply surgical changes (extract method, rename variable, etc.).
  5. Validate (Post): Execute the scripts/check_quality.sh to verify linters and tests.

Standards & Principles

Refer to the following for detailed guidance:

Examples

  • User: "This service function is too long, can you refactor it?"
  • Agent: Reads the function, identifies logic that can be extracted to a helper, verifies tests pass, refactors, and runs quality checks.

Resources

  • scripts/check_quality.sh: Automates Ruff, Black, and Pytest validation.
  • references/clean-code-rules.md: Comprehensive guide for SOLID and Clean Code.

© fike, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts, references) in .agents/skills-packages/clean-code-refactorer of fike/fastapi-blog.

  • SKILL.md
  • references/clean-code-rules.md
  • scripts/check_quality.sh

Open the folder on GitHubat commit f8be702

Compare with similar skills

Clean Code Refactorer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clean Code Refactorer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clean Code Refactorer this skillfike/fastapi-blog101—~402Automated safety check: PassMIT
Senior Fullstackalirezarezvani/claude-skills28k1 repos~3.7kAutomated safety check: NotesMIT
Senior Fullstackborghei/Claude-Skills874—~1.7kAutomated safety check: PassMIT
React Performanceaffaan-m/ECC274k1 repos~4.5kAutomated safety check: PassMIT
Flowfile Debugging PlaybookEdwardvaneechoud/Flowfile370—~6.3kAutomated safety check: PassMIT
Ag2 Ag UIag2ai/build-with-ag2252—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • Senior Fullstack

    alirezarezvani/claude-skills

    Fullstack development toolkit with project scaffolding for Next.js, FastAPI, MERN, and Django stacks, code quality analysis with security and complexity scoring, and stack selection guidance.

    28k GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: notes
  • Senior Fullstack

    borghei/Claude-Skills

    Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis.

    874 GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • React Performance

    affaan-m/ECC

    React and Next.js performance optimization patterns adapted from Vercel Engineering's React Best Practices (https://github.com/vercel-labs/agent-skills).

    274k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed
  • Flowfile Debugging Playbook

    Edwardvaneechoud/Flowfile

    Symptom-to-cause triage playbook for Flowfile (core/worker/kernel/frontend/AI) — covers "no such table" DB cascades (two distinct causes), import-time Alembic migration corruption, silent…

    370 GitHub stars~6.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Ag2 Ag UI

    ag2ai/build-with-ag2

    Expose an AG2 beta Agent over the AG-UI protocol so a frontend (CopilotKit, custom React/Next.js, or any AG-UI client) can stream responses, render tool calls, sync shared state, and surface…

    252 GitHub stars~1.7k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Docs Guide

    fivetaku/gptaku-plugins-codex

    Fetch and explain official documentation for any library, framework, API, or service using an llms.txt-first strategy — triggers on "How do I…", "What is…", "How does X work", "Best practice for…"…

    128 GitHub stars~3.5k tokensUpdated 29 days ago
    Backend & APIsAuto-check passed

More from fike/fastapi-blog

  • Xp Copilot

    fike/fastapi-blog

    Skill for Extreme Programming (XP) practices and Test-Driven Development (TDD).

    101 GitHub stars~286 tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Clean Code Refactorer

What does Clean Code Refactorer do?

Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles. Clean Code Refactorer is an agent skill from fike/fastapi-blog. Skill for identifying code smells and refactoring code using Clean Code, SOLID, and DRY principles.

When should I use Clean Code Refactorer?

Clean Code Refactorer fits situations like: requested to clean up; improve quality of backend code.

How do I install Clean Code Refactorer in Claude Code?

Run `npx skills add fike/fastapi-blog --skill clean-code-refactorer -a claude-code`. Or copy the skill folder (.agents/skills-packages/clean-code-refactorer in fike/fastapi-blog) into .claude/skills/clean-code-refactorer in your project. Claude Code loads it when a task matches its description.

How do I install Clean Code Refactorer in Codex?

Run `npx skills add fike/fastapi-blog --skill clean-code-refactorer -a codex`. Or copy the skill folder (.agents/skills-packages/clean-code-refactorer in fike/fastapi-blog) into .agents/skills/clean-code-refactorer in your project. Codex loads it when a task matches its description.

Can I use Clean Code Refactorer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add fike/fastapi-blog --skill clean-code-refactorer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clean-code-refactorer, .gemini/skills/clean-code-refactorer, .github/skills/clean-code-refactorer and .opencode/skills/clean-code-refactorer in your project.

What does Clean Code Refactorer need to run?

Going by SKILL.md and its folder, Clean Code Refactorer needs a shell for the scripts in its folder. Our summary lists: A Bash shell.

Does Clean Code Refactorer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Clean Code Refactorer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Clean Code Refactorer use?

Clean Code Refactorer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clean Code Refactorer use?

About 402 tokens (SKILL.md is roughly 1.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 400 tokens, read only when the agent opens those files.

What are the alternatives to Clean Code Refactorer?

Skills that share tags, products or a category with Clean Code Refactorer: Senior Fullstack (alirezarezvani/claude-skills, 28k stars), Senior Fullstack (borghei/Claude-Skills, 874 stars), React Performance (affaan-m/ECC, 274k stars) and Flowfile Debugging Playbook (Edwardvaneechoud/Flowfile, 370 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Code Refactorer?

fike (a GitHub user) maintains it in fike/fastapi-blog, which has 101 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 5, 2026.

Source: fike/fastapi-blog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.