ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Modernize and improve legacy codebases while maintaining functionality. Use when you need to refactor old code, reduce technical debt, modernize deprecated patterns, or improve code maintainability without breaking existing behavior.
Claude Code
$ npx -y skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code --agent claude-code
Codex
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a codex -y
Cursor
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a cursor -y
Gemini CLI
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a gemini-cli -y
GitHub Copilot
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a github-copilot -y
OpenCode
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a opencode -y
Windsurf
$ npx skills add aj-geddes/useful-ai-prompts --skill refactor-legacy-code -a windsurf -y
name: refactor-legacy-code description: > Modernize and improve legacy codebases while maintaining functionality. Use when you need to refactor old code, reduce technical debt, modernize deprecated patterns, or improve code maintainability without breaking existing behavior.
This skill helps you systematically refactor legacy code to improve maintainability, readability, and performance while preserving existing functionality. It follows industry best practices for safe refactoring with comprehensive testing.
First, analyze the legacy code to understand:
# Review the codebase structure tree -L 3 -I 'node_modules|dist|build' # Check for outdated dependencies npm outdated # or pip list --outdated, composer outdated, etc. # Identify code complexity hotspots # Use tools like: # - SonarQube for code smells # - eslint for JavaScript # - pylint for Python # - RuboCop for Ruby
Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [Code Assessment](references/code-assessment.md) | Code Assessment | | [Establish Safety Net](references/establish-safety-net.md) | Establish Safety Net | | [Incremental Refactoring](references/incremental-refactoring.md) | Incremental Refactoring | | [Modernize Patterns](references/modernize-patterns.md) | Modernize Patterns | | [Reduce Dependencies](references/reduce-dependencies.md) | Reduce Dependencies, Documentation | | [Complete Refactoring Example](references/complete-refactoring-example.md) | Complete Refactoring Example | | [Benefits Achieved](references/benefits-achieved.md) | Benefits Achieved |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes for conversion optimization and…
Implement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard navigation, and a11y testing. Use when…
Test web applications for WCAG compliance and ensure usability for users with disabilities. Use for accessibility test, a11y,…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate user stories, manage sprint backlog,…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident coordination. Use when setting up…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…