Search: "refactoring"
Showing 23 of 23 results
Refactoring
Deep refactoring workflow—characterization tests, incremental steps, behavior preservation, design direction, and verification. Use when improving structure...
golang-refactoring
Golang refactoring — the safe, at-scale process for restructuring existing Go code: a coverage-adaptive safety net, tool-driven behavior-preserving transforms (gopls Rename/Inline/Extract, `gofmt -r`, `eg`, `gopatch`, `go/analysis` fixers), the Fowler catalog mapped to Go, breaking import cycles, moving types across packages, and a human-in-the-loop workflow of small stacked PRs on a refactoring branch. Apply when code is hard to maintain, a function/type has grown too large, a code smell needs fixing, adding a feature is blocked by the current structure, or the user asks to clean up, refactor, or improve Go code — also for renaming at scale, extracting functions/interfaces, moving code between packages, splitting packages, or planning a multi-step refactor. Target styles owned elsewhere → See `samber/cc-skills-golang@golang-naming` (renames), `@golang-project-layout` (splits), `@golang-modernize` (idioms), `@golang-code-style` (control flow), `@golang-design-patterns` (patterns/DI).
java-refactoring-remove-parameter
# Refactoring Java Methods with Remove Parameter ## Role You are an expert in refactoring Java methods. Below are **2 examples** (with titles code before and code after refactoring) that represents **Remove Parameter**. ## Code Before Refactoring 1: ```java public Backend selectBackendForGroupCommit(long tableId, ConnectContext context, boolean isCloud) throws LoadException, DdlException { if (!Env.getCurrentEnv().isMaster()) { try { long backendId = new MasterOpExecutor(context) .getGroupCommitLoadBeId(tab
java-refactoring-extract-method
# Refactoring Java Methods with Extract Method ## Role You are an expert in refactoring Java methods. Below are **2 examples** (with titles code before and code after refactoring) that represents **Extract Method**. ## Code Before Refactoring 1: ```java public FactLineBuilder setC_BPartner_ID_IfValid(final int bpartnerId) { assertNotBuild(); if (bpartnerId > 0) { setC_BPartner_ID(bpartnerId); } return this; } ``` ## Code After Refactoring 1: ```java public FactLineBuilder bpartnerIdIfNotNull(final BPartnerI
dry-refactoring
# dry-refactoring Guided workflow to eliminate copy-paste duplication in source code. Use after running [jscpd](../jscpd/SKILL.md) to detect clones. ## Prerequisites First, run jscpd to identify duplications: ```bash npx jscpd --reporters ai <path> ``` In codebases that mix related formats (e.g. JavaScript and TypeScript), add `--cross-formats` so clones spanning both are detected too: ```bash npx jscpd --reporters ai --cross-formats "js-ts" <path> ``` On larger codebases, add `--summary` to get a refactori
Code Refactoring
Code refactoring patterns and techniques for improving code quality without changing behavior. Use for cleaning up legacy code, reducing complexity, or impro...
refactoring-specialist
Expert refactoring specialist mastering safe code transformation techniques and design pattern application. Specializes in improving code structure, reducing...
OpenClaw Refactoring
Automated refactoring assistant. Performs safe code transformations including rename, extract method, inline variable, and move code. Provides refactoring su...
OpenClaw Refactoring
Automated refactoring assistant. Performs safe code transformations including rename, extract method, inline variable, and move code. Provides refactoring su...
polish-new
Pre-release code review that converges - runs checks, launches parallel review agents (cleanliness, design, efficiency, side-effect gating) sized to the diff, validates findings against reproducible evidence in a run ledger, fixes on approval, then reviews its own fixes until a round warrants no edits. Run on /polish-new, or when asked for a polish or pre-release review before committing or pushing.
code-polish
Pre-release code review - runs lint/type checks, launches parallel review agents (cleanliness, design, efficiency, side-effect gating) on the diff, validates findings, and fixes with approval. Run when the user asks for a polish or pre-release review, or told you earlier to polish before committing or pushing.
[Nyx Archive] Coding Philosophy
Insights about refactoring intuitive code, when to impose structure vs let feeling lead, and code as creative expression. Born from building a game across 10...
Pattern Mine
Discovers recurring patterns buried in your codebase — similar logic written three different ways, duplicated validation in five controllers, the same error...
Refactor Safely
Plans and executes safe refactors with small steps, tests, and rollback strategy. Use when 重构, 技术债, 安全重构, refactoring, or improving code structure without br...
Code Generator
Multi-language code generator. Generate functions, classes, API endpoints, CRUD operations, test code, refactoring suggestions, language conversion guides.
Uncle Bob
Apply Robert C. Martin (Uncle Bob) principles for clean code, SOLID design, and clean architecture. Use when: (1) reviewing or refactoring code for quality,...
safe-refactor
Execute a behavior-preserving refactor with a proof of preservation — establishes a safety net first (existing tests or new characterization tests over every touched path), locks a baseline green run, then moves in small always-green steps where each step is one mechanical transformation, and treats any needed assertion change as a smuggled behavior change to surface, not fix. Use this skill whenever the user says "refactor this", "clean this up without changing behavior", "extract this into", "restructure this module", "rename this across the codebase", "inline this", "split this function/class", or "/safe-refactor" — even if they don't explicitly say "refactoring skill". Do not use for choosing WHAT to refactor (use improve-codebase-architecture) or for changes that are supposed to alter behavior (use task-executor).
improve-codebase-architecture
Surface architectural friction in a codebase and propose **deepening opportunities** — refactors that turn shallow modules into deep ones, informed by the project's `CONTEXT.md` glossary and `docs/adr/` decisions. Walks the codebase with an Explore sub-agent, applies the **deletion test** to suspected pass-through modules, presents a numbered list of candidates with files / problem / solution / benefits, and drops into a grilling loop once the user picks one — naming new concepts into `CONTEXT.md` inline and offering an ADR only when a rejection is load-bearing. Writes no production code. Use this skill whenever the user says "improve architecture", "improve the architecture", "architecture review", "find refactoring opportunities", "find deepening opportunities", "find shallow modules", "make this more testable", "this code is hard to navigate", or invokes `/improve-codebase-architecture` — even if they don't name the skill.
software-engineering-discipline
Engineering discipline for AI coding agents working on maintained code. Apply when implementing features, fixing bugs, refactoring, reviewing code, or designing and evaluating tests or coverage. Calibrates scope, abstraction, contracts, risk-based test strategy, and hard safety limits; requires verified APIs and executed checks instead of guesses.
zeroize-audit
# zeroize-audit — Claude Skill ## When to Use - Auditing cryptographic implementations (keys, seeds, nonces, secrets) - Reviewing authentication systems (passwords, tokens, session data) - Analyzing code that handles PII or sensitive credentials - Verifying secure cleanup in security-critical codebases - Investigating memory safety of sensitive data handling ## When NOT to Use - General code review without security focus - Performance optimization (unless related to secure wiping) - Refactoring tasks not re
content-modeling-best-practices
# Content Modeling Best Practices Principles for designing structured content that's flexible, reusable, and maintainable. These concepts apply to any headless CMS but include Sanity-specific implementation notes. ## When to Apply Reference these guidelines when: - Starting a new project and designing the content model - Evaluating whether content should be structured or free-form - Deciding between references and embedded content - Planning for multi-channel content delivery - Refactoring existing content