agentleFS
Cogni-AI-OUCogni-AI-OU/cogni-ai-agent-skills/agentskills/SKILL.md

agentskills

Skill4 starsChanged 6 months agoMITView on GitHub

Reference for the Agent Skills open standard. Defines the schema, directory structure, formatting, and portability requirements for agent skills. You MUST load this skill to understand the technical structure of an agent skill.

1 other project uses 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

23 rules. About 0 are common, 13 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Portability: Keep scripts self-contained within the skill folder to allow sharing and avoid referencing external absolute paths.

    line 16
  2. Distinctive:

    Non-Interactive Execution: Always design skills for non-interactive flow, using specific arguments or flags to avoid stalling the agent.

    line 17
  3. Distinctive:

    Pre-flight Inspection: Always inspect third-party skills before installing to verify content safety and avoid malicious instructions or …

    line 18
  4. Distinctive:

    Supply Chain Integrity: Prefer pinning skills to specific tags or commit SHAs to ensure deterministic behavior.

    line 19
  5. Distinctive:

    When designing, architecting, or manually creating a new agent skill folder from scratch.

    line 28
  6. Distinctive:

    When reviewing a third-party skill for compliance with the Agent Skills specification.

    line 30
  7. Very specific:

    When generating the markdown content for a skill automatically (use agent-skill-md-writer instead).

    line 34
  8. Distinctive:

    When writing project-specific coding conventions that do not require actionable agent instructions.

    line 36
  9. Very specific:

    Installable skills: Use gh skill install OWNER/REPOSITORY to browse skills interactively, gh skill install OWNER/REPOSITORY SKILL-NAME for …

    line 49
  10. Distinctive:

    Create a directory named after the skill (lowercase-hyphenated).

    line 51
  11. Very specific:

    Create a SKILL.md file with the required YAML frontmatter (name, description).

    line 52
  12. Distinctive:

    Add any supporting scripts or resources within the same directory.

    line 53
  13. Very specific:

    Verify Structure: Ensure the SKILL.md follows the standard sections and style (imperative, dense, expert-level).

    line 54
  14. Very specific:

    Assets vs Templates: If the AI agent reads and builds upon the file content, place it in templates/.

    line 70
  15. Distinctive:

    CRITICAL: Keep descriptions concise and keyword-dense to respect the context budget.

    line 78
  16. Very specific:

    Security Warning: Only pre-approve shell or bash if you fully trust the skill source.

    line 89
  17. Distinctive:

    Use imperative mood ("Run", "Create", "Configure"), dense, expert-level instructions.

    line 93
  18. Very specific:

    Keep SKILL.md under 500 lines to preserve context window.

    line 94
  19. Very specific:

    Use relative paths from the skill root (e.g., reference).

    line 108
  20. Very specific:

    Keep file references up to two levels deep from SKILL.md if necessary for organization (e.g., references/subdir/file.md).

    line 109
  21. Distinctive:

    Avoid excessively deep nesting (beyond 2 levels) to maintain portability.

    line 110
  22. Very specific:

    Trust Boundaries: When running agent workflows on pull_request_target or issue_comment triggers, the PR branch's .github/skills/ and …

    line 137
  23. Distinctive:

    Before publishing a skill, verify:

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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
<!-- markdownlint-disable MD013 MD023 MD031 MD032 -->

Agent Skills (Standard)

The Agent Skills open standard provides a framework for structuring and specifying skills to ensure portability across different AI systems and agent hosts. Agent Skills work with GitHub Copilot (Cloud, CLI, and VS Code), Claude Code, OpenCode, and other compliant agents. Agent Skills are self-contained folders with instructions and bundled resources that teach AI agents specialized capabilities, unlike custom instructions which only define coding standards.

Core Principles

  • Open Standard: Rely on the open standard for structure and specifications to ensure portability across different AI systems.
  • Portability: Keep scripts self-contained within the skill folder to allow sharing and avoid referencing external absolute paths.
  • Non-Interactive Execution: Always design skills for non-interactive flow, using specific arguments or flags to avoid stalling the agent.
  • Pre-flight Inspection: Always inspect third-party skills before installing to verify content safety and avoid malicious instructions or scripts.
  • Supply Chain Integrity: Prefer pinning skills to specific tags or commit SHAs to ensure deterministic behavior.
  • Portable Provenance: Skills should include tracking metadata (repository, ref, tree SHA) in the SKILL.md frontmatter to allow tracking even if files are moved.
  • Progressive Loading Architecture: Structure skills so detail is loaded only as needed:
    1. Discovery (~100 tokens): name and description are loaded at startup.
    2. Instructions (< 5000 tokens): SKILL.md body is loaded when the request matches the description.
    3. Resources (as needed): Scripts, examples, and docs are loaded only when explicitly referenced.

When to Use

  • When designing, architecting, or manually creating a new agent skill folder from scratch.
  • To understand the progressive loading architecture, directory structure, and metadata requirements of the open standard.
  • When reviewing a third-party skill for compliance with the Agent Skills specification.

When Not to Use

  • When generating the markdown content for a skill automatically (use agent-skill-md-writer instead).
  • For configuring the top-level behavior or personality of the agent itself (use agent-md-writer).
  • When writing project-specific coding conventions that do not require actionable agent instructions.

Common Pitfalls

  • Vague Descriptions: Writing a skill description that is too generic, meaning the agent will never trigger it when needed.
  • Absolute Paths: Hardcoding absolute file paths inside skill scripts, breaking portability when the skill is installed on a different machine.
  • Interactive Prompts: Bundling shell scripts that wait for human input, causing autonomous agents to hang indefinitely.

Core Process (Manual Creation)

  1. Determine Scope:
    • Project skills: Stored in .github/skills/, .claude/skills/, or .agents/skills/ depending on the tool. Scope is limited to the repository.
    • Personal skills: Stored in ~/.copilot/skills/, ~/.claude/skills/, or ~/.agents/skills/ depending on the tool. Scope is global for the user's CLI environment.
    • Installable skills: Use gh skill install OWNER/REPOSITORY to browse skills interactively, gh skill install OWNER/REPOSITORY SKILL-NAME for a non-interactive install, or npx skills add https://docs-url (Vercel's skills CLI) to install external skills.
  2. Scaffold Skill:
    • Create a directory named after the skill (lowercase-hyphenated).
    • Create a SKILL.md file with the required YAML frontmatter (name, description).
    • Add any supporting scripts or resources within the same directory.
  3. Verify Structure: Ensure the SKILL.md follows the standard sections and style (imperative, dense, expert-level).

Directory Structure

A standard skill directory should be organized as follows:

skill-name/
├── SKILL.md          # MANDATORY: must be named SKILL.md (metadata + instructions)
├── LICENSE.txt       # Recommended: License terms (Apache 2.0 typical)
├── scripts/          # Optional: executable code (Python, Bash, JS). Loaded when executed.
├── references/       # Optional: additional documentation. Loaded when referenced.
├── assets/           # Optional: static files used AS-IS in output (not modified by agent).
└── templates/        # Optional: starter code/scaffolds that the AI agent MODIFIES.

Assets vs Templates: If the AI agent reads and builds upon the file content, place it in templates/. If the file is used as-is in output (e.g., logo.png, report format), place it in assets/.

Skill Structure & Formatting

Agent profile format (Frontmatter)

The name and description fields in SKILL.md frontmatter are critical. The agent decides whether to load a skill based on the description alone. A vague description means the skill never activates. Write descriptions that specify both when the skill applies and when it does not.

CRITICAL: Keep descriptions concise and keyword-dense to respect the context budget. Describe WHAT the skill does, WHEN to use it, and include relevant KEYWORDS.

FieldRequiredConstraints
nameYes1-64 chars, lowercase alphanumeric and hyphens only. No start/end hyphens.
descriptionYes10-1024 chars. Should describe capabilities AND use cases. Wrapped in single quotes.
licenseNoLicense name or reference to a bundled license file (e.g., Complete terms in LICENSE.txt).
compatibilityNoMax 500 chars. System packages, network access needs, etc.
metadataNoArbitrary key-value mapping (e.g., author, version).
allowed-toolsNoSpace-separated string of pre-approved tools (e.g., shell, bash).

Security Warning: Only pre-approve shell or bash if you fully trust the skill source. Pre-approving these tools removes the confirmation step and can allow execution of arbitrary commands.

Body Content

  • Use imperative mood ("Run", "Create", "Configure"), dense, expert-level instructions.
  • Keep SKILL.md under 500 lines to preserve context window. Split into references/ if it exceeds ~200 lines.
  • Focus on What Copilot Doesn't Know: Exclude standard language syntax or well-documented API behavior. Focus on internal conventions, non-obvious defaults, version-specific quirks, and domain-specific workflows.

Recommended sections:

  • # Title: Brief overview of what this skill enables.
  • ## When to Use This Skill: List of scenarios reinforcing description triggers.
  • ## Prerequisites: Required tools or dependencies.
  • ## Step-by-Step Workflows: Numbered steps for repeatable procedures (build, deploy, setup). Use flexible guidelines instead of rigid steps for open-ended tasks.
  • ## Gotchas: Proactive warnings about non-obvious behavior. This is the highest-signal content. Bold the key constraint and explain why.
  • ## Troubleshooting: Reactive fixes for known issues (symptom → solution pairs).
  • ## References: Links to bundled docs (references/) or external resources.

File References

  • Use relative paths from the skill root (e.g., [reference](./references/REF.md)).
  • Keep file references up to two levels deep from SKILL.md if necessary for organization (e.g., references/subdir/file.md).
  • Avoid excessively deep nesting (beyond 2 levels) to maintain portability.

Directory Scopes

LevelLocationScope
Project (Shared).agents/skills/Single repository, portable across agents
Project (Provider).github/skills/, .claude/skills/, .opencode/skills/Single repository, provider-specific
Project (Runtime).skills/Ephemeral workspace symlink (e.g., CI/CD)
Personal (Shared)~/.agents/skills/User-wide (CLI), portable across agents
Personal (Provider)~/.copilot/skills/, ~/.claude/skills/, ~/.config/opencode/skills/User-wide (CLI), provider-specific
Installablegh skill install OWNER/REPOSITORY, npx skills add https://docs-urlInstall external skills via CLI
System/usr/share/agents/skills/System-wide

Managing Skills with GitHub CLI

The gh skill command in GitHub CLI (v2.90.0+) allows discovering, installing, and managing skills:

  • Search: gh skill search <topic>
  • Preview: gh skill preview <owner>/<repository> <skill-name>
  • Install: gh skill install <owner>/<repository> <skill-name>
  • Update: gh skill update --all
  • Publish: gh skill publish

Runtime and CI/CD Caveats

  • Discoverability: In CI/CD environments (like GitHub Actions), agents may run with workspace-scoped tools. If skills are cloned outside the workspace (e.g., ${{ runner.temp }}/.skills), they should be symlinked into the workspace (e.g., .skills/) to be discoverable by the agent.
  • Trust Boundaries: When running agent workflows on pull_request_target or issue_comment triggers, the PR branch's .github/skills/ and .github/instructions/ might be checked out by platform tools. Ensure base branch skills are preserved to prevent malicious forks from injecting altered skills.

Validation Checklist

Before publishing a skill, verify:

  • SKILL.md has valid frontmatter with name and description
  • name is lowercase with hyphens, ≤64 characters
  • description clearly states WHAT it does, WHEN to use it, and relevant KEYWORDS
  • Body focuses on information Copilot wouldn't know from training data
  • ## Gotchas section present if skill involves non-obvious behavior, API quirks, or common traps
  • SKILL.md body under 500 lines (consider splitting into references/ at ~200 lines)
  • Large workflows (>5 steps) split into references/ folder with clear links
  • Scripts include help documentation and error handling
  • Relative paths used for all resource references

Locally validate skills using the skills-ref reference library:

skills-ref validate ./my-skill

What to Avoid

  • Placing project-specific skills in global directories.
  • Referencing external absolute paths in scripts inside a skill folder.
  • Hardcoding environment-specific values that break portability.
  • Including interactive scripts that require user input.
  • Including information the agent already knows from its training data.

References

Related Skills

  • agent-skill-md-writer: You MUST load this skill when creating or updating specific coding agent skills.
  • gh-skill: See this skill for using the GitHub CLI (gh skill) to manage and publish Agent Skills.

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.