Borrowing it
Nothing to install: this file belongs to waynesutton/markdown-site. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/waynesutton/markdown-site/main/.cursor/skills/convex-return-validators/SKILL.mdgit clone --depth 1 https://github.com/waynesutton/markdown-siteWrote 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/waynesutton/markdown-site/convex-return-validators)<a href="https://agentmods.dev/skills/waynesutton/markdown-site/convex-return-validators"><img src="https://agentmods.dev/badge/skills/waynesutton/markdown-site/convex-return-validators/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/waynesutton/markdown-site/convex-return-validators"><img src="https://agentmods.dev/badge/skills/waynesutton/markdown-site/convex-return-validators.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.00144 | $0.02106 |
| Opus 5.5 | $0.00058 | $0.00842 |
| Sonnet 5.5 | $0.00029 | $0.00421 |
| Haiku 4.5 | $0.00014 | $0.00211 |
Grade A, and why
convex-return-validators 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 1mo 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 — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to and when not to use return validators in Convex
Convex recently updated its guidance on return validators. The old rule was "always add a returns validator." The new guidance is: prefer simple TypeScript types and inference by default. Use returns: when you actually want Convex to enforce an exact runtime contract.
Return validators aren't bad. The word "always" was doing damage.
What is a return validator?
Convex lets you validate arguments coming into a function using args and return values going out using returns. A return validator declares the return shape, and Convex checks it at runtime.
import { query } from "./_generated/server";
import { v } from "convex/values";
export const getUserPreview = query({
args: { userId: v.id("users") },
returns: v.object({
name: v.string(),
}),
handler: async (ctx, { userId }) => {
const user = await ctx.db.get(userId);
if (!user) throw new Error("User not found");
return { name: user.name };
},
});
If the returned value doesn't match, you get a runtime error instead of silently returning unexpected data. Object validators don't allow extra properties — returning extra fields will fail validation at runtime.
Why the old "always" rule existed
The original motivation was more about TypeScript pain than runtime correctness. Convex projects can hit circular type problems because functions reference generated api or internal objects, and those references become part of the generated types. Types reference types reference types until TypeScript gives up.
The thinking: if the model always declared return validators, it would reduce reliance on inferred return types and break the cycle. In practice, it only helps in specific circumstances.
Why "always" causes problems
In real codebases, and especially in agentic AI workflows, the "always" rule creates predictable failure modes:
Verbosity and copy-paste fragility
LLMs don't reuse validators. They copy-paste shapes inline. You end up with return validators like this on every function:
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 190 lines · 144 tokens per session scan A dc5187f72df1
convex-return-validators is a skill published in the GitHub repository waynesutton/markdown-site (627 stars, last pushed 5mo ago), licensed MIT. It adds 144 tokens to every session and 2,106 once invoked, about $0.0006 per session on Opus 5.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
api-tester
API testing expert for curl, REST, GraphQL, authentication, and debugging.
Bug Fixing
Skill "Bug Fixing" from OpenLabor/openlabor, covering bug fixing, objective, process and guidelines.
Write Tests
Generate unit and integration tests.
API Design
Design and document APIs.
System Design
Design system architecture.
api-tester
Skill "api-tester" from aimerdoux/wavex-os, covering api tester agent personality, 🧠 your identity & memory, 🎯 your core mission, comprehensive api testing strategy and performance and security validation.