demock

demock is a skill for Claude Code, Codex from LilMGenius/paperthin. It costs 153 tokens per session (1,192 once invoked), scanned A, original, MIT.

A code-path review that looks for mocks, stubs, fakes, swallowed failures, and placeholder implementations running outside tests. It proposes a real dependency or an explicit failure for each finding before anything is changed.

In plain words
What is it for?
It helps inspect a named change, file set, directory, or diff for fake dependencies and hidden fallbacks used by builds, exports, handlers, or command-line entry points.
Why use it?
A test double or fallback on a real path can make a system report success without doing the real work. This exposes those false-success paths and traces whether they are actually reachable.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the paperthin plugin — 45 skills shipped together

Good fit It helps inspect a named change, file set, directory, or diff for fake dependencies and hidden fallbacks used by builds, exports, handlers, or command-line entry points.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lilmgenius/paperthin/demock
About the project

Paperthin is a collection of low-level design patterns that coding agents can apply as repeatable checks and actions during software work. It is for people using agents such as Claude Code, Codex, Cursor, or other supported tools, and its catalogue entries package the patterns as skills, an instruction, and a plugin.

LilMGenius/paperthin · 1,481 stars · on GitHub · paperthin.ai

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 LilMGenius/paperthin --skill demock
Clone the repo
git clone --depth 1 https://github.com/LilMGenius/paperthin

Made for: Claude Code, Codex.

Or install paperthin, the plugin that ships this one along with the rest of its 45 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 demock

README.md
[![agentmods](https://agentmods.dev/badge/skills/lilmgenius/paperthin/demock/github.svg)](https://agentmods.dev/skills/lilmgenius/paperthin/demock)
Your own site
<a href="https://agentmods.dev/skills/lilmgenius/paperthin/demock"><img src="https://agentmods.dev/badge/skills/lilmgenius/paperthin/demock/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 demock

Your own site · 80×15
<a href="https://agentmods.dev/skills/lilmgenius/paperthin/demock"><img src="https://agentmods.dev/badge/skills/lilmgenius/paperthin/demock.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,192 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.00153 $0.01192
Opus 5.5 $0.00061 $0.00477
Sonnet 5.5 $0.00031 $0.00238
Haiku 4.5 $0.00015 $0.00119

Measured 14d ago against content hash 8166ab4862cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

demock 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 14d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/scan.mjs, scripts/scan.test.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/depth/demock/SKILL.md · 42 lines

How it starts

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

Find candidates for a test double, a swallowed failure or a placeholder on the real code path with the bundled script, read each one, and propose the real dependency or an honest failure before anything is fixed.

Goal

A real code path runs what it claims to run: a success means the work happened, and a failure surfaces with its cause. The scope is what the human named: files, directories, a diff, or the change just made. The run never picks its own target.

The run reports each finding with its location, the evidence that it is reached from the real path, its class and its proposal; then, for each item the human approved, the test that failed first and the fix. A run whose scope holds no finding changes nothing and says so.

Workflow

  1. Split real paths from test paths first. Read the repository's test convention from its test directories, file naming rules and test configuration. A real path is code reached from an entry point (build output, an export, a handler, a CLI): trace it through imports and calls, including what dependency injection or a registry wires in. Code nothing reaches is dead, not a finding here; report it for a cleanup pass.
  2. List candidates. From this skill's folder run node scripts/scan.mjs <paths...> [--test-glob <glob>]... [--json] over the scope, adding a --test-glob for each test path the repository's convention names beyond the defaults. It prints each candidate outside the test paths with its file, line, kind and evidence text; --json prints one JSON object. Exit codes: 0 no candidate, 3 candidates, 2 a usage error. An exit of 2 is a broken run: fix the command and run again. A name match is a lead, never a verdict.
  3. Add the repository's own linter rules. When the repository already uses a linter carrying swallowed-failure rules (ruff BLE, S110 and S112, ESLint no-empty, Go errcheck), run those rules through the repository's own scripts or locally installed binaries at the version it declares, and add their hits to the candidates. Install no new tool.
  4. Read and classify each candidate. Class (a) is a test double on the real path. Class (b) is a false success: a catch that turns a failure into a success, logged or not, a fallback whose caller cannot tell it from the real result, or a gate on access, spending, deletion or a counted signal that lets the request through when the secret, dependency or input it checks is missing. Class (c) is a placeholder: an unfinished implementation the real path reaches. Class (d) is intended: a seam where the real implementation is chosen at runtime, a degradation the caller can see (a typed empty result, a flag, a documented status) and is designed to handle, an offline mode documented and off by default on the real path, or code a production build excludes. Keep (d) with its evidence. When reaching the real path cannot be confirmed, give the candidate its class and proposal and mark it unverified.
  5. Propose a fix for each (a), (b) and (c): the real dependency that should run, or an honest failure that surfaces the cause; for a gate that lets requests through, the honest failure is a denial. Never propose swapping one fake for another.
  6. Stop and report. Report the findings and their proposals, including any pattern the script missed, and end the run. The human approves by naming the items to fix; nothing else changes.
  7. Fix one approved item at a time. First write a test that fails on the fake, proving the real path runs or the failure surfaces; then fix the item and rerun the repository's checks.

Read the full file on GitHub · 42 lines

Files

What ships with it

3 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. 14d ago Changed · -1 lines 8166ab4862cf
  2. 20d ago First seen · 43 lines · 153 tokens per session scan A 7b09c0806fde

Subscribe to this mod's changes

demock is a skill published in the GitHub repository LilMGenius/paperthin (1,481 stars, last pushed 4d ago), licensed MIT. It adds 153 tokens to every session and 1,192 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-11-09.

Related

demock compared with skills from other repositories

demock next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
demockLilMGenius/paperthinSkill1.5k4d agoMITA153Claude Code, Codex
repro-firstedonadei/caliperSkill239yesterdayMITA30Claude Code
bugfix-workflowakshay5995/agent-skill-evalsSkill34mo agoMITA91Claude Code, Codex
pathways-workloadgoogle/skillsSkill25ktodayApache-2.0A178Claude Code, Codex
gke-workload-scaling-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A170Claude Code, Codex
gke-node-notreadygoogle/skillsSkill25ktodayApache-2.0A112Claude Code, Codex
data-manager-api-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A179Claude Code, Codex