Skip to content

feat: add batch-wizard skill for guided batch job creation#38

Open
mtibbits wants to merge 9 commits into
JCSnap:mainfrom
mtibbits:feat/batch-wizard-skill
Open

feat: add batch-wizard skill for guided batch job creation#38
mtibbits wants to merge 9 commits into
JCSnap:mainfrom
mtibbits:feat/batch-wizard-skill

Conversation

@mtibbits

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new batch-wizard skill (skills/batch-wizard/SKILL.md) that provides a 10-phase guided workflow for designing and generating batch queue jobs
  • Phases cover: scoping, target discovery, prompt design, template variables, CSV generation, priority config, dry-run generation, red-team review, token efficiency optimization, and launch
  • Includes a visual progress tracker ([x]/-->/[ ]) printed at each phase transition so the user always knows where they are and what's coming
  • Red-team phase (8) reviews prompts for scope drift, hidden assumptions, parallelism concerns, and idempotency risks
  • Token efficiency phase (9) reviews context files, prompt verbosity, model selection, and output scope before committing compute

Test plan

  • Install skill and invoke with "batch wizard" trigger phrase
  • Walk through all 10 phases with a real project to verify flow
  • Verify progress tracker renders correctly at each phase transition
  • Test flexible entry: start with an existing template and confirm it picks up at the right phase
  • Test Phase 8 loop-back: make a change during red-team review and confirm dry-run re-executes
  • Verify generated jobs match expected claude-queue batch generate output

🤖 Generated with Claude Code

mtibbits and others added 9 commits March 15, 2026 13:24
Covers _cleanup_rate_limit_artifacts() and _do_cleanup_rate_limit_artifacts()
from PR JCSnap#32. Uses tmp_path-based fake ~/.claude/ directories with
Path.home() patched — no real filesystem state touched.

Tests (CLN-001 through CLN-023):
- Deletion of all four artifact types (JSONL, todo, debug, telemetry)
- Preservation of old, large, non-empty, and uncorrelated files
- Cleanup only triggered on rate-limit results (not success/failure)
- Missing directories, per-file OSError isolation, top-level exception safety
- Resolved working directory stashing, YAML non-persistence, fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
After each job completes during `claude-queue start`, print duration and
token usage (input + output) extracted from Claude Code's JSONL conversation
logs. Detailed cache breakdowns are persisted in the prompt's execution log.

Uses the existing JSONL files under ~/.claude/projects/ rather than switching
to --output-format json, preserving text-mode stdout, Fix 2 rate-limit
detection, and all existing tests unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
Adds `claude-queue cleanup [--dry-run]` to remove rate-limit artifacts
from ~/.claude/. Identifies rate-limited sessions by scanning debug
transcripts for 'rate_limit_error', then deletes correlated JSONL,
todo, and telemetry files by UUID.

No claude binary needed (E3 pattern).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
Allow users to specify a Claude model ID (e.g. claude-haiku-4-5-20251001)
per queued prompt via YAML frontmatter or `claude-queue add --model`.
When set, the value is passed to the claude CLI via `--model <id>`.

- models.py: add `model: Optional[str]` field to QueuedPrompt
- storage.py: R7 type-safe coercion in parse, round-trip in write,
  include in templates and bank list output
- claude_interface.py: inject `--model` flag before positional prompt
- cli.py: add `--model/-m` to `add` subparser, display in `bank list`
- CLAUDE.md: add model field to YAML schema, --model to CLI reference
- 14 new tests across all 4 test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
Ten-phase interactive workflow that walks users through scoping,
target discovery, prompt design, variable extraction, CSV generation,
priority config, dry-run generation, adversarial red-team review,
token efficiency optimization, and launch. Includes a visual progress
tracker at each phase transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
- Move skill to src/claude_code_queue/skills/batch-wizard/ to match
  existing queue skill location and package data glob
- Update install-skill CLI to discover and install all bundled skills,
  with optional skill_name argument for selective install
- Remove invalid allowed-tools frontmatter field
- Use explicit CSV path (~/.claude-queue/bank/) instead of vague location
- Fix speculative language in Phase 8c parallelism section
- Widen time estimate in Phase 10 to ~1-3 min/job

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant