create-command
Ce qu’il fait
Cette compétence explique comment écrire des commandes personnalisées pour l'application de code Forge. Chaque commande est un fichier markdown avec un nom, une description et une liste d'étapes. Elle s'adresse aux personnes qui veulent des flux de travail répétables dans Forge.
Quand l’utiliser
- ✓Quand vous voulez un flux de travail répétable, comme vérifier le code avant un commit, enregistré comme commande Forge.
- ✓Quand vous voulez modifier une commande Forge existante.
- ✓Quand vous devez comprendre la structure d'un fichier de commande Forge.
Lien du skill
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-command/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Peux-tu créer une commande Forge qui lance le linter et les tests avant que je fasse un commit ?”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent écrit un fichier markdown avec un court en-tête et une liste d'étapes. Des balises spéciales marquent les étapes de lint et de test pour que Forge les lance automatiquement.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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:
YAML Frontmatter (required):
name: Command identifier (use hyphens for multi-word names)description: What the command does
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:
Questions fréquentes
Où sont enregistrées les commandes ?
Elles sont enregistrées dans un dossier commands, à l'intérieur du dossier forge du projet.
Qu'est-ce qu'une balise spéciale ?
Une balise comme lint ou test marque une étape que Forge exécute comme commande dans le projet.
Les commandes doivent-elles avoir un nom ?
Oui. L'en-tête demande un nom, et les noms de plusieurs mots utilisent des tirets.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 7.6k
- Position au classement
- #13109
- Licence
- Apache-2.0
- Mis à jour
- 01/11/2026
Commentaires
- …
Autres skills de ce dépôt
create-agent
7.6kApprend à votre agent à créer ou modifier des agents personnalisés pour l'application de code Forge, stockés en fichiers markdown avec les réglages en tête.
create-github-issue
7.6kAide votre agent à ouvrir une issue GitHub qui suit le modèle d'issue du dépôt, avec les bons champs et les bons libellés.
create-plan
7.6kAide votre agent à rédiger un plan de mise en œuvre détaillé pour une tâche complexe, avec étapes, risques et alternatives, avant toute modification du code.
github-pr-comments
7.6kAide votre agent à traiter chaque commentaire en ligne d'une demande de fusion GitHub, en appliquant les modifications demandées une à une.
Skills similaires
add-model-provider
394kPermet à votre agent de connecter un nouveau fournisseur de modèles IA à OpenClaw par des commandes sûres, sans clé en clair, puis de lancer un test.
acp-router
394kAide votre agent à envoyer une tâche à un assistant de code comme Claude Code ou Cursor via OpenClaw, afin que le travail s'exécute dans cet outil.
browser-automation
394kApprend à votre agent à piloter des pages web étape par étape, y compris les connexions, les onglets et la reprise lorsqu'une page ne répond plus.