cost-sim

cost-sim is a skill for Claude Code from kimsanguine/hplan. It costs 63 tokens per session (3,075 once invoked), scanned B, original, MIT.

A planning tool for estimating the cost of running an AI agent, including model tokens, API calls, and external services. It models different usage levels and compares possible operating scenarios.

In plain words
What is it for?
It helps forecast monthly spending, compare build-versus-buy choices, estimate costs for different user counts, and set cost-related targets.
Why use it?
It helps reveal how costs can grow with usage before the agent is built, so feasibility and cost limits can be assessed early.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; positional $N argument.

Part of the discover plugin — 6 skills shipped together

Good fit It helps forecast monthly spending, compare build-versus-buy choices, estimate costs for different user counts, and set cost-related targets.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kimsanguine/hplan/cost-sim
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 kimsanguine/hplan --skill cost-sim
Clone the repo
git clone --depth 1 https://github.com/kimsanguine/hplan

Made for: Claude Code.

Or install discover, the plugin that ships this one along with the rest of its 6 skills.

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 cost-sim

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimsanguine/hplan/cost-sim.svg)](https://agentmods.dev/skills/kimsanguine/hplan/cost-sim)
Your own site
<a href="https://agentmods.dev/skills/kimsanguine/hplan/cost-sim"><img src="https://agentmods.dev/badge/skills/kimsanguine/hplan/cost-sim.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,075 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00063 $0.03075
Opus 5 $0.00032 $0.01537
Sonnet 5 $0.00013 $0.00615
Haiku 4.5 $0.00006 $0.00308

Measured 8d ago against content hash 52378c2b635c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

cost-sim scanned grade B with 1 finding 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 8d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

!`cat .claude/MEMORY.md 2>/dev/null || echo "프로젝트 메모리 없음 — .claude/MEMORY.md를 생성하면 자동 참조됩니다."`
discover/skills/cost-sim/SKILL.md · 308 lines

How it starts

The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Core Goal

  • 에이전트 운영 비용을 사전에 시뮬레이션하여 비용 폭탄을 방지한다.
  • 토큰/API/외부 서비스 비용을 통합 모델링한다.
  • 스케일 시나리오(1→10→100→1,000명)별 비용 곡선을 예측한다.

Trigger Gate

Use This Skill When

  • 에이전트 타당성 평가 시 월간 비용을 추정해야 할 때
  • build-or-buy 판단의 비용 축 근거가 필요할 때
  • 에이전트 KPI에 비용 상한을 설정해야 할 때
  • "이거 비용 얼마 들어?" 류의 질문이 나올 때

Route to Other Skills When

  • 비용이 아닌 모델 성능/품질 기준이면 → architect/orchestration --pattern router
  • 비용 추적/최적화(이미 운영 중)면 → operate/ops-review
  • 비용이 과다해서 직접 구축 vs 외부 솔루션을 비교한다면 → discover/assumptions --mode build-or-buy
  • 결정론적 p50/p90 마진 + free-user abuse 시뮬레이션 수치가 필요할 때 → cogs-sentinel (hplan plugin)

Boundary Checks

  • 이 스킬은 사전 시뮬레이션 전용이다. 실 비용 추적/모니터링은 operate/ops-review 범위.
  • 모델 가격은 2026-03 기준이며 빠르게 변동함을 항상 명시한다.
  • 추정치를 확정 수치로 표현하지 않는다 — 범위(range)로 제시.

Agent Cost Model

에이전트 비용은 일반 SaaS와 완전히 다른 구조입니다.

일반 SaaS 에이전트
고정 인프라 비용 사용량 비례 비용
서버 × 시간 토큰 × 호출 수 × 모델 단가
예측 가능 사용 패턴에 따라 변동
스케일 시 점진 증가 스케일 시 비용 폭발 가능

가장 흔한 실수: MVP에서 $5/월이었던 비용이, 사용자 100명에서 $500/월로 폭증.


비용 구조 3요소

요소 1 — 토큰 비용 (Token Cost)

Input Cost  = 입력 토큰 수 × 모델별 입력 단가
Output Cost = 출력 토큰 수 × 모델별 출력 단가
Total Token Cost = (Input + Output) × 호출 횟수

모델별 단가 (2026-03 기준, 1M 토큰당):

모델 입력 출력 특징
Claude Haiku $0.25 $1.25 비용 효율, 단순 작업
Claude Sonnet $3.00 $15.00 균형, 대부분의 작업
Claude Opus $15.00 $75.00 최고 품질, 복잡한 판단
GPT-4o $2.50 $10.00 범용
GPT-4o-mini $0.15 $0.60 저비용 대안

⚠️ 모델 가격은 빠르게 변동합니다. 실제 계획 시 최신 가격 확인 필수.

요소 2 — 호출 빈도 (Call Frequency)

일간 호출 수 = 트리거 횟수 × 에이전트당 평균 API 호출 수
월간 호출 수 = 일간 × 30

에이전트 유형별 일반적 호출 패턴:

유형 트리거 빈도 회당 API 호출 월간 호출
Cron Agent (1일 1회) 30/월 2~5 60~150
Monitor Agent (1시간) 720/월 1~3 720~2,160
On-demand Agent 사용자 의존 3~10 변동
Orchestrator 하위 에이전트 수 의존 10~50 높음

요소 3 — 외부 API 비용 (External API Cost)

에이전트가 사용하는 외부 서비스 비용:

서비스 무료 티어 유료 단가
Brave Search API 2,000 쿼리/월 $3/1,000 쿼리
Google Search API 100 쿼리/일 $5/1,000 쿼리
Telegram Bot API 무제한 무료
Notion API 무제한 (개인) 무료
SendGrid 100/일 $0.001/이메일

Read the full file on GitHub · 308 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 308 lines · 63 tokens per session scan B 52378c2b635c

Subscribe to this mod's changes

cost-sim is a skill published in the GitHub repository kimsanguine/hplan (2 stars, last pushed 22d ago), licensed MIT. It adds 63 tokens to every session and 3,075 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codex-setup

Initialize sd0x-dev-flow infrastructure for Codex CLI and other non-Claude agents. Generates AGENTS.md, installs the commit-msg hook, copies runner scripts. The pre-push gate is opt-in via --with-push-gate. Use when setting up a new project or after updating skills.

sd0xdev/sd0x-harness · 65 tokens

smart-rebase

Smart partial rebase for squash-merge repositories. Auto-detect which commits to keep/drop when base branch was squash-merged into target. Use when: user says 'rebase', 'partial rebase', 'base already merged', 'smart rebase', or /smart-rebase. Not for: simple git rebase (the developer runs it — Claude never executes…

sd0xdev/sd0x-harness · 131 tokens

recap-doc

Post-development recap document generator. Use when: AI/Codex has implemented a feature and the user needs a guided walkthrough of what changed and why, with blind-spot detection and anticipated questions. Not for: Q&A follow-up (use /recap-ask), technical share-out for teammates (use /tech-brief), or generic code…

sd0xdev/sd0x-harness · 114 tokens

runbook

Generate and update feature release runbooks from existing docs and codebase. Use when: creating operational runbook, release handbook, deployment checklist, pre-release preparation. Not for: incident response (v2), code review (use codex-code-review), architecture design (use architecture).

sd0xdev/sd0x-harness · 59 tokens

test-review

Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report.

sd0xdev/sd0x-harness · 56 tokens

debug

Interactive debugging workflow with hypothesis-driven probe loop. Use when: unknown bugs, script errors, silent failures, troubleshooting. Not for: known bugs (use bug-fix), GitHub issue analysis (use issue-analyze), code understanding (use code-explore). Output: debug report with probe journal + root cause + fix.

sd0xdev/sd0x-harness · 67 tokens