agent-define-skill

agent-define-skill is a skill for Claude Code, Codex from majiayu000/claude-skill-registry. It costs 23 tokens per session (3,219 once invoked), scanned A, original, MIT.

A template-driven method for defining an AI agent’s role, responsibilities, specialist skills, and collaboration needs. It takes system requirements and available skills as input and produces an agent definition.

In plain words
What is it for?
Use it when creating subagent definitions, assigning specialist roles, or planning how agents hand work to one another.
Why use it?
It helps keep agent responsibilities clear and prevents creating agents with overlapping or poorly matched duties.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it when creating subagent definitions, assigning specialist roles, or planning how agents hand work to one another.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/claude-skill-registry/agent-define-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/claude-skill-registry --skill agent-define-skill
Clone the repo
git clone --depth 1 https://github.com/majiayu000/claude-skill-registry

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-define-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/claude-skill-registry/agent-define-skill/github.svg)](https://agentmods.dev/skills/majiayu000/claude-skill-registry/agent-define-skill)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/claude-skill-registry/agent-define-skill"><img src="https://agentmods.dev/badge/skills/majiayu000/claude-skill-registry/agent-define-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-define-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/claude-skill-registry/agent-define-skill"><img src="https://agentmods.dev/badge/skills/majiayu000/claude-skill-registry/agent-define-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,219 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.03219
Opus 5 $0.00012 $0.01610
Sonnet 5 $0.00005 $0.00644
Haiku 4.5 $0.00002 $0.00322

Measured 9d ago against content hash 57211fdbc5b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

agent-define-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent/agent-define-skill/SKILL.md · 629 lines

How it starts

The opening of the file, as written. The whole thing — 629 lines — stays where its author put it; the contents beside it link to each section on GitHub.

agent-define-skill

用途: 定义 Agent(Subagent)的职责、擅长领域和配置

输入: Skills 列表、Workflows 列表、系统需求

输出: Agent 定义文件(.md)


核心原则

  1. 职责明确 - Agent 的职责要清晰
  2. 技能匹配 - Agent 擅长的 Skills 要与职责匹配
  3. 领域专精 - 每个 Agent 专注于特定领域
  4. 可协作 - Agent 之间可以通过 handoff 协作
  5. 适度数量 - 不要创建过多 Agent

输入格式

input:
  system_info:
    name: string                    # 系统名称
    domain: string                  # 领域
    purpose: string                 # 系统目标

  skills:                           # 可用的 Skills
    - name: string
      purpose: string
      complexity: string

  workflows:                        # Workflows 列表
    - name: string
      purpose: string
      main_skills: array            # 主要使用的 Skills

  requirements:
    collaboration_needed: boolean   # 是否需要多 Agent 协作
    specialization_level: string    # 专业化程度(low/medium/high)

输出格式

output:
  agents:                           # Agent 列表
    - name: string                  # Agent 名称
      role: string                  # 角色描述
      responsibilities: array       # 职责列表
      skills: array                 # 擅长的 Skills
      workflows: array              # 负责的 Workflows
      personality: string           # 性格特点(可选)

      # Agent 文件内容
      file_content: string          # 完整的 .md 文件内容

执行逻辑

1. 分析系统需求

确定是否需要多个 Agent:

def should_create_multiple_agents(system_info, skills, workflows):
    """
    判断是否需要创建多个 Agent
    """
    # 简单系统:1 个 Agent
    if len(skills) <= 5 and len(workflows) <= 3:
        return False

    # 复杂系统但领域单一:1 个 Agent
    if system_info.specialization_level == "low":
        return False

    # 多领域系统:多个 Agent
    skill_domains = identify_skill_domains(skills)
    if len(skill_domains) >= 2:
        return True

    return False

2. 识别领域和角色

将 Skills 和 Workflows 按领域分组:

def identify_domains(skills, workflows):
    """
    识别不同的领域
    """
    # 健康管理系统示例
    domains = {
        "analysis": [],      # 分析类
        "reporting": [],     # 报告类
        "data_management": [] # 数据管理类
    }

    for skill in skills:
        if "analysis" in skill.name or "assess" in skill.name:
            domains["analysis"].append(skill)
        elif "report" in skill.name or "review" in skill.name:
            domains["reporting"].append(skill)
        elif "collect" in skill.name or "data" in skill.name:
            domains["data_management"].append(skill)

    return domains

Read the full file on GitHub · 629 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 629 lines · 23 tokens per session scan A 57211fdbc5b9

Subscribe to this mod's changes

agent-define-skill is a skill published in the GitHub repository majiayu000/claude-skill-registry (606 stars, last pushed today), licensed MIT. It adds 23 tokens to every session and 3,219 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.