speckit.extract

speckit.extract is a command for Codex from opsmill/infrahub-mcp. It costs 16 tokens per session (1,397 once invoked), scanned A, original, Apache-2.0.

A command that takes completed feature specifications and records their important decisions, shared knowledge, and development guidelines in project documentation. ADRs are short records of significant technical decisions.

In plain words
What is it for?
Use it to review completed specifications and update the project's architecture decisions, knowledge notes, and development guidelines.
Why use it?
It prevents useful decisions and lessons from being lost after a feature is finished, while reducing duplicate documentation.

Command for Codex

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 commands/opsmill/infrahub-mcp/speckit.extract
Clone the repo
git clone --depth 1 https://github.com/opsmill/infrahub-mcp

Made for: Codex.

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 speckit.extract

README.md
[![agentmods](https://agentmods.dev/badge/commands/opsmill/infrahub-mcp/speckit.extract.svg)](https://agentmods.dev/commands/opsmill/infrahub-mcp/speckit.extract)
Your own site
<a href="https://agentmods.dev/commands/opsmill/infrahub-mcp/speckit.extract"><img src="https://agentmods.dev/badge/commands/opsmill/infrahub-mcp/speckit.extract.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 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,397 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.1 $0.00016 $0.01397
Opus 5 $0.00008 $0.00698
Sonnet 5 $0.00003 $0.00279
Haiku 4.5 $0.00002 $0.00140

Measured 5d ago against content hash ee67e32e6abd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

speckit.extract 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 5d 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.

.agents/commands/speckit.extract.md · 206 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Outline

  1. Phase 0: Setup & Validation
  2. Phase 1: Analysis & Classification
  3. Phase 2: Interactive Review
  4. Phase 3: Write Extractions
  5. Phase 4: Cleanup & Report

Phase 0: Setup & Validation

  1. Determine target spec(s):

    • If user provided a spec name: locate it in .specify/ or specs/
    • If no argument: scan for specs with status implemented or completed
    • If no completed specs found: report and exit
  2. For each target spec, read:

    • spec.md (the specification)
    • research.md (if exists — research notes from implementation)
    • plan.md (if exists — implementation plan)
    • tasks.md (if exists — task breakdown)
  3. Read existing documentation to avoid duplicates:

    • dev/adr/ — existing ADR files
    • dev/knowledge/ — existing knowledge docs
    • dev/guidelines/ — existing guideline docs
  4. Determine next ADR number from existing files in dev/adr/.

Phase 1: Analysis & Classification

Step 1: Extract ADR candidates

Parse the spec and research files. For each significant decision:

  1. Extract: Decision, Rationale, Alternatives considered, Implementation pattern
  2. Determine if ADR-worthy:
    • ADR-worthy: Affects system structure, API contracts, middleware composition, MCP protocol behavior, authentication patterns, or establishes a pattern used across multiple components
    • Not ADR-worthy: One-off implementation detail with no broader implications
  3. Draft an ADR title (concise, decision-focused)

Step 2: Extract knowledge candidates

Identify content that documents how the system works:

  • New architectural patterns or components
  • Request/response flows
  • Integration points with Infrahub SDK
  • Middleware behavior changes

Determine target file: new doc in dev/knowledge/ or update to existing dev/knowledge/architecture.md.

Step 3: Extract guideline candidates

Identify content that prescribes how code should be written:

Read the full file on GitHub · 206 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. 5d ago First seen · 206 lines · 16 tokens per session scan A ee67e32e6abd

Subscribe to this mod's changes

speckit.extract is a command published in the GitHub repository opsmill/infrahub-mcp (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 16 tokens to every session and 1,397 once invoked, about $0.0001 per session on Opus 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.