agentleFS
metacircu1armetacircu1ar/hive_skills/skills/audit/audit-input-validation/SKILL.md

audit-input-validation

Skill4 starsChanged 2 months agoMITView on GitHub

Audit web application client forms and server endpoints for input validation. Use when reviewing forms, API handlers, controllers, schemas, route tests, or launch readiness for missing type, length, format, allowed-character, and server-side validation coverage; generate reviewable validation tests when server endpoint gaps are found.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat server-side validation as mandatory even when client validation exists.

    line 22
  2. Distinctive:

    When server validation tests are missing and the project has an established test pattern, add focused tests as a reviewable diff.

    line 24
  3. Very specific:

    Use the repository's route definitions and framework conventions first.

    line 28
  4. Distinctive:

    Do not count TypeScript types, UI placeholders, HTML input types, or OpenAPI documentation as server validation unless runtime code …

    line 30
  5. Distinctive:

    After the table, list fixes in priority order.

    line 40

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Audit Input Validation

Audit every user-controlled input path from UI to server and report concrete validation gaps with file and line references.

Workflow

  1. Map the application surfaces:
    • Find client forms, controlled inputs, file uploads, query builders, and API calls.
    • Find server routes, controllers, handlers, schemas, serializers, background jobs fed by user input, and webhook-like endpoints.
    • Build a route-to-form map where possible by following client API calls to server handlers.
  2. For each input, verify validation at both layers:
    • Type: int, float, boolean, enum, string, array, object, file.
    • Bounds: length, numeric ranges, item counts, file sizes.
    • Format: email, URL, UUID, date/time, phone, slug, currency, etc.
    • Allowed character set: especially for names, slugs, search, rich text, filenames, and identifiers.
    • Required/optional behavior and default values.
  3. Treat server-side validation as mandatory even when client validation exists.
  4. Review tests for each endpoint that accepts user input. Look for invalid type, too long, malformed format, disallowed characters, missing required fields, and boundary values.
  5. When server validation tests are missing and the project has an established test pattern, add focused tests as a reviewable diff. Do not commit automatically.

Useful Searches

Use the repository's route definitions and framework conventions first. Useful search terms include route, router, controller, handler, schema, validate, changeset, zod, yup, joi, params, body, query, Form, input, textarea, select, upload, and multipart.

Do not count TypeScript types, UI placeholders, HTML input types, or OpenAPI documentation as server validation unless runtime code enforces them.

Output

Produce a table with one row per form or endpoint:

SurfaceInputClient validationServer validationTest coverageFindings
path/file:linefield_namepresent/missing/partialpresent/missing/partialpresent/missing/partialconcrete issue

After the table, list fixes in priority order. Each finding must include:

  • File and line reference.
  • Risk in one sentence.
  • Suggested fix, preferably matching the repository's validation style.
  • Tests added or tests still needed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.