simplify

simplify is a skill for Claude Code from jh941213/codex-lattice. It costs 70 tokens per session (890 once invoked), scanned A, original, MIT.

A code-simplification and refactoring skill for reviewing recently changed code and reducing unnecessary abstractions, duplication, and complexity.

In plain words
What is it for?
Use it after a change to inline one-off helpers, flatten nested conditions, remove repetition, and run type checks and tests.
Why use it?
It makes existing changes easier to understand and maintain while keeping the task focused on cleanup rather than adding features or fixing bugs.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it after a change to inline one-off helpers, flatten nested conditions, remove repetition, and run type checks and tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jh941213/codex-lattice/simplify
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jh941213/codex-lattice --skill simplify
Clone the repo
git clone --depth 1 https://github.com/jh941213/codex-lattice

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for simplify

README.md
[![agentmods](https://agentmods.dev/badge/skills/jh941213/codex-lattice/simplify/github.svg)](https://agentmods.dev/skills/jh941213/codex-lattice/simplify)
Your own site
<a href="https://agentmods.dev/skills/jh941213/codex-lattice/simplify"><img src="https://agentmods.dev/badge/skills/jh941213/codex-lattice/simplify/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for simplify

Your own site · 80×15
<a href="https://agentmods.dev/skills/jh941213/codex-lattice/simplify"><img src="https://agentmods.dev/badge/skills/jh941213/codex-lattice/simplify.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00890
Opus 5.5 $0.00028 $0.00356
Sonnet 5.5 $0.00014 $0.00178
Haiku 4.5 $0.00007 $0.00089

Measured 3mo ago against content hash 00f8005673d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

simplify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/simplify/SKILL.md · 101 lines

What it actually says

코드 단순화

최근 변경된 코드를 리뷰하고 단순화합니다.

Step 1: 변경 범위 파악

git diff --name-only HEAD~1  # 최근 변경 파일 확인

Step 2: 리팩토링 패턴 적용

불필요한 추상화 제거

// BEFORE: 한 번만 쓰이는 헬퍼
function formatUserName(user: User) { return `${user.first} ${user.last}`; }
const name = formatUserName(user);

// AFTER: 인라인
const name = `${user.first} ${user.last}`;

조건문 단순화

// BEFORE: 깊은 중첩
if (user) {
  if (user.isActive) {
    if (user.hasPermission) {
      doThing();
    }
  }
}

// AFTER: 얼리 리턴
if (!user?.isActive || !user.hasPermission) return;
doThing();

중복 제거

// BEFORE: 반복 패턴
const users = data.filter(d => d.type === 'user').map(d => d.name);
const admins = data.filter(d => d.type === 'admin').map(d => d.name);

// AFTER: 3회 이상 반복될 때만 추출
const namesByType = (type: string) => data.filter(d => d.type === type).map(d => d.name);

주의: 2회 반복은 추출하지 않음. 3회부터 고려.

Step 2.5: 중복 코드 탐지

# jscpd — copy-paste 감지 (3줄 이상 중복)
npx jscpd src/ --min-lines 3 --reporters console 2>/dev/null | head -30

# ast-grep — 구조적 패턴 탐지
sg --pattern 'console.log($$$)' --lang ts 2>/dev/null | head -10

Step 3: 검증

수정 후 반드시 확인:

npm run typecheck || npx tsc --noEmit  # 타입 안전
npm test                                # 테스트 통과

체크리스트

  • 함수 50줄 이하
  • 파일 800줄 이하
  • 중첩 4단계 이하
  • 매직 넘버 → 상수
  • 명확한 변수명
  • console.log 제거
  • 사용하지 않는 import 제거
  • any 타입 제거

절대 단순화하지 않을 것 (NEVER)

  • NEVER 에러 핸들링 제거 — try/catch, 유효성 검사는 의도적 코드
  • NEVER 생성된/벤더 파일 수정 — node_modules, generated, vendor 디렉토리
  • NEVER 설정 파일 단순화 — tsconfig, eslint, webpack 등은 건드리지 않음
  • NEVER 관련 없는 함수 병합 — 비슷해 보여도 도메인이 다르면 분리 유지
  • NEVER 테스트 코드 단순화 — 테스트의 명시성은 의도적. DRY 적용 금지
  • NEVER 타입 정의 제거 — 중복처럼 보여도 타입 안전성 유지

범위 결정

  • 사용자가 특정 파일 지정 시 → 해당 파일만
  • 지정 없으면 → git diff --name-only HEAD~1 (최근 커밋 변경 파일)
  • 변경 범위 밖 코드는 절대 수정하지 않음

원칙

  • 동작은 변경하지 않음 (리팩토링만)
  • 3줄 비슷한 코드 > 조기 추상화
  • 과도한 최적화 지양
  • 수정 전 git stash 또는 현재 상태 확인 → 수정 후 검증 → 실패 시 원복
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 101 lines · 70 tokens per session scan A 00f8005673d1

Subscribe to this mod's changes

simplify is a skill published in the GitHub repository jh941213/codex-lattice (19 stars, last pushed 6mo ago), licensed MIT. It adds 70 tokens to every session and 890 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

simplify compared with skills from other repositories

simplify next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
simplifyjh941213/codex-latticeSkill196mo agoMITA70Claude Code
autoreviewopenclaw/clawhubSkill9.6ktodayMITA17Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill6.3ktodayMITA18Claude Code
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k11d agoMITA115Claude Code, Codex
asplos-writing-stylebrycewang-stanford/Awesome-Journal-SkillsSkill1.5kyesterdayMITA65Claude Code
revdiff-planumputun/revdiffSkill976yesterdayMITA84Claude Code
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex