Index of every page on this site: llms.txt
All skills
aktsmm avatar

/code-simplifier

@9bedf91
by yamapanaktsmm/agent-skills27 stars
5
Run it yourself

Guide for simplifying and refining code after coding sessions. Use when cleaning up complex code, reviewing PRs for readability, or applying consistent refactoring patterns. Triggers on simplify code, refactor, clean up, code review, コード整理, リファクタ, 複雑さ削減, コードレビュー.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/code-simplifier

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈81 tokens for metadata: the name and description. ≈434 when used: this file. ≈746 more on demand in 1 file.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

This Skill turns off automatic use in Claude Code. Its description stays out of the automatic Skill list by default.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Code Simplifier

A guide for simplifying and refining code while preserving functionality.

When to Use

  • Refactor, simplify code, clean up, code review
  • After completing a coding task or writing a logical chunk of code
  • Cleaning up complex PRs before review
  • Refactoring code for better readability and maintainability

Core Principles

1. Preserve Functionality

Change how the code does it, never what it does. Run the existing tests before and after.

2. Apply Project Standards

Follow the project's configured standards (CLAUDE.md, AGENTS.md, .editorconfig, linters) over personal preference.

3. Enhance Clarity

  • Avoid nested ternary operators; prefer switch or if/else chains
  • Avoid overly compact one-liners; choose clarity over brevity
  • Remove comments that only restate obvious code

4. Maintain Balance

Avoid over-simplification that could:

  • Reduce code clarity or maintainability
  • Create overly clever solutions that are hard to understand
  • Combine too many concerns into single functions
  • Remove helpful abstractions that improve organization
  • Make the code harder to debug or extend

5. Focus Scope

Only refine code that has been recently modified or touched, unless explicitly instructed to review a broader scope.

Refactoring Patterns

See references/refactoring-patterns.md for the pattern table, behavior-changing equivalence traps, and review feedback format.

Done Criteria

  • All tests pass after refactoring
  • No functionality changed
  • Code follows project standards
  • No nested ternaries, overly compact one-liners, or new unnecessary abstractions
  • Comments updated where logic changed

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning25d4 checks · Risk SAFE
  • Gen Agent Trust Hub25d

    The skill provides guidelines and patterns for refactoring and simplifying code. It contains no executable scripts, external dependencies, or network operations. All instructions are text-based and focused on improving code readability and maintainability.

  • Socket25d

    No alerts

  • Snyk25d

    Risk: LOW · No issues

  • Runlayer9mo

    3/3 files flagged

Signed by skilld at 9bedf91. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated last month
argument-hint
整理したいコードや PR、気になる複雑さ
user-invocable
true
disable-model-invocation
true
Other metadata
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}

README badge

README badge for aktsmm/agent-skills/code-simplifier