Refactor code to improve structure, readability, and maintainability without changing behavior.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Code Refactoring Skill
This skill guides systematic code refactoring while preserving functionality.
## Refactoring Principles
### Extract Method/Function
- Break down large functions into smaller, focused ones
- Name functions based on their purpose
- Each function should do one thing well
### Simplify Conditionals
- Replace complex conditions with well-named functions
- Use early returns to reduce nesting
- Consider guard clauses
### Remove Duplication
- Identify repeated code patterns
- Extract common logic into reusable functions
- Use abstraction wisely (avoid premature optimization)
### Improve Naming
- Use descriptive, meaningful names
- Follow language conventions
- Avoid abbreviations unless widely known
### Organize Code
- Group related functionality
- Separate concerns
- Follow single responsibility principle
## Refactoring Workflow
1. **Understand First**: Read and understand the existing code
2. **Ensure Tests**: Make sure tests exist or write them
3. **Small Steps**: Make incremental changes
4. **Test After Each Step**: Verify functionality is preserved
5. **Review**: Check if the code is clearer than before
## Common Refactoring Patterns
…
The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_5epr34fka2sghtrh
GET https://markdownregistry.com/api/v1/resolve?ref=hua-bang/pulse-agent/refactor
GET https://markdownregistry.com/api/v1/blob/ec6590837e64ecf05606786fac41d633013ad3586467ace0d2d70484a5868c93
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
hua-bang/pulse-agent · .pulse-coder/skills/agent-research/SKILL.md · Strict research and design workflow for general coding-agent loops with evidence-backed benchmarking, iterative user…
hua-bang/pulse-agent · .pulse-coder/skills/fix-pulse-agent-issue/SKILL.md · Diagnose and implement a verified fix for one Pulse Agent GitHub issue in the pulse-agent repository.
hua-bang/pulse-agent · .pulse-coder/skills/git-workflow/SKILL.md · Standard git workflow for handling changes on the current branch - add, commit, push, then auto-run MR generation when…
hua-bang/pulse-agent · .pulse-coder/skills/mr-generator/SKILL.md · Automatically generate concise MR titles and descriptions based on current branch diff
hua-bang/pulse-agent · .pulse-coder/skills/perf-report/SKILL.md · Run the canvas-workspace performance evaluation, publish the latest static dashboard through the local nginx/Cloudflare…
hua-bang/pulse-agent · .pulse-coder/skills/project-roadmap/SKILL.md · Analyze the current Pulse Coder project/repository and turn vague or concrete needs into prioritized requirements…
hua-bang/pulse-agent · .pulse-coder/skills/session-digest/SKILL.md · Summarize sessions across a multi-day range by paging session_summary in chunks, output bilingual, and write back…
code-yeongyu/oh-my-openagent · packages/shared-skills/skills/refactor/SKILL.md · Guides a refactor, cleanup, or restructure with the right decomposition. Use when the user asks to refactor, simplify…
rsmdt/the-startup · plugins/start/skills/refactor/SKILL.md · Refactor, simplify, or clean up code for improved maintainability without changing business logic
boshu2/agentops · skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…
boshu2/agentops · plugin/skills/refactor/SKILL.md · Restructure or clean up code with no behavior change, proved by before-and-after checks. Use when: asked to clean up…