Skip to content

CLI Debug Workflow

Guides an agent to build, test, and debug the forge CLI using debug builds, help output, and cloned conversations.

Stars
7,638
Licence
Apache-2.0
Files
3 files

What it does

When installed, the agent follows a fixed workflow for changing and checking the forge command-line tool: build in debug mode with cargo, read the latest --help output, run test tasks with the -p flag, and dump or clone saved conversations so bugs can be reproduced without touching the originals. It also includes a smoke-test script that runs the build and several help and conversation-list commands in sequence.

Great for

  • Contributors to the forge codebase who add or fix CLI commands or options
  • Developers reproducing a bug reported in a saved forge conversation
  • Maintainers who want a repeatable smoke test after CLI changes

Skip it if

  • People who only use forge and are not editing its code, since the steps assume a local Rust project and build
  • Running scripts/test_cli.sh on an unfamiliar machine or checkout, because it executes cargo build and the forge binary and is not reviewed here for side effects beyond what the script shows

Try asking

  • “Add a new --verbose-style option to forge and check that it shows up in --help”
  • “Reproduce a bug from conversation ID abc123 by cloning it and running a test prompt”
  • “Dump a conversation to HTML so I can read through what the agent did”
  • “Run the CLI smoke test script after my changes”
Step-by-step guide: how to use CLI Debug WorkflowInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the Apache-2.0 licence and an attribution note.

    debug-cli.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip debug-cli.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip debug-cli.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Run the debug build from the project root so the relative ./target/debug/forge path works
  • Clone a conversation before reproducing a bug and keep the original unchanged
  • Review scripts/test_cli.sh before running it, since it executes the built binary and forge -p tasks may call external models

What's inside

  • scripts/README.md
  • scripts/test_cli.sh
  • SKILL.md

Redistributed unmodified from tailcallhq/forgecode under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.