agent-creator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Agent Creator

Agent Creator

This skill provides a structured process for designing and configuring specialized AI Agents.
本技能提供了设计和配置专用AI Agent的结构化流程。

When to Use

适用场景

Use this skill when you need to:
  1. Create a New Agent: Define a purpose-built agent with specific expertise (e.g., "Make a Frontend Specialist Agent").
  2. Generate System Prompts: Create robust, effective system instructions for an agent.
  3. Assemble Capabilities: Select the right combination of Skills, Workflows, and Rules for a specific domain.
  4. Refine Agent Behavior: specialized tuning of an existing agent's operational guidelines.
当你需要完成以下操作时使用本技能:
  1. 创建新Agent:定义具备特定专业能力的定制化Agent(例如"制作前端专家Agent")。
  2. 生成系统提示词:为Agent创建健壮、有效的系统指令。
  3. 组装能力集:为特定领域选择技能、工作流和规则的最佳组合。
  4. 优化Agent行为:对现有Agent的运行规则进行专项调优。

Agent Architecture

Agent架构

An Agent in the Antigravity system is defined by a markdown file in
.agent/agents/{name}.md
containing:
Antigravity系统中的Agent由
.agent/agents/{name}.md
路径下的markdown文件定义,文件包含以下内容:

1. Frontmatter (Metadata)

1. Frontmatter(元数据)

  • name
    : Kebab-case identifier (e.g.,
    backend-specialist
    ).
  • description
    : Short summary and trigger keywords.
  • tools
    : List of tools the agent has access to (e.g.,
    Read, Write, Bash
    ).
  • model
    : The model usage strategy (usually
    inherit
    ).
  • skills
    : Comma-separated list of skills from
    .agent/skills/
    this agent needs.
  • name
    :Kebab-case命名格式的标识符(例如
    backend-specialist
    )。
  • description
    :简短概述和触发关键词。
  • tools
    :Agent可访问的工具列表(例如
    Read, Write, Bash
    )。
  • model
    :模型使用策略(通常为
    inherit
    )。
  • skills
    :该Agent需要的、来自
    .agent/skills/
    的技能列表,以逗号分隔。

2. Identity & Charter

2. 身份与职责

  • Role: Who the agent is.
  • Philosophy: Core beliefs driving decisions.
  • Mindset: Operational mode and priorities.
  • 角色:Agent的定位。
  • 理念:驱动决策的核心准则。
  • 思维模式:运行方式和优先级。

3. Critical Guidelines (The "Stop & Ask" Protocol)

3. 关键准则("停下询问"协议)

  • CRITICAL: CLARIFY BEFORE CODING: A mandatory section forcing the agent to ask clarifying questions before making assumptions about stack, runtime, or tools.
  • 关键规则:编码前先澄清:强制要求Agent在对技术栈、运行环境或工具做出假设前,先询问澄清问题的必填章节。

4. Decision Frameworks

4. 决策框架

  • Tables and logic guides to help the agent make technical decisions (e.g., "Node vs Python", "SQL vs NoSQL").
帮助Agent做出技术决策的表格和逻辑指南(例如"Node vs Python"、"SQL vs NoSQL")。

5. Capabilities & specialized Lists

5. 能力与专项清单

  • Expertise Areas: Deep dive into specific techs.
  • Quality Control Loop: Mandatory steps to run after every edit.
  • 专业领域:特定技术的深度能力说明。
  • 质量控制闭环:每次编辑后必须执行的步骤。

Workflow: Creating an Agent

工作流:创建Agent

Follow these steps to create a new Agent.
遵循以下步骤创建新Agent。

Step 1: Define the Goal

步骤1:定义目标

Ask the user for the Agent's primary purpose.
  • Prompt: "What is the primary goal of this agent? What domain does it specialize in?"
询问用户Agent的核心用途。
  • 提示词:"这个Agent的核心目标是什么?它专精哪个领域?"

Step 2: Select Capabilities (Skills)

步骤2:选择能力(技能)

Analyze the available Skills in
.agent/skills/
to recommend the best set to include in the
skills
frontmatter.
  • Example: A Backend Agent needs
    nodejs-best-practices
    ,
    database-design
    .
分析
.agent/skills/
中可用的技能,推荐最适合加入frontmatter的
skills
字段的技能集合。
  • 示例:后端Agent需要
    nodejs-best-practices
    database-design

Step 3: Draft the Agent Definition

步骤3:起草Agent定义

Use the Agent Template in
assets/agent_template.md
as the mandatory base.
  1. Frontmatter: Fill in name, tools, and required skills.
  2. Philosophy & Mindset: Define how the agent thinks, not just what it does.
  3. Critical Clarifications: Define what the agent MUST ask users before starting (e.g., "Which framework?", "Which DB?").
  4. Decision Frameworks: Populate tables with current best practices for the domain.
使用
assets/agent_template.md
中的Agent模板作为强制基础。
  1. Frontmatter:填写名称、工具和所需技能。
  2. 理念与思维模式:定义Agent的思考方式,而非仅说明它要做什么。
  3. 关键澄清规则:定义Agent开始工作前必须询问用户的内容(例如"使用哪个框架?"、"使用哪个数据库?")。
  4. 决策框架:填充对应领域当前最佳实践的表格。

Step 4: Save the Artifact

步骤4:保存产出物

Save the file to
.agent/agents/{name}.md
.
  • Ensure the filename matches the
    name
    in frontmatter.
将文件保存到
.agent/agents/{name}.md
  • 确保文件名与frontmatter中的
    name
    一致。

Tools & Resources

工具与资源

Agent Template

Agent模板

Use
assets/agent_template.md
to structure the agent definition. Strictly follow this structure.
使用
assets/agent_template.md
构建Agent定义。严格遵循该结构。

Best Practices for specialized Agents

专用Agent最佳实践

  • Opinionated Defaults: Agents should have strong opinions (Philosophy) but flexible execution (Clarification).
  • Mandatory Checks: Include a "Quality Control Loop" that forces the agent to validate its own work (Lint, Test, Security).
  • Anti-Patterns: Explicitly list what the agent should AVOID.
  • 预设明确的默认规则:Agent应具备明确的决策理念(Philosophy),但执行方式灵活(支持澄清询问)。
  • 强制检查机制:加入"质量控制闭环",强制Agent验证自己的产出(Lint、测试、安全检查)。
  • 反模式:明确列出Agent应该避免的行为。