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 agentmods add skills/mthines/agent-skills/optimize-mock-datanpx skills add mthines/agent-skills --skill optimize-mock-datagit clone --depth 1 https://github.com/mthines/agent-skillsWrote 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/mthines/agent-skills/optimize-mock-data)<a href="https://agentmods.dev/skills/mthines/agent-skills/optimize-mock-data"><img src="https://agentmods.dev/badge/skills/mthines/agent-skills/optimize-mock-data.svg" alt="Measured on agentmods" 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 | $0.00195 | $0.03050 |
| Opus 5 | $0.00097 | $0.01525 |
| Sonnet 5 | $0.00039 | $0.00610 |
| Haiku 4.5 | $0.00019 | $0.00305 |
Grade A, and why
optimize-mock-data 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 5d 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 — 263 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize Mock Data
Audit and normalize a set of related JSON (or JSONL) mock fixtures so
every file shares the same shape, formatting, and verbosity budget.
Pure shape work — never touches semantics or business values unless
the user explicitly asks for shrink.
This
SKILL.mdis a thin index. Detailed rules live inrules/*.mdand load on demand. Reusable Python scripts live inscripts/*.pyand run viaBash. Worked example output lives inreferences/example-report.md.
Mode Detection
Parse $ARGUMENTS as <mode> <path> [flags] where <mode> is one of
analyze, normalize, shrink, trim. If the first token is a path
(starts with /, ./, or ~) treat it as <path> and default
<mode> to analyze.
| Mode | Default | Trigger | Side effect |
|---|---|---|---|
analyze |
yes | analyze, audit, check, report, or first arg is a path |
Read-only report |
normalize |
normalize, fix, format, reorder |
Rewrites files | |
shrink |
shrink, shorten, truncate-strings |
Rewrites files (string truncation) | |
trim |
trim, trim-arrays, cardinality, reduce-arrays, compact, slim |
Rewrites files (array entry reduction; never modifies strings) |
State the detected mode, target path, and file count in one line before continuing:
Mode: analyze
Target: components/ui/src/agent0/mocks/ (22 files)
Workflow
A four-phase pipeline. Each phase has a gate; do not proceed until it passes.
| Phase | Name | Rule file | Gate |
|---|---|---|---|
| 0 | Resolve corpus | — | Target resolved to ≥ 2 JSON files |
| 1 | Shape extraction | rules/shape-extraction.md |
Each file has a shape fingerprint |
| 2 | Drift detection | rules/drift-detection.md |
Drift report produced (or "no drift") |
| 3 | Apply (mode-gated) | rules/shrink-policy.md (shrink only) |
Rewrites pass round-trip parse; analyze skips |
What ships with it
11 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.
- references/example-report.md 2.9 KB
- rules/diagnostic-surface.md 15 KB
- rules/drift-detection.md 5.0 KB
- rules/shape-extraction.md 4.5 KB
- rules/shrink-policy.md 5.7 KB
- rules/trim-policy.md 8.2 KB
- scripts/diff-shapes.py 13 KB runs code
- scripts/normalize.py 4.9 KB runs code
- scripts/shape.py 3.6 KB runs code
- scripts/shrink.py 6.8 KB runs code
- scripts/trim.py 8.0 KB runs code
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.
- 5d ago First seen · 263 lines · 195 tokens per session scan A 78f9c1fa05dd
optimize-mock-data is a skill published in the GitHub repository mthines/agent-skills (12 stars, last pushed yesterday), licensed MIT. It adds 195 tokens to every session and 3,050 once invoked, about $0.0010 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.
Other skills, from other repositories
data-scraper-agent
Build an automated data-collection agent that scrapes a public source on a schedule, enriches results with a cheap/free LLM, stores them in a database, and improves scoring from user feedback over time — runnable entirely on free-tier infrastructure. Use when the user wants to monitor, collect, or track any public…
content-hash-cache-pattern
Cache expensive file-processing results (PDF parsing, OCR, text extraction, image analysis) keyed by a SHA-256 hash of file content rather than file path, so renamed files still hit the cache and changed content auto-invalidates it. Use when building a file-processing pipeline that reprocesses the same files across…
genkit-go-flows
Guides building AI features with Genkit for Go - flows, prompts, structured generation, tool calling, and middleware. Use when defining a Genkit flow, writing a prompt, calling genkit.Generate/GenerateData, defining a tool, debugging Genkit output with traces, or asked how Genkit differs from Google's Agent…
agent-platform-tuning
Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).
developing-genkit-js
Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.
agent-platform-prompt-management
Manages and orchestrates prompts in Agent Platform. Use when you need to create, list, retrieve, version, or delete managed prompts in Agent Platform. Don't use for model training, model deployment to endpoints, or managing non-Agent Platform prompts.