skills/code-simplifier/SKILL.md
Simplify complex code by removing unnecessary abstractions, over-engineering, and cognitive overhead. Use this skill at the end of coding sessions or to clean up complex PRs. Focuses on making code easier to read, understand, and maintain.
npx skillsauth add ahmedhamadto/software-forge code-simplifierInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill analyzes code and aggressively simplifies it by removing unnecessary complexity, over-engineering, and cognitive overhead. The goal is code that is immediately understandable by any developer.
Simple code is not naive code. Simple code is the result of deep understanding. It takes more effort to write simple code than complex code. The goal is to reduce cognitive load for the next developer (including future you).
"Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupery
Remove abstractions that don't earn their keep:
Before:
interface IUserRepository {
getUser(id: string): Promise<User>;
}
class UserRepositoryImpl implements IUserRepository {
async getUser(id: string): Promise<User> {
return db.users.findOne({ id });
}
}
class UserService {
constructor(private repo: IUserRepository) {}
async getUser(id: string): Promise<User> {
return this.repo.getUser(id);
}
}
After:
async function getUser(id: string): Promise<User> {
return db.users.findOne({ id });
}
Code should solve the actual problem, not hypothetical future problems:
Rule of Three: Don't abstract until you have three concrete examples. Two is a coincidence.
Remove complexity added for performance without measurement:
Keep it simple, profile later.
Trust the system more:
Flatten and inline:
Let the code speak:
userThatIsCurrentlyLoggedIn -> user)strName -> name)Delete ruthlessly:
Direct is better:
Use grep, glob, and read tools to understand the code:
For each file/module, ask:
For each simplification:
Make the changes:
For each change:
## [File/Component Name]
### Removed
- [What was removed and why]
### Simplified
- [What was simplified and how]
### Before (X lines)
[Code snippet]
### After (Y lines)
[Code snippet]
These patterns often indicate over-engineering:
AbstractSingletonProxyFactoryBeanIServiceProviderFactoryBaseAbstractHandlerutils.ts, helpers.ts, common.ts (often grab bags)Keep complexity when:
// Before
const config = {
apiUrl: 'https://api.example.com',
timeout: 5000,
};
fetch(config.apiUrl, { timeout: config.timeout });
// After (if these values are only used here)
fetch('https://api.example.com', { timeout: 5000 });
// Before
class EmailValidator {
validate(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
}
const validator = new EmailValidator();
validator.validate(email);
// After
function isValidEmail(email: string): boolean {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
isValidEmail(email);
// Before
getUser(id, (user) => {
getOrders(user.id, (orders) => {
getProducts(orders[0].id, (products) => {
render(products);
});
});
});
// After
const user = await getUser(id);
const orders = await getOrders(user.id);
const products = await getProducts(orders[0].id);
render(products);
The best code is code that doesn't exist. Every line is a liability. Be aggressive about deletion. The goal is not minimal code but maximally understandable code. Sometimes that means more lines (for clarity), but usually it means fewer.
testing
Craft stunning macOS desktop experiences with SwiftUI — cinematic animations, particle systems, glass materials, and wallpaper-grade visual design. Use like `/apple-craftsman A minimalist weather widget with aurora particle effects`.
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when testing a web application for security vulnerabilities, before deployment or during security review — guides through a structured 10-phase penetration testing methodology covering mapping, authentication, session management, access controls, injection, logic flaws, and server configuration.
data-ai
Engineer system prompts for LiveKit voice agents with multilingual support. Use when creating or optimizing AI agent conversation flows.