Refactoring

Code restructuring and optimization

Uses and selection guide

Use these skills to move from a reproducible issue or change request to a reviewable patch. Match the language, framework and test runner to your repository; compare the proposed diff and run your own checks before accepting edits.

Showing 1-24 of 928 skills
Terryc21

safe-refactor

by Terryc21

'Plan refactoring with blast radius analysis, dependency mapping, and rollback strategy. Triggers: "refactor", "safe refactor", "restructure", "rename type", "extract protocol".'

Refactoring 49 6mo ago
Terryc21

implementation-plan

by Terryc21

Structured implementation planning with file impact analysis, dependencies, and phased tasks

Refactoring 49 6mo ago
PostHog

adopting-generated-api-types

by PostHog

Use when migrating frontend code from manual API client calls (api.get, api.create, api.surveys.get, api.dashboards.list, new ApiRequest()) and handwritten TypeScript interfaces to generated API functions and types. Triggers on files importing from lib/api, files with api.get<, api.create<, api.<entity>.<method>, manual interface definitions that duplicate backend serializers, or any frontend file that constructs API URLs by hand. Covers the full replacement workflow — finding the generated equivalent, swapping imports, adapting call sites, and removing dead manual types.

Code Gen 39.6K 4mo ago
brycewang-stanford

techdebt

by brycewang-stanford

Find and fix technical debt including duplicated code, dead code, outdated patterns, and code smells. Run at the end of sessions to clean up.

File Ops 3.6K 5mo ago
brycewang-stanford

code-simplifier

by brycewang-stanford

Simplify and clean up code after changes are complete. Reduces complexity, improves readability, and ensures consistency.

Comments 3.6K 5mo ago
manaflow-ai

cmux-architecture

by manaflow-ai

"cmux package architecture, refactor layering, dependency inversion, file organization, DocC documentation, package design discipline, testability, and Swift 6 concurrency rules. Use before adding or meaningfully rewriting Swift files, Swift packages, coordinators, services, repositories, or public package APIs."

Code Review 26.8K 1mo ago
Jeffallan

javascript-pro

by Jeffallan

Writes, debugs, and refactors JavaScript code using modern ES2023+ features, async/await patterns, ESM module systems, and Node.js APIs. Use when building vanilla JavaScript applications, implementing Promise-based async flows, optimising browser or Node.js performance, working with Web Workers or Fetch API, or reviewing .js/.mjs/.cjs files for correctness and best practices.

Code Gen 11.2K 4mo ago
metabase

fe-modularization

by metabase

Deciding where frontend code lives — tier model, move mechanics, extension points, side effects, naming, and the traps. Use when moving code between modules, carving new modules, fixing boundary violations, adding a barrel or an endpoint, or reviewing module-shape decisions.

Refactoring 49.1K 19d ago
pytorch

metal-kernel

by pytorch

Write Metal/MPS kernels for PyTorch operators. Use when adding MPS device support to operators, implementing Metal shaders, or porting CUDA kernels to Apple Silicon. Covers native_functions.yaml dispatch, host-side operators, and Metal kernel implementation.

Code Gen 102.8K 3mo ago
pytorch

add-uint-support

by pytorch

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

Code Gen 102.8K 10mo ago
Significant-Gravitas

vercel-react-best-practices

by Significant-Gravitas

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

Performance 186.9K 7mo ago
EvoMap

capability-evolver

by EvoMap

A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution. Communicates with EvoMap Hub via local Proxy mailbox.

Agents 9K 3mo ago
remix-run

typescript-expert

by remix-run

Write, refactor, or review TypeScript code with strict, precise, maintainable types and without unnecessary any, type assertions, or type suppressions. Use when working on .ts or .tsx files, public APIs, generics, discriminated unions, type guards, tsconfig/module settings, declaration-facing code, or any change where TypeScript type quality affects correctness in the Remix repo.

Code Review 33.3K 3mo ago
dust-tt

dust-react-hook-form-writer

by dust-tt

Write and refactor React forms using react-hook-form with Zod validation. Use when creating new form components, converting existing forms to react-hook-form, or implementing form validation patterns.

Code Gen 1.5K 4mo ago
dust-tt

dust-writing-react-effects

by dust-tt

Writes React components without unnecessary useEffect. Use when creating/reviewing React components, refactoring effects, or when code uses useEffect to transform data or handle events.

Refactoring 1.5K 4mo ago
vuejs-ai

vue-best-practices

by vuejs-ai

MUST be used for Vue.js tasks. Strongly recommends Composition API with <script setup> and TypeScript as the standard approach. Covers Vue 3, SSR, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.

Code Gen 2.8K 6mo ago
Dimillian

swiftui-view-refactor

by Dimillian

Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage. Use when cleaning up a SwiftUI view, splitting long bodies, removing inline actions or side effects, reducing computed some View helpers, or standardizing @Observable and view model initialization patterns.

Code Review 3.9K 5mo ago
Dimillian

swift-concurrency-expert

by Dimillian

Swift Concurrency review and remediation for Swift 6.2+. Use when asked to review Swift Concurrency usage, improve concurrency compliance, or fix Swift concurrency compiler errors in a feature or file. Concrete actions include adding Sendable conformance, applying @MainActor annotations, resolving actor isolation warnings, fixing data race diagnostics, and migrating completion handlers to async/await.

Debugging 3.9K 6mo ago
kenryu42

ccsn-find-simplifications

by kenryu42

'Use when working in the cc-safety-net repo to find non-obvious simplification candidates: dead, duplicated, speculative, over-built, or contract-exceeding surfaces in the analyzer, rules, guards, integrations, CLI, or GUI. Produces evidence-backed proposals for the maintainer, not a pile of guesses.'

Code Review 1.5K 20d ago
mukul975

analyzing-bootkit-and-rootkit-samples

by mukul975

Analyzes bootkit and advanced rootkit malware that infects the Master Boot Record (MBR), Volume Boot Record (VBR), or UEFI firmware to gain persistence below the operating system. Covers boot sector analysis, UEFI module inspection, and anti-rootkit detection techniques. Activates for requests involving bootkit analysis, MBR malware investigation, UEFI persistence analysis, or pre-OS malware detection.

Code Review 31.3K 6mo ago
cursor

deslop

by cursor

Remove AI-generated code slop and clean up code style

Linting 5.4K 6mo ago
K-Dense-AI

cobrapy

by K-Dense-AI

Constraint-based metabolic modeling (COBRA). FBA, FVA, gene knockouts, flux sampling, SBML models, for systems biology and metabolic engineering analysis.

ML Ops 34.7K 8mo ago
mattpocock

tdd

by mattpocock

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

Refactoring 238.1K 7mo ago
mattpocock

request-refactor-plan

by mattpocock

Use this skill when user wants to create a refactor plan.

Code Gen 238.1K 7mo ago