CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

pdk-unit

Write and run unit tests for custom Omni Gateway policies built with the Policy Development Kit (PDK) — wire up `src/tests/`, build a first `UnitTestBuilder` test, mock HTTP/gRPC upstreams with closures or `TraceBackend`, factor reusable `TestConfig` helpers, assert on responses / headers / violations, run with `make test` or `cargo test`, troubleshoot init-sleep races, authority mismatches, and feature-gate skew. Use whenever the user mentions "PDK unit test", "pdk-unit", "UnitTestBuilder", "test my policy", "cargo test PDK", "mock backend PDK", "Omni Gateway policy unit testing", `with_http_upstream_from_authority`, `with_entrypoint`, `TraceBackend`, or asks "how do I test an Omni Gateway policy", "how do I mock an upstream in pdk-unit", "why is my policy timer not firing in tests". For full `pdk-unit` API reference see `pdk-templates/templates/unit_testing.md`. For scaffolding / build / publish see `develop-pdk-policy`.

76

Quality

95%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

88%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A strong, highly actionable body: exact commands, executable code skeletons, explicit gates, and a genuine troubleshooting playbook keyed to real failure modes. The main weaknesses are minor redundancy (the pdk-test boundary and INIT_SLEEP gotcha are each stated twice or more) and template references that point outside the bundle without stating where the templates live.

Suggestions

State once where the `templates/*.rs` files live (e.g., 'in the `pdk-templates` sibling skill') at their first mention, since they are not part of this skill's bundle and the current bare paths cannot be resolved from SKILL.md alone.

Consolidate the three unit-vs-integration discussions ('When to use this skill vs alternatives', Step 1, and 'When to graduate to `pdk-test`') into one section and cross-reference it, reclaiming roughly 15 lines.

Cover the INIT_SLEEP gotcha in one place only (Step 5) and have the Troubleshooting entry reference `INIT_SLEEP` from `src/tests/common.rs` rather than restating the full cause/fix.

DimensionReasoningScore

Conciseness

The body is dense and assumes competence (no explanation of Rust, cargo, or what unit testing is), but the unit-vs-`pdk-test` distinction is explained three times ("When to use this skill vs alternatives", Step 1's decision tree, and "When to graduate to `pdk-test`") and the `INIT_SLEEP` gotcha is fully repeated in both Step 5 and Troubleshooting. Fits the 4 anchor ("minor instances of over-explanation that could be trimmed"); not 5 because of this redundancy, not 3 because there is no padded conceptual explanation.

4 / 5

Actionability

Everything is copy-paste executable: exact commands (`mkdir -p src/tests`, `cargo test hello_world -- --nocapture`, `make test`), a concrete `UnitTestBuilder` skeleton, exact error strings ("no upstream registered for authority X") with diagnostic steps (`info!("calling {:?}", &config.service);`) and specific fixes. Matches the 5 anchor; not 4 because even edge cases (entrypoint naming, timer advancement) get executable fixes.

5 / 5

Workflow Clarity

A clearly sequenced Step 1–5 workflow with an explicit validation gate ("this test must pass before adding mocks, advanced config, or violations. If it fails, jump to Troubleshooting") and a cause/fix Troubleshooting section that provides feedback loops for every named failure mode. Matches the 5 anchor (explicit validation steps, error-recovery loops, plus a Pattern Index checklist); not 4 because checkpoints are explicit and no risky step lacks a verify-then-proceed condition.

5 / 5

Progressive Disclosure

Good structure: lean overview sections, a Pattern Index table, and a well-signaled one-level-deep pointer for the full API ("lives in `pdk-templates/templates/unit_testing.md`... Do not re-derive"). Falls short of 5 because the seven referenced `templates/*.rs` files (e.g., `templates/hello_test.rs`) are not present in this skill's bundle — no references/, scripts/, or assets/ directories exist — so their location is only implied; not 3 because the references that do exist are clearly signaled and the split between inline essentials and external detail is sound.

4 / 5

Total

18

/

20

Passed

Description

100%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: concrete, comprehensive capability list, explicit and richly populated 'Use when' trigger clause, distinctive niche terminology, and clear routing to sibling skills. The only conceivable criticism is verbosity, but every clause is load-bearing (triggers or disambiguation), not padding.

DimensionReasoningScore

Specificity

The description lists multiple concrete actions spanning the whole task lifecycle — "wire up `src/tests/`", "build a first `UnitTestBuilder` test", "mock HTTP/gRPC upstreams with closures or `TraceBackend`", "factor reusable `TestConfig` helpers", "assert on responses / headers / violations", "troubleshoot init-sleep races, authority mismatches, and feature-gate skew" — matching the comprehensive-coverage anchor; it is not 4 because no meaningful capability gap remains.

5 / 5

Completeness

It explicitly answers both questions: the "what" is the full first sentence of concrete capabilities, and the "when" is an explicit "Use whenever the user mentions..." clause with concrete trigger phrases — the exact 5 anchor. Not 3 because the when-clause is present, not 4 because it is fully explicit rather than weakly implied.

5 / 5

Trigger Term Quality

Trigger coverage is comprehensive and natural: phrasings a user would actually say ("test my policy", "how do I mock an upstream in pdk-unit", "why is my policy timer not firing in tests") alongside command forms ("cargo test PDK") and API identifiers (`UnitTestBuilder`, `with_entrypoint`, `TraceBackend`). Not 4 because both synonyms and technical variants are present with nothing obvious missing.

5 / 5

Distinctiveness Conflict Risk

A clear niche (unit-testing Omni Gateway PDK policies, in-process via `UnitTestBuilder` in `src/tests/`) with triggers unique to it, plus explicit disambiguation routing siblings ("For scaffolding / build / publish see `develop-pdk-policy`"). Not 4 because the overlap risk with the pdk-test integration framework and develop-pdk-policy lifecycle skills is actively resolved by routing statements rather than merely minor.

5 / 5

Total

20

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

mulesoft/mulesoft-dx

Path

skills/mule-development/pdk-unit/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.