simplify

Simplify recently changed code while preserving behavior and repository standards.

16|2|Updated Mar 29, 2018
One-click install
npx skills add https://github.com/khoi/dotfiles --skill simplify-khoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simplify
Source: https://github.com/khoi/dotfiles/tree/main/chezmoi/dot_agents/skills/simplify
Command: npx skills add https://github.com/khoi/dotfiles --skill simplify-khoi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps engineers clean up code that was recently changed, improving readability and maintainability without altering program behavior. It enforces the repository's standards and reduces unnecessary complexity within the touched scope.

Core Features & Use Cases

  • Improve readability: simplify control flow, rename ambiguous variables, and reduce duplication while preserving semantics.
  • Scoped changes: limit edits to code touched in the current task unless broader changes are requested.
  • Standards-aligned: follow active AGENTS.md conventions and local project guidelines to maintain consistency.

Quick Start

Refine the recently changed code to improve readability while preserving behavior within the current task scope.

Frequently Asked Questions about simplify

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor recently changed code to improve readability without breaking functionality?

Code cleanup simplifies control flow and renames variables within the current task scope while preserving program behavior. It aligns edits with active AGENTS.md conventions and local project guidelines to maintain consistency.

What is the best way to reduce code complexity after a feature update?

Reducing code complexity involves removing unnecessary duplication and simplifying control flow in recently touched files. This refactoring process enforces repository standards without altering the program's underlying semantics.

Can I clean up code outside the current session's scope?

Code cleanup is strictly scoped to files touched during the current task unless broader changes are explicitly requested. This targeted refactoring approach prevents unintended side effects across the broader repository.

Does this code simplification process follow existing project conventions?

Yes, the refactoring process actively reads and applies AGENTS.md conventions alongside local project guidelines. This ensures all readability improvements and code cleanup actions remain consistent with established repository standards.

When should I avoid automated code refactoring?

Avoid refactoring when the recently changed code lacks clear repository standards or when simplifying control flow risks altering program behavior. Refactoring should be limited to reducing unnecessary complexity within a safely scoped context.

How do I simplify control flow and remove duplication while preserving semantics?

To simplify control flow and remove duplication, apply targeted refactoring to recently changed code while strictly preserving semantics. This process improves code clarity by enforcing repository standards without altering program behavior.