agentleFS
MicrosoftKnown publishermicrosoft/vstest/.github/skills/validate-skills/SKILL.md

validate-skills

Skill976 starsChanged 6 months agoMITView on GitHub

Validate that commands documented in skill files actually work. Use when creating, updating, or reviewing skills to ensure all documented commands exit with code 0.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify every executable command in a skill runs successfully on the current OS.

    line 8
  2. Distinctive:

    After creating or updating a skill that contains executable commands

    line 12
  3. Distinctive:

    When switching OS (e.g. Windows → Linux) to confirm cross-platform commands

    line 14
  4. Very specific:

    If a command contains comments like # Windows or # Linux / macOS, only run the one for your OS.

    line 37
  5. Distinctive:

    Use the SQL tool to create a tracking table:

    line 43
  6. Distinctive:

    Run it from the repo root

    line 61
  7. Distinctive:

    After all commands finish, print a summary:

    line 76
  8. Very specific:

    ERROR (documentation bug): Update the skill's SKILL.md to fix the command.

    line 90
  9. Very specific:

    ENV_ISSUE: Add a troubleshooting note to the skill if the environment prerequisite is not already documented.

    line 91
  10. Distinctive:

    PASS: No action needed.

    line 92
  11. Distinctive:

    Run restore/build before tests (tests depend on build output)

    line 96
  12. Distinctive:

    Run the cheapest commands first to fail fast

    line 97

“Common” is measured: kept by at least 6 in 10 of the 4 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

Validating Skills

Verify every executable command in a skill runs successfully on the current OS.

When to Use

  • After creating or updating a skill that contains executable commands
  • During skill review to catch stale or broken instructions
  • When switching OS (e.g. Windows → Linux) to confirm cross-platform commands

Procedure

1. Detect Current OS

Determine which platform commands to extract:

# PowerShell (Windows)
$os = "Windows"
# Bash (Linux / macOS)
OS=$(uname -s)   # "Linux" or "Darwin"

2. Extract Commands

Parse the target skill's SKILL.md and list every shell command for the detected OS:

  • Many skills document commands in tables with Windows and Linux / macOS columns. Pick the column matching your OS.
  • If a command contains comments like # Windows or # Linux / macOS, only run the one for your OS.
  • Placeholder substitution: Replace obvious placeholders (e.g. <path-to-csproj>, <skill-name>) with real values from the repo. If no sensible value exists, skip the command.
  • Adapt cross-platform commands: Commands like ls -la should be adapted to PowerShell equivalents (Get-ChildItem) on Windows when no native Windows command is documented.

3. Track Results

Use the SQL tool to create a tracking table:

CREATE TABLE skill_commands (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  skill TEXT NOT NULL,
  command TEXT NOT NULL,
  expected_exit INTEGER DEFAULT 0,
  actual_exit INTEGER,
  status TEXT DEFAULT 'pending',
  notes TEXT
);

4. Run Each Command

For every extracted command:

  1. Run it from the repo root
  2. Record the exit code
  3. Classify the result:
    • Exit 0 → PASS
    • Non-zero + environment issue (missing SDK, no internet) → ENV_ISSUE
    • Non-zero + command/docs wrong → ERROR

5. Safety Rules

CRITICAL: Never run unfiltered integration/acceptance tests. They take hours.

  • test.sh --integrationTest or test.cmd -Integration MUST include a --filter or -p flag.
  • test.sh -p smoke is acceptable (scoped to smoke tests), but expect it to be slow.

6. Report

After all commands finish, print a summary:

=== Skill Validation Report ===
Skill: <skill-name>
OS: <Linux|Darwin|Windows>
Commands tested: N
PASS: X
ENV_ISSUE: Y (list with reasons)
ERROR: Z (list failed commands with exit codes)

7. Fix or Flag

  • ERROR (documentation bug): Update the skill's SKILL.md to fix the command.
  • ENV_ISSUE: Add a troubleshooting note to the skill if the environment prerequisite is not already documented.
  • PASS: No action needed.

Ordering Tips

  • Run restore/build before tests (tests depend on build output)
  • Run the cheapest commands first to fail fast
  • Batch independent test commands in parallel when possible

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.