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.
npx skills add Lonsdale201/wp-agent-skills --skill bd-validation-rulegit clone --depth 1 https://github.com/Lonsdale201/wp-agent-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/lonsdale201/wp-agent-skills/bd-validation-rule)<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/bd-validation-rule"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/bd-validation-rule/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/lonsdale201/wp-agent-skills/bd-validation-rule"><img src="https://agentmods.dev/badge/skills/lonsdale201/wp-agent-skills/bd-validation-rule.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00186 | $0.03647 |
| Opus 5 | $0.00093 | $0.01824 |
| Sonnet 5 | $0.00037 | $0.00729 |
| Haiku 4.5 | $0.00019 | $0.00365 |
Grade A, and why
bd-validation-rule scanned grade A with 0 findings 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 11d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 350 lines — stays where its author put it; the contents beside it link to each section on GitHub.
better-data: Adding a validation rule
For library maintainers introducing a new built-in validation rule (Rule\CreditCard, Rule\PhoneE164, Rule\StrongPassword, etc.). Rules are tiny, pure, attribute-decorated classes that the validator iterates per field. The contract is small but precise — getting it wrong (throwing instead of returning, applying to nulls, embedding side effects) breaks compositional rules and surfaces messy errors to consumers.
Misconception this skill corrects
"I'll throw an exception with the validation error message inside
check()— easier than a return-string protocol."
The contract at src/Validation/Rule.php:25-28 is:
interface Rule
{
public function check(mixed $value, string $fieldName, DataObject $subject): ?string;
}
null = pass, short error string = fail. Throwing is the engine's prerogative, not an individual rule's. The BuiltInValidator (src/Validation/BuiltInValidator.php) iterates rules across many fields and accumulates errors; an exception would short-circuit the entire validation pass and return a single error instead of the complete failure list — which is what ValidationResult is for.
Other AI-prone misconceptions:
- "Rule\Foo extends Rule\Email." Wrong — rules don't compose via inheritance; PHP's attribute reflection looks up exact class names. Add a new rule.
- "The interface is RuleInterface." Wrong — it's literally
Rule. The AGENTS.md docs in older drafts referred to it asRuleInterface, but the actual file issrc/Validation/Rule.phpand the interface isRule. Use that name. - "Rules apply to null values too — I want to validate that
?Email $email = nullis non-null." Wrong — convention isnullmeans "skip"; if you want non-null, add#[Rule\Required]also. Single responsibility.
When to use this skill
Trigger when ANY of the following is true:
- Creating a new file under
src/Validation/Rule/. - The diff adds
implements Rule(or implements the deprecatedRuleInterface). - Adding a new
#[Rule\Foo]attribute to a DTO and you can't findFooinsrc/Validation/Rule/. - Reviewing a PR that throws inside a
check()method — flag and convert to return-string.
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.
- 11d ago First seen · 350 lines · 186 tokens per session scan A a612e2807741
bd-validation-rule is a skill published in the GitHub repository Lonsdale201/wp-agent-skills (22 stars, last pushed 12d ago), licensed MIT. It adds 186 tokens to every session and 3,647 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
migrate-mstest-v3-to-v4
Use this skill before answering, planning, or editing any MSTest 3.x-to-4.x upgrade or post-upgrade failure. Triggers include "MSTest v4 breaking changes"; CS0507/CS0103/CS1061/CS1615; ExecuteAsync, CallerInfo, DisplayName, or custom TestMethodAttribute; ClassCleanupBehavior; ContainsKey; ThrowsExactly or…
migrate-xunit-to-mstest
Convert .NET tests from xUnit.net v2/v3 to MSTest v4 while preserving VSTest or MTP. Use for replacing xunit packages, Fact/Theory/InlineData/MemberData, assertions, IClassFixture/ICollectionFixture, ITestOutputHelper, TestContext cancellation, traits/Owner, skips, timeouts, and xUnit parallelization. Also use when a…
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
tunit
Write, run, or repair .NET tests that use TUnit. Use when a repo uses TUnit, TUnit.Playwright, [Test], [Arguments], ClassDataSource, SharedType.PerTestSession, or Microsoft.Testing.Platform-based execution. Preserve TUnit's parallel-by-default model and constrain only destructive shared-state collisions. DO NOT USE…
test-harness
Generates pytest test suites with happy path, edge cases, error conditions, fixture scaffolding, mocks, async patterns. Triggers on: "generate tests", "write tests for", "test this function", "create test suite", "pytest for", "unit tests for", "mock strategy for".
xunit
Write, run, or repair .NET tests that use xUnit with the right package, CLI, and runner guidance. USE FOR: xUnit v2 or xUnit v3 projects; adding, running, debugging, or repairing xUnit tests; choosing between VSTest and Microsoft.Testing.Platform. DO NOT USE FOR: TUnit projects; MSTest projects. INVOKES: inspect the…