Agent skill

Refactor Op

by CVCUDA in 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).

Custom licenceAuto-check passedDevelopment

Install Refactor Op

skills CLI
$ npx skills add CVCUDA/CV-CUDA --skill refactor-op -a claude-code

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

GitHub CLI
$ gh skill install CVCUDA/CV-CUDA refactor-op --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/CVCUDA/CV-CUDA.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/refactor-op .claude/skills/refactor-op && 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-op
GitHub stars
2.7k
Token cost
~1.5k tokens
SKILL.md length
640 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Custom licence

At a glance

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

  • Works in 3 steps: assess — python3 tools/refactor_op.py… → apply (only if asked to fix) — apply the… → verify — when the MR scope includes a…
  • Asked to reduce code duplication
  • SKILL.md covers Workflow and Prompt Handling
  • Calls python3

What it does

Refactor Op is an agent skill from 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). Use when asked to reduce code duplication, de-duplicate or unify an operator's kernels/bindings, remove dead code, or verify a refactor changed nothing observable. Produces a deterministic findings-first report; the apply path is gated by a strict bit-exact / feature-set / test-coverage parity check.

Its SKILL.md is about 1.5k 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, Code simplification and Test coverage. It works with CUDA, NVIDIA AI Platform and Python. The repository describes itself as: CV-CUDA™ is an open-source, GPU accelerated library for cloud-scale image processing and computer vision.

When your agent uses it

  • Asked to reduce code duplication
  • Unify an operators kernels/bindings
  • Remove dead code
  • Verify a refactor changed nothing observable

Example prompts

  • “/refactor-op”

Requirements

  • Python 3

Workflow steps

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

  1. assess — python3 tools/refactor_op.py (scope with --domain impl|api|xcut;
  2. apply (only if asked to fix) — apply the finding's named corrective action on the
  3. verify — when the MR scope includes a refactor, run

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • python3

    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 Op loads about 1.5k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 640 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 640 words (~1,455 tokens).

“[//]: # "SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved." [//]: # "SPDX-License-Identifier: Apache-2.0"”

— opening of SKILL.md by CVCUDA, Custom licence
name
refactor-op

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/refactor-op of CVCUDA/CV-CUDA.

Open the folder on GitHubat commit b051f32

Compare with similar skills

Refactor Op 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 Op compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Refactor Op this skillCVCUDA/CV-CUDA2.7k—~1.5kAutomated safety check: PassCustom licence
Code RefinerMathews-Tom/armory328—~3.1kAutomated safety check: PassMIT
Cutlass SkillslowlyC/agent-gpu-skills169—~1.3kAutomated safety check: PassMIT
Triton SkillslowlyC/agent-gpu-skills169—~1.3kAutomated safety check: PassMIT
Vllm Deploy Simplevllm-project/vllm-skills103—~1.6kAutomated safety check: PassApache-2.0
Hyperpod Version Checkerawslabs/agent-plugins9151 repos~910Automated safety check: PassApache-2.0

Similar skills

  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    328 GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Cutlass Skill

    slowlyC/agent-gpu-skills

    Write, debug, and optimize CUTLASS, CuTe, and CuTeDSL GPU kernels from local upstream source, examples, and headers.

    169 GitHub stars~1.3k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Triton Skill

    slowlyC/agent-gpu-skills

    Write, debug, and optimize Triton and Gluon GPU kernels from local upstream tutorials, production kernels, language definitions, and compiler source.

    169 GitHub stars~1.3k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • Vllm Deploy Simple

    vllm-project/vllm-skills

    Quick install and deploy vLLM, start serving with a simple LLM, and test OpenAI API.

    103 GitHub stars~1.6k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Hyperpod Version Checker

    awslabs/agent-plugins

    Official

    Check and compare software component versions on SageMaker HyperPod cluster nodes - NVIDIA drivers, CUDA toolkit, cuDNN, NCCL, EFA, AWS OFI NCCL, GDRCopy, MPI, Neuron SDK (Trainium/Inferentia)…

    915 GitHub starsUsed in 1 repo~910 tokens
    AI & LLM EngineeringAuto-check passed
  • Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

    181 GitHub stars~1.4k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed

More from CVCUDA/CV-CUDA

All 12 skills in this repo
  • Optimize Op

    CVCUDA/CV-CUDA

    Drive a single-operator optimization campaign per .agents/guidance/OPTIMIZATIONGUIDELINES.md, with a deterministically enforced definition-of-done and versioned MR summary.

    2.7k GitHub stars~834 tokensUpdated 21 days ago
    Auto-check passed
  • Review Op

    CVCUDA/CV-CUDA

    Review a CV-CUDA operator end-to-end (support / test / bench / docs coverage).

    2.7k GitHub stars~481 tokensUpdated 21 days ago
    Auto-check passed
  • Optimize Op Verify

    CVCUDA/CV-CUDA

    Verify a CV-CUDA optimization campaign's deterministic definition-of-done and concise versioned MR summary per .agents/guidance/OPTIMIZATIONGUIDELINES.md.

    2.7k GitHub stars~424 tokensUpdated 21 days ago
    Auto-check passed
  • Make Op

    CVCUDA/CV-CUDA

    Add a new CV-CUDA operator end-to-end per .agents/guidance/MAKEOPGUIDELINES.md, with a deterministically-enforced definition-of-done.

    2.7k GitHub stars~831 tokensUpdated 21 days ago
    Auto-check passed
  • Make Op Scaffold

    CVCUDA/CV-CUDA

    Scaffold a new CV-CUDA operator — a complete, wired, building skeleton — and delegate the implementation to a human or another AI.

    2.7k GitHub stars~306 tokensUpdated 21 days ago
    Auto-check passed
  • Make Op Verify

    CVCUDA/CV-CUDA

    Verify a new CV-CUDA operator against the deterministic final regression checklist (the /make-op done-gate).

    2.7k GitHub stars~433 tokensUpdated 21 days ago
    Auto-check passed

Categories

Questions about Refactor Op

What does Refactor Op do?

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). Refactor Op is an agent skill from 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).

When should I use Refactor Op?

Refactor Op fits situations like: asked to reduce code duplication; unify an operators kernels/bindings; remove dead code; verify a refactor changed nothing observable.

How do I install Refactor Op in Claude Code?

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

How do I install Refactor Op in Codex?

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

Can I use Refactor Op 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 CVCUDA/CV-CUDA --skill refactor-op -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-op, .gemini/skills/refactor-op, .github/skills/refactor-op and .opencode/skills/refactor-op in your project.

What does Refactor Op need to run?

Going by SKILL.md and its folder, Refactor Op needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

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

Refactor Op has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Refactor Op use?

About 1.5k tokens (SKILL.md is roughly 5.8k 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 Op?

Skills that share tags, products or a category with Refactor Op: Code Refiner (Mathews-Tom/armory, 328 stars), Cutlass Skill (slowlyC/agent-gpu-skills, 169 stars), Triton Skill (slowlyC/agent-gpu-skills, 169 stars) and Vllm Deploy Simple (vllm-project/vllm-skills, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Refactor Op?

CVCUDA (a GitHub organization) maintains it in CVCUDA/CV-CUDA, which has 2,728 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on September 16, 2026.

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