layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Blog] Where to Place Coding Agent Skills in Open Source Repos

Open Copilot opened this issue 8 months ago • 1 comments

New blog post addressing the Agent Skills specification — specifically, where SKILL.md files belong depending on whether you're adding project-specific agent skills or publishing reusable skills for community distribution.

Content

  • Two placement scenarios clearly distinguished:
    • Project skills → hidden dot-directories (.agents/skills/<name>/ as canonical, vendor paths via symlinks)
    • Community/distributable skills → visible skills/ directory or repo root for single-skill repos
  • Symlink strategy for multi-tool compatibility (Copilot, Cursor, Claude Code) without duplication — mirrors the same pattern recommended for AGENTS.md
  • Standard internal structure — progressive disclosure pattern keeping SKILL.md lean with scripts/, references/, assets/ subdirectories loaded on demand
  • Decision tree for quick placement lookup
  • Cloud native example using a Meshery/Kanvas platform-infra repo showing full .agents/ + symlink layout
  • Cross-links to the companion AGENTS.md post, Meshery, Kanvas, and community resources

Files

File Description
src/collections/blog/2026/03-06-coding-agent-skills-placement/post.mdx Blog post
src/collections/blog/2026/03-06-coding-agent-skills-placement/hero-image.webp Hero image

The post is categorized under AI, tagged ai, Engineering, Open Source, and marked resource: true for inclusion in the resources collection.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Blog] New post on organization coding agent skills</issue_title> <issue_description>A new blog post fitting the following description is requested to be written by a community member:

Topic: in what directory should coding agent skills be placed in open source repos?

Core points to convey in the post:

Here is a draft of the post that needs to be rewritten:

The placement of agent skills in an open-source repository depends on whether you are adding skills to help an AI agent work on your specific project, or if you are publishing a standalone skill for others to download.

First, a quick point of clarification: Under the open Agent Skills specification (adopted by Claude, Cursor, GitHub Copilot, and others), the file is strictly named SKILL.md (all caps), and it must live inside its own named folder rather than existing as a standalone file.

Here is exactly where you should place them based on your goal:

1. Adding Skills to Help Agents Work on Your Project

If you are adding skills to teach coding agents how to navigate, build, or deploy your specific codebase, they should be placed in a hidden directory at the root of your project.

The emerging universal standard is the .agents/ directory, but major tools also check their own specific folders.

  • The Open Standard: .agents/skills/<skill-name>/
  • VS Code / GitHub Copilot: .github/skills/<skill-name>/
  • Cursor: .cursor/skills/<skill-name>/
  • Claude Code: .claude/skills/<skill-name>/

Recommended Approach: Put your skills in .agents/skills/ as most modern agents (including Cursor and Codex) will automatically discover them there.

2. Publishing a Skill for the Community

If your open-source repository exists solely to distribute a reusable skill (for example, to be installed via Vercel's npx skills CLI or Vercel's skills.sh directory), the placement changes:

  • Single-Skill Repository: Place the SKILL.md file directly at the root of the repository.
  • Multi-Skill Monorepo: If your repository contains a collection of skills (like the official anthropics/skills or huggingface/skills repos), group them in a visible skills/ folder at the root (e.g., skills/my-custom-skill/SKILL.md).

The Standard Directory Structure

Regardless of where the root folder lives, every skill must follow a progressive disclosure pattern. The SKILL.md file contains the YAML frontmatter (metadata) and core instructions, while heavier files are kept in subdirectories so they don't bloat the agent's context window until explicitly needed.

Here is what a complete, standard skill directory looks like:

.agents/
└── skills/
    └── deploy-app/                 # The name of your skill
        ├── SKILL.md                # REQUIRED: Frontmatter + core instructions
        ├── scripts/                # OPTIONAL: Executable code (e.g., Python/Bash scripts)
        ├── references/             # OPTIONAL: Dense docs or API schemas loaded on demand
        └── assets/                 # OPTIONAL: JSON templates, static files, etc.


Contributor Resources

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

<agent_instructions>Generate or identity a blog post hero image, too.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Custom agent used: blog-writer Custom agent: Expert in creating high-quality blog posts for the Layer5 website. Specializes in cloud native topics, Meshery, Kanvas features, Layer5 Cloud features, open source, AI, AI Agents, Agentic coding methodologies, and more (see below).

  • Fixes layer5io/layer5#7452

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot avatar Mar 06 '26 20:03 Copilot

Solid content on agent skills placement — this fills a real gap in our documentation and the two-scenario distinction (project-specific vs. community-distributable) is clearly explained with actionable directory examples.

A few things to review before merge:

  • Filename convention — Layer5 blog posts use index.mdx as the MDX filename, not post.mdx. Please rename post.mdx → index.mdx to match the pattern used across every other post in src/collections/blog/.
  • Hero image format — The hero image was added as .webp, but the frontmatter and surrounding posts typically reference the image by filename. Please confirm the image field in the frontmatter matches the exact filename hero-image.webp.
  • No community review — This came from the Copilot agent responding to the issue. It would benefit from a human review pass — specifically to verify that the SKILL.md / .agents/ specification details are accurate and that the Meshery/Kanvas example reflects our actual repo structure.
  • Date — The folder is dated 03-06 (March 6). Confirm this is the intended publish date or update to reflect current timing.

Good initiative using the blog-writer agent for this. The technical content is sound.

arjunmehta-git avatar Apr 09 '26 07:04 arjunmehta-git