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 agentmods add skills/padamson/playwright-rust/doctest-conventionsnpx skills add padamson/playwright-rust --skill doctest-conventionsgit clone --depth 1 https://github.com/padamson/playwright-rustWrote 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/padamson/playwright-rust/doctest-conventions)<a href="https://agentmods.dev/skills/padamson/playwright-rust/doctest-conventions"><img src="https://agentmods.dev/badge/skills/padamson/playwright-rust/doctest-conventions.svg" alt="Measured on agentmods" height="20"></a>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.00049 | $0.00732 |
| Opus 5 | $0.00024 | $0.00366 |
| Sonnet 5 | $0.00010 | $0.00146 |
| Haiku 4.5 | $0.00005 | $0.00073 |
Grade A, and why
doctest-conventions 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 6d 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 — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Doctest Conventions
Philosophy: documentation that cannot rot
Every rustdoc example is compile-checked on every cargo test --doc
(pre-commit and CI). Browser automation can't execute in a doctest
harness, so examples are compiled but not run — same contract as the
agent-doc snippets (verify-agent-docs) and landing-page snippets
(verify-site-snippets).
The annotation: no_run
no_run — compiled every time, never executed. ← use this
ignore — never compiled, never executed; rustdoc only highlights it.
(none) — compiled AND executed; only for pure, browser-free examples.
Use ```no_run for anything that would launch a browser or talk to
the Playwright server. Plain ```rust is fine for pure logic
(selector builders, option construction) that can really execute.
Never use ```ignore except when the code genuinely cannot
compile in this crate — the only sanctioned case is the macros/trace
crates' module docs showing downstream playwright-rs usage, which
would need a cyclic dev-dependency to compile.
History. Until 2026-06, the convention was
ignore+ a CI step runningcargo test --doc -- --ignored, believed to execute them. It never did: rustdoc surfacesignoreblocks as empty always-pass stubs (83 "passed" in 0.00s). The examples had zero protection and ~10 had silently rotted.no_runis what the convention always intended.
Structure
Prefer one comprehensive module-level doctest (//!) per protocol
file, demonstrating related APIs in a realistic scenario. Per-function
examples are allowed where they pull their weight — they must compile
like everything else.
Use hidden scaffolding lines (# -prefixed) so the rendered docs
show only the instructive lines while the compiler sees a complete
program:
/// # Example
///
/// ```no_run
/// # use playwright_rs::Playwright;
/// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
/// # let pw = Playwright::launch().await?;
/// # let page = pw.chromium().launch().await?.new_page().await?;
/// page.goto("https://example.com", None).await?;
/// let title = page.title().await?;
/// # Ok(())
/// # }
/// ```
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.
- 6d ago First seen · 89 lines · 49 tokens per session scan A 0b708b51e60f
doctest-conventions is a skill published in the GitHub repository padamson/playwright-rust (143 stars, last pushed 6d ago), licensed Apache-2.0. It adds 49 tokens to every session and 732 once invoked, about $0.0002 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
moli-webfetch
Fetch, inspect, crawl, and capture live, JavaScript-rendered websites with Moli. Use when Codex needs current web content, web research, fact lookup, link following, a bounded crawl, client-rendered or response-gated content, network diagnostics, or a standalone HTML, Markdown, JSON, semantic-tree, viewport or…
moli-cdp-server
Start Moli's CDP server and connect Playwright, Puppeteer, or raw CDP clients. Use to run a headless-browser CDP endpoint, replace a Chromium process, attach over CDP, enable real layout and screenshot surfaces, or diagnose CDP discovery, connection, and target startup—even when Moli is not named.
rust-unit-tests
Write, improve, and run Rust unit tests in the warp Rust codebase.
check
Run Rust fmt, clippy, and unit tests. Use after making Rust code changes.
rust-learner
Learn Rust language features and crate updates. Use when user asks about Rust version changelog, what's new in Rust, crate updates, Cargo.toml dependencies, tokio/serde/axum features, or any Rust ecosystem questions.
Agent Browser Automation
Fast Rust-based headless browser automation CLI with Node.js fallback for AI agents, featuring navigation, clicking, typing, snapshots, and structured commands optimized for agent workflows.