一键导入
create-agnostic-skill
Use when adding a reusable workflow skill for AI coding agents. Scaffolds a new .agents/skills skill using the Agent Skills open standard.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when adding a reusable workflow skill for AI coding agents. Scaffolds a new .agents/skills skill using the Agent Skills open standard.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | create-agnostic-skill |
| version | 1.4.0 |
| description | Use when adding a reusable workflow skill for AI coding agents. Scaffolds a new .agents/skills skill using the Agent Skills open standard. |
| argument-hint | [skill-name] |
| disable-model-invocation | true |
| allowed-tools | Read, Write, Bash, Glob, Grep, AskUserQuestion |
| user-invocable | true |
Create a new skill for AI coding agents using the Agent Skills open standard. Skills live in .agents/skills/ (canonical source) and work across Claude Code, Cursor, Codex CLI, Gemini CLI, GitHub Copilot, and 20+ other compatible agents.
For deep-dive research on cross-provider compatibility, frontmatter behavior, and distribution patterns, see references/docs/skills-guide.md (bundled with this skill).
Use when:
If you are creating a new oat-* skill:
/create-oat-skill (it references this baseline guidance and adds OAT-specific conventions like {PROJECTS_ROOT} resolution and separator progress banners).Don't create a skill when:
Parse the following from $ARGUMENTS:
my-new-skill)If not provided in arguments, ask for:
Required:
create-ticket, docs-review)Use when [trigger condition]. [What it does for disambiguation]. Allowed trigger stems: Use when, Run when, or Trigger when.Optional:
/ menu? (default: yes)The context window is a shared resource. Skills share context with everything else the agent needs. Structure information in three levels:
references/, scripts/, assets/ loaded as-neededWriting principles:
Section structure (adjust based on complexity):
For detailed guidance, see references/skill-template.md.
Template:
---
name: skill-name
version: 1.0.0
description: Use when [trigger condition]. [What it does for disambiguation].
argument-hint: '[arg1] [--flag]'
disable-model-invocation: true
allowed-tools: Read, Write, Glob, Grep
user-invocable: true
---
# Skill Title
Brief description of what this skill does.
## When to Use
Use when:
- Condition 1
- Condition 2
## When NOT to Use
Don't use when:
- Condition 1
- Condition 2
## Arguments
Parse from `$ARGUMENTS`:
- **required-arg**: (required) Description
- **--optional-flag**: (optional) Description with default
## Workflow
### Step 1: First Step
Instructions...
### Step 2: Second Step
Instructions...
## Examples
### Basic Usage
\`\`\`
/skill-name arg1 --flag
\`\`\`
### Conversational
\`\`\`
Natural language request that triggers this skill
\`\`\`
## Troubleshooting
**Common issue:**
- Solution
## Success Criteria
- ✅ Criterion 1
- ✅ Criterion 2
Frontmatter notes:
argument-hint, allowed-tools, user-invocable, context, hooks are Claude Code specificname: max 64 chars for cross-provider portability (Codex allows 100, but 64 is the spec limit)version: include valid semver and start new skills at 1.0.0description: single line, ≤ 500 chars (Codex enforces single-line ≤ 500 chars; spec allows 1024)version on future edits: patch for fixes/clarifications, minor for backward-compatible behavior additions, major for breaking workflow/interface changesWriting the description field:
The description is your primary routing mechanism — agents load only name + description at startup across all installed skills, then semantic-match against the user's prompt. The SKILL.md body handles "what it does" once loaded. The description's job is to win the routing decision.
Use when [trigger condition]. [What it does for disambiguation]. Run when and Trigger when are also valid trigger stems when wording is clearer.Examples:
Present the plan and wait for user approval before creating files.
Create the skill at .agents/skills/{skill-name}/SKILL.md
Key requirements:
version: 1.0.0 in frontmatterSupporting files (create if needed):
Skills can include supporting files in subdirectories:
.agents/skills/{skill-name}/
├── SKILL.md # Main instructions (required)
├── scripts/ # Executable code agents can run
│ └── setup.sh
├── references/ # Additional docs loaded on demand
│ └── api-spec.md
└── assets/ # Templates, images, data files
└── template.md
| Directory | Purpose |
|---|---|
scripts/ | Executable code that agents can run |
references/ | Additional documentation loaded on demand |
assets/ | Static resources like templates or data files |
After creating the skill, run OAT sync to update provider views:
oat sync
Verify:
.agents/skills/{skill-name}/SKILL.mdversion: (new skills start at 1.0.0)AGENTS.mdoat-, run pnpm oat:validate-skills and fix any findingsProvide:
/skill-namecreate-pr-description, docs-new)docs-new, docs-update, docs-review)name field in frontmatterversion for edits: patch = fixes/clarifications, minor = backward-compatible additions, major = breaking changesSkills that need user decisions (parameter choices, confirmations, disambiguation) should include interactive prompts in their workflow steps.
Write instructions portably: Use natural language like "Ask the user which approach they prefer" in workflow prose. All providers can handle this conversationally.
Host-specific structured input guidance: If the skill benefits from structured prompts, document the host split explicitly in the workflow:
AskUserQuestion when availableDo not hard-code a specific Codex question tool name in skill prose unless the runtime contract is guaranteed. Prefer capability-based wording ("structured user-input tooling when available") so the skill remains portable across Codex hosts.
Claude Code enhancement: Add AskUserQuestion to allowed-tools in frontmatter. Claude Code renders these as structured UI prompts with selectable options, headers, and multi-select support. Other providers ignore the field and handle the same instructions as conversational questions.
When to include interactive input:
When NOT to:
Skills that dispatch subagents, reviewers, workers, or fresh-context helper sessions must define a pre-work capability model. Do not let generated skills assume delegation is available, silently downgrade because authorization is required, or ask repeated approval questions mid-run.
When to include this section:
Required guidance for delegation-capable skills:
available, authorization required, or not resolved; do not treat authorization-required as unavailable.Portable provider wording:
AskUserQuestion in allowed-tools.Good pre-work pattern:
### Step 0.5: Capability Detection
Before edits, writes, external side effects, or long-running work, detect whether the required helper agents are available.
- Available without authorization → Tier 1: delegated execution.
- Authorization required → ask once: "Authorize `{worker/reviewer}` delegation for this run?"
- Approved → Tier 1.
- Declined → Tier 2: documented fallback.
- Not resolved / unsupported → Tier 2: documented fallback.
Report:
`Selected: Tier {1|2} — {Delegated|Fallback}; Reason: {available|authorized|user declined delegation|dispatch unavailable|required role unresolved}`
Lock the selected tier for the run.
Anti-patterns:
For multi-step skills, print brief progress updates so the user knows what's happening:
[N/N] step indicators for sequential work (e.g., [1/3] Resolving dependencies…)references/ directory.agents/docs/ — edit it in one place, don't fork copies per skillreferences/docs/ as a symlink to the canonical file:
ln -s ../../../../docs/my-guide.md references/docs/my-guide.md
The build (bundle-assets.sh, which copies with cp -RL) materializes the symlink into a real file, so the doc travels with the skill and the reference resolves wherever the skill is installed.references/docs/my-guide.md), not repo-root .agents/docs/. A bare .agents/docs/... reference only resolves inside this monorepo and dangles once the skill is installed in another repo.Legend: ✅ supported | ⚠️ provider-specific | 💤 ignored | ❓ unknown
| Field | Spec | Claude Code | Cursor | Codex CLI | Gemini CLI |
|---|---|---|---|---|---|
name | ✅ required | ✅ | ✅ | ✅ required | ✅ |
description | ✅ required | ✅ | ✅ | ✅ required | ✅ |
license | ✅ optional | ❓ | ✅ | 💤 | ❓ |
compatibility | ✅ optional | ❓ | ✅ | 💤 | ❓ |
metadata | ✅ optional | ❓ | ✅ | 💤 | ❓ |
allowed-tools | ⚠️ experimental | ✅ | ❓ | 💤 | ❓ |
disable-model-invocation | ❌ | ✅ | ✅ | 💤 | ❓ |
user-invocable | ❌ | ✅ | ❓ | 💤 | ❓ |
argument-hint | ❌ | ✅ | ❓ | 💤 | ❓ |
context / agent | ❌ | ✅ | ❌ | 💤 | ❓ |
hooks | ❌ | ✅ | ❌ | 💤 | ❓ |
Key takeaway: name + description are the only truly portable interface. Codex ignores unknown keys (safe to include Claude fields), so layer tool-specific fields on top of a portable baseline. For the full matrix, see references/docs/skills-guide.md (bundled with this skill).
| Skill Type | Detail Level | Examples |
|---|---|---|
| Complex workflows | Detailed | docs-new, docs-review |
| Simple command-like | Concise | update-doc-refs, create-ticket |
| Reference/standards | Detailed | repo-documentation |
| Helper (auto-invoked) | Moderate | read-relevant-docs |
/create-agnostic-skill my-new-skill
/create-agnostic-skill deploy-preview
Create a new skill called code-review that helps review pull requests
I need a skill for running database migrations
references/docs/skills-guide.md — bundled deep-dive: compatibility matrix, resolved questions, patterns.agents/docs/reference-architecture.md — where skills/agents/docs live and why (OAT monorepo only; not bundled)Skill not appearing in menu:
oat sync to regenerate provider viewsuser-invocable is not set to false (Claude Code)Skill invocation fails:
.agents/skills/{name}/SKILL.mdSupporting files not loading:
Successful skill creation:
.agents/skills/{name}/SKILL.mdoat sync run successfullyoat-* skills, pnpm oat:validate-skills passes/skill-nameUse when prioritizing the file-backed repo backlog or evaluating roadmap alignment. Produces value-effort ratings, dependency mapping, and execution recommendations.
Use when repo reference artifacts need updating — roadmap, decision records, backlog status, or completed history. Frequently invoked at project completion, often chained from `oat-project-document`, to ensure active `.oat/repo/pjm/` state and durable `.oat/repo/reference/` records reflect what shipped.
Use when plan.md is ready for execution. Dispatches phase-level subagents with bounded fix loops; supports plan-declared parallel phase groups with worktree-isolated execution and ordered fan-in.
Use when design.md is complete and executable implementation tasks are needed. Breaks design into bite-sized TDD tasks in canonical plan.md format.
Use when authoring or mutating plan.md in any OAT workflow. Defines canonical format invariants — stable task IDs, required sections, review table rules, and resume guardrails.
Use when a task is small enough for quick mode or rapid iteration is preferred. Scaffolds a lightweight OAT project from discovery directly to a runnable plan, with optional brainstorming and lightweight design.