test

A command that checks a SKILL.md file, the instruction file used by a coding-agent skill, against quality and security checks and gives it a score and grade.

In plain words
What is it for?
Checking one skill or all installed skills, producing detailed or machine-readable results, and failing checks below a chosen score.
Why use it?
It helps catch missing metadata, weak structure, and certain security problems before a skill is used or published.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rolecraft-sh/rolecraft/test
Clone the repo
git clone --depth 1 https://github.com/rolecraft-sh/rolecraft
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01042
Opus 5 $0.00000 $0.00521
Sonnet 5 $0.00000 $0.00208
Haiku 4.5 $0.00000 $0.00104

Measured 2d ago against content hash dbd260cccdde, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

test scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| `dangerous-patterns` | 15 | No `rm -rf`, `eval`, `exec`, `sudo`, `/etc/passwd` patterns |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

docs/commands/test.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rolecraft test

Test a SKILL.md quality with built-in assertions. Scans frontmatter, content structure, security patterns, and completeness — then assigns a score and grade.

Usage

rolecraft test <skill-path>     # Test a single skill
rolecraft test --all             # Test all installed skills
rolecraft test --all --json      # JSON output for CI

Options

Flag Description
--all Test all installed skills from lockfile
--json Machine-readable JSON output
--verbose, -v Detailed assertion results
--min-score <N> Fail if score below N (default: 50)
--only <names> Run specific assertions only (comma-separated)
--no-color Disable ANSI colors
--no-emoji Replace emojis with ASCII ([OK], [FAIL], [WARN])

Assertions

Assertion Weight Description
name-defined 10 frontmatter.name must exist
description-defined 10 frontmatter.description must exist
description-length 5 Description >= 20 characters
frontmatter-valid 10 YAML delimiters (---) must be present and parseable
slug-defined 5 frontmatter.slug must exist
content-not-empty 10 Body must contain >= 50 words
code-block-lang 10 Code fences must have language tags (```js not ```)
dangerous-patterns 15 No rm -rf, eval, exec, sudo, /etc/passwd patterns
line-length 5 No lines exceeding 120 characters
example-commands 10 Must contain $ command or ```bash block
mcp-referenced 5 If MCP servers referenced in body, they must be in frontmatter
agent-targets 5 Must specify agents: or scope: in frontmatter
has-sections 5 Must have at least 2 ## sections

Grades

Score Grade Meaning
90-100 A Excellent
75-89 B Good
50-74 C Adequate
25-49 D Poor
0-24 F Unusable

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 118 lines · 0 tokens per session scan B dbd260cccdde

Subscribe to this mod's changes

test is a command published in the GitHub repository rolecraft-sh/rolecraft (75 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,042 tokens. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.