create-command
できること
このスキルは、Forgeのコーディングアプリ向けのカスタムコマンドの書き方を説明します。各コマンドは、名前、説明、手順の一覧を持つMarkdownファイルです。Forgeで繰り返し使えるワークフローがほしい人向けです。
使う場面
- ✓コミット前にコードを確認するなど、繰り返し使うワークフローをForgeのコマンドとして保存したいとき。
- ✓既存のForgeのコマンドを変更したいとき。
- ✓Forgeのコマンドのファイルの構造を理解したいとき。
スキルのリンク
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-command/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“コミットする前にリンターとテストを実行するForgeのコマンドを作ってもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、短いヘッダーと手順の一覧を持つMarkdownファイルを書きます。特別なタグが、リンターとテストの手順に印を付けるので、Forgeがそれらを自動で実行できます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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:
よくある質問
コマンドはどこに保存されますか?
プロジェクトのforgeフォルダーの中にあるcommandsというフォルダーに保存されます。
特別なタグとは何ですか?
lintやtestなどのタグは、Forgeがプロジェクトで実行するコマンドの手順だと示す印です。
コマンドには名前が必要ですか?
はい。ヘッダーには名前が必要で、複数の単語の名前にはハイフンを使います。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 7.6k
- ランキング
- #13109
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
create-agent
7.6kForgeのコーディングアプリ向けのカスタムエージェントを、先頭に設定があるMarkdownファイルとして作成または変更する方法をエージェントに教えます。
create-github-issue
7.6kリポジトリ独自のIssueテンプレートに従い、適切な項目とラベルを付けたGitHubのIssueを作成するようエージェントを支援します。
create-plan
7.6kコードを変更する前に、手順、リスク、代替案を含む、複雑な作業の詳しい実装計画を書くようエージェントを支援します。
github-pr-comments
7.6kGitHubのプルリクエストのインラインコメントをすべて確認し、要求された変更を1つずつ行うようエージェントを支援します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。