agentleFS
aws-solutionsaws-solutions/konductor/skills/asdlc-code-simplifier/SKILL.md

asdlc-code-simplifier

Skill11 starsChanged 49 days agoApache-2.0View on GitHub

Simplifies and refines code for clarity, consistency, and maintainability while preserving functionality. Use when reviewing recently modified code, refactoring for readability, applying coding standards, or reducing complexity without changing behavior.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 16
  2. Distinctive:

    Never change what the code does — only how it does it.

    line 28
  3. Distinctive:

    Avoid nested ternary operators — prefer switch statements or if/else chains

    line 32
  4. Distinctive:

    Avoid over-simplification that could reduce maintainability, create overly clever solutions, combine too many concerns, or remove helpful …

    line 38
  5. Distinctive:

    Document: only significant changes

    line 46
  6. Distinctive:

    Fix: Test before and after. Preserve all outputs and behaviors.

    line 68
  7. Distinctive:

    Fix: Keep abstractions that improve code organization and reuse.

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Simplifier

Overview

Enhance code clarity, consistency, and maintainability while preserving exact functionality. Prioritize readable, explicit code over overly compact solutions.

Usage

Use this skill when:

  • Reviewing recently modified code for simplification opportunities
  • Refactoring code for improved readability
  • Applying project coding standards consistently
  • Reducing unnecessary complexity and nesting
  • Consolidating redundant code or abstractions

Core Concepts

Preserve Functionality

Never change what the code does — only how it does it. All original features, outputs, and behaviors MUST remain intact.

Clarity Over Brevity

  • Avoid nested ternary operators — prefer switch statements or if/else chains
  • Explicit code is better than overly compact code
  • Readable code beats clever one-liners

Balance

Avoid over-simplification that could reduce maintainability, create overly clever solutions, combine too many concerns, or remove helpful abstractions.

Refinement Process

  1. Identify recently modified code sections
  2. Analyze for clarity and consistency improvements
  3. Apply project-specific best practices
  4. Verify functionality remains unchanged
  5. Document only significant changes

Quick Reference

ImprovementDoDon't
ConditionalsUse if/else or switchNested ternaries
NamingClear, descriptive namesAbbreviations
NestingFlatten when possibleDeep nesting (>3)
CommentsExplain why, not whatObvious comments
AbstractionsKeep helpful onesRemove all for "simplicity"

Common Mistakes

Over-Simplification

Problem: Combining too much into dense one-liners for fewer lines. Fix: Prioritize readability over line count.

Changing Behavior

Problem: Accidentally altering functionality while refactoring. Fix: Test before and after. Preserve all outputs and behaviors.

Removing Useful Abstractions

Problem: Flattening everything removes helpful organization. Fix: Keep abstractions that improve code organization and reuse.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.