create-agent
Skill này làm gì
Skill này giải thích cách viết file agent tùy chỉnh cho ứng dụng lập trình Forge. Mỗi agent là một file markdown có phần đầu chứa thiết lập và phần thân chứa hướng dẫn. Skill dành cho người muốn tùy biến Forge.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một agent tùy chỉnh mới cho ứng dụng Forge.
- ✓Khi bạn cần đổi công cụ hoặc hướng dẫn của một agent hiện có.
- ✓Khi bạn muốn hiểu cấu trúc file agent của Forge.
Liên kết skill
https://github.com/tailcallhq/forgecode/blob/main/.forge/skills/create-agent/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể tạo một agent tùy chỉnh cho Forge để xem code của tôi về vấn đề phong cách không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết một file markdown có phần đầu nêu tên agent và các công cụ, rồi thêm hướng dẫn vào phần thân. File được lưu trong thư mục agents của dự án.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
{{{{raw}}}}
Create Agents
Create and manage agents for the code-forge application. Agents are specialized AI assistants with specific capabilities, tools, and behaviors.
File Location
CRITICAL: All agent files must be created in the <cwd>/.forge/agents directory, where <cwd> is the current working directory of your code-forge project.
- Directory:
<cwd>/.forge/agents - File format:
{agent-id}.md - Example: If your project is at
/home/user/my-project, agents go in/home/user/my-project/.forge/agents/
This is the only location where forge will discover and load custom agents.
Agent File Structure
Every agent file must have:
YAML Frontmatter (required):
id: Unique agent identifiertitle: Agent display namedescription: Detailed description of what the agent doesreasoning: Configuration withenabled: true/falsetools: List of tools the agent can useuser_prompt: Template for user context
Agent Body (required):
- Agent identity and purpose
- Core principles
- Capabilities
- Methodology
- Best practices
- Limitations and boundaries
Example Agent File
---
id: "forge"
title: "Perform technical development tasks"
description: "Hands-on implementation agent that executes software development tasks..."
reasoning:
enabled: true
tools:
- sem_search
- sage
- fs_search
- read
- write
- undo
- remove
- patch
- shell
- fetch
- skill
- mcp_*
user_prompt: |-
<{{event.name}}>{{event.value}}</{{event.name}}>
<system_date>{{current_date}}</system_date>
---
You are Forge, an expert software engineering assistant...
## Core Principles:
...
Complete Sample Agent
This sample demonstrates a complete agent structure:
---
id: "sample-agent"
title: "Sample agent for demonstration"
description: "A sample agent that demonstrates the complete agent file structure with all required fields and common patterns."
reasoning:
enabled: true
tools:
- sem_search
- read
- write
- shell
user_prompt: |-
<{{event.name}}>{{event.value}}</{{event.name}}>
<system_date>{{current_date}}</system_date>
---
You are Sample Agent, a demonstration agent that shows how to structure agent files.
## Core Principles:
1. **Principle 1**: Description of the first core principle
2. **Principle 2**: Description of the second core principle
3. **Principle 3**: Description of the third core principle
## Capabilities:
### Capability Category 1:
- Description of first capability
- Description of second capability
### Capability Category 2:
- Description of third capability
- Description of fourth capability
## Methodology:
### Step 1: First Step
Description of the first step in the methodology.
### Step 2: Second Step
Description of the second step in the methodology.
### Step 3: Third Step
Description of the third step in the methodology.
## Best Practices:
- Best practice 1
- Best practice 2
- Best practice 3
## Limitations and Boundaries:
This agent cannot perform certain tasks. When asked to do so, politely explain the limitations and suggest alternative approaches.
Creating a New Agent
Step 1: Determine Agent Purpose
Identify what the agent should accomplish:
- What is the agent's primary function?
- What tasks will it perform?
- What tools does it need?
- What are its limitations?
- How does it differ from existing agents?
Step 2: Choose Agent ID and Title
Use descriptive IDs and titles:
- ID: Use lowercase with hyphens for multi-word (e.g.,
code-reviewer,test-automation) - Title: Use clear, descriptive text (e.g., "Review code quality", "Automate testing")
Step 3: Write the Agent File
Create the file in the <cwd>/.forge/agents directory with the format: {agent-id}.md
IMPORTANT: The file MUST be in <cwd>/.forge/agents where <cwd> is your current working directory. Agents placed anywhere else will not be discovered by forge.
Frontmatter
---
id: "your-agent-id"
title: "Your Agent Title"
description: "Detailed description of what this agent does, its capabilities, and when to use it."
reasoning:
enabled: true
tools:
- tool1
- tool2
- tool3
user_prompt: |-
<{{event.name}}>{{event.value}}</{{event.name}}>
<system_date>{{current_date}}</system_date>
---
Agent Body
The body should include:
- Agent introduction and identity
- Core principles (typically 5-7 principles)
- Capabilities
Câu hỏi thường gặp
File agent được đặt ở đâu?
Chúng được đặt trong một thư mục tên agents, nằm trong thư mục forge của dự án.
Phần đầu phải có những gì?
Nó gồm ID của agent, tiêu đề, mô tả, thiết lập suy luận, công cụ và lời nhắc của người dùng.
Tôi có thể sửa agent hiện có không?
Có. Skill hướng dẫn cả cách chỉnh sửa file agent đã có lẫn cách tạo mới.
Chi tiết
Mô tả gốc của tác giả
Create new agents for the code-forge application. Agents are stored as .md files in the <cwd>/.forge/agents directory with YAML frontmatter (id, title, description, reasoning, tools, user_prompt) and markdown body containing agent instructions. Use when users need to add new agents, modify existing agents, or understand the agent file structure.
repo: tailcallhq/forgecode
Độ phổ biến
- Sao GitHub
- 7.6k
- Vị trí xếp hạng
- #13108
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
create-command
7.6kDạy agent của bạn tạo lệnh tái sử dụng cho ứng dụng lập trình Forge, viết dưới dạng các bước markdown chạy theo thứ tự.
create-github-issue
7.6kGiúp agent của bạn tạo issue GitHub theo đúng mẫu issue của kho lưu trữ, với các trường và nhãn phù hợp.
create-plan
7.6kGiúp agent của bạn viết một kế hoạch triển khai chi tiết cho tác vụ phức tạp, gồm các bước, rủi ro và phương án thay thế, trước khi sửa code.
github-pr-comments
7.6kGiúp agent của bạn xử lý từng bình luận nội tuyến trên pull request GitHub, thực hiện từng thay đổi được yêu cầu một cách tuần tự.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.