debug-cli

Diagnose and fix Forge CLI issues using a repeatable cargo build debugging workflow.

7.5k|1.4k|Updated Dec 8, 2024
One-click install
npx skills add https://github.com/antinomyhq/forge --skill debug-cli-antinomyhq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-cli
Source: https://github.com/antinomyhq/forge/tree/main/.forge/skills/debug-cli
Command: npx skills add https://github.com/antinomyhq/forge --skill debug-cli-antinomyhq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cargo, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a structured workflow for debugging, modifying, or extending the code-forge application's command-line interface (CLI). It helps developers reproduce issues, test changes, and ensure CLI reliability across commands and options.

Core Features & Use Cases

  • Systematic debugging workflow: Step-by-step process to build, test, and verify CLI changes.
  • CLI testing patterns: Quick ways to validate help output, argument parsing, and subcommands.
  • Non-destructive debugging: Guidelines to avoid committing changes during debugging and to clone conversations when debugging prompts or conversations.

Quick Start

Start Forge in debug mode and follow the workflow:

  • Build the project: cargo build
  • Run the CLI help to see current commands: ./target/debug/forge --help
  • Test a task with the -p flag: ./target/debug/forge -p "describe a CLI bug or feature"
  • Inspect subcommand help: ./target/debug/forge list --help

Frequently Asked Questions about debug-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug and test CLI argument parsing in a local Rust build?

Test CLI argument parsing by building in debug mode with cargo build, then running the compiled binary with --help to inspect command outputs and verify subcommands. This systematic workflow ensures argument changes are validated locally without committing code.

What is the best way to diagnose runtime issues in Forge CLI commands?

Diagnose Forge CLI runtime issues by following a structured debugging workflow: build in debug mode, inspect subcommand help outputs, and test tasks using the -p flag. This isolates runtime behavior problems across local builds and development environments.

Do I need cargo to run the Forge CLI debugging workflow?

Yes, cargo is required as a dependency to build the project in debug mode using cargo build. The debugging workflow depends on compiling the Rust project locally to inspect CLI commands and test runtime behavior.

Can I test CLI changes locally without committing them to the repository?

Yes, you can test CLI changes non-destructively by building in debug mode and running tasks with the -p flag. This allows you to validate argument parsing and command behavior locally without committing code changes to version control.

Why should I inspect --help output when debugging CLI subcommands?

Inspecting --help output reveals the current command structure, available subcommands, and argument parsing rules. It helps verify that CLI changes are correctly registered and formatted before testing runtime behavior with specific tasks.

What are the limitations of testing CLI behavior with the -p flag?

The -p flag tests tasks without committing changes, but it focuses on runtime CLI behavior and argument parsing. It does not replace integration testing across full deployment environments, though it supports debugging across local builds and development setups.