Skip to content

Guide · Agent skill

How to use the CLI Debug Workflow agent skill (debug-cli)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The debug-cli skill is a set of instructions that teaches an AI agent a fixed workflow for changing and checking the forge command-line tool from the code-forge project. It is written for people who are editing the forge codebase, such as contributors adding or fixing CLI commands, developers reproducing a bug from a saved conversation, and maintainers who want a repeatable smoke test. After this guide you will know what the skill does, how to install it, how to trigger it with plain requests, and what it needs before it can run.

CLI Debug Workflowtailcallhq/forgecode · Apache-2.0

Quick start

  1. 1Get the skill. Download the debug-cli ZIP from this page and unzip it.
  2. 2Place the folder. Copy debug-cli into ~/.claude/skills/ for personal use, or into your project's .claude/skills/ folder. Alternatively, upload it under Settings → Capabilities → Skills in the Claude apps.
  3. 3Check the forge checkout. Make sure you have a local forge repository with cargo installed.
  4. 4Build the binary. Run cargo build from the project root so ./target/debug/forge exists.
  5. 5Ask for a change or bug fix. Describe the CLI task in plain language, mentioning the conversation ID if there is one.
  6. 6Verify with help and -p tests. Let the agent check --help output and run -p tasks, then review the output yourself.
  7. 7Run the smoke test if needed. Read scripts/test_cli.sh, then run ./scripts/test_cli.sh in a checkout you control.

What the debug-cli skill makes the agent do

An agent skill is a folder with a SKILL.md file that the agent reads when a request matches the skill's description. The debug-cli skill matches requests about debugging, modifying or extending the forge CLI's commands, argument parsing or CLI behavior.

Once active, the skill tells the agent to follow a set of core principles: check the latest --help output before testing, test by giving forge tasks with the -p flag, never commit changes during debugging, and clone a source conversation before reproducing a conversation bug.

  • Build in debug mode with cargo build (the skill says not to use --release for debugging).
  • Read ./target/debug/forge --help and the help for specific commands and subcommands.
  • Run test tasks with ./target/debug/forge -p "...".
  • Dump conversations to JSON or HTML, or clone them, so the original is never modified.
  • Run scripts/test_cli.sh as a smoke test.

Install the debug-cli skill

Download the skill ZIP from this page and unzip it. To make the skill available to Claude Code for your user account, place the debug-cli folder in ~/.claude/skills/. To make it available only inside one project, place it in that project's .claude/skills/ folder.

In the Claude apps, you can instead upload the skill under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/debug-cli/
  • Project install: <your-project>/.claude/skills/debug-cli/
  • Claude apps: Settings → Capabilities → Skills, then upload the skill.

Trigger the skill with natural requests

You do not need a special command to start the skill. Describe the CLI work in plain language and the agent will load the skill when your request matches its description. The description covers adding new commands, fixing CLI bugs, updating command options and troubleshooting CLI-related issues.

Mention the forge repository and the bug or change so the agent knows which project and conversation to work with. Include a conversation ID if one exists.

  • "Add a --dry-run option to the forge export command and check its help output."
  • "Reproduce the bug in conversation <id> without changing the original."
  • "Run the CLI smoke test after my argument parsing change."
  • "Why does forge show the wrong help text for the new subcommand?"

Example workflows

For a reported bug in a saved conversation, the skill's workflow is to clone the conversation first, build, then reproduce against the clone. Cloning gives you a new conversation ID, so the original stays intact and you can repeat the test or verify a fix on a fresh clone.

To inspect prompts, the skill dumps a conversation to JSON and can pipe it through jq. The source's example filters messages to show role and content. jq is optional and only used in that example.

  • Clone: ./target/debug/forge conversation clone <source-conversation-id>
  • Reproduce: ./target/debug/forge --conversation-id <new-cloned-id> -p "reproduce the issue"
  • Dump JSON: ./target/debug/forge conversation dump <id> (creates a timestamped .json file)
  • Dump HTML: ./target/debug/forge conversation dump --html <id> (creates a timestamped .html file)
./target/debug/forge conversation clone <source-conversation-id> ./target/debug/forge --conversation-id <new-cloned-id> -p "reproduce the issue"

What you need before running it

The skill assumes a local checkout of the forge repository with a Rust toolchain that includes cargo, and a built ./target/debug/forge binary. Run commands from the project root because the skill uses relative paths. Bash is needed for scripts/test_cli.sh.

forge also needs its own working configuration and any model or API credentials to run -p tasks. The skill files do not specify what those are, so check the forge project's own setup.

  • Rust toolchain with cargo
  • A local forge repository checkout with a built ./target/debug/forge
  • Bash (for scripts/test_cli.sh)
  • jq (optional, used in one prompt-debugging example)
  • Working forge configuration and any credentials forge needs for -p tasks

Safety notes: scripts and network access

This skill runs scripts and uses the network. scripts/test_cli.sh builds the CLI with cargo build and then runs the forge binary with several help and conversation-list commands. Read the script before running it on a machine or checkout you do not know well. The skill files do not review side effects beyond what the script shows.

The skill also says never to commit changes. Keep that rule in mind when the agent edits code, and review diffs yourself before any commit.

  • Read scripts/test_cli.sh before running it.
  • Run it in a checkout you control, not on an unfamiliar machine.
  • Running -p tasks may call models or APIs, depending on your forge configuration.
./scripts/test_cli.sh

Tips for getting good results

The skill works best when the agent can follow its order: build, check help, test, then clone for bug work. Ask for the build and help check explicitly after each change, because the skill treats them as the first steps. When a test looks wrong, ask the agent to check exit codes with echo $? and to look at build warnings, which the skill notes often point to real issues.

  • Say which conversation ID or command you are working on.
  • Ask for --verbose output when you need more detail from a -p run.
  • Dumped files land in the current directory with timestamped names, so you do not need shell redirection.

What people use it for

  • Adding a new forge subcommand and checking that it appears in --help.
  • Reproducing a bug from a saved conversation by cloning it and testing the clone.
  • Dumping a conversation to HTML to read it more easily during a bug investigation.
  • Running a repeatable smoke test after changing argument parsing.

Frequently asked questions

Is the debug-cli skill free to use?

The skill is licensed under Apache-2.0, according to the item listing. Check the license file in the repository for the full terms before redistributing it.

Do I need to know Rust to use it?

The skill assumes a Rust toolchain with cargo and a local build of the forge binary. If you only use forge and do not edit its code, the skill is not designed for your use.

Where do I install the debug-cli skill?

Unzip the download into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, upload it under Settings → Capabilities → Skills.

Does the skill run code on my machine?

Yes. scripts/test_cli.sh runs cargo build and the forge binary, and the skill uses network access through forge's -p tasks. Read the script before running it on an unfamiliar checkout.

Why does the skill say to clone a conversation instead of editing it?

Cloning preserves the original bug evidence and lets you run several reproduction attempts or A/B tests. The skill says to never modify the original conversation.

Can I use this skill with other coding tools or without forge's source code?

The source describes a workflow for the code-forge repository only. It does not say it works with other tools or without a local forge checkout, so it is not confirmed for those cases.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use debug-cli if you are contributing to or maintaining the forge codebase and want an agent to follow a consistent build, help, test and conversation-clone routine. Skip it if you only use forge, do not have a local Rust build, or are not comfortable running an unreviewed smoke-test script.

Download the skill