optimize-mock-data

Solid

Optimizes a directory of structurally-related JSON / JSONL mock fixtures by inferring a shared schema, detecting structural drift between files, normalizing formatting and key order, and optionally shrinking verbose payloads while preserving shape. Use when fixture files have grown inconsistent (mixed tabs / 2-space indent, reordered keys, fields present in some files but missing from others, megabyte-sized payloads), when adding a new mock that must match an existing set, or when preparing fixtures for a storage-cost-sensitive context. Four modes — `analyze` (default, read-only), `normalize` (rewrites files in place), `shrink` (caps verbose string fields), `trim` (reduces array cardinality without touching strings). Triggers on "optimize mock data", "normalize fixtures", "check mock structure", "audit mocks", "shrink test fixtures", "are these mocks consistent", "/optimize-mock-data".

Testing & QA 8 stars 2 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
32
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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.md` is a thin index.** Detailed rules live in > `rules/*.md` and load on demand. Reusable Python scripts live in > `scripts/*.py` and run via `Bash`. Worked example output lives in > `references/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`, `redu...

Details

Author
mthines
Repository
mthines/agent-skills
Created
3 months ago
Last Updated
2 days ago
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Solid

optimize-claude-md

Audits CLAUDE.md files (root, nested, `.claude/rules/*.md`) for context bloat and emits ranked suggestions across two levers — (1) shrink inventory entries, (2) flag rarely-used agent-invokable skills that should become slash-only to drop their description from the always-on available-skills list. Triggers on Claude Code's "Large CLAUDE.md will impact performance" warning (> 40k chars), inventory entries duplicating harness-loaded skill descriptions, "CLAUDE.md is too big", "shrink CLAUDE.md", "optimize CLAUDE.md", "/optimize-claude-md". Three modes — `audit` (read-only ranked report + slash-conversion candidates), `trim` (interactive one-line hook + diff approval), `extract` (moves sections to linked files preserving content). Composes with `docs` (Placement Resolver) and `create-skill` (invocation matrix). Hard rules: refuses files < 10k chars; never deletes silently; never edits any skill's canonical `SKILL.md` frontmatter — routes to `/create-skill`.

8 Updated 2 days ago
mthines
Code & Development Solid

optimize-approach

Reviews whether a change takes the most optimal approach for its stated intent and, when it does not, researches the code, validates a concretely better approach via holistic analysis, and either proposes it (report mode) or applies it behind a confidence gate (apply mode). Judges four axes — codebase-fit, simplicity, performance, robustness — at the approach level, deferring line-level and failure-mode findings to code-quality, critical, and holistic-review. Stays silent when the approach is already optimal (quiet early-exit). A `plan` mode reviews a drafted plan's approach at plan time (aw-planner Phase 1) — the cheapest moment to switch. Called by the reviewer and pr-reviewer agents, the polish skill, and aw-planner as a default-on lens; also runnable standalone. Triggers on "is this the best approach", "better way to do this", "is this optimal", "optimize this approach", "rethink the approach", "/optimize-approach".

8 Updated 2 days ago
mthines
AI & Automation Listed

text-optimize

Optimizes text/docs for LLM token efficiency. Triggers - optimize, reduce tokens, compress, deep compress.

31 Updated 4 days ago
kochetkov-ma