optimize-ai-setup

optimize-ai-setup is a skill for Claude Code from mgiovani/cc-arsenal. It costs 199 tokens per session (1,663 once invoked), scanned B, original, MIT.

A local audit of AI coding tools and their settings, including Claude Code, Codex, Cursor, Gemini CLI, and others. It measures session logs and configuration data to find token waste and quality problems, then ranks possible fixes.

In plain words
What is it for?
Use it to inspect startup context size, prompt-cache use, rebuilds, and other reported setup findings over a chosen time period.
Why use it?
It replaces guesswork about slow or expensive AI-assisted development with measurements from the machine's actual use.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Part of the cc-arsenal-skills plugin — 10 skills shipped together , and of cc-arsenal

Good fit Use it to inspect startup context size, prompt-cache use, rebuilds, and other reported setup findings over a chosen time period.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mgiovani/cc-arsenal/optimize-ai-setup
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 mgiovani/cc-arsenal --skill optimize-ai-setup
Clone the repo
git clone --depth 1 https://github.com/mgiovani/cc-arsenal

Made for: Claude Code.

Or install cc-arsenal-skills, the plugin that ships this one along with the rest of its 10 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 optimize-ai-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/optimize-ai-setup/github.svg)](https://agentmods.dev/skills/mgiovani/cc-arsenal/optimize-ai-setup)
Your own site
<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.

agentmods 80×15 button for optimize-ai-setup

Your own site · 80×15
<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>
Per session 199 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,663 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00199 $0.01663
Opus 5.5 $0.00080 $0.00665
Sonnet 5.5 $0.00040 $0.00333
Haiku 4.5 $0.00020 $0.00166

Measured 1mo ago against content hash e5c02d3df791, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 20 executable files (scripts/collect.py, scripts/optimize_ai_setup/__init__.py, scripts/optimize_ai_setup/antigravity.py, …), 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.

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.
skills/optimize-ai-setup/SKILL.md · 89 lines

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.md only by ID (the awk range 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 (/compact before 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 / *-DUP finding's names list in the reply (grouped by source, e.g. plugin prefix), not only the truncated evidence line or a count. Run --all --json to 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.

Read the full file on GitHub · 89 lines

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. 1mo ago Changed · -1 lines e5c02d3df791
  2. 2mo ago Changed · +1 lines 957682d6065a
  3. 2mo ago First seen · 89 lines · 199 tokens per session scan B c18d13258f7a

Subscribe to this mod's changes

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.

Related

optimize-ai-setup compared with skills from other repositories

optimize-ai-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
optimize-ai-setupmgiovani/cc-arsenalSkill81mo agoMITB199Claude Code
ai-prompt-generatorLeoYeAI/openclaw-master-skillsSkill2.2k10d agoMITA0Claude Code, Codex
queryboykush/scrapsSkill45todayMITA61Claude Code
microsoft-outlookzapier/connectorsSkill1903mo agononeA80Claude Code
microsoft-sharepointzapier/connectorsSkill1903mo agononeA75Claude Code
notionzapier/connectorsSkill1903mo agononeA63Claude Code
google-calendarzapier/connectorsSkill1903mo agononeA96Claude Code