# Create Command

Create new commands for the code-forge application.

- Repository: https://github.com/tailcallhq/forgecode (7636 stars)
- Category: Testing
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add tailcallhq/forgecode --skill create-command -g -a claude-code -y`
Codex: `npx skills add tailcallhq/forgecode --skill create-command -g -a codex -y`
Cursor: `npx skills add tailcallhq/forgecode --skill create-command -g -a cursor -y`
Gemini CLI: `npx skills add tailcallhq/forgecode --skill create-command -g -a gemini-cli -y`

## Description

Create new commands for the code-forge application. Commands are stored as .md files in the <cwd>/.forge/commands directory with YAML frontmatter (name, description) and markdown body containing command steps. Use when users need to add new commands, modify existing commands, or understand the command file structure. Supports special command tags like <lint> and <test> for automated workflows.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Create Commands

Create and manage commands for the code-forge application. Commands are modular workflows that can be invoked to perform specific tasks.

## File Location

**CRITICAL**: All command files must be created in the `<cwd>/.forge/commands` directory, where `<cwd>` is the current working directory of your code-forge project.

- **Directory**: `<cwd>/.forge/commands`
- **File format**: `{command-name}.md`
- **Example**: If your project is at `/home/user/my-project`, commands go in `/home/user/my-project/.forge/commands/`

This is the only location where forge will discover and load custom commands.

## Command File Structure

Every command file must have:

1. **YAML Frontmatter** (required):
   - `name`: Command identifier (use hyphens for multi-word names)
   - `description`: What the command does

2. **Command Body** (required):
   - List of steps to execute
   - Special tags for automated workflows
   - Clear instructions for each step

### Example Command File

```markdown
---
name: check
description: Checks if the code is ready to be committed
---

- Run the `lint` and `test` commands and verify if everything is fine.
  <lint>cargo +nightly fmt --all; cargo +nightly clippy --fix --allow-staged --allow-dirty --workspace</lint>
  <test>cargo insta test --accept --unreferenced=delete</test>
- Fix every issue found in the process
```

### Complete Sample Command

This sample demonstrates all three tag types:

```markdown
---
name: sample-command
description: Sample command demonstrating the command file structure
---

This is a sample command that demonstrates the structure of command files.

- First step: Perform an initial action
  <lint>echo "Running linting..."</lint>
- Second step: Execute tests
  <test>echo "Running tests..."</test>
- Third step: Complete the workflow
  <shell>echo "Workflow complete!"</shell>
- Final step: Verify everything worked correctly
```

## Creating a New Command

### Step 1: Determine Command Purpose

The rest: https://github.com/tailcallhq/forgecode/blob/HEAD/.forge/skills/create-command/SKILL.md
