klai: Command for Claude Code

.claude/commands/klai/auto.md

auto is a command for Claude Code from GetKlai/klai. It costs 58 tokens per session (3,408 once invoked), scanned A, original, MIT.

An autonomous workflow that takes an approved software specification through implementation review, database migrations, synchronisation, end-to-end tests, and optionally merging. A specification is a written description of the change to build.

In plain words
What is it for?
Use it to run an approved specification through the full delivery process, or stop before end-to-end tests or merging with the available options.
Why use it?
It combines the repeated steps after a specification is approved, reducing manual coordination across reviews, tests, migrations, and merging.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions subagents; names the AskUserQuestion tool.

This is GetKlai/klai's own configuration. It tells Claude Code how to work on klai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything klai configures →

View source ↗ GetKlai/klai
Reuse

Borrowing it

Nothing to install: this file belongs to GetKlai/klai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/GetKlai/klai/main/.claude/commands/klai/auto.md
Clone the repo
git clone --depth 1 https://github.com/GetKlai/klai

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 auto

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/getklai/klai/auto"><img src="https://agentmods.dev/badge/commands/getklai/klai/auto.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 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,408 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.00058 $0.03408
Opus 5.5 $0.00023 $0.01363
Sonnet 5.5 $0.00012 $0.00682
Haiku 4.5 $0.00006 $0.00341

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

Security

Grade A, and why

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

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Voor backend-only endpoints: test direct met curl:
.claude/commands/klai/auto.md · 370 lines

How it starts

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

/klai:auto — Klai Autonomous Pipeline

Input: $ARGUMENTS (SPEC-ID verplicht, bijv. SPEC-KB-003)

Pre-execution git context: !git branch --show-current 2>/dev/null !git status --porcelain 2>/dev/null | head -10


Doel

Voer de complete post-SPEC cyclus volledig autonoom uit. Geen menselijke goedkeuring vereist. De enige bewuste stop in de totale workflow is de SPEC-goedkeuring in de plan-fase — die heeft de gebruiker al gedaan.

Flags:

  • --no-e2e: Sla E2E tests over (bijv. als dev server niet draait)
  • --no-merge: Stop na sync + E2E, merge niet automatisch
  • --issue: Maak alleen op expliciet verzoek een gekoppeld publiek GitHub Issue
  • --review: Voeg twee menselijke goedkeuringsstops toe (na interview review + voor merge)

Volledige flow (geen --review):

run → interview-standard auto-fix → migraties → sync --pr → e2e → merge

Met --review:

run → [STOP: interview review] → migraties → sync --pr → e2e → [STOP: finale gate] → merge

Phase 0: SPEC Verificatie

Lees de SPEC in docs/specs/{SPEC-ID}/spec.md of docs/specs/{SPEC-ID}.md (of .workflow/specs/{SPEC-ID}/spec.md) om te bevestigen dat de SPEC bestaat.

Als de SPEC niet bestaat: geef een foutmelding en stop.

Bepaal:

  • spec_title: de titel van de SPEC
  • branch_name: feature/{SPEC-ID}
  • review_mode: true als --review vlag aanwezig
  • has_e2e: true tenzij --no-e2e vlag aanwezig

Phase 1: Implementatie

Implementeer de SPEC direct: lees de acceptance criteria, maak de code- en testwijzigingen, en draai de relevante test- en lintcommando's tot ze slagen.

Als er na implementatie nog test failures of build errors zijn:

  • Delegeer aan expert-debug subagent met de exacte foutmelding
  • Verifieer dat de fix de tests laat slagen
  • Herhaal tot alle tests groen zijn (max 10 iteraties)
  • Na 10 iteraties zonder succes: rapporteer wat er nog openstaat en stop

Dit is hetzelfde gedrag als tijdens normale coding — build breekt, fix, herhaal.

Read the full file on GitHub · 370 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 · 370 lines · 58 tokens per session scan A f3377e38d44e

Subscribe to this mod's changes

auto is a command published in the GitHub repository GetKlai/klai (11 stars, last pushed today), licensed MIT. It adds 58 tokens to every session and 3,408 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.