Pular para o conteúdo
Skillpedia
Agentes7,6 mil · #13109

create-command

O que ela faz

Esta skill explica como escrever comandos personalizados para o aplicativo de programação Forge. Cada comando é um arquivo markdown com um nome, uma descrição e uma lista de passos. É para quem quer fluxos de trabalho repetíveis no Forge.

Quando usar

  • ✓Quando você quer um fluxo de trabalho repetível, como verificar o código antes de um commit, salvo como um comando do Forge.
  • ✓Quando você quer alterar um comando existente do Forge.
  • ✓Quando você precisa entender a estrutura de um arquivo de comando do Forge.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-command/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Pode criar um comando no Forge que rode o linter e os testes antes de eu fazer commit?”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente escreve um arquivo markdown com um cabeçalho curto e uma lista de passos. Tags especiais marcam os passos de lint e de teste para que o Forge possa executá-los automaticamente.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

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

---
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:

---
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

Identify what the command should accomplish:

  • What task will it perform?
  • What steps are involved?
  • Are there automated checks or tests needed?
  • What should the user do with the results?

Step 2: Choose Command Name

Use verb-based names with hyphens for multi-word commands:

  • Good: check, fixme, pr-description, run-tests
  • Bad: checker, fixing, PRdescription

Step 3: Write the Command File

Create the file in the <cwd>/.forge/commands directory with the format: {command-name}.md

IMPORTANT: The file MUST be in <cwd>/.forge/commands where <cwd> is your current working directory. Commands placed anywhere else will not be discovered by forge.

Frontmatter

---
name: your-command-name
description: Clear, concise description of what this command does
---

Command Body

Use markdown lists for steps. Each step should:

  • Start with a clear action verb
  • Be specific and actionable
  • Include context about what to do

Special Command Tags

Use these tags for automated workflows:

<lint> Tag

For linting/formatting commands:

<lint>cargo +nightly fmt --all; cargo +nightly clippy --fix --allow-staged --allow-dirty --workspace</lint>

<test> Tag

For testing commands:

<test>cargo insta test --accept --unreferenced=delete</test>

<shell> Tag

For general shell commands (not linting or testing):

<shell>rm -rf target/debug</shell>

Using Tags

Tags should be placed on their own line after the step description:

- Run linting and testing
  <lint>your-lint-command</lint>
  <test>your-test-command</test>

Command Types

Simple Commands

Single-step or instruction-only commands:

---
name: fixme
description: Looks for all the fixme comments in the code and attempts to fix them
---

Find all the FIXME comments in source-code files and attempt to fix them.

Multi-Step Commands

Commands with multiple sequential steps:

---
name: pr-description
description: Updates the description of the PR
---

- I have created a Pull Request with all the accepted changes
- Understand the current PR deeply using the GH CLI and update the PR title and description
- Make sure the title follows conventional commits standard
- Top-level summary should contain 2-3 lines about the core functionality improvements

Automated Workflow Commands

Commands that include automated checks:

---
name: check
description:
Perguntas frequentes

Onde os comandos são salvos?

Eles são salvos em uma pasta commands, dentro da pasta forge do projeto.

O que é uma tag especial?

Uma tag como lint ou test marca um passo que o Forge executa como um comando no projeto.

Os comandos precisam de um nome?

Sim. O cabeçalho precisa de um nome, e nomes com mais de uma palavra usam hífens.

Detalhes

Descrição original do autor

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.

repo: tailcallhq/forgecode

Popularidade

Estrelas no GitHub
7,6 mil
Posição no ranking
#13109
Licença
Apache-2.0
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas