Agent skill

Refactor

by jrkerns in jrkerns/pylinac

Refactor code for big-picture architectural improvements. An agent skill from jrkerns/pylinac.

MITAuto-check passedDevelopment

Install Refactor

skills CLI
$ npx skills add jrkerns/pylinac --skill refactor -a claude-code

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

GitHub CLI
$ gh skill install jrkerns/pylinac refactor --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/jrkerns/pylinac.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/refactor .claude/skills/refactor && 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
refactor
GitHub stars
202
Token cost
~175 tokens
SKILL.md length
91 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Refactor code for big-picture architectural improvements. An agent skill from jrkerns/pylinac.

  • Tasks that involve Refactoring
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Refactor is an agent skill from jrkerns/pylinac. Refactor code for big-picture architectural improvements

Its SKILL.md is about 180 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring. It works with Python. The repository describes itself as: An image analysis library for medical physics. The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/refactor”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit c7c039d. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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

Refactor loads about 175 tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 91 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~175

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from jrkerns/pylinac at commit c7c039d, republished under its MIT licence (© jrkerns). 91 words, ~175 tokens.

Download SKILL.mdSave it as .claude/skills/refactor/SKILL.md (or your agent's skills folder).
name
refactor
description
Refactor code for big-picture architectural improvements
disable-model-invocation
true

refactor

The goal of refactoring is:

  • Add helper functions or methods as needed
  • Simplify logic
  • Assess the structure of the code for possible architectural issues
  • Assess the design pattern and propose new changes if needed
  • Prompt me on how to proceed if multiple design patterns may fit

Do not perform tiny changes. The point is to address big picture issues.

Helper functions should not be created if they will be 2 lines or less.

Helper functions should ideally take primitives for parameters and return types. Primitives include built-in Python data types.

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

Files

Just SKILL.md in .agents/skills/refactor of jrkerns/pylinac.

Open the folder on GitHubat commit c7c039d

Compare with similar skills

Refactor 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.

Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactor this skilljrkerns/pylinac202—~175Automated safety check: PassMIT
Dignified Python Standardsdocling-project/docling68k—~1.5kAutomated safety check: PassApache-2.0
Readable Pycrazyguitar/pysheeet8.2k—~2.4kAutomated safety check: PassMIT
Nexus MapperHaaaiawd/Nexus-skills1661 repos~2.5kAutomated safety check: NotesNone
Refactor OpCVCUDA/CV-CUDA2.7k—~1.5kAutomated safety check: PassCustom licence
Readable Verilog GeneratorEriemon/verilog-generator308—~5.4kAutomated safety check: PassApache-2.0

Similar skills

  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    68k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Readable Py

    crazyguitar/pysheeet

    Readable Python code rules inspired by The Art of Readable Code.

    8.2k GitHub stars~2.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Nexus Mapper

    Haaaiawd/Nexus-skills

    Generate a persistent .nexus-map/ knowledge base that lets any AI session instantly understand a codebase's architecture, systems, dependencies, and change hotspots.

    166 GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check: notes
  • Refactor Op

    CVCUDA/CV-CUDA

    Find and safely apply per-operator refactoring / redundancy-reduction opportunities in a CV-CUDA operator (near-duplicate Tensor/VarShape kernels, reinvented shared utilities, dead code).

    2.7k GitHub stars~1.5k tokensUpdated 21 days ago
    DevelopmentAuto-check passed
  • Readable Verilog Generator

    Eriemon/verilog-generator

    A skill your agent uses when creating, writing, reviewing, annotating, repairing, refactoring, or validating readable Verilog RTL, including synthesizable Verilog-2001 .v files, existing-RTL…

    308 GitHub stars~5.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Python Design

    mindfold-ai/Trellis

    Python design patterns for CLI scripts and utilities — type-first development, deep modules, complexity management, and red flags.

    15k GitHub stars~4k tokensUpdated 8 days ago
    DevelopmentAuto-check passed

More from jrkerns/pylinac

  • Generate Pull Request

    jrkerns/pylinac

    Generate a draft Bitbucket pull request with proper formatting

    202 GitHub stars~304 tokensUpdated 2 days ago
    Auto-check passed
  • Pull Request Review

    jrkerns/pylinac

    Review a Bitbucket pull request against the project checklist

    202 GitHub stars~141 tokensUpdated 2 days ago
    Auto-check passed
  • Clean Up

    jrkerns/pylinac

    Clean up code with lightweight clarity improvements. An agent skill from jrkerns/pylinac.

    202 GitHub stars~146 tokensUpdated 2 days ago
    Auto-check passed

Works with

Categories

Questions about Refactor

What does Refactor do?

Refactor code for big-picture architectural improvements. An agent skill from jrkerns/pylinac. Refactor is an agent skill from jrkerns/pylinac.

When should I use Refactor?

Refactor fits situations like: tasks that involve Refactoring.

How do I install Refactor in Claude Code?

Run `npx skills add jrkerns/pylinac --skill refactor -a claude-code`. Or copy the skill folder (.agents/skills/refactor in jrkerns/pylinac) into .claude/skills/refactor in your project. Claude Code loads it when a task matches its description.

How do I install Refactor in Codex?

Run `npx skills add jrkerns/pylinac --skill refactor -a codex`. Or copy the skill folder (.agents/skills/refactor in jrkerns/pylinac) into .agents/skills/refactor in your project. Codex loads it when a task matches its description.

Can I use Refactor 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 jrkerns/pylinac --skill refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor, .gemini/skills/refactor, .github/skills/refactor and .opencode/skills/refactor in your project.

What does Refactor need to run?

SKILL.md names no scripts, command-line tools or credentials: Refactor is instructions for the agent only. Our summary lists: Python 3.

Does Refactor 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 Refactor 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. Review the folder before installing.

What licence does Refactor use?

Refactor 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 Refactor use?

About 175 tokens (SKILL.md is roughly 700 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Refactor?

Skills that share tags, products or a category with Refactor: Dignified Python Standards (docling-project/docling, 68k stars), Readable Py (crazyguitar/pysheeet, 8.2k stars), Nexus Mapper (Haaaiawd/Nexus-skills, 166 stars) and Refactor Op (CVCUDA/CV-CUDA, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactor?

jrkerns (a GitHub user) maintains it in jrkerns/pylinac, which has 202 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 5, 2026.

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