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 introduce-assertiongit 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/introduce-assertion)<a href="https://agentmods.dev/skills/msbaek/msbaek-claude-plugins/introduce-assertion"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/introduce-assertion/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/introduce-assertion"><img src="https://agentmods.dev/badge/skills/msbaek/msbaek-claude-plugins/introduce-assertion.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.00102 | $0.01762 |
| Opus 5.5 | $0.00041 | $0.00705 |
| Sonnet 5.5 | $0.00020 | $0.00352 |
| Haiku 4.5 | $0.00010 | $0.00176 |
Grade A, and why
introduce-assertion 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 1mo 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 — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Introduce Assertion
GOAL
코드가 암묵적으로 가정하는 조건을 assertion으로 명시하여:
- 가정 위반 시 즉시 발견 (원인과 증상의 거리 단축)
- 주석보다 강력한 실행 가능한 문서
- 계약 기반 프로그래밍의 경량 버전
CONSTRAINTS
- 계열: Tidy — 후보 보고 후 승인 없이 적용 (
../../references/refactoring-procedure.md§0·§3-A) - 동작 변경 금지: assertion 추가만 수행 (기존 로직 변경 없음)
- 테스트 수정 금지: assertion 추가가 테스트를 실패시키면 되돌리기
- 명시적 git add:
git add -A금지, 변경된 파일만 명시
Assertion 도구 선택 (프로젝트 의존성 자동 감지)
프로젝트의 빌드 파일(build.gradle 또는 pom.xml)을 확인하여 자동 선택:
- Spring 의존성 있음 →
org.springframework.util.Assert - Apache Commons 있음 →
org.apache.commons.lang3.Validate - 둘 다 없음 →
java.util.Objects.requireNonNull+IllegalArgumentException
Java
assert키워드는-ea플래그가 필요하여 프로덕션에서 비활성화될 수 있으므로 사용하지 않음
적용 패턴
Before: 암묵적 가정 (Spring Assert)
public double calculateDiscount(double price, double rate) {
// price는 양수, rate는 0~1 사이여야 함 (주석 또는 아무것도 없음)
return price * rate;
}
After: assertion으로 가정 명시
import org.springframework.util.Assert;
public double calculateDiscount(double price, double rate) {
Assert.isTrue(price > 0, "price must be positive: " + price);
Assert.isTrue(rate >= 0 && rate <= 1, "rate must be between 0 and 1: " + rate);
return price * rate;
}
추가 예시: Apache Commons Validate
import org.apache.commons.lang3.Validate;
public String formatName(Customer customer) {
Validate.notNull(customer, "customer must not be null");
Validate.notBlank(customer.getFirstName(), "firstName must not be blank");
return customer.getFirstName() + " " + customer.getLastName();
}
추가 예시: 사후 조건 (결과 검증)
public int allocateSlots(int requested, int available) {
int allocated = Math.min(requested, available);
Assert.isTrue(allocated >= 0, "allocated slots must not be negative: " + allocated);
Assert.isTrue(allocated <= available, "allocated exceeds available: " + allocated + " > " + available);
return allocated;
}
적용 기준
적용 대상
- 메서드가 특정 조건을 가정하지만 명시하지 않은 경우
- 내부 메서드(private/package-private)의 전제 조건
- 계산 결과의 사후 조건 (결과값 범위 검증)
- 알고리즘의 불변식 (invariant)
- null이 아닌 것을 암묵적으로 가정하는 경우
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.
- 1mo ago Changed · -1 lines · +65 tokens per session 3b57836d3d3a
- 1mo ago Changed ca4ef85fa048
- 1mo ago First seen · 180 lines · 37 tokens per session scan A 01664b7d8ff3
introduce-assertion is a skill published in the GitHub repository msbaek/msbaek-claude-plugins (8 stars, last pushed 5d ago), licensed MIT. It adds 102 tokens to every session and 1,762 once invoked, about $0.0004 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.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…
next-cache-components-optimizer
Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…