agent-directory-validator

Validates .agents directory structure, spec files, and SKILL.md frontmatter across workspace folders.

2|Updated Jul 20, 2026
One-click install
npx skills add https://github.com/myrson2/eMSME --skill agent-directory-validator-myrson2
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-directory-validator
Source: https://github.com/myrson2/eMSME/tree/main/.agents/.agents/skills/agent-directory-validator
Command: npx skills add https://github.com/myrson2/eMSME --skill agent-directory-validator-myrson2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? AI agents rely on a well-structured .agents directory for project context, feature specs, memory handoffs, and reusable skills. Missing or malformed files cause hallucinated code, lost session state, and ignored constraints. This Skill audits every .agents directory in a workspace and reports exactly what is missing and how to fix it. ## Core Features & Use Cases - Structural Validation: Recursively finds all .agents directories and checks for required folders (specs, architecture, conventions, mcps, memory, skills) and files (AGENTS.md, context.md, system-overview.md). - Spec Completeness Checks: Verifies each feature folder contains spec.md, architecture.md, implementation.md, and decisions.md, with errors for critical gaps and warnings for optional ones. - Human-Readable Diagnostics: Outputs formatted pass/warning/error logs explaining each issue, why it matters, and how to fix it, plus a summary with exit codes for CI use. - Use Case: Before starting a new feature, run the validator to confirm your spec-driven development setup is complete so AI agents load the correct requirements and constraints. ## Quick Start Run the validation script against my workspace and report any missing or malformed .agents directory files.

Frequently Asked Questions about agent-directory-validator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate an .agents directory structure?▼

Run node .agents/skills/agent-directory-validator/scripts/validate-agents-dir.js from your project root, optionally passing a target directory path. The script recursively finds all .agents folders and checks required files and sections.

What files are required in a spec-driven development specs folder?▼

Each feature folder must contain spec.md, architecture.md (or arch.md), and implementation.md (or impl.md); missing any of these is an error. decisions.md is recommended and its absence produces a warning.

Can I use this validator in a CI pipeline?▼

Yes. The script exits with code 1 when errors are found and code 0 when only warnings or passes exist, so it integrates directly into CI gates that block merges on structural violations.

Why does the validator report missing AGENTS.md sections?▼

AGENTS.md must contain standard sections like Project Context, Tech Stack Constraints, Guardrails, and Session Handoff. Missing sections trigger warnings because AI agents may skip critical guidelines during initialization.

Does the validator check SKILL.md frontmatter content?▼

It verifies that every subdirectory under .agents/skills contains a SKILL.md file, treating a missing file as an error. It checks file presence rather than parsing the YAML frontmatter fields in depth.