Community라이팅 & 에디팅github.com

코드 단순화 플러그인

Codex가 최근 변경된 코드를 단순화, 리팩터링, 정리하여 동작을 유지하면서 가독성과 일관성을 향상시키도록 돕는 스킬입니다.

코드 단순화 플러그인란 무엇인가요?

이 스킬은 Codex와 같은 AI 코딩 에이전트가 구현 세션 후, 커밋 전, 또는 코드가 과도하게 복잡해졌거나 중복되었거나 깊이 중첩된 경우에 최근 변경된 코드를 단순화, 리팩터링, 정리할 수 있도록 설계되었습니다. 모든 동작, 공개 API, 출력, 데이터 형식, 부작용을 정확히 보존하면서 코드의 명확성과 유지보수성을 향상시키는 데 중점을 둡니다. 작업 범위는 현재 세션에서 변경된 파일에 제한되며, `AGENTS.md` 및 기존 프로젝트 스타일을 따릅니다. 중복 제거, 깊은 중첩 축소, 단일 목적 래퍼 인라인화, 의도를 모호하게 하는 추상화 제거, 주석이 불필요한 코드 정리 등 실질적인 개선을 목표로 합니다. 스타일 변경, 위험한 변경, 동작 보존이 어려운 변경은 건너뛰고, 가장 작은 일관된 패치를 적용한 후 관련 검증 명령을 실행합니다. 새 기능 추가, 종속성 변경, 에러 메시지 수정 등은 금지되며, 동작 보존 증거 없이 주장하지 않습니다.

지원 대상~Claude CodeCodex CLI~Cursor
npx skills add yidasanqian/codex-code-simplifier

Installed? Explore more 라이팅 & 에디팅 skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Code Simplifier

Use this skill to refine code for clarity, consistency, and maintainability without changing what it does.

Scope

  • Focus on files changed in the current session or the user's explicitly named files.
  • Preserve all behavior, public APIs, outputs, data formats, and side effects.
  • Follow the nearest AGENTS.md and existing project style before applying general preferences.
  • Keep changes surgical. Do not refactor unrelated old code.
  • Prefer readable, explicit code over clever or highly compressed code.

Workflow

  1. Inspect the current diff and nearby code before editing.
  2. Identify simplifications with a clear payoff:
    • reduce unnecessary nesting or branching
    • remove duplication introduced by recent edits
    • inline single-use abstractions that obscure intent
    • split code only when it creates a clearer boundary
    • improve names when they clarify purpose
    • remove comments that only repeat obvious code
  3. Skip changes that are only stylistic, risky, or hard to prove behavior-preserving.
  4. Apply the smallest coherent patch.
  5. Run the narrowest relevant verification command. Broaden verification when shared behavior changed.
  6. Report what changed and what was verified.

Guardrails

  • Do not add features, options, new dependencies, or speculative flexibility.
  • Do not change error messages, serialization, ordering, timing, permissions, or external calls unless the user asked.
  • Do not convert clear conditionals into nested ternaries or dense one-liners.
  • Do not remove helpful abstractions just to reduce line count.
  • Do not rewrite an entire module when a local simplification is enough.
  • Do not claim behavior is preserved without fresh verification evidence.

Good Targets

SignalUseful Simplification
Repeated blocks from recent editsExtract or consolidate only the repeated intent
Deep if nestingUse early returns or clearer branching
Temporary variables with unclear namesRename to describe domain meaning
Single-use wrapper functionInline it if it hides more than it helps
Comments narrating codeRemove or replace with a reason-oriented comment

Stop Conditions

Stop and ask before editing when behavior preservation depends on product intent, undocumented compatibility, or unclear external contracts. If verification cannot be run, say exactly what was not verified.

관련 스킬

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community