/cc-arsenal:optimize-ai-setupfrom cc-arsenal
Audits AI coding tools (Claude Code, Codex, Cursor, etc.) for token waste and quality drag, measuring session logs and configs to rank fixes. Use when burning through limits or optimizing agent setup.
Ships in cc-arsenal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
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.
references/checks.md only by ID (the awk range below), only for findings being presented.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.error:: mention it and continue with the others.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:
/compact before a break); model or effort rebuilds by choosing both at session start; upgrade rebuilds are expected and need no fix.name-only, user-invocable-only) before disabling.*-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.Use the render skill to build the proposals as one audit page (via the Skill tool as render audit, otherwise follow the render skill's steps inline). One anchored item per finding, anchor finding-<harness>-<check-id>, holding:
--json output carries a names list (the actual skills, servers, or plugins it's about); substitute those for any generic <name> placeholder in the fix string instead of leaving it literalfix / won't fix / discuss verdictGroup the distribution by harness and sort by severity. Put the habits in a short section with no verdicts. Deliver the page path in two lines and ask the user to mark it. When they say it's marked, read the marks back per the render skill and apply only the items marked fix. Without a render skill, print the full name lists first (see above), then ask with AskUserQuestion (multi-select) or a numbered list.
Rules for applying the chosen fixes:
skillOverrides, promptCacheTtl, autoCompactWindow, statusLine, removing a DISABLE_PROMPT_CACHING* env): use the update-config skill via the Skill tool where available, otherwise edit the settings JSON directly and keep every other key intact.~/.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.X-MCP-INLINE-SECRET: name the file and server only, and tell the user to rotate the secret and reference it as ${VAR}. Never print or move the value./clear, /compact, model choice) are advice, not edits.Settings changes apply to new sessions. Do not re-run the collector to "verify" in the same session: its evidence comes from past sessions. Suggest re-running after a week or two of normal use to compare.
Print the HABITS entry with the same awk range and keep only the lines that match what the report showed (for example, the /compact line only when idle rebuilds were found).
In chat, keep it to the snapshot and the page link. The page carries the full proposal list:
**Setup snapshot** (last 14 days): <1-2 lines with the most telling metrics>
**Top fixes:** <the three highest-impact fixes, one line each>
Proposals: <page path> (mark fix / won't fix / discuss, save, then tell me)
/usage (prompt cache line, usage attribution) and /context (startup composition) complement this audit.evals/evals.json (opens in a new tab)evals/trigger-eval.json (opens in a new tab)references/checks.md (opens in a new tab)scripts/collect.py (opens in a new tab)scripts/optimize_ai_setup/__init__.py (opens in a new tab)scripts/optimize_ai_setup/antigravity.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/__init__.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/memory.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/settings.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/skills_mcp.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/transcript.py (opens in a new tab)scripts/optimize_ai_setup/claude_code/usage_checks.py (opens in a new tab)scripts/optimize_ai_setup/claude_desktop.py (opens in a new tab)scripts/optimize_ai_setup/cli.py (opens in a new tab)scripts/optimize_ai_setup/codex.py (opens in a new tab)scripts/optimize_ai_setup/constants.py (opens in a new tab)scripts/optimize_ai_setup/cross_tool.py (opens in a new tab)scripts/optimize_ai_setup/cursor.py (opens in a new tab)scripts/optimize_ai_setup/gemini.py (opens in a new tab)scripts/optimize_ai_setup/io.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
52 skills in this plugin
/agent-browserHeadless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than raw DOM tools. Use whenever a task needs to interact with a live web page: click, fill forms, log in, extract text or data, take screenshots, test a running web app, or scrape a site. Triggers on 'automate the browser', 'fill this form', 'click the button', 'take a screenshot of the page', 'log into', 'scrape this site', 'test my web app', 'headless browser'. Not for Playwright test-suite authoring or CDP/service-worker work needing the full JS API: use Playwright directly. Not for driving the user's own already-open, logged-in Chrome tab: use claude-in-chrome for that./anything-to-skillTurns a docs site, local folder, PDF or book, YouTube video, playlist or channel, or a topic into a source-grounded, token-efficient agent skill (hub SKILL.md, sectioned references, INDEX, evals), and can compact it into a lean expert skill. Use for "make a skill from these docs", "turn this channel into a skill". Not for a skill from your own description (use create-skill), improving one (use improve-skill) or finding third-party skills (use find-skills)./ci-generateGenerate a production-ready CI/CD pipeline config (GitHub Actions, GitLab CI, CircleCI, or Jenkins) by discovering the project's actual stack, test/build commands, and dependencies. Use when setting up CI for a new project, adding a missing workflow file, or asked to create/generate a pipeline, workflow, or `.gitlab-ci.yml`/`Jenkinsfile`. Not for writing a Dockerfile itself (see docker-init), this only wires CI stages around one. Not for running existing CI checks locally (use ci-local), this skill only authors the pipeline file itself./ci-localRun the checks a GitHub Actions workflow would run, locally, when Actions is unavailable or out of quota. Parses .github/workflows/*.yml, extracts the jobs/steps that gate merges (lint, typecheck, test, build), translates them to local commands respecting the workflow's pinned node/python versions and env, executes them sequentially, and reports a parity table of what passed locally vs. what can't be replicated (service containers, secrets, matrix dimensions) and why. Activates on "CI quota", "Actions is down/unavailable", "run CI locally", "verify like CI would", "run the pipeline on my machine", or a pre-push request to check a branch the way CI checks it. Not for generating a new workflow file (use ci-generate), not for debugging why a specific CI run failed on GitHub (use fix-bug or review-code), and not for the release/hotfix gating process itself (use gitflow), this skill only produces the local stand-in when the real thing isn't reachable./clotho-researchFind what a change will actually touch before planning it — the existing code that must change, the prior art worth copying, and the risks that will bite. Trigger on "what would this change touch", "research this before we plan it", or an automated pre-planning step. Reports files, sources, and risks; it never proposes an implementation and never edits anything. Not for auditing dependencies (use review-deps), not for writing the plan itself (use project-planner), and not for reviewing code that already exists (use review-code)./codex-imagegenGenerates images and polished raster art (logos, mascots, hero images, icons, characters, sprite sheets, illustrations, product mockups) by driving Codex CLI's $imagegen skill. This is the default image generator, use it for any request to generate or create an image or visual asset, including "generate an image", "create a hero image", "make a mascot", "design a logo", "draw an icon", "generate a sprite sheet", or "make an illustration". Requires the `codex` CLI installed and authenticated (ChatGPT auth). Not for architecture, flow, or sequence diagrams (use docs-diagram).npx claudepluginhub mgiovani/ai-arsenal --plugin cc-arsenal