All skills
sergiodxa avatar

/skill-writing-best-practices

@11112da

Guidelines for creating AI agent skills. Use when writing new skills, documenting coding patterns, or reviewing skill files. Triggers when creating or modifying files in the skills/ directory.

Use this Skill: https://skilld.dev/gh/sergiodxa/agent-skills/skill-writing-best-practices

This session only. Nothing lands on disk.

rulesskill-directory-structure.md

≈423 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Skill Directory Structure

Every skill lives in its own directory with a consistent structure: a main SKILL.md file and a rules/ subdirectory containing individual rule files.

Why

  • Discoverability: Consistent structure means agents know where to find things
  • Scalability: Individual rule files keep content manageable
  • References: SKILL.md can link to detailed rules with @rules/rule-name.md

Structure

skills/
└── topic-best-practices/
    ├── SKILL.md              # Main summary file
    └── rules/
        ├── rule-one.md       # Detailed rule
        ├── rule-two.md       # Another rule
        └── rule-three.md     # And another

Naming Conventions

Skill directories: {topic}-best-practices

ruby-on-rails-best-practices/
frontend-react-best-practices/
frontend-testing-best-practices/
skill-writing-best-practices/

Rule files: kebab-case.md

model-scoped-concerns.md
thin-controllers.md
current-in-other-contexts.md

What Goes Where

SKILL.md contains:

  • Frontmatter with name and description
  • Overview and "When to Apply" section
  • Condensed summaries of all rules with short examples
  • Links to full rule files

rules/*.md contain:

  • Detailed explanation of one specific rule
  • Full code examples with bad/good patterns
  • Edge cases and exceptions
  • Numbered takeaways

Rules

  1. One skill = one directory with SKILL.md + rules/
  2. Directory names use {topic}-best-practices pattern
  3. Rule files use kebab-case.md naming
  4. SKILL.md summarizes; rules/ files go deep

Source: SKILL.md on GitHub

1 warning8d5 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill provides guidelines and best practices for creating AI agent skills. It is composed entirely of informational Markdown documentation and code examples. No malicious code, network activity, or security vulnerabilities were detected.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

  • Runlayer7mo

    7/7 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 11112da. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago

README badge

README badge for sergiodxa/agent-skills/skill-writing-best-practices