agentleFS
Zengxiansheng007Zengxiansheng007/skills-old/skills/create-agent-skill/SKILL.md

create-agent-skill

Skill1 starsChanged 3 months agoMITView on GitHub

Create or improve concise Codex agent skills from a workflow, domain requirement, SOP, tool integration, or repeated task. Use when the user asks to write, review, optimize, package, validate, or document an Agent Skill / Codex skill / SKILL.md, including deciding scripts, references, assets, metadata, trigger descriptions, progressive disclosure, examples, and validation steps.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

30 rules. 0 are common, 18 are distinctive, and 12 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 12

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create skills as small operational playbooks for another Codex agent.

    line 10
  2. Distinctive:

    Write concise frontmatter and body instructions.

    line 17
  3. Distinctive:

    Before writing files, answer these questions:

    line 23
  4. Very specific:

    If the user has not chosen a location, create personal skills under $CODEX_HOME/skills.

    line 34
  5. Distinctive:

    Use the smallest structure that supports the job:

    line 38
  6. Distinctive:

    Do not add README, changelog, installation guide, long tutorial notes, or evaluation reports unless the user explicitly asks.

    line 63
  7. Distinctive:

    Use lowercase letters, digits, and hyphens.

    line 79
  8. Distinctive:

    Keep the name short and action-oriented.

    line 80
  9. Very specific:

    Put trigger conditions in description, because only metadata is available before the skill loads.

    line 81
  10. Distinctive:

    Do not rely on a body section named "When to use".

    line 82
  11. Very specific:

    Avoid extra frontmatter fields such as version, tags, author, compatibility, or nested metadata unless the local platform explicitly …

    line 83
  12. Very specific:

    Use imperative instructions.

    line 87
  13. Distinctive:

    Decision rules: when to choose scripts, references, assets, or fallback paths.

    line 91
  14. Distinctive:

    Escalation and safety: when to ask the user, avoid live changes, or protect secrets.

    line 93
  15. Distinctive:

    Prefer concrete examples and short checklists.

    line 95
  16. Distinctive:

    Treat context as limited:

    line 99
  17. Very specific:

    Keep SKILL.md focused on the core workflow.

    line 101
  18. Very specific:

    Put long schemas, rubrics, examples, and provider-specific details in references/.

    line 102
  19. Distinctive:

    Keep references one level deep.

    line 104
  20. Very specific:

    Avoid duplicating the same content in SKILL.md and references.

    line 105
  21. Very specific:

    Read references/skill-quality-rubric.md when reviewing or hardening a skill.

    line 107
  22. Distinctive:

    Use plain instructions when the task is flexible and judgment-heavy.

    line 113
  23. Very specific:

    Add references/ when the agent needs detailed domain knowledge or multiple variants.

    line 114
  24. Very specific:

    Add scripts/ when the same fragile logic would otherwise be rewritten repeatedly.

    line 115
  25. Very specific:

    Add assets/ when outputs need templates, sample files, icons, or boilerplate.

    line 116
  26. Distinctive:

    After creating or changing a skill:

    line 122
  27. Distinctive:

    Run the local skill validator when available, for example:

    line 124
  28. Distinctive:

    no secrets, credentials, or project-private data are embedded.

    line 135
  29. Distinctive:

    Do not leak the intended answer into the test prompt.

    line 143
  30. Distinctive:

    When reviewing an existing skill, prioritize:

    line 147

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Agent Skill

Operating Rules

Create skills as small operational playbooks for another Codex agent. Prefer essential procedural knowledge over broad explanations. Keep SKILL.md lean, and move detailed examples, scoring rubrics, or variant-specific guidance into references/.

Use this order:

  1. Clarify the skill objective, triggers, inputs, outputs, success criteria, and safety boundaries.
  2. Decide whether the skill needs only SKILL.md or also references/, scripts/, or assets/.
  3. Initialize or update the skill folder.
  4. Write concise frontmatter and body instructions.
  5. Validate the skill structure.
  6. Forward-test or simulate realistic usage when the skill is nontrivial.

Skill Design Checklist

Before writing files, answer these questions:

  • What repeated task will this skill make more reliable?
  • What user wording should trigger it?
  • What should the agent produce or change?
  • Which steps must be followed exactly?
  • Which decisions can be left to the agent?
  • What external tools, APIs, credentials, files, or permissions are needed?
  • What evidence proves the skill worked?
  • What should the skill refuse, avoid, or ask before doing?

If the user has not chosen a location, create personal skills under $CODEX_HOME/skills; when unset, use ~/.codex/skills.

File Structure

Use the smallest structure that supports the job:

skill-name/
  SKILL.md
  agents/openai.yaml
  references/
  scripts/
  assets/

Required:

  • SKILL.md: YAML frontmatter plus concise Markdown instructions.

Recommended:

  • agents/openai.yaml: UI metadata.

Optional:

  • references/: detailed guides loaded only when needed.
  • scripts/: deterministic commands, validators, generators, converters, or wrappers.
  • assets/: templates, icons, sample files, or boilerplate copied into outputs.

Do not add README, changelog, installation guide, long tutorial notes, or evaluation reports unless the user explicitly asks. They create noise and are not part of the operating skill.

Frontmatter

Use only:

---
name: skill-name
description: What the skill does and exactly when to use it.
---

Rules:

  • name must match the folder name.
  • Use lowercase letters, digits, and hyphens.
  • Keep the name short and action-oriented.
  • Put trigger conditions in description, because only metadata is available before the skill loads.
  • Do not rely on a body section named "When to use"; the body is loaded too late for triggering.
  • Avoid extra frontmatter fields such as version, tags, author, compatibility, or nested metadata unless the local platform explicitly requires them.

Body Pattern

Use imperative instructions. A strong SKILL.md body usually contains:

  1. Operating rules: non-negotiable behavior.
  2. Workflow: ordered steps the agent should follow.
  3. Decision rules: when to choose scripts, references, assets, or fallback paths.
  4. Validation: commands or checks that prove the skill is usable.
  5. Escalation and safety: when to ask the user, avoid live changes, or protect secrets.

Prefer concrete examples and short checklists. Remove background theory unless it changes execution.

Progressive Disclosure

Treat context as limited:

  • Keep SKILL.md focused on the core workflow.
  • Put long schemas, rubrics, examples, and provider-specific details in references/.
  • Link each reference from SKILL.md and say when to read it.
  • Keep references one level deep.
  • Avoid duplicating the same content in SKILL.md and references.

Read references/skill-quality-rubric.md when reviewing or hardening a skill.

Resource Selection

Choose resources by execution risk:

  • Use plain instructions when the task is flexible and judgment-heavy.
  • Add references/ when the agent needs detailed domain knowledge or multiple variants.
  • Add scripts/ when the same fragile logic would otherwise be rewritten repeatedly.
  • Add assets/ when outputs need templates, sample files, icons, or boilerplate.

Scripts must be runnable and validated. If a script depends on external tools or credentials, document those assumptions in the skill body.

Validation

After creating or changing a skill:

  1. Run the local skill validator when available, for example:
python path/to/quick_validate.py path/to/skill-folder
  1. Inspect SKILL.md for:
    • frontmatter has only name and description;
    • description includes use cases and trigger wording;
    • body is procedural, not a tutorial;
    • references are discoverable and not duplicated;
    • no secrets, credentials, or project-private data are embedded.
  2. For nontrivial skills, forward-test with a realistic user request:
Use $skill-name to complete [realistic task].

Do not leak the intended answer into the test prompt.

Review Heuristics

When reviewing an existing skill, prioritize:

  • trigger accuracy;
  • unnecessary context or duplicated content;
  • missing validation;
  • brittle steps that should be scripts;
  • hidden assumptions about tools, permissions, environment, or credentials;
  • resources that are never referenced;
  • outputs that cannot be verified.

Return findings first, then a compact change plan.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.