Refactor complex functions into clean, testable, well-named smaller functions following SOLID principles.
Refactor this code following these principles: 1. Extract functions that do more than one thing into single-responsibility functions 2. Replace magic numbers and strings with named constants 3. Simplify nested conditionals (use early returns, guard clauses) 4. Extract repeated logic into shared utility functions 5. Use descriptive variable names that explain intent, not implementation 6. Replace imperative loops with declarative array methods where clearer 7. Add TypeScript types to any untyped parameters or returns 8. Remove dead code and unused imports 9. Preserve ALL existing behavior — this is refactoring, not feature work 10. Add brief comments only where the WHY is non-obvious Do NOT: - Change the public API/interface - Add new dependencies - Rename exported functions/classes (would break consumers) - Gold-plate or over-engineer
Select the code block to refactor, then apply this prompt. Review each change carefully — refactoring should never change behavior. Run tests before and after.
Agent Library is a centralized collection of reusable AI agent skills, workflows, prompts, and specialized knowledge modules. Built for Claude Code, Codex, Cursor, and other AI coding agents with an efficient on-demand loading architecture.
An open-source collection of production-ready AI skills, prompts, templates, and workflows for Claude, ChatGPT, Gemini, Cursor, and other AI tools.
A collection of Skills (system prompts) for autonomous AI Agents and LLMs (Google Antigravity, Claude Code, GitHub Copilot, Codex, Cursor, AutoGPT, ChatGPT, Gemini).
许惟的 AI 工具合集 · A growing collection of practical AI tools & skills. First up: diagram-generator (one sentence → clean diagrams).
A curated collection of high-quality AI prompts for ChatGPT, Claude, Gemini, Cursor, and other AI assistants
A curated collection of ready-to-run automation prompts for real-world workflows.
Workflows from the Neura Market marketplace related to this Cursor resource