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/mehrad-dm/mastermind/performancenpx skills add mehrad-dm/mastermind --skill performancegit clone --depth 1 https://github.com/mehrad-dm/mastermindWhat 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.00057 | $0.00745 |
| Opus 5 | $0.00028 | $0.00373 |
| Sonnet 5 | $0.00011 | $0.00149 |
| Haiku 4.5 | $0.00006 | $0.00075 |
Grade A, and why
performance 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 3d 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 — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Perf: measure, find the real bottleneck, fix the biggest, verify
Slowness has a real, measurable cause. The cardinal sin is optimizing by intuition. You'll spend effort on the wrong thing and maybe trade away correctness for nothing. Get data first.
The loop
- Reproduce + measure. Get a real number under a realistic scenario: wall-clock, FPS/frame time,
query ms (
EXPLAIN ANALYZE), request latency, bundle size, memory. No number, no optimizing. Write it down; it's your before. - Find the bottleneck: profile it. Use the right instrument (browser Performance panel /
React Profiler, a flame graph, DB query plan, a tracer) and find where the time actually goes, the
~20% causing ~80%. The universal classes of waste: repeated work (recomputed per item/render
instead of once), amplified work (one request fanning out into N), missing lookup structure
(a scan where an index/map belongs), serial waiting (round-trips that could be batched or
parallel), oversized payloads, and no caching of stable results. For the domain-specific
suspects, load the active field pack (
engineering/active-field.md→ the pack's performance section); if the field has no pack, let the profile, not a checklist, name the suspect. - Fix the biggest one. Make the single change with the most impact; resist micro-optimizing noise. Prefer doing less work (cache, batch, index, memoize, defer, paginate) over doing the same work faster.
- Verify the win. Re-measure the same way: confirm the number actually moved, and that behavior
and correctness are unchanged (
core/rigor.md). A "faster" version that's subtly wrong is a regression. - Guard it. Note the metric (a comment, a budget, a perf test) so the regression is visible next time.
After
Run levelup (capture) to record the bottleneck class and its lesson in the active field's
lessons.md: including the wrong suspect you ruled out, so MasterMind doesn't re-profile it next
time. Report: before → after numbers, the cause, the fix, and the guard added.
What ships with it
1 file 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.
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.
- 3d ago First seen · 43 lines · 57 tokens per session scan A e79cef67c02b
performance is a skill published in the GitHub repository mehrad-dm/mastermind (24 stars, last pushed 3d ago), licensed MIT. It adds 57 tokens to every session and 745 once invoked, about $0.0003 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-30.
Other skills, from other repositories
tool-prompt-optimization
Optimize the description prompts an AI agent reads to learn its built-in tools (the .md files under prompts/tools/). Two halves: (1) measure how much of a prompt is already inferable from the tool's JSON parameter schema + name, to prune redundancy with evidence; (2) house authoring rules for what belongs in a tool…
semantic-compression
Re-encode verbose prose into a dense telegraphic register — punctuation as connectives, label frames, verbless assertions — without losing normativity or precision. Use when compressing system prompts, tool/function descriptions, skill bodies, or agent instructions; reducing token count or context bloat; making…
docker-extend
Use when: User wants to extend Docker with custom tools, personalize the Docker environment, or set up user-specific Docker customization. Triggers: 'extend docker', 'docker-extend', 'add tools to docker', 'customize docker', 'add my tools to the container', 'personalize docker setup', 'docker user setup', 'install…
ppt-generation
Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Has TWO workflows: (1) Primary — AI-generated full-slide images composed via scripts/generate.py; (2) Fallback — python-pptx programmatic slides (all text editable, better for reports/project management). The fallback…
runjam-defaults
Default constraints for every RunJam session. Defines output path conventions, dependency checking rules, fallback strategies, and file management discipline. This skill is auto-injected into every session — do not remove. Current session working directory: /Users/guizhan/work/code/runjam.
database-migrations
Database migration best practices for schema changes, data migrations, rollbacks, and zero-downtime deployments across PostgreSQL, MySQL, and common ORMs (Prisma, Drizzle, Django, TypeORM, golang-migrate). Use when planning or implementing database schema changes.