一键导入
agent-creation
Standards-compliant agent definitions with templates. Trigger: When creating agent definitions, setting up project agents, or documenting workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Standards-compliant agent definitions with templates. Trigger: When creating agent definitions, setting up project agents, or documenting workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Paste-ready session summary for context transfer to a new chat. Trigger: User says 'context handoff', 'start fresh', or session needs to continue.
One-at-a-time questioning to fully profile a goal before acting. Trigger: User says 'grill me', goal is vague, or clarification is needed first.
Batch execution with checkpoints. Trigger: When executing plans with batched tasks.
Universal coding principles: DRY, security by default, null guards, and YAGNI. Trigger: When writing or reviewing code in any language or technology.
Accessibility guide (WCAG 2.1/2.2, Level A–AAA). Trigger: When building UI components, interactive elements, or auditing accessibility compliance.
Astro quality patterns: island philosophy, SEO by page type, and Core Web Vitals. Trigger: When reviewing Astro site quality or hydration decisions.
| name | agent-creation |
| description | Standards-compliant agent definitions with templates. Trigger: When creating agent definitions, setting up project agents, or documenting workflows. |
| license | Apache 2.0 |
| metadata | {"version":"1.1","type":"behavioral","skills":["critical-partner","english-writing"]} |
Create project-specific agent definitions (AGENTS.md) with YAML frontmatter and structured markdown. Agents define purpose, skills, workflows, and policies for AI assistants working on a project.
Don't use for:
Before gathering context or writing any content, determine which mode to use.
Precedence order:
Is destination project context visible (not the framework itself)?
YES → Analysis Mode (confirm with user before proceeding)
NO → Interview Mode
Auto-detect warning: If the current working directory appears to be the ai-agents-skills framework (e.g., package.json shows "name": "ai-agents-skills"), do not auto-select Analysis Mode. Confirm with the user which project to analyze or switch to Interview Mode.
Signals that destination project context is available:
package.json with a project name different from the frameworkREADME.md describing the destination projectsrc/ directory with application source codeAsk these 9 questions in order. Wait for answers before proceeding.
Do not proceed until all required questions are answered.
Read files in this order and extract answers to the 9 questions above:
| File | Extract |
|---|---|
package.json | Project name, dependencies, framework versions |
README.md | Project purpose, architecture overview, tech stack |
tsconfig.json | TypeScript strictness, target, paths |
src/ structure | Main patterns, component organization, layers |
.github/workflows/ | CI/CD tools, test runners, linting setup |
AGENTS.md (existing) | Current skills, workflows already defined |
After analysis, only ask the user about gaps — information that could not be inferred from the files.
Always confirm your findings before writing: "Based on your project, I found: X, Y, Z. Does this look correct?"
name: my-project-agent # Required: lowercase-with-hyphens
description: "Development assistant for Project X. Expert in TypeScript, React, MUI."
license: "Apache 2.0"
metadata:
version: "1.0"
skills:
- typescript
- react
- critical-partner # Mandatory for ALL agents
- code-conventions # Mandatory for coding-related agents
- a11y
---
Rules:
name, description, skills are requiredcritical-partner in skills- item), never []After frontmatter, include:
AGENTS.md must include this section BEFORE the Skills Reference table. It must always include auto-discovery as the primary mechanism.
Key steps (copy full template from references):
.{model}/skills/ to find installed skills; read each SKILL.md description.{model}/skills/{skill-name}/SKILL.mdmetadata.skills before proceedingFull section template with all sub-steps: agent-templates.md
Why auto-discovery matters: Skills Reference table reflects skills at creation time only; directory listing always reflects current state. Both together ensure 100% coverage.
Include this section only if skills have been identified — either specified by the user (Interview Mode Q4) or detected from project files (Analysis Mode). If no skills were identified at all, omit this section entirely.
Every identified skill must appear in both places:
metadata.skills in the frontmatterWhen included, place it AFTER the How to Use Skills section. Use {model} placeholders for model-agnostic paths.
Full table template: agent-templates.md
AGENTS.md must include this section AFTER the Skills Reference table. Explains the 3-layer symlink structure for LLMs that struggle with symlink resolution.
Full section template with symlink diagram: agent-templates.md
Always determine the mode (Interview or Analysis) before gathering any context. Jumping straight to writing the AGENTS.md leads to incomplete or incorrect agent definitions.
If running from within ai-agents-skills, confirm the destination project before using Analysis Mode. Reading the framework's own package.json or README.md produces an agent definition for the wrong project.
An empty table or a table with placeholder rows provides no value and misleads the model. Omit the section entirely if no skills exist yet.
Explicit mode specified by user?
YES → Use that mode directly
NO → Auto-detect:
Working directory = ai-agents-skills framework?
YES → Interview Mode (or confirm with user)
NO → Destination project files visible?
YES → Analysis Mode (confirm findings with user first)
NO → Interview Mode
Interview Mode:
All 9 questions answered? → NO → Stop: Ask clarifying questions
→ Proceed to create AGENTS.md
Analysis Mode:
Files read and findings confirmed? → NO → Confirm with user
All gaps filled? → NO → Ask only about missing information
→ Proceed to create AGENTS.md
Both modes:
All required skills identified? → NO → Ask: Which skills needed?
Agent has complex workflows? → YES → Add Workflows section
Agent has version constraints? → YES → Add Policies section
Skills installed in project? → YES → Add Skills Reference table
→ NO → Omit Skills Reference table
All referenced skills exist? → NO → Verify paths
critical-partner in skills? → NO → Must include (mandatory)
mkdir presets/{project-name} + create AGENTS.md{model} placeholdersname: example-agent
description: "Development assistant for Example Project. TypeScript, React, accessibility."
license: "Apache 2.0"
metadata:
version: "1.0"
skills:
- typescript
- react
- critical-partner
- code-conventions
- a11y
Resulting AGENTS.md structure (abbreviated):
# Example Project Agent
Purpose: Primary development assistant for TypeScript/React best practices and accessibility.
How to Use Skills (MANDATORY WORKFLOW):
Step 1 — Discover | Step 2 — Match | Step 3 — Read
Step 4 — Dependencies | Step 5 — Apply
Skills Reference:
TypeScript types/interfaces | typescript | {model}/skills/typescript/SKILL.md
React components/hooks | react | {model}/skills/react/SKILL.md
Code review | critical-partner | {model}/skills/critical-partner/SKILL.md
Project Structure & Skills Storage: 3-layer symlink structure (see template for full diagram)
Supported Stack: TypeScript 5.0+, React 18+, Vite
Policies: Strict typing (no `any`), keyboard-accessible components, React hooks best practices
Full AGENTS.md content with all section templates: agent-templates.md
Agent with 20+ skills: Group skills in the reference table by category (Framework, Testing, Standards).
Multiple agents per project: Each agent should have distinct responsibility. Avoid skill overlap.
Modifying existing agents: Re-gather context for changed requirements before updating.
No skills installed yet: Omit the Skills Reference table. The auto-discovery section in How to Use Skills is sufficient — the model will find skills as they are installed.
Skills added after creation: The auto-discovery section handles this automatically. No need to update the AGENTS.md when new skills are installed.
When to split one agent into multiple: Split when the agent prompt exceeds ~400 tokens OR the agent covers 2+ unrelated workflows (e.g., frontend development + infrastructure provisioning). Each agent should have one primary job so skill routing stays predictable. Overlap between agents causes the model to load multiple agents unnecessarily.
Updating agent description when project scope changes: The description field in AGENTS.md frontmatter is the routing key — the model uses it to decide which agent to activate. If the project's scope changes (new framework, added backend), re-run the creation workflow to regenerate the description. A stale description causes the wrong agent to be selected or the right one to be skipped.
Skill version conflicts across agents: Skills are installed project-wide, not per-agent. If two agents in the same project reference the same skill, they share the same installed version. After updating a skill with skills sync, both agents get the update simultaneously — verify both agents' behavior after any skill update that changes critical patterns.
presets/ (lowercase-with-hyphens)AGENTS.md with frontmatter: name, description, skillscritical-partner in skills (mandatory for all){model} placeholders (model-agnostic paths).agents/skills/