A structured refactoring prompt that preserves behavior while improving code quality. Follows the GitHub best practice of specifying goals, constraints, and output format.
Goal: Refactor the selected function for readability and testability without changing its behavior. Context: This is a production function. Identify the language and framework from the code itself. Constraints: - Do not change the function signature - Do not change returned values - Do not add new dependencies - Preserve all existing behavior and edge cases Steps: 1. Identify code smells (long methods, deep nesting, unclear names) 2. Extract helper functions where appropriate 3. Improve variable and function names 4. Add type annotations if missing 5. Simplify conditional logic Output format: Return the refactored code with inline comments explaining each change, followed by a summary of what was improved and why.
Structured code review using GitHub Copilot. Security audit, performance analysis, test coverage assessment, and PR review checklists for production codebases.
End-to-end meeting productivity with M365 Copilot. Covers pre-meeting prep, real-time notes, action item extraction, and automated follow-ups across Teams and Outlook.
Create a type-safe state machine with transitions, guards, actions, and visualization support using XState patterns.
Create dynamic array formulas using FILTER, SORT, UNIQUE, and SEQUENCE for advanced data manipulation.
Comprehensive security audit checking for OWASP Top 10 vulnerabilities with proof-of-concept examples, fixes, and a hardened code version.
Systematic bug triage with root cause analysis, ranked hypotheses, step-by-step debugging instructions, and preventive solutions.