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.
npx skills add msbaek/msbaek-claude-plugins --skill consolidate-conditionalgit clone --depth 1 https://github.com/msbaek/msbaek-claude-pluginsWrote 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.
[](https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/consolidate-conditional)<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/consolidate-conditional"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/consolidate-conditional/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.
<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/consolidate-conditional"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/consolidate-conditional.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00144 | $0.01544 |
| Opus 5.5 | $0.00058 | $0.00618 |
| Sonnet 5.5 | $0.00029 | $0.00309 |
| Haiku 4.5 | $0.00014 | $0.00154 |
Grade A, and why
consolidate-conditional 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Consolidate Conditional Expression
GOAL
동일한 결과를 내는 여러 조건문을 하나로 통합하여:
- 흩어진 조건들의 관계를 명확히 표현
- 통합된 조건을 의미 있는 메서드로 추출
- 코드 의도 파악 용이
decompose-conditional과 상호 보완:
- Consolidate: 흩어진 조건을 통합하는 방향 (여러 if → 하나의 if)
- Decompose: 복잡한 조건을 분해하는 방향 (하나의 복잡한 if → 여러 메서드)
- 실전: Consolidate → Decompose 순서로 적용하는 경우가 많음
CONSTRAINTS
- 계열: Tidy — 후보 보고 후 승인 없이 적용 (
../../references/refactoring-procedure.md§0·§3-A) - 동작 변경 금지: 구조 개선만 수행 (기능 변경 없음)
- 테스트 수정 금지: 구조 변경이 테스트를 실패시키면 되돌리기
- 명시적 git add:
git add -A금지, 변경된 파일만 명시 - Extract Method 포함: 단일 클래스 내 완결 시에만 적용
적용 패턴
Before: OR 패턴 — 동일 결과를 내는 조건들이 분산
if (employee.getSeniority() < 2) return 0;
if (employee.getMonthsDisabled() > 12) return 0;
if (employee.isPartTime()) return 0;
After: 조건 통합 + 메서드 추출
if (isNotEligibleForDisability(employee)) return 0;
private boolean isNotEligibleForDisability(Employee employee) {
return employee.getSeniority() < 2
|| employee.getMonthsDisabled() > 12
|| employee.isPartTime();
}
추가 예시: AND 패턴 — 중첩 조건 통합
// Before
if (employee.onVacation()) {
if (employee.getSeniority() > 10) {
return 1;
}
}
// After
if (employee.onVacation() && employee.getSeniority() > 10) {
return 1;
}
추가 예시: 삼항 연산자 통합
// Before
if (isSpecialDeal()) {
total = price * 0.95;
} else {
total = price * 0.98;
}
if (isLoyalCustomer()) {
total = price * 0.95;
}
// After (동일 결과를 내는 조건 통합)
if (isSpecialDeal() || isLoyalCustomer()) {
total = price * 0.95;
} else {
total = price * 0.98;
}
적용 기준
적용 대상
- 2개 이상의 조건문이 동일한 결과(return/throw/assign)를 냄
- 조건들이 논리적으로 OR 또는 AND로 결합 가능
- 각 조건이 독립적 (부수효과 없음)
- 통합 후 의미 있는 이름을 부여할 수 있음
적용 제외
- 다른 결과: 조건들이 서로 다른 결과를 냄
- 부수효과 사이: 조건 사이에 부수효과 코드가 있음
- 의도적 분리: 각 조건이 서로 다른 비즈니스 규칙을 표현 (분리가 의도적)
- 단일 조건: 통합할 조건이 1개뿐
OUTPUT FORMAT
실행 절차
공통 골격(대상 파일 수집 → 후보 제시(계열별 승인 규칙) → 적용 → 테스트 → 커밋/되돌리기, 브랜치·PR이
필요한 조건)은 이 스킬 디렉터리 기준 ../../references/refactoring-procedure.md가 정본이다.
아래는 이 기법에 고유한 부분만 규정한다.
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.
- 2mo ago Changed · -1 lines · +104 tokens per session c163ae59df35
- 2mo ago Changed 900a9c71bf4d
- 3mo ago First seen · 165 lines · 40 tokens per session scan A 8f606e30a83b
consolidate-conditional is a skill published in the GitHub repository msbaek/msbaek-claude-plugins (8 stars, last pushed 1mo ago), licensed MIT. It adds 144 tokens to every session and 1,544 once invoked, about $0.0006 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-31.
consolidate-conditional compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| consolidate-conditionalmsbaek/msbaek-claude-plugins | Skill | 8 | 1mo ago | MIT | A | 144 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 82k | today | MIT | A | 200 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 102k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 396k | today | MIT | A | 36 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 15k | today | CC0-1.0 | A | 113 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 333k | 7d ago | MIT | A | 21 | Claude Code |