optimise

optimise is a command for Claude Code from runnithan/claudex-setup. It costs 38 tokens per session (10,271 once invoked), scanned A, original, MIT.

A command for reviewing a project's Claude Code, Claude Design, or Codex setup against a library of recorded lessons. It focuses on the tools and working habits around a project, not the project's application code.

In plain words
What is it for?
Use it to audit a registered project, discuss suggested setup changes, and record the approved improvements.
Why use it?
It helps find and apply improvements to agent settings, skills, hooks, prompts, and related workflows one change at a time with approval.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Part of the claudex-setup plugin — 3 skills, 24 commands, 6 agents, 1 hook shipped together

Good fit Use it to audit a registered project, discuss suggested setup changes, and record the approved improvements.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/runnithan/claudex-setup/optimise
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.

Clone the repo
git clone --depth 1 https://github.com/runnithan/claudex-setup

Made for: Claude Code.

Or install claudex-setup, the plugin that ships this one along with the rest of its 3 skills, 24 commands, 6 agents, 1 hook.

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 optimise

README.md
[![agentmods](https://agentmods.dev/badge/commands/runnithan/claudex-setup/optimise/github.svg)](https://agentmods.dev/commands/runnithan/claudex-setup/optimise)
Your own site
<a href="https://agentmods.dev/commands/runnithan/claudex-setup/optimise"><img src="https://agentmods.dev/badge/commands/runnithan/claudex-setup/optimise/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 optimise

Your own site · 80×15
<a href="https://agentmods.dev/commands/runnithan/claudex-setup/optimise"><img src="https://agentmods.dev/badge/commands/runnithan/claudex-setup/optimise.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00038 $0.10271
Opus 5.5 $0.00015 $0.04108
Sonnet 5.5 $0.00008 $0.02054
Haiku 4.5 $0.00004 $0.01027

Measured 23d ago against content hash 2b567ddb1d85, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

optimise scanned grade A 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 23d 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 directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`AGENTS.md`, any project `.codex/` directory, and the relevant `~/.codex/config.toml`, the

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

.claude/commands/optimise.md · 643 lines

How it starts

The opening of the file, as written. The whole thing — 643 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/optimise: audit a project's Claude setup and apply improvements

You are auditing ONE registered project's Claude tooling setup against the repo's lessons/ library, then walking the owner through concrete improvements interactively and applying the ones they approve. This is not a code review of the project's application code, every finding is about how the owner works with Claude on this project (config, agents, skills, hooks, prompting/keyboard habits), never about whether the app itself is buggy.

This command runs from inside the claudex-setup repo (the hub). The project being audited usually lives elsewhere on disk (its real path is in the registry frontmatter). You edit two places: the audited project's actual .claude/ (applying approved config changes), and the claudex-setup repo's projects/ tracking files (recording what you found and did).

Tune your behaviour to run reliably and unattended-friendly: follow the numbered steps in order, use the exact file paths and formats below, stop where the stop conditions say to stop, and run the final self-check before reporting done.


0. Inputs and mode resolution

  1. Read the argument string. The first bare token is the project slug (e.g. your-project, claudex-setup, another-project, personal-notes). If no slug is given, list the registered projects (the subdirectories of projects/, excluding the root-level registry files README.md, audit-log.md, and habits.md) and ask the owner which one to audit, then stop until they answer.
  2. Detect a tool flag anywhere in the argument string: --design selects the Claude Design sub-area, --codex selects the Codex sub-area, and --code (or no flag) selects the default Claude Code area. Set MODE = design, MODE = codex, or MODE = code accordingly. If the project is multi-tool and no flag was given, tell the owner the project has sub-areas and which flags reach the others (--design, --codex), the default must be a visible choice, not a silent one, then proceed with claude-code/. --design or --codex on a flat (single-tool) project is an error: only a multi-tool project has those sub-areas.
  3. Establish the repo root. This command lives in the claudex-setup repo; the registry is at <repo-root>/projects/. Use <repo-root> as the base for every projects/... path below.

Read the full file on GitHub · 643 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. 23d ago Changed · +21 lines 2b567ddb1d85
  2. 1mo ago First seen · 622 lines · 38 tokens per session scan A 115f08453082

Subscribe to this mod's changes

optimise is a command published in the GitHub repository runnithan/claudex-setup (1 stars, last pushed 6d ago), licensed MIT. It adds 38 tokens to every session and 10,271 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.