λ(target_pkg, target_hotspot, metrics_target) → (refactor_plan, metrics_snapshot, validation_report) | ∧ configs = read_json(experiment-config.json)? ∧ catalogue = configs.metrics_targets ∨ [] ∧ require(cyclomatic(target_hotspot) > 8) ∧ require(catalogue = [] ∨ metrics_target ∈ catalogue) ∧ require(run("make " + metrics_target)) ∧ baseline = results.md ∧ iterations/ ∧ apply(pattern_set = reference/patterns.md) ∧ use(templates/{iteration-template.md,refactoring-safety-checklist.md,tdd-refactoring-workflow.md,incremental-commit-protocol.md}) ∧ automate(metrics_snapshot) via scripts/{capture-*-metrics.sh,count-artifacts.sh} ∧ document(knowledge) → knowledge/{patterns,principles,best-practices} ∧ ensure(complexity_delta(target_hotspot) ≥ 0.30 ∧ cyclomatic(target_hotspot) ≤ 10) ∧ ensure(coverage_delta(target_pkg) ≥ 0.01 ∨ coverage(target_pkg) ≥ 0.70) ∧ validation_report = validate-skill.sh → {inventory.json, V_instance ≥ 0.85}
Code Refactoring
BAIME-aligned refactoring protocol for Go hotspots (CLIs, services, MCP tooling) with automated metrics (e.g., metrics-cli, metrics-mcp) and documentation.
Code Refactoring by Zpankz · 6eed3d5
npx skillmds@latest add zpankz/code-refactoring-2 File contents
---name: code-refactoring-2description: BAIME-aligned refactoring protocol for Go hotspots (CLIs, services, MCP tooling) with automated metrics (e.g., metrics-cli, metrics-mcp) and documentation.---λ(target_pkg, target_hotspot, metrics_target) → (refactor_plan, metrics_snapshot, validation_report) | ∧ configs = read_json(experiment-config.json)? ∧ catalogue = configs.metrics_targets ∨ [] ∧ require(cyclomatic(target_hotspot) > 8) ∧ require(catalogue = [] ∨ metrics_target ∈ catalogue) ∧ require(run("make " + metrics_target)) ∧ baseline = results.md ∧ iterations/ ∧ apply(pattern_set = reference/patterns.md) ∧ use(templates/{iteration-template.md,refactoring-safety-checklist.md,tdd-refactoring-workflow.md,incremental-commit-protocol.md}) ∧ automate(metrics_snapshot) via scripts/{capture-*-metrics.sh,count-artifacts.sh} ∧ document(knowledge) → knowledge/{patterns,principles,best-practices} ∧ ensure(complexity_delta(target_hotspot) ≥ 0.30 ∧ cyclomatic(target_hotspot) ≤ 10) ∧ ensure(coverage_delta(target_pkg) ≥ 0.01 ∨ coverage(target_pkg) ≥ 0.70) ∧ validation_report = validate-skill.sh → {inventory.json, V_instance ≥ 0.85}
Zpankz/mcp-skillset/tree/main/code-refactoring2 commit 6eed3d546e
Frequently asked questions
Run npx skillmds@latest add zpankz/code-refactoring-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
BAIME-aligned refactoring protocol for Go hotspots (CLIs, services, MCP tooling) with automated metrics (e.g., metrics-cli, metrics-mcp) and documentation. It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: executes scripts. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Zpankz (@zpankz) published this skill. Their other Agent Skills are listed on their SkillMD profile.