docs

A reference for the SpecLeft command-line workflow, a tool for managing feature specifications and their tests. It covers validation, progress checks, coverage, and safe command use.

In plain words
What is it for?
Use it to validate or list features, add specifications, check coverage and status, verify skills, and run the project tests.
Why use it?
It provides repeatable checks and explains how to avoid overwriting files or misreading command results.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/specleft/specleft/docs
Any agent
npx skills add SpecLeft/specleft --skill docs
Clone the repo
git clone --depth 1 https://github.com/SpecLeft/specleft

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 980 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00980
Opus 5 $0.00000 $0.00490
Sonnet 5 $0.00000 $0.00196
Haiku 4.5 $0.00000 $0.00098

Measured yesterday against content hash da7b607179f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs 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 yesterday.

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.

docs/SKILL.md · 115 lines

How it starts

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

SpecLeft CLI Reference

Setup

export SPECLEFT_COMPACT=1 All commands below run in compact mode.

Workflow

  1. specleft next --limit 1
  2. Implement test logic
  3. specleft features validate
  4. specleft skill verify
  5. pytest
  6. Repeat

Quick checks

  • Validation: check exit code first, parse JSON only on failure
  • Coverage: specleft coverage --threshold 100 and check exit code
  • Status: specleft status for progress snapshots

Safety

  • Always --dry-run before writing files
  • Never use --force unless explicitly requested
  • Exit codes: 0 = success, 1 = error, 2 = cancelled
  • Commands are deterministic and safe to retry

Features

Validate specs

specleft features validate --format json [--dir PATH] [--strict] Validate before generating tests. --strict treats warnings as errors.

List features

specleft features list --format json [--dir PATH]

Show stats

specleft features stats --format json [--dir PATH] [--tests-dir PATH]

Add a feature

specleft features add --format json --id FEATURE_ID --title "Title" [--priority PRIORITY] [--description TEXT] [--dir PATH] [--dry-run] Creates <features-dir>/feature-id.md. Never overwrites existing files. Use --interactive for guided prompts (TTY only).

Add a scenario

specleft features add-scenario --format json --feature FEATURE_ID --title "Title" [--id SCENARIO_ID] [--step "Given ..."] [--step "When ..."] [--step "Then ..."] [--priority PRIORITY] [--tags "tag1,tag2"] [--dir PATH] [--tests-dir PATH] [--dry-run] [--add-test MODE] [--preview-test] Appends to feature file. --add-test generates a test file. --preview-test shows test content without writing. Use --interactive for guided prompts (TTY only).

Status and Planning

Show status

specleft status --format json [--dir PATH] [--feature ID] [--story ID] [--unimplemented] [--implemented]

Next scenario to implement

specleft next --format json [--dir PATH] [--limit N] [--priority PRIORITY] [--feature ID] [--story ID]

Read the full file on GitHub · 115 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 115 lines · 0 tokens per session scan A da7b607179f9

Subscribe to this mod's changes

docs is a skill published in the GitHub repository SpecLeft/specleft (3 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 980 tokens. 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.