alexbruno/dev-skills

code-simplification

Simplify code for human readability, clarity, and directness without changing behavior.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/alexbruno/dev-skills --skill code-simplification

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Code Simplification

Make code clean, direct, and easy for humans to read while preserving exact runtime behavior. Prefer straightforward, objective implementations over clever tricks or premature abstractions.

Core Principles

  1. Preserve Behavior Exactly: Inputs, outputs, side effects, error semantics, and edge-case guards must remain identical. Existing tests must pass without modification.
  2. Clarity Over Cleverness (and Over Brevity): The goal is human comprehension, not fewer lines. Never replace readable code with cryptic one-liners, nested ternaries, or dense chains.
  3. Direct Over Indirection: Do not take three hops to do something simple. Inline trivial single-use wrappers, pass-through helpers, and speculative abstractions that add ceremony without clarity.
  4. Chesterton's Fence: Before deleting or rewriting code that looks redundant or defensive, understand why it was written (check callers, tests, comments, or workflow/SPEC.md).

When to Apply

  • Right after a feature or bug fix works and tests pass, to clean up rough or over-complicated implementation details.
  • When functions have deep if/else nesting, long monolithic blocks, or unclear variable/method names.
  • When workflow/REVIEW.md flags readability, maintainability, or over-engineering issues.

What to Simplify

  • Flatten control flow: Replace deep if/else nesting with guard clauses and early returns.
  • Remove unnecessary indirection: Collapse pass-through functions, single-use factories, or redundant layers that hide simple operations.
  • Make logic linear and objective: Replace convoluted state flags or roundabout transformations with direct, step-by-step code.
  • Right-size functions: Break up overly long functions into cohesive, well-named units—only when each unit represents a clear step, not to fragment trivial code.
  • Use clear names, trim obvious noise: Rename vague identifiers so code is self-explanatory. Remove comments that merely restate the code, while preserving non-obvious why comments and existing docstrings.
  • Unify genuine duplication: When two blocks repeat the same logic, extract a single parameterized helper rather than maintaining parallel copies.

Guardrails (What NOT to Do)

  • Do not alter public APIs, return shapes, or error handling unless explicitly requested.
  • Do not refactor unrelated files outside the scope of the current change.
  • Do not remove edge-case checks (null, empty, boundary conditions) unless proven unreachable.

Verification

  1. Review the diff to confirm every change is simpler, cleaner, and strictly behavior-preserving.
  2. Run the relevant test suite, linter, and typechecker to verify all checks pass unchanged.
같은 저장소의 Skills

더 많은 Skills

모든 Skills
alexbruno
커뮤니티

architect-worker

Role-based multi-agent software engineering pattern separating high-level architecture, specification, planning, and code review (Architect) from focused code implementation and verification (Worker). Use this skill whenever assigned the Architect or Worker role (in any language), or when coordinating work between planning/review agents and implementation agents via workflow/.

1시간 설치 수
1
GitHub Stars
0
업데이트
11월 13일
alexbruno
커뮤니티

changelog-management

Maintain and update a standardized root CHANGELOG.md following Keep a Changelog and Semantic Versioning. Use this skill to initialize or update changelog entries, categorize changes, prepare release cuts, and proactively prompt the user when notable changes warrant updating the changelog.

1시간 설치 수
1
GitHub Stars
0
업데이트
11월 13일
alexbruno
커뮤니티

code-review

Perform structured, multi-dimensional code reviews aligned with the spec-driven-workflow (workflow/SPEC.md, workflow/PLAN.md, workflow/REVIEW.md). Use this skill after implementing a feature or bug fix, before merging a PR, or when reviewing changes written by another agent or human.

1시간 설치 수
1
GitHub Stars
0
업데이트
11월 13일
alexbruno
커뮤니티

codebase-indexing

Index, synchronize, and query a project's codebase using CodeGraph and Repomix. Use this skill when exploring an unfamiliar repository, maintaining up-to-date code intelligence after edits, or setting up project indexing with .codegraph/ and Markdown-formatted Repomix snapshots.

1시간 설치 수
1
GitHub Stars
0
업데이트
11월 13일