Back to Skills

create-agent

pjt222
Updated 2 days ago
7 views
17
2
17
View on GitHub
Metaaidesign

About

This skill creates new agent definition files following the agent-almanac template and conventions. It guides developers through persona design, tool selection, skill assignment, and proper registry integration. Use it when adding specialized agents to the library or converting repetitive workflows into reusable, domain-specific assistants.

Quick Install

Claude Code

Recommended
Primary
npx skills add pjt222/agent-almanac -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/pjt222/agent-almanac
Git CloneAlternative
git clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/create-agent

Copy and paste this command in Claude Code to install this skill

Documentation

建新行者

定 Claude Code 之子行者,有專之志、擇之器、配之技、全之文,循行者樣與籍制。

用時

  • 為未覆之域增新專行者於籍
  • 轉反復之流或提示模式為可重用行者
  • 建域專之助,有擇技與限器
  • 析過廣行者為專職單責
  • 設團前擬新成員

  • 必要:行者之名(小寫中劃線,如 data-engineer
  • 必要:行者主志之一行述
  • 必要:志明所解之題
  • 可選:模型(默 sonnet;替 opushaiku
  • 可選:優先(默 normal;替 highlow
  • 可選:由 skills/_registry.yml 配之技集
  • 可選:所需 MCP 伺(如 r-mcptoolshf-mcp-server

第一步:設行者之人格

擇清晰專之身:

  • :小寫中劃線,明職。始以名詞或域飾:security-analystr-developertour-planner。避泛名如 helperassistant
  • :一段述此行者所解之具體題。問:「此行者為何?何行者未覆?」
  • 語調:按域。技術者宜精引證多;創意者可探;合規者宜正式具審。

行前察與現 53 行者之重:

grep -i "description:" agents/_registry.yml | grep -i "<your-domain-keywords>"

得: 無現行者覆同利基。若部分重,宜擴現者非建新。

敗則: 若現行者重甚,或擴其技集,或窄新者範以補而非重。

第二步:擇器

擇行者所需之最小器集。最小權之則施:

器集用時例行者
[Read, Grep, Glob]唯讀析、審、查code-reviewer, security-analyst, auditor
[Read, Grep, Glob, WebFetch]析兼外查senior-researcher
[Read, Write, Edit, Bash, Grep, Glob]全開發——建改碼r-developer, web-developer, devops-engineer
[Read, Write, Edit, Bash, Grep, Glob, WebFetch, WebSearch]開發兼外研polymath, shapeshifter

唯析碼者勿含 Bash。不需外查者勿含 WebFetchWebSearch

得: 器列唯含行者實用之器。

敗則: 察行者能力列——若能力不需器,刪之。

第三步:擇模型

按任務繁選:

  • sonnet(默):多行者。推理速度衡。用於開發、審、析、標準流。
  • opus:繁推、多步劃、微判。用於高級行者、架構決、需深域專者。
  • haiku:簡速應。用於直查、格、填樣者。

得: 模型合行者主用案之認知需。

敗則: 疑則用 sonnet。唯試示推理不足乃升 opus

第四步:配技

覽技籍擇行者域相關者:

# List all skills in a domain
grep -A3 "domain-name:" skills/_registry.yml

# Search for skills by keyword
grep -i "keyword" skills/_registry.yml

為前言建技列:

skills:
  - skill-id-one
  - skill-id-two
  - skill-id-three

要: 諸行者自動繼籍之 default_skillsmeditateheal)。列於前言,除其為行者法之核心(如 mysticmeditate 乃因冥想之引為其主志)。

得: 技列含 3-15 存於 skills/_registry.yml 之技 ID。

敗則: 驗每技 ID 存:grep "id: skill-name" skills/_registry.yml。刪不合者。

第五步:書行者文件

複樣填前言:

cp agents/_template.md agents/<agent-name>.md

填 YAML 前言:

---
name: agent-name
description: One to two sentences describing primary capability and domain
tools: [Read, Write, Edit, Bash, Grep, Glob]
model: sonnet
version: "1.0.0"
author: Philipp Thoss
created: YYYY-MM-DD
updated: YYYY-MM-DD
tags: [domain, specialty, relevant-keywords]
priority: normal
max_context_tokens: 200000
skills:
  - assigned-skill-one
  - assigned-skill-two
# Note: All agents inherit default skills (meditate, heal) from the registry.
# Only list them here if they are core to this agent's methodology.
# mcp_servers: []  # Uncomment and populate if MCP servers are needed
---

得: YAML 前言無訛而解。諸必要域(namedescriptiontoolsmodelversionauthor)皆存。

敗則: 驗 YAML 語法。常病:版本字串缺引號、縮進誤、器列括弧未閉。

第六步:書志與能

替樣之虛位:

Purpose:一段述此行者所解之題及所供之值。具體——名域、流、果。

Capabilities:粗體領之點列。能多則依類分組:

## Capabilities

- **Primary Capability**: What the agent does best
- **Secondary Capability**: Additional functionality
- **Tool Integration**: How it leverages its tools

Available Skills:列諸配技並簡述。用赤技 ID(斜線命令名):

## Available Skills

- `skill-id` - Brief description of what the skill does

得: 志具體(非「助開發」),能力具體可驗,技列合前言。

敗則: 若志感泛,答:「用者會請此行者作何具體事?」以答為志。

第七步:書用案與例

供 2-3 用案,示如何呼行者:

### Scenario 1: Primary Use Case
Brief description of the main scenario.

> "Use the agent-name agent to [specific task]."

### Scenario 2: Alternative Use Case
Description of another common use case.

> "Spawn the agent-name to [different task]."

增 1-2 具體例,示用者請求與期行:

### Example 1: Basic Usage
**User**: [Specific request]
**Agent**: [Expected response pattern and actions taken]

得: 案實,例示實值,呼式合 Claude Code 慣。

敗則: 心試諸例——行者能以其器技實現乎?

第八步:書限與參

Limitations:3-5 誠實之限。行者不能為、不宜用、或果劣之處:

## Limitations

- Cannot execute code in language X (no runtime available)
- Not suitable for tasks requiring Y — use Z agent instead
- Requires MCP server ABC to be running for full functionality

See Also:交叉引補行者、相關指南、相關團:

## See Also

- [complementary-agent](complementary-agent.md) - handles the X side of this workflow
- [relevant-guide](../guides/guide-name.md) - background knowledge for this domain
- [relevant-team](../teams/team-name.md) - team that includes this agent

得: 限誠實具體。參引現文件。

敗則: 察引文件存:ls agents/complementary-agent.md

第九步:入籍

agents/_registry.yml 按字母位增新行者:

  - id: agent-name
    path: agents/agent-name.md
    description: Same one-line description from frontmatter
    tags: [domain, specialty]
    priority: normal
    tools: [Read, Write, Edit, Bash, Grep, Glob]
    skills:
      - skill-id-one
      - skill-id-two

增頂之 total_agents 計。

得: 籍項合行者文件前言。total_agents 等實項數。

敗則:grep -c "^ - id:" agents/_registry.yml 計之,驗合 total_agents

第十步:驗發現

Claude Code 由 .claude/agents/ 發現行者。此庫該目錄為 agents/ 之符號鏈:

# Verify the symlink exists and resolves
ls -la .claude/agents/
readlink -f .claude/agents/<agent-name>.md

.claude/agents/ 鏈完,無他須為——新行者自動可發現。

運 README 自動更以更行者 README:

npm run update-readmes

得: .claude/agents/<agent-name>.md 解至新行者文件。agents/README.md 含新行者。

敗則: 若鏈斷,重建:ln -sf ../agents .claude/agents。若 npm run update-readmes 敗,察 scripts/generate-readmes.js 存且 js-yaml 已裝。

第十一步:搭翻譯之架

諸行者必需。 此步施於人作者與循此法之 AI 行者。勿略——缺翻譯積為陳積。

提交新行者後即時為四支持語搭翻譯文件:

for locale in de zh-CN ja es; do
  npm run translate:scaffold -- agents <agent-name> "$locale"
done

而後譯各文件之散文(代碼塊與 ID 留英)。終重生狀態文件:

npm run translation:status

得: 四文件建於 i18n/{de,zh-CN,ja,es}/agents/<agent-name>.mdsource_commit 皆合當前 HEAD。npm run validate:translations 顯新行者無陳警。

敗則: 若搭架敗,驗行者存於 agents/_registry.yml。若狀態文件不更,明運 npm run translation:status——CI 不自動觸之。

  • 行者文件存於 agents/<agent-name>.md
  • YAML 前言無訛而解
  • 諸必要域皆存:namedescriptiontoolsmodelversionauthor
  • name 合文件名(無 .md
  • 諸節皆存:Purpose、Capabilities、Available Skills、Usage Scenarios、Examples、Limitations、See Also
  • 前言之技存於 skills/_registry.yml
  • 默技(meditateheal)未列,除非行者法之核心
  • 器列循最小權之則
  • 行者列於 agents/_registry.yml,路與元資料相合
  • 籍之 total_agents 計已更
  • .claude/agents/ 符號鏈解至新行者文件
  • 與現行者無顯重

  • 器過配:僅需讀析者卻含 BashWriteWebFetch。違最小權,或致意外副作用。始於最小集,唯能需時增器。
  • 缺或誤技配:列不存於籍之技 ID,或忘配技。增前皆以 grep "id: skill-name" skills/_registry.yml 驗各 ID。
  • 無謂列默技:於前言加 meditateheal 而其已由籍繼。唯為行者法之核心(如 mysticalchemistgardenershaman)乃列。
  • 與現者範圍重:建新行者而其能已覆於 53 現行者之一。先搜籍,考擴現者之技而非重。
  • 志能泛:書「助開發」而非「建 R 包,含全構、文、CI/CD 設」。具體乃行者有用可發現之由。

  • create-skill — 建 SKILL.md 文件之平行法,非行者文件
  • create-team — 組多行者為協團(劃中)
  • commit-changes — 提交新行者文件與籍更

GitHub Repository

pjt222/agent-almanac
Path: i18n/wenyan/skills/create-agent
0
agentsagentskillsai-assisted-developmentclaude-codeskillsteams

Related Skills

content-collections

Meta

This skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.

View skill

polymarket

Meta

This skill enables developers to build applications with the Polymarket prediction markets platform, including API integration for trading and market data. It also provides real-time data streaming via WebSocket to monitor live trades and market activity. Use it for implementing trading strategies or creating tools that process live market updates.

View skill

creating-opencode-plugins

Meta

This skill helps developers create OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It provides the plugin structure, event API specifications, and implementation patterns for JavaScript/TypeScript modules. Use it when you need to intercept, monitor, or extend the OpenCode AI assistant's lifecycle with custom event-driven logic.

View skill

sglang

Meta

SGLang is a high-performance LLM serving framework that specializes in fast, structured generation for JSON, regex, and agentic workflows using its RadixAttention prefix caching. It delivers significantly faster inference, especially for tasks with repeated prefixes, making it ideal for complex, structured outputs and multi-turn conversations. Choose SGLang over alternatives like vLLM when you need constrained decoding or are building applications with extensive prefix sharing.

View skill