darto-validate-request

darto-validate-request is a skill for Claude Code, Codex from evandersondev/darto. It costs 83 tokens per session (1,166 once invoked), scanned A, original, MIT.

A guide for checking Darto web-request data in Dart against defined rules before a route handler runs. Darto is a Dart web framework, and the guide uses schemas to describe valid input.

In plain words
What is it for?
Use it to define rules for fields such as names, email addresses, and ages, attach those rules to a route, and read the checked data in the handler.
Why use it?
It prevents handlers from processing missing, malformed, or out-of-range body, query, parameter, or header values.

Skill for Claude CodeCodex

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 skills/evandersondev/darto/darto-validate-request
Any agent
npx skills add evandersondev/darto --skill darto-validate-request
Clone the repo
git clone --depth 1 https://github.com/evandersondev/darto

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for darto-validate-request

README.md
[![agentmods](https://agentmods.dev/badge/skills/evandersondev/darto/darto-validate-request.svg)](https://agentmods.dev/skills/evandersondev/darto/darto-validate-request)
Your own site
<a href="https://agentmods.dev/skills/evandersondev/darto/darto-validate-request"><img src="https://agentmods.dev/badge/skills/evandersondev/darto/darto-validate-request.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,166 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00083 $0.01166
Opus 5 $0.00042 $0.00583
Sonnet 5 $0.00017 $0.00233
Haiku 4.5 $0.00008 $0.00117

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

Security

Grade A, and why

darto-validate-request 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 4d 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.

skills/darto-validate-request/SKILL.md · 136 lines

How it starts

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

Validate a request in Darto

Validation in Darto is a route middleware, zValidator, from the darto_validator package. It validates one part of the request against a zard schema (Zod-style). When validation passes, the handler runs and reads the parsed data via c.req.valid(...). When it fails, the request is rejected before the handler runs.

Setup

# pubspec.yaml
dependencies:
  darto: ^1.2.0
  darto_validator: ^1.0.0   # re-exports `zard`; no separate zard dependency
import 'package:darto/darto.dart';
import 'package:darto_validator/darto_validator.dart'; // gives you z.* and zValidator

Procedure

  1. Define a schema with z:
    final userSchema = z.map({
      'name':  z.string().min(1),
      'email': z.string().email(),
      'age':   z.int().min(0).max(150),
    });
    
  2. Attach zValidator(target, schema) as route middleware. The handler runs only if validation succeeds:
    app.post('/users', [zValidator('json', userSchema)], (Context c) {
      final data = c.req.valid<Map<String, dynamic>>('json');
      return c.created({'user': data});
    });
    
  3. Read the validated data in the handler with the same target string: c.req.valid<Map<String, dynamic>>('json' | 'query' | 'param' | 'header'). Use the validated value — not the raw c.req.json() — so you get the parsed / coerced result.

Targets

target Validates
'json' JSON request body
'query' query-string parameters
'param' path parameters
'header' request headers
// Query
app.get('/search', [zValidator('query', z.map({'q': z.string().min(1)}))], (c) {
  final q = c.req.valid<Map<String, dynamic>>('query');
  return c.ok({'query': q['q']});
});

// Path param
app.get('/posts/:id', [zValidator('param', z.map({'id': z.string()}))], (c) {
  final params = c.req.valid<Map<String, dynamic>>('param');
  return c.ok({'id': params['id']});
});

Read the full file on GitHub · 136 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. 4d ago First seen · 136 lines · 83 tokens per session scan A 7fea89542714

Subscribe to this mod's changes

darto-validate-request is a skill published in the GitHub repository evandersondev/darto (43 stars, last pushed 1mo ago), licensed MIT. It adds 83 tokens to every session and 1,166 once invoked, about $0.0004 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.