cogs-sentinel

cogs-sentinel is a skill for Claude Code from kimsanguine/hplan. It costs 103 tokens per session (1,306 once invoked), scanned A, original, MIT.

A cost check for paid AI products that estimates typical and high-use monthly model costs per paying user. It also tests how free-user misuse could affect margins and returns a go, conditional-go, or no-go result.

In plain words
What is it for?
Use it to compare AI providers, test prices and usage assumptions, model free-user abuse, and check customer-acquisition or churn scenarios when those inputs are supplied.
Why use it?
It helps determine whether pricing can cover AI usage before committing to the product. It also exposes cases where free access or heavy usage could make the business unprofitable.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 hplan/scripts/cogs_sentinel.py \.

Part of the hplan plugin — 8 skills, 11 commands, 4 agents shipped together

Good fit Use it to compare AI providers, test prices and usage assumptions, model free-user abuse, and check customer-acquisition or churn scenarios when those inputs are supplied.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kimsanguine/hplan
agentmods
npx agentmods add skills/kimsanguine/hplan/cogs-sentinel

Made for: Claude Code.

Or install hplan, the plugin that ships this one along with the rest of its 8 skills, 11 commands, 4 agents.

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 cogs-sentinel

README.md
[![agentmods](https://agentmods.dev/badge/skills/kimsanguine/hplan/cogs-sentinel.svg)](https://agentmods.dev/skills/kimsanguine/hplan/cogs-sentinel)
Your own site
<a href="https://agentmods.dev/skills/kimsanguine/hplan/cogs-sentinel"><img src="https://agentmods.dev/badge/skills/kimsanguine/hplan/cogs-sentinel.svg" alt="Measured on agentmods" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,306 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.00103 $0.01306
Opus 5 $0.00051 $0.00653
Sonnet 5 $0.00021 $0.00261
Haiku 4.5 $0.00010 $0.00131

Measured 7d ago against content hash 03812880ee7f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

cogs-sentinel 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 7d 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.

hplan/skills/cogs-sentinel/SKILL.md · 99 lines

How it starts

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

COGS Sentinel — Executable Margin Gate

Running for: $ARGUMENTS

Core Goal

  • Token 단가와 사용 패턴으로부터 p50/p90 월간 COGS와 gross margin을 계산하여 paid AI product의 경제적 viability를 PRD 전에 판단한다.
  • Free-user abuse 시나리오를 blend해 "유료 1명당 무료 24명을 감당해야 할 때" 마진이 살아남는지 본다.
  • 결정은 GREEN / CONDITIONAL_GO / RED + 구체적 mitigation 권고.

Trigger Gate

Use This Skill When

  • 사용자가 유료 가격을 책정하려 할 때 ($X/mo, per-call, etc.)
  • discover/cost-sim이 시나리오를 도출한 후 결정론적 수치가 필요할 때
  • Provider 교체(Anthropic ↔ OpenAI ↔ Google)의 영향 측정
  • 무료 tier 도입 시 abuse가 마진을 깨지 않는지 사전 검증
  • Build Gate 진입

Route to Other Skills When

  • 비용 시나리오 자체가 아직 명확하지 않을 때 → discover/cost-sim 먼저
  • 배포 후 실제 추적 → operate/ops-review
  • 가격 모델 자체를 다시 짤 때 → architect/strategy
  • COGS RED 결정이 났을 때 → decision-log (hold/pivot) 기록 후 routing

Boundary Checks

  • ℹ️ --cac--monthly-churn을 함께 전달하면 LTV/CAC/Payback + overall_verdict(BUILD/HOLD/INVESTIGATE)를 추가로 산출한다. 두 인자를 생략하면 무시되어 하위호환이 유지된다. (--mau 추가 시 Business Report 블록 — 매출/COGS/cost_ratio/blended — 도 포함됨.)
  • ℹ️ 이 skill은 sanity-check(빌드 게이트)이지 회계 보고서가 아니다 — 법인세·감가상각 등 전산 회계 항목은 다루지 않는다.
  • ❌ Provider 단가는 references/provider_pricing.json 스냅샷 기준이다. 최신 단가는 사용자가 verify해야 함.
  • ❌ lognormal sampling이라 결정론적이지만 실제 분포와 다를 수 있다 — sanity check 용도지 회계 보고서 아님.

Inputs

CLI:

python3 hplan/scripts/cogs_sentinel.py \
  --provider anthropic --model claude-sonnet-4-6 \
  --tokens-in 3000 --tokens-out 1500 --calls-per-user-month 40 \
  --arpu 29 --paid-conversion 0.08 --free-abuse-multiplier 3

또는 JSON:

{
  "provider": "anthropic", "model": "claude-sonnet-4-6",
  "tokens_in": 3000, "tokens_out": 1500,
  "calls_per_user_month": 40, "arpu": 29,
  "paid_conversion": 0.08, "free_abuse_multiplier": 3,
  "target_gross_margin": 0.70
}

Steps

  1. Confirm provider + model exists in references/provider_pricing.json (or pass --pricing path).
  2. Estimate usage params from discover/cost-sim output or user input.
  3. Run python3 hplan/scripts/cogs_sentinel.py ....
  4. Read the markdown report at harness/build-gate/cogs_report.md.
  5. If decision is GREEN, proceed to decision-loghandoff.
  6. If CONDITIONAL_GO, list mitigations and require human approval.
  7. If RED, route to decision-log with decision = pivot or hold.

Read the full file on GitHub · 99 lines

Files

What ships with it

4 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. 7d ago First seen · 99 lines · 103 tokens per session scan A 03812880ee7f

Subscribe to this mod's changes

cogs-sentinel is a skill published in the GitHub repository kimsanguine/hplan (2 stars, last pushed 22d ago), licensed MIT. It adds 103 tokens to every session and 1,306 once invoked, about $0.0005 per session on Opus 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.

Related

Other skills, from other repositories

invest

First-time fork users: run the invest-setup skill first to initialize. The main flow lives in this skill (the AI agent uses the CLI/MCP to view the portfolio / run the committee / replay decision history). The Web GUI has been retired (2026-07) — every capability is exposed via CLI subcommands / MCP tools. The backend…

longsizhuo/openInvest · 261 tokens

invest-setup

A first-time setup workflow for openInvest, a system for tracking investments and running portfolio analysis.

longsizhuo/openInvest · 105 tokens

invest-backup

Back up / restore openInvest's local state — memory/ (holdings, strategy, user profile, committee records, dream logs) + db/ (trade ledger, job run history, market-data cache) + .env (SMTP/API credentials) + userprofile.json. All of this data is .gitignore'd with no historical versions in git, so a single accidental…

longsizhuo/openInvest · 202 tokens

portfolio

Portfolio system knowledge base. Use when: position queries, routing strategy questions, provider integration. Not for: general code exploration (use code-explore), code review (use codex-code-review). Output: domain-specific analysis + recommendations.

sd0xdev/sd0x-harness · 49 tokens

yield-xyz-agentkit-builder

Build applications that integrate with the Yield.xyz APIs — staking, lending, vaults, and RWA across 80+ networks. Generates code covering REST API integration, transaction signing, wallet connection, and fee monetization. Use when user wants to build an app, integrate yield, generate code, or set up a project using…

stakekit/agentkit · 75 tokens

yield-xyz-agentkit-privy

The Privy connector for the Yield.xyz AgentKit — signs and broadcasts via Privy agentic wallets. Extends the yield-xyz-agentkit skill — that skill discovers yields and builds the unsigned transactions; this one adds Privy wallet creation, policy enforcement, signing, and broadcasting, in autonomous and semi-autonomous…

stakekit/agentkit · 124 tokens