claude

chkim-su-serena-refactor

MCP-based symbolic refactoring plugin with context isolation, duplicate detection, and intelligent feature injection.

0 on GitHubupdated 6 months agocode_general
/

Plugin chkim-su-serena-refactor from marketplace cascade-code-general-misc-1 in joshuarweaver/cascade-code-general-misc-1. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (8)

  • debugging-workflow

    Systematic debugging workflow with parallel agent exploration, root cause analysis, and fix verification. Adapted from feature-dev methodology for bug investigation.

  • duplicate-detection-rules

    Code duplication detection rules. Patterns and thresholds for identifying clone code, role duplication, and variable duplication. Guide for removing duplicates through refactoring.

  • feature-injection-rules

    Rules and patterns for safely injecting new features into existing codebases. Ensures consistency with project conventions and SOLID principles.

  • laboratory-patterns

    Scientific experimentation patterns for exploring implementation approaches through hypothesis testing, parallel PoC execution, and rigorous verification. Used by laboratory command for systematic research workflows.

  • project-knowledge-graph

    Project knowledge extraction and graph structure rules. Defines how to analyze, document, and maintain project architecture knowledge using Serena MCP.

  • serena-refactoring-patterns

    Symbolic refactoring patterns using Serena MCP tools. Core patterns for safe code modification, reference tracking, and automated refactoring workflows.

  • solid-design-rules

    SOLID principles and TDD enforcement rules. Reference for maintainable software design. Used for code quality analysis, refactoring planning, and architecture verification.

  • user-simulation-test

    Rules and patterns for simulating real user behavior in E2E tests. Covers UI interactions, API flows, and scenario-based testing strategies.

Slash commands (11)

  • /chkim-su-serena-refactor:analyze

    Serena MCP-based SOLID analysis. Symbol-level analysis for accurate violation detection and auto-fix paths.

  • /chkim-su-serena-refactor:audit

    Quick code quality audit. Verifies code quality before and after refactoring.

  • /chkim-su-serena-refactor:debug

    Systematic debugging workflow with parallel agent exploration, root cause analysis, fix strategy design, and verification. Adapted from feature-dev methodology.

  • /chkim-su-serena-refactor:detect-duplicates

    Duplicate code and role detection. Identifies clone code, similar functions, and duplicate constants, suggesting consolidation approaches.

  • /chkim-su-serena-refactor:e2e-test

    Execute real user behavior simulation tests. UI interactions (clicks, inputs, drag-drop), API sequences, and scenario-based E2E testing using Playwright MCP.

  • /chkim-su-serena-refactor:extract

    Serena-based code extraction. Safely performs method, interface, and class extraction at the symbol level.

  • /chkim-su-serena-refactor:inject

    Intelligent feature injection with project knowledge. Extracts project structure, plans implementation following conventions, and safely injects new code.

  • /chkim-su-serena-refactor:laboratory

    Scientific experimentation workflow for exploring implementation approaches through hypothesis-driven parallel experiments, creative problem-solving, and rigorous verification.

  • /chkim-su-serena-refactor:plan

    Refactoring plan creation only. Generates step-by-step plans based on analysis results for user review.

  • /chkim-su-serena-refactor:refactor

    Serena MCP-based automated refactoring. Executes the full workflow of analysis, planning, execution, and verification.

  • /chkim-su-serena-refactor:rename

    Serena-based safe symbol renaming. Automatically updates all references across the entire codebase.

Subagents (19)

  • code-injector

    Executes code injection based on implementation plan. Safely inserts new code, handles imports, and verifies successful injection using Serena MCP.

  • creative-generator

    Generates creative and unconventional implementation approaches including API bypasses, technology combinations, and constraint-ignoring experiments. Helper agent for Phase 3 of the laboratory workflow.

  • debug-explorer

    Deeply analyzes codebase to trace bug execution paths, map data flows, and identify affected components. Uses Serena MCP for symbol-level investigation.

  • debug-strategist

    Designs fix strategies for identified bugs with risk assessment, side effect analysis, and implementation blueprints. Provides multiple approaches from minimal to comprehensive.

  • debug-verifier

    Verifies bug fixes by checking direct resolution, regression testing, and edge case coverage. Uses confidence-based reporting to filter false positives.

  • duplicate-detector

    Duplicate role, variable, and code pattern detector. Identifies code with similar functionality and suggests consolidation refactoring. Receives pre-fetched symbol data for analysis.

  • e2e-test-runner

    Executes real user behavior simulation tests including UI interactions (clicks, inputs, drag-drop), API sequences, and scenario-based E2E testing using Playwright MCP tools.

  • edge-case-hunter

    Discovers and analyzes edge cases including boundary conditions, error scenarios, concurrent access issues, and resource limits. Helper agent for Phases 4 and 6 of the laboratory workflow.

  • feature-planner

    Plans feature implementation based on extracted project knowledge. Designs injection points, code templates, and execution steps while ensuring convention and SOLID compliance.

  • knowledge-extractor

    Extracts comprehensive project knowledge including symbols, dependencies, patterns, and conventions using Serena MCP. Builds and maintains the project knowledge graph.

  • lab-analyst

    Analyzes problems by decomposing them into sub-problems and forming testable hypotheses. Core agent for Phases 1 and 4 of the laboratory workflow.

  • lab-experimenter

    Implements proof-of-concept code for hypotheses and coordinates parallel experiments. Core agent for Phase 5 of the laboratory workflow.

  • lab-verifier

    Rigorously verifies experiment results against success criteria, checks reproducibility, and generates final reports. Core agent for Phases 6 and 7 of the laboratory workflow.

  • llm-consultant

    Consults external LLMs (Gemini, Codex) via u-llm-sdk for diverse perspectives on implementation approaches and failure analysis. Helper agent for Phases 2-3 and 6 of the laboratory workflow.

  • refactor-auditor

    Refactoring quality auditor. Compares code quality before and after refactoring, detects incomplete modifications or new issues.

  • refactor-planner

    Refactoring plan architect. Creates step-by-step refactoring plans based on SOLID analysis results. Each step must be independently testable and rollback-capable.

  • serena-refactor-executor

    Serena MCP-based refactoring executor. Provides execution guidance for symbol-level code modifications including renaming, extraction, and restructuring.

  • serena-solid-analyzer

    SOLID principle violation analyzer. Analyzes pre-fetched code data to detect violations and provide fix recommendations.

  • source-fetcher

    Searches and collects implementation approaches from GitHub Issues, Stack Overflow, and official documentation via Context7. Helper agent for Phase 2 of the laboratory workflow.

Hooks (12)

  • SessionStart

    MCP_FILE="$HOME/.claude/mcp_servers.json"; echo '' && echo '════════════════════════════════════════════════════════════' && echo ' 🔧 Serena Refactor Plugin - MCP Configuration Check' && echo '═════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"serena-refactor-executor"* ]] && exit 0; echo '' && echo '═══════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"refactor-auditor"* ]] && exit 0; echo '' && echo '═══════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"refena-planner"* ]] && [[ "$SUBAGENT" != *"refactor-planner"* ]] && exit 0; echo '' && echo '════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"duplicate-detector"* ]] && exit 0; echo '' && echo '═════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"serena-solid-analyzer"* ]] && exit 0; echo '' && echo '══════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"knowledge-extractor"* ]] && exit 0; echo '' && echo '════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"feature-planner"* ]] && exit 0; echo '' && echo '════════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"code-injector"* ]] && exit 0; echo '' && echo '══════════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"e2e-test-runner"* ]] && exit 0; echo '' && echo '════════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"debug-explorer"* ]] && exit 0; echo '' && echo '═════════════════════════════════════════════════

  • PreToolUse

    INPUT=$(cat); SUBAGENT=$(echo "$INPUT" | jq -r '.tool_input.subagent_type // ""'); [[ "$SUBAGENT" != *"debug-strategist"* ]] && exit 0; echo '' && echo '═══════════════════════════════════════════════

View source on GitHub

More from joshuarweaver/cascade-code-general-misc-1

All 150 plugins →

Software architecture patterns skill for designing maintainable, testable applications with clear separation of concerns.

200 skills

0

Collection of plugins for code analysis, architecture review, SOLID principles, and distributed systems design.

113 skills

0

Comprehensive development environment featuring specialized AI agents for code review, security analysis, and technical leadership. Designed for engineering teams managing complex codebases.

100 skills

0

In-code documentation tool for generating README files, JSDoc comments, and code organization guides automatically.

66 skills

0

Similar plugins

ruflo-sparc

claudecodex

SPARC methodology — Specification, Pseudocode, Architecture, Refinement, Completion phases with quality gates

3 skills · 1 command · 1 agent

ruvnet/ruflo 81,589

serena

claude

Semantic code analysis MCP server providing intelligent code understanding, refactoring suggestions, and codebase navigation through language server protocol integration.

1 MCP server

anthropics/claude-plugins-official 47,076

Test-driven development methodology with red-green-refactor cycles and code review

4 commands · 2 agents

wshobson/agents 42,461

Agent coordination and meta-programming - multi-agent orchestration, workflow automation, and safe refactor governance. Works best with other voltagent plugins installed.

VoltAgent/awesome-claude-code-subagents 26,513

sepia

claudecodex

Installs the general Sepia router plus five separate entries: sepia-write, sepia-review, sepia-refactor, sepia-recreate, and sepia-hemingway.

6 skills

Nanako0129/sepia 3,799

13 MIT-licensed SKILL.md skills for everyday developer work: review-my-diff, repro-first-debugging, pr-description, safe-refactor, dependency-upgrade (shows the target version and files and waits for a yes before changing anything), explain-codebase, security-quick-review, prove-it-ran (make the agent show real test output before saying done), session-handoff, brag-doc-from-git, write-agents-md, agents-md-audit (with a small read-only Python audit script) and write-subagent. Skills only: no hooks, no MCP servers, no settings, no network calls.

13 skills

davepoon/buildwithclaude 3,741

Maintain chkim-su-serena-refactor?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins150 plugins