speculative-build

speculative-build is a skill for Claude Code from bdfinst/agentic-dev-team. It costs 51 tokens per session (5,331 once invoked), scanned A, original, MIT.

An internal build procedure that creates several independent versions of one complex build step, compares them, and merges the selected version. It is triggered only through the specified build command and is not meant to be run directly.

In plain words
What is it for?
Use it as part of a build run with the candidates option when you want independent implementations screened and ranked before one is merged.
Why use it?
Trying multiple implementations can help choose between alternatives for a complex change, while keeping each attempt isolated in its own worktree, a separate working copy of the repository.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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 dev-team plugin — 102 skills, 56 agents, 4 hooks shipped together

Good fit Use it as part of a build run with the candidates option when you want independent implementations screened and ranked before one is merged.

Compare 6 skills 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 bdfinst/agentic-dev-team
Claude Code
/plugin install dev-team

Made for: Claude Code.

Or install dev-team, the plugin that ships this one along with the rest of its 102 skills, 56 agents, 4 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/speculative-build/github.svg)](https://agentmods.dev/skills/bdfinst/agentic-dev-team/speculative-build)
Your own site
<a href="https://agentmods.dev/skills/bdfinst/agentic-dev-team/speculative-build"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/speculative-build/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 speculative-build

Your own site · 80×15
<a href="https://agentmods.dev/skills/bdfinst/agentic-dev-team/speculative-build"><img src="https://agentmods.dev/badge/skills/bdfinst/agentic-dev-team/speculative-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,331 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.00051 $0.05331
Opus 5.5 $0.00020 $0.02132
Sonnet 5.5 $0.00010 $0.01066
Haiku 4.5 $0.00005 $0.00533

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

Security

Grade A, and why

speculative-build 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 25d 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/dev-team/skills/speculative-build/SKILL.md · 402 lines

How it starts

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

Speculative build

Role: orchestrator. This procedure implements one complex step N times, ranks the candidates with scripts, and merges the winner. /build --candidates N is the only entry point. The flag is experimental.

Preconditions

/build runs these checks before it follows this skill:

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/build_candidates.py" validate-flags --candidates='<raw>' --max-cost-usd='<raw>' --jobs='<raw>'
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/build_worktree_baseref.py" detect

Pass only the flags the user gave to /build; omit the others, as /build does.

This skill assumes four results:

  • validate-flags exited 0 and printed "speculative": true.
  • /build located the session transcript, the way skills/cost-report/SKILL.md does.
  • build_worktree_baseref.py detect printed head for worktree.baseRef.
  • /build holds the Agent (or Task) tool.

If the Agent (or Task) tool is missing, halt before batch 1. Give the report that /build's Orchestrator constraints prescribe.

If any other result is missing, halt with this message:

speculative dispatch requires a session transcript, worktree.baseRef = head and validated flags; run /build, not this skill

This skill halts when you invoke it outside /build.

A Preconditions halt writes no record and prints only its own message.

Base and batches

Run the step as a loop of batches. The sections below detail each part. For each batch:

  1. Read prev from the cost meter.
  2. Hash the plan file, dispatch the batch, then hash it again. Halt if the hashes differ.
  3. Read now. Compute delta = now - prev. Add delta to spent.
  4. Run the suite in each candidate worktree.
  5. Screen each candidate, then run collect.
  6. Run project, then dispatch the next batch. After the last batch, go to Rank.

These placeholders recur in templates and commands:

  • <X> is the cap from --max-cost-usd.
  • <P> is the projected total that project prints.
  • <b> is the batch number.
  • <ks> lists the earlier attempt numbers.

Read the full file on GitHub · 402 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. 25d ago First seen · 402 lines · 51 tokens per session scan A f39e2061fac7

Subscribe to this mod's changes

speculative-build is a skill published in the GitHub repository bdfinst/agentic-dev-team (312 stars, last pushed today), licensed MIT. It adds 51 tokens to every session and 5,331 once invoked, about $0.0002 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-11-07.

Related

speculative-build compared with skills from other repositories

speculative-build next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
speculative-buildbdfinst/agentic-dev-teamSkill312todayMITA51Claude Code
merge-batchdiegosouzapw/OmniRouteSkill91k3d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15kyesterdayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1kyesterdayMITA51Claude Code
comet-githubrpamis/cometSkill3.3kyesterdayMITA72Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.5kyesterdayMITA51Claude Code, Codex