build-optimization

build-optimization is a command for Claude Code from alifanov/darkflow. It costs 20 tokens per session (1,886 once invoked), scanned A, original, MIT.

A proposal-only review of a project's build and deployment pipeline, the steps that turn source code into a released application. It maps the tools, identifies slow or wasteful parts, and writes improvement tasks.

In plain words
What is it for?
Use it to document the current build pipeline, find bottlenecks, and create optimization proposals with measurable acceptance criteria.
Why use it?
It makes build and deployment problems easier to understand without changing the project automatically.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to document the current build pipeline, find bottlenecks, and create optimization proposals with measurable acceptance criteria.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alifanov/darkflow/build-optimization
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/alifanov/darkflow

Made for: Claude Code.

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 build-optimization

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/alifanov/darkflow/build-optimization"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/build-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,886 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.00020 $0.01886
Opus 5.5 $0.00008 $0.00754
Sonnet 5.5 $0.00004 $0.00377
Haiku 4.5 $0.00002 $0.00189

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

Security

Grade A, and why

build-optimization 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.

templates/.claude/commands/darkflow/build-optimization.md · 167 lines

How it starts

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

Analyze how this project builds and deploys — map the full pipeline, find bottlenecks and inefficiencies, and create tasks with concrete optimization proposals. Each task should describe the problem, what to change, and a measurable acceptance criterion.

This is a proposal-only audit: it identifies opportunities and proposes changes. It does not apply changes itself (that is a human/fix-issues decision).

Step 1 — Read project config

Load the project config (contract in .darkflow.d/claude.md → Project config). Uses: language, mergeStrategy.

Step 2 — Map the build & deploy pipeline

Detect and read the actual toolchain. Check each of the following (skip if not present):

App build:

  • package.json scripts (build, test, lint, typecheck, dev), infer package manager from lockfile (pnpm-lock.yaml → pnpm, yarn.lock → yarn, package-lock.json → npm)
  • Bundler/framework config: next.config.*, vite.config.*, webpack.config.*, turbo.json, nx.json
  • pyproject.toml / uv.lock / requirements.txt for Python projects

Container build:

  • Dockerfile / Dockerfile.* — note base image, layer order, multi-stage structure, what gets copied
  • .dockerignore — presence and what it excludes
  • docker-compose.yml / docker-compose.*.yml — services, build context, volume mounts

CI/CD:

  • .github/workflows/*.yml — jobs, steps, caching strategy (look for actions/cache), parallelism, matrix builds, deploy steps
  • Makefile — relevant build/deploy targets

Deploy mechanism:

  • Coolify (deploy step in CI or coolify CLI invocation)
  • Registry push commands (docker build && docker push)
  • Any deploy scripts

Recent churn:

git log --oneline -30
git diff --stat HEAD~10..HEAD 2>/dev/null | grep -E "Dockerfile|\.yml|package\.json|turbo|next\.config|pyproject" | head -20

Summarize the current build → deploy path in a short paragraph and note where time is likely spent (e.g., "installs ~800 deps on every CI run, no cache configured").

Read the full file on GitHub · 167 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 First seen · 167 lines · 20 tokens per session scan A c0549aac4d95

Subscribe to this mod's changes

build-optimization is a command published in the GitHub repository alifanov/darkflow (4 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,886 once invoked, about $0.0001 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-08-31.