Skip to content
Productivity
Skill

/refactor-code

Improve code structure and readability

From plugin
cowork-os
544157 skills

Claude Code

$ npx -y skills add CoWork-OS/CoWork-OS --skill refactor-code --agent claude-code

SKILL.md

refactor-code.SKILL.md
name: refactor-code
description: "Improve code structure and readability"
version: "1.0.0"
metadata:
  author: CoWork OS Contributors <info@coworkosapp.com>

Refactor Code

Purpose

Improve code structure and readability

Routing

  • Use when: Use when user asks to improve maintainability, readability, modularity, or error handling in code.
  • Do not use when: Don't use for behavior-only fixes where refactor risk is unnecessary.
  • Outputs: Refactor changes, rationale, and minimal review checklist for behavior-sensitive sections.
  • Success criteria: Preserves behavior while improving structure and readability.

Trigger Examples

Positive

  • Use the refactor-code skill for this request.
  • Help me with refactor code.
  • Use when user asks to improve maintainability, readability, modularity, or error handling in code.
  • Refactor Code: provide an actionable result.

Negative

  • Don't use for behavior-only fixes where refactor risk is unnecessary.
  • Do not use refactor-code for unrelated requests.
  • This request is outside refactor code scope.
  • This is conceptual discussion only; no tool workflow is needed.

Parameters

| Name | Type | Required | Description | | ----- | ------ | -------- | ---------------------------- | | path | string | Yes | Path to the file to refactor | | focus | select | Yes | What to focus on |

Runtime Prompt

  • Current runtime prompt length: 235 characters.
  • Runtime prompt is defined directly in `../refactor-code.json`.
Read more
@cowork-os
Ships withcowork-os

Rent the model. Own everything else. Free, open-source AI app for real work.

Stars on GitHub

Momentum

stars in total
544
Star history of CoWork-OS/CoWork-OS on GitHub, a chart by star-history.com

Other skills on cowork-os.

attack-path-analysis

attack-path-analysis

Use when Codex is already in the attack-path-analysis phase of a security scan or the user explicitly asks to trace a security…

@cowork-os@cowork-osInstall Skill
deep-security-scan

deep-security-scan

Use when the user asks for a deep, exhaustive, multi-pass, or variance-reducing repository-wide Codex Security scan. Run repeated…

@cowork-os@cowork-osInstall Skill
finding-discovery

finding-discovery

Use when Codex is already in the finding-discovery phase of a security scan or the user explicitly asks to discover candidate…

@cowork-os@cowork-osInstall Skill
fix-finding

fix-finding

Use when the user explicitly asks to fix and verify a validated or plausible security finding. Do not use as the primary trigger…

@cowork-os@cowork-osInstall Skill
security-diff-scan

security-diff-scan

Use when the user asks for a security review of a pull request, commit, branch diff, working-tree patch, or other Git-backed…

@cowork-os@cowork-osInstall Skill

More skills from other plugins.

i-have-adhd

i-have-adhd

Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress…

@ayghri@ayghriInstall Skill
ab-test-analysis

ab-test-analysis

Analyze A/B test results with statistical significance, sample size validation, confidence intervals, and ship/extend/stop…

@phuryn@phurynInstall Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

Questions about refactor-code.

Which coding agents can use refactor-code?
refactor-code installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.