cub: Command for Claude Code

.claude/commands/cub:spec-to-issues.md

cub:spec-to-issues is a command for Claude Code from lavallee/cub. It costs 0 tokens per session (1,430 once invoked), scanned A, original, MIT.

A planning command that turns a feature specification—a written description of what to build—into epics and tasks tracked in Beads-compatible files.

In plain words
What is it for?
Use it to read a specification and create an implementation plan with one larger feature group and smaller tasks, including dependencies and labels.
Why use it?
It removes the need to manually break a feature into small, ordered pieces of work and assign their identifiers.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is lavallee/cub's own configuration. It tells Claude Code how to work on cub 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 cub configures →

View source ↗ lavallee/cub
Reuse

Borrowing it

Nothing to install: this file belongs to lavallee/cub. 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/lavallee/cub/main/.claude/commands/cub:spec-to-issues.md
Clone the repo
git clone --depth 1 https://github.com/lavallee/cub

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 cub:spec-to-issues

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/lavallee/cub/cub-spec-to-issues"><img src="https://agentmods.dev/badge/commands/lavallee/cub/cub-spec-to-issues.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,430 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.00000 $0.01430
Opus 5 $0.00000 $0.00715
Sonnet 5 $0.00000 $0.00286
Haiku 4.5 $0.00000 $0.00143

Measured 8d ago against content hash 84d57acad381, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

cub:spec-to-issues 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 8d 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.

.claude/commands/cub:spec-to-issues.md · 150 lines

How it starts

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

Spec to Issues: Generate Tasks from Feature Spec

You are a Planning Agent. Your job is to read a feature specification and generate a set of beads-compatible issues (epics and tasks) for implementation.

Input

You will receive input in this format:

SPEC_FILE: path/to/spec.md
OUTPUT_PATH: path/to/output/plan.jsonl
FEATURE_SLUG: feature-slug
PREFIX: cub
NEXT_EPIC_NUM: N
NEXT_TASK_NUM: M

Instructions

Step 1: Read the Spec

Read the spec file at SPEC_FILE. Understand:

  • What feature is being built
  • The goals and non-goals
  • The CLI interface (if any)
  • The implementation notes
  • Any success criteria

Step 2: Plan the Work

Break down the spec into implementable work:

One Epic for the feature itself (unless the spec explicitly defines multiple phases).

Tasks should be:

  • Atomic: One clear objective per task
  • Right-sized: 15-30 minutes for simple tasks, 1-2 hours max for complex ones
  • Ordered: Dependencies explicit
  • Labeled: Model complexity, feature slug

Step 3: Determine IDs

Use the provided NEXT_EPIC_NUM and NEXT_TASK_NUM to assign IDs:

  • Epic: {PREFIX}-E{NEXT_EPIC_NUM} (zero-padded to 2 digits)
  • Tasks: {PREFIX}-{NEXT_TASK_NUM}, {PREFIX}-{NEXT_TASK_NUM+1}, etc. (zero-padded to 3 digits)

CRITICAL: Never reuse IDs. Always start from the provided next numbers.

Step 4: Assign Labels

Every issue MUST have these labels:

  • feature:{FEATURE_SLUG} - Links to the feature
  • model:opus|sonnet|haiku - Recommended model based on complexity
  • complexity:high|medium|low - Task complexity

Model Selection:

  • model:opus - Complex architectural decisions, novel problems, security-sensitive
  • model:sonnet - Standard implementation, clear patterns, moderate complexity
  • model:haiku - Boilerplate, simple changes, configuration, docs

Step 5: Generate JSONL

Write to OUTPUT_PATH with one JSON object per line.

Epic Schema:

{
  "id": "{PREFIX}-E{NN}",
  "title": "Feature: {Feature Name}",
  "description": "# Epic: {Feature Name}\n\n## Overview\n{description}\n\n## Goals\n{goals}\n\n## Success Criteria\n{criteria}",
  "status": "open",
  "priority": 1,
  "issue_type": "epic",
  "labels": ["feature:{FEATURE_SLUG}"],
  "dependencies": []
}

Read the full file on GitHub · 150 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. 8d ago First seen · 150 lines · 0 tokens per session scan A 84d57acad381

Subscribe to this mod's changes

cub:spec-to-issues is a command published in the GitHub repository lavallee/cub (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,430 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.