From johnweek-agent18
Systematically refactor an Johnweek codebase (Rust, TypeScript, React/Next.js, ZK circuits) to improve code quality, performance, and security without introducing breaking changes. Use this skill whenever the user asks to refactor, clean up, restructure, or improve an existing project or codebase. Also trigger when the user mentions "tech debt", "code smell", "cleanup", "modernize code", "improve code quality", "optimize codebase", or wants to reorganize files/modules. This skill handles full-project refactoring with analysis, planning, safe execution, validation, and documentation — with additional safeguards for ZK circuits, cryptographic primitives, Web3 integrations, and cross-language FFI boundaries. Every refactoring session produces a REFACTOR-yyyy-mm-dd.md report documenting all changes and any unavoidable breaking changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/johnweek-agent18:refactorThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Improves code quality, performance, and security while preserving existing behavior.
Improves code quality, performance, and security while preserving existing behavior.
Every session ends with a REFACTOR-yyyy-mm-dd.md report.
rules/security-first.mdrules/johnweek-stack.mdrules/code-review-standards.mdsubtle crate). Do not introduce branching on secret data.zeroize derive annotations must survive
refactoring).Debug implementations on types that hold secret material.napi-rs, wasm-bindgen, or similar, update the TypeScript type definitions
and consumer code in the same batch.serde attributes) at FFI boundaries break
JavaScript consumers silently — always test the full roundtrip.view the project root. Read config files to determine
languages, frameworks, dependencies, and build system.Read references/refactor-checklist.md for per-language guidance before starting.
Rules:
Read references/report-template.md for the exact template.
Generate REFACTOR-yyyy-mm-dd.md in the project root containing:
Present the report to the user.
references/refactor-checklist.md — Per-language checklists for Quality, Performance,
Security, and Modernize changes, plus Orochi-specific items. Read before Phase 2.references/report-template.md — Markdown template for the final report. Read before Phase 4.npx claudepluginhub hungnguyen18/your-skill-18 --plugin johnweek-agent18Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.