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 skills add mgiovani/cc-arsenal --skill optimize-ai-setupgit clone --depth 1 https://github.com/mgiovani/cc-arsenalWrote 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/mgiovani/cc-arsenal/optimize-ai-setup)<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/optimize-ai-setup"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/optimize-ai-setup/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.
<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/optimize-ai-setup"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/optimize-ai-setup.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00199 | $0.01663 |
| Opus 5.5 | $0.00080 | $0.00665 |
| Sonnet 5.5 | $0.00040 | $0.00333 |
| Haiku 4.5 | $0.00020 | $0.00166 |
Grade B, and why
optimize-ai-setup scanned grade B with 1 finding 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 1mo 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Codex `~/.codex/config.toml` (`enabled = false` or `enabled_tools` on an MCP server, `project_doc_max_bytes`), `disable-model-invocation: true` on the user's own skills, and `.cursor/rules` frontmatter: edit in place. How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Optimize AI Setup
Measure first, then advise. A local script collects every number from configs and session logs; the model reads only its compact report plus the catalog entries for the findings that fired.
Token rules for this skill
- Run the collector once per audit. Do not open transcripts, session logs, SQLite stores, or whole config files: the script already read them, safely and with size caps.
- Read
references/checks.mdonly by ID (theawkrange below), only for findings being presented. - Answer with a short snapshot and a ranked fix table. Do not restate the whole report.
Step 1: Collect evidence
From the user's project directory, run the collector (<skill-dir> is this skill's directory):
uv run <skill-dir>/scripts/collect.py --days 14
Without uv, use python3 <skill-dir>/scripts/collect.py (Python 3.11+). Flags: --days N (lookback window), --project PATH, --all (every finding, not just the top 15), --json.
no harness detected: say so and stop.- A harness line showing
error:: mention it and continue with the others.
Step 2: Explain the top findings
Print the catalog entries for every HIGH finding plus the top five overall, in one call (the awk range prints each entry and stops at the next heading):
awk '/^## (CC-STARTUP|CC-REBUILD|CX-AGENTSMD-CAP)$/{p=1;print;next} /^## /{p=0} p' <skill-dir>/references/checks.md
Interpret the evidence before recommending:
- Startup context is paid by every session and every subagent, so a large one outranks most other findings.
- A high token-weighted cache hit rate can still hide expensive writes; judge caching by the cost-weighted share and the rebuild count.
- Rebuilds after idle are fixed by a habit (
/compactbefore a break); model or effort rebuilds by choosing both at session start; upgrade rebuilds are expected and need no fix. - "Unused" only means no uses inside the window. Say "no uses in the last N days" and suggest demoting (
name-only,user-invocable-only) before disabling. - Before asking whether to demote or disable anything, list every name from each
*-UNUSED/*-DUPfinding'snameslist in the reply (grouped by source, e.g. plugin prefix), not only the truncated evidence line or a count. Run--all --jsonto get the full lists. Users cannot decide on items they cannot see. - Quote the numbers the report printed. Never invent or extrapolate numbers the script did not measure.
- Flag any fix that trades quality for cost (lower effort, a smaller auto-compact window) with its Tradeoff line.
What ships with it
23 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.
- evals/evals.json 2.3 KB
- evals/trigger-eval.json 2.0 KB
- references/checks.md 15 KB
- scripts/collect.py 803 B runs code
- scripts/optimize_ai_setup/__init__.py 150 B runs code
- scripts/optimize_ai_setup/antigravity.py 1.8 KB runs code
- scripts/optimize_ai_setup/claude_code/__init__.py 3.4 KB runs code
- scripts/optimize_ai_setup/claude_code/memory.py 5.5 KB runs code
- scripts/optimize_ai_setup/claude_code/settings.py 3.3 KB runs code
- scripts/optimize_ai_setup/claude_code/skills_mcp.py 7.7 KB runs code
- scripts/optimize_ai_setup/claude_code/transcript.py 9.7 KB runs code
- scripts/optimize_ai_setup/claude_code/usage_checks.py 13 KB runs code
- scripts/optimize_ai_setup/claude_desktop.py 2.0 KB runs code
- scripts/optimize_ai_setup/cli.py 3.4 KB runs code
- scripts/optimize_ai_setup/codex.py 12 KB runs code
- scripts/optimize_ai_setup/constants.py 305 B runs code
- scripts/optimize_ai_setup/cross_tool.py 3.3 KB runs code
- scripts/optimize_ai_setup/cursor.py 2.4 KB runs code
- scripts/optimize_ai_setup/gemini.py 1.9 KB runs code
- scripts/optimize_ai_setup/io.py 5.1 KB runs code
- scripts/optimize_ai_setup/model.py 1.1 KB runs code
- scripts/optimize_ai_setup/report.py 5.7 KB runs code
- scripts/optimize_ai_setup/skillfiles.py 1.6 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.
- 1mo ago Changed · -1 lines e5c02d3df791
- 2mo ago Changed · +1 lines 957682d6065a
- 2mo ago First seen · 89 lines · 199 tokens per session scan B c18d13258f7a
optimize-ai-setup is a skill published in the GitHub repository mgiovani/cc-arsenal (8 stars, last pushed 1mo ago), licensed MIT. It adds 199 tokens to every session and 1,663 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-26.
optimize-ai-setup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| optimize-ai-setupmgiovani/cc-arsenal | Skill | 8 | 1mo ago | MIT | B | 199 | Claude Code |
| ai-prompt-generatorLeoYeAI/openclaw-master-skills | Skill | 2.2k | 10d ago | MIT | A | 0 | Claude Code, Codex |
| queryboykush/scraps | Skill | 45 | today | MIT | A | 61 | Claude Code |
| microsoft-outlookzapier/connectors | Skill | 190 | 3mo ago | none | A | 80 | Claude Code |
| microsoft-sharepointzapier/connectors | Skill | 190 | 3mo ago | none | A | 75 | Claude Code |
| notionzapier/connectors | Skill | 190 | 3mo ago | none | A | 63 | Claude Code |
| google-calendarzapier/connectors | Skill | 190 | 3mo ago | none | A | 96 | Claude Code |