optimize

optimize is a command for Claude Code from gopherguides/gopher-ai. It costs 7 tokens per session (3,898 once invoked), scanned A, original, MIT.

A command for analyzing and optimizing the CSS generated by Tailwind CSS. It can inspect a project or a specific Tailwind CSS entry file.

In plain words
What is it for?
Use it for quick or detailed Tailwind output analysis, with an option to apply safe optimizations.
Why use it?
It helps reveal large bundles, unused styles, missing source paths, excess CSS variables, and slow builds.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the tailwind plugin — 5 skills, 4 commands shipped together

Good fit Use it for quick or detailed Tailwind output analysis, with an option to apply safe optimizations.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add gopherguides/gopher-ai
Claude Code
/plugin install tailwind

Made for: Claude Code.

Or install tailwind, the plugin that ships this one along with the rest of its 5 skills, 4 commands.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/gopherguides/gopher-ai/optimize"><img src="https://agentmods.dev/badge/commands/gopherguides/gopher-ai/optimize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00007 $0.03898
Opus 5.5 $0.00003 $0.01559
Sonnet 5.5 $0.00001 $0.00780
Haiku 4.5 $0.00001 $0.00390

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

Security

Grade A, and why

optimize 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 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.

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.

plugins/tailwind/commands/optimize.md · 375 lines

How it starts

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

Optimize Tailwind CSS

If $ARGUMENTS is empty or not provided:

Analyze Tailwind CSS output and provide optimization recommendations.

Usage: /tailwind-optimize [path] [options]

  • /tailwind-optimize — quick analysis
  • /tailwind-optimize ./apps/storefront — analyze one project or subtree
  • /tailwind-optimize ./src/app.css — analyze a specific Tailwind entry
  • /tailwind-optimize --report — detailed report
  • /tailwind-optimize --fix — apply safe optimizations

Analyzes: bundle size (dev vs prod, gzipped) · source coverage (@source paths cover all templates) · unused classes (in CSS but not templates) · CSS variable bloat · build performance.

Proceed with optimization analysis.


If $ARGUMENTS is provided:

Parse arguments:

  • Path — directory or file (default: current directory)
  • --report — detailed markdown report
  • --fix — apply safe optimizations
  • --verbose — show all findings

Bind the requested or implicitly derived path to <OPTIMIZE_TARGET> as a concrete normalized path. If no path was supplied, bind the current directory. Stop with a clear error when the target does not exist. Resolve the containing project or package root to <PROJECT_ROOT> for build configuration and local dependency lookup, but never use <PROJECT_ROOT> as a replacement discovery target.

Bind <SUPPORTED_SOURCE_EXTENSIONS> once to the project's complete source set and use it for target validation, directory discovery, @source verification, <TEMPLATE_FILES>, class inventory, reporting, and fixes. The baseline set is:

js, jsx, ts, tsx, html, htm, templ, vue, svelte, astro, php, blade.php, erb, hbs, md, mdx, ejs, twig, liquid, njk, nunjucks, pug, jade, haml, slim, razor, and cshtml.

This baseline is not an allowlist. Tailwind scans non-ignored plain-text source files, so add every other text source selected by an @source rule or the chosen build integration. Exclude CSS, binary files, lockfiles, node_modules, and ignored paths using Tailwind's source-detection rules. Never omit a target-associated source merely because its extension is absent from the baseline.

When <OPTIMIZE_TARGET> is a directory, limit CSS entries, generated artifacts, and templates to that subtree. When it is a CSS file, bind that file directly to <CSS_ENTRY> and derive <TEMPLATE_FILES> only from its @source rules and the selected integration's content scope. When it is a supported template file, use that file as the complete <TEMPLATE_FILES> set and locate only the Tailwind entry associated with its containing integration. For any other file type, stop with a clear unsupported-target error. Retain the complete <TEMPLATE_FILES> set for every later analysis and fix; do not widen discovery to ..

Read the full file on GitHub · 375 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 9ddd3c13e0bd
  2. 1mo ago First seen · 375 lines · 7 tokens per session scan A 24e9a44779cc

Subscribe to this mod's changes

optimize is a command published in the GitHub repository gopherguides/gopher-ai (21 stars, last pushed yesterday), licensed MIT. It adds 7 tokens to every session and 3,898 once invoked, about $0.0000 per session on Opus 5.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-09-03.