code-simplifier
Code refinement expert that improves clarity, consistency, and maintainability while preserving exact functionality. Use when simplifying complex code, cleaning up recently modified files, or refactoring for readability. Based on Anthropic's official code-simplifier pattern - never alters WHAT code does, only HOW.
Why use this skill?
Enhance code clarity, consistency, and maintainability with the OpenClaw code-simplifier. Expertly refactor your projects while preserving exact functionality.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anton-abyzov/sw-code-simplifierWhat This Skill Does
The code-simplifier skill serves as a dedicated refinement engine within the OpenClaw ecosystem, designed to improve the quality of your codebase without altering its underlying logic. Unlike generic code generators that might introduce new features or change execution patterns, this skill adheres to a strict 'preservation first' mandate. It identifies opportunities to enhance clarity, consistency, and maintainability by refactoring code structures—such as replacing deeply nested conditionals with early returns, eliminating redundant logic, and applying descriptive naming conventions. It acts as a specialized linting and refactoring agent that translates complex, difficult-to-maintain blocks into cleaner, more readable implementations that align with modern software development best practices.
Installation
You can integrate this skill into your environment by running the following command in your terminal or OpenClaw interface:
clawhub install openclaw/skills/skills/anton-abyzov/sw-code-simplifier
Use Cases
- Refactoring Recently Modified Files: Use this skill after pushing a new feature to ensure the added code is idiomatic and matches the project's style standards.
- Cleaning Up Legacy Logic: Apply the skill to older functions that have become 'spaghetti code' due to incremental updates, making them easier for team members to read and extend.
- Optimizing Readability: Use it when code is technically correct but difficult to parse visually, such as blocks with excessive ternary operators or unclear variable naming.
- Review Prep: Run this skill on your pull requests to ensure that your code reaches a high standard of maintainability before it reaches human code reviewers.
Example Prompts
- "@code-simplifier Please review the latest changes in
authController.ts. There's a lot of nested logic in the user validation block that I'd like to see cleaned up using early returns." - "@code-simplifier Take a look at this utility function I wrote. It works, but it feels redundant. Can you simplify the boolean logic and improve the naming?"
- "@code-simplifier My recent commit to the payment processor service has grown too large. Can you extract some of the smaller logic into helper functions to make the main function easier to follow?"
Tips & Limitations
- Preserve Functionality: Always remember that the skill is designed to keep behavior identical. If you need to change logic or add features, use a different skill.
- Contextual Scope: The skill performs best when directed at specific files or functions. Providing broad instructions for massive codebases may lead to generalized results.
- Review Output: While the agent is highly reliable, always inspect refactored code before merging to ensure the simplification aligns with your team's architectural preferences. Do not use this skill as a substitute for unit testing.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anton-abyzov-sw-code-simplifier": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write
Related Skills
network-engineer
Cloud network architect for VPC design, service mesh, zero-trust networking, load balancers, and CDN optimization. Use for network troubleshooting or connectivity issues.
jira-multi-project-mapper
Expert in mapping SpecWeave specs to multiple JIRA projects with intelligent project detection and cross-project coordination. Use when syncing to multiple JIRA projects (project-per-team, component-based), or managing bidirectional sync across team boundaries.
helm-chart-scaffolding
Design, organize, and manage Helm charts for templating and packaging Kubernetes applications with reusable configurations. Use when creating Helm charts, packaging Kubernetes applications, or implementing templated deployments.
performance-optimization
React Native performance with Hermes V1, FlashList, expo-image v2, concurrent rendering. Use for slow app, memory leaks, or FPS issues.
release-strategy-advisor
Release strategy advisor - detects brownfield patterns (tags, CI/CD, changelogs), recommends versioning strategy based on architecture. Creates release-strategy.md.