refactor-clean

refactor-clean is a skill for Claude Code from icefrag/nbl-superpowers. It costs 53 tokens per session (1,206 once invoked), scanned A, original, no licence file.

A Java-focused workflow for finding unused or unreachable code and restructuring the remaining code. Dead code is code that is no longer needed or used.

In plain words
What is it for?
Use it to clean up dead Java code or refactor and optimise a Java project.
Why use it?
It helps remove unnecessary code while checking each change with tests, reducing clutter and the risk of breaking existing behaviour.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the nbl.superpowers plugin — 23 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/icefrag/nbl-superpowers/refactor-clean
Any agent
npx skills add icefrag/nbl-superpowers --skill refactor-clean
Clone the repo
git clone --depth 1 https://github.com/icefrag/nbl-superpowers

Made for: Claude Code.

Or install nbl.superpowers, the plugin that ships this one along with the rest of its 23 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refactor-clean

README.md
[![agentmods](https://agentmods.dev/badge/skills/icefrag/nbl-superpowers/refactor-clean.svg)](https://agentmods.dev/skills/icefrag/nbl-superpowers/refactor-clean)
Your own site
<a href="https://agentmods.dev/skills/icefrag/nbl-superpowers/refactor-clean"><img src="https://agentmods.dev/badge/skills/icefrag/nbl-superpowers/refactor-clean.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,206 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01206
Opus 5 $0.00026 $0.00603
Sonnet 5 $0.00011 $0.00241
Haiku 4.5 $0.00005 $0.00121

Measured 6d ago against content hash 2b5ed5fd62b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

refactor-clean scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/refactor-clean/SKILL.md · 139 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 139 lines · 53 tokens per session scan A 2b5ed5fd62b4

Subscribe to this mod's changes

refactor-clean is a skill published in the GitHub repository icefrag/nbl-superpowers (17 stars, last pushed today), with no licence file. It adds 53 tokens to every session and 1,206 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

nullaway

Guide for resolving NullAway static analysis errors. Best practices for: Passing ObservableSupplier/Supplier Dereferencing potentially @Nullable values Adding @NullMarked to Java code.

chromium/chromium · 43 tokens

wxjava-troubleshooter

排查 WxJava 在配置初始化、access token、签名验签、支付证书、回调通知、序列化、网络请求和多账号隔离方面的问题。适用于用户提供异常、日志、请求响应或“WxJava 为什么不能调用”的场景。.

binarywang/WxJava · 65 tokens

performance-smell-detection

Detect potential code-level performance smells in Java - streams, collections, boxing, regex, object creation. Provides awareness, not absolutes - always measure before optimizing. For JPA/database performance, use jpa-patterns instead.

decebals/claude-code-java · 51 tokens

126-java-exception-handling

Use when you need to apply Java exception handling best practices — including using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs early with fail-fast principles, handling thread interruption…

jabrena/plinth · 144 tokens

jstall

This skill should be used when the user asks about "JVM performance", "Java thread dump", "Java deadlock", "JVM diagnosis", "what is my Java application doing", "slow Java", "Java profiling", "flamegraph", "Java CPU usage", "thread contention", "JVM inspection", "jstall", or any question about analyzing, debugging, or…

parttimenerd/jstall · 87 tokens

java-heap-dump-triage

分析 Java heap dump、.hprof 文件、Eclipse MAT HTML 报告、Leak Suspects zip、Class Histogram、Dominator Tree、GC 异常、JVM OOM 或内存泄漏问题,并把 retained heap 证据关联回 Java/Kotlin/Spring/Quartz 项目代码,产出中文的根因判断、修复方案、验证计划和故障复盘文档。适用于用户要求分析 dump/hprof/heap dump/MAT 报告、内存泄漏、OOM、retained heap、dominator tree、RAMJobStore、ThreadLocal 泄漏、缓存泄漏、classloader…

TencentBlueKing/bk-ci · 162 tokens