lsp-refactoring

lsp-refactoring is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 46 tokens per session (1,098 once invoked), scanned A, original, Apache-2.0.

A refactoring tool that uses language-aware code navigation to change symbols, functions, classes, or modules across a project. Refactoring means changing code structure without intentionally changing what it does.

In plain words
What is it for?
It supports workspace-wide renames, extracting or moving code, updating references, applying repeated code transformations, and verifying changes with tests.
Why use it?
It reduces mistakes from manual find-and-replace when a change affects many files or references. It also uses tests to check that the refactoring remains safe.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit It supports workspace-wide renames, extracting or moving code, updating references, applying repeated code transformations, and verifying changes with tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/lsp-refactoring
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.

Any agent
npx skills add ArabelaTso/Skills-4-SE --skill lsp-refactoring
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

Made for: Claude Code, Codex.

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 lsp-refactoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/lsp-refactoring/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/lsp-refactoring)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/lsp-refactoring"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/lsp-refactoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lsp-refactoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/lsp-refactoring"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/lsp-refactoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,098 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 76
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original 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.00046 $0.01098
Opus 5 $0.00023 $0.00549
Sonnet 5 $0.00009 $0.00220
Haiku 4.5 $0.00005 $0.00110

Measured 7d ago against content hash b5f041fcc3f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

lsp-refactoring 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 7d 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/lsp-refactoring/SKILL.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LSP Refactoring

Refactoring workflow that combines language server capabilities with code search and test-driven verification for safe, precise code transformations.

When to Use This Skill

  • Renaming symbols across an entire workspace
  • Extracting functions, classes, or modules
  • Moving code between files with automatic reference updates
  • Large-scale pattern-based code transformations
  • Any refactoring where manual find-replace is error-prone

What This Skill Does

Phase 1: Analysis — Understand Before Changing

  1. Scope assessment: Find all usages of the target symbol using grep or IDE references
  2. Dependency graph: Trace where the symbol is defined and what depends on it
  3. Impact analysis: Identify all files that will be affected
  4. Pattern discovery: Search for similar patterns that should be refactored consistently
# Find all usages of a function
grep -rn "getUserData" src/ --include="*.ts"

# Find pattern across codebase with AST-aware tools (if available)
# e.g., ast-grep, semgrep, or comby
ast-grep --pattern 'console.log($MSG)' --lang typescript

Phase 2: Plan — Design the Transformation

  1. Pre-flight check: Run the type checker / linter to capture baseline errors
  2. Rename validation: Verify the symbol can be safely renamed (no conflicts)
  3. Transformation plan: List each change with file, line, before/after
  4. Test identification: Find tests covering the code being refactored

Phase 3: Execute — Apply Changes Safely

For renames (use IDE/editor capabilities when available):

# Using sed for simple renames
find src/ -name "*.ts" -exec sed -i '' 's/getUserData/fetchUserProfile/g' {} +

# Or use language-specific tools
# TypeScript: ts-morph, jscodeshift
# Python: rope, bowler
# Go: gorename

For pattern-based transformations:

# Using ast-grep (if installed)
ast-grep --pattern 'console.log($MSG)' --rewrite 'logger.info($MSG)' --lang typescript

# Using comby
comby 'console.log(:[msg])' 'logger.info(:[msg])' .ts

Read the full file on GitHub · 118 lines

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. 7d ago First seen · 118 lines · 46 tokens per session scan A b5f041fcc3f4

Subscribe to this mod's changes

lsp-refactoring is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (252 stars, last pushed 21d ago), licensed Apache-2.0. It adds 46 tokens to every session and 1,098 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

test-first-bugs

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

jamditis/claude-skills-journalism · 35 tokens

fixing-bugs

Fix a bug using strict TDD — UNDERSTAND → REPRODUCE (RED) → VERIFY RED → FIX → VERIFY GREEN → VALIDATE → REFACTOR. Use when the user reports a bug, asks to fix something, mentions a Sentry/error/regression, or pastes a stack trace. Bugs require a failing test that proves the bug existed before any code change. For…

Cristhianzl/claude-skills-czl · 105 tokens

triage-issue

Invoked helper skill for deep bug diagnosis, usually delegated from /qa when a reported issue needs root-cause analysis and a TDD fix plan before implementation. Use when the cause is unclear, the bug is a regression, or the user explicitly wants diagnosis. Not for lightweight QA intake (use /qa) or already-clear…

chrislacey89/skills · 77 tokens

self-correcting-loop

Use when generated or modified ABAP code has syntax errors, ATC findings, test failures, or activation issues. Runs an iterative fix-check-fix loop until the code is clean, tested, and activated. Equivalent to a persistent development TDD cycle.

vigneshbarani24/sap-superpowers · 57 tokens

test-first-bugfix

Test-driven bug fixing — reproduce before you fix. Use this skill whenever the user reports a bug, describes unexpected behavior, says something is broken, mentions a regression, or asks you to fix an error. This includes phrases like "this is broken", "X doesn't work", "there's a bug in", "getting an error when", "it…

The-Artificer-of-Ciphers-LLC/skills-from-the-artificer · 138 tokens

tdd-xfail

Use when fixing a bug through strict xfail reproduction and needing proof that the test fails for the intended reason.

tony/skills · 27 tokens