agentleFS
zhengqiuyangzhengqiuyang/agent-skills/skills/real-world-gauntlet/SKILL.md

real-world-gauntlet

Skill0 starsChanged 2 months agoMITView on GitHub

Validates a tool against real-world third-party inputs instead of self-made fixtures: official servers, real repositories, real PRs, real version drift, and cross-platform CI. Use when unit tests are green but you need evidence the tool works outside the lab — before publishing, after a major refactor, or whenever a security/precision claim needs to hold on data you did not invent. Catches the class of bugs fixtures structurally cannot contain.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Measure false positives explicitly: Run against inputs known-good in reality (popular repos, official servers).

    line 52
  2. Distinctive:

    When something fails on CI (Linux) but not locally (Windows), do not guess.

    line 62
  3. Distinctive:

    Create a throwaway branch that adds diagnostics at the failure point (print the rendered command, child stderr, env vars), push it, let the …

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Real-World Validation Gauntlet

Unit tests with self-made fixtures prove the code matches your imagination, not that it works. This skill runs a gauntlet: real third-party inputs, evidence captured, failures fixed, then re-run. Every rule below was paid for by a real bug (see references/bug-case-studies.md).

The validation ladder

Know which rung you are on, and never claim a higher one:

  1. L1 unit tests — logic correct. Input is yours. Weakest evidence.
  2. L2 real-world gauntlet (this skill) — third-party inputs test compatibility, false-positive rate, and platform behavior.
  3. L3 dogfooding — you depend on the tool daily; telemetry accumulates.
  4. L4 external users — strangers install it and file issues. The only terminal proof. Everything before it is your own judgment.

Designing the gauntlet

Pick 2–4 attacks per tool, each using an input you do not control:

Tool typeReal-world attack
CLI that parses filesRun against 2–3 popular real repositories (one huge, one quirky)
Client of a protocol/serverRun against the official reference server, not a mock
Version-sensitive toolExercise two real published versions (old vs new)
CI/gate toolRun against real public PRs via the platform API
Scheduler/runnerRun a real useful job with real side effects, twice (idempotence)
Anything cross-platformPush to both Linux and Windows CI before trusting local runs

Hard rules:

  • Never simulate the real thing when the real thing is reachable. npx the real package, gh the real PR, clone the real repo. Mocks hide exactly the bugs you are hunting.
  • Measure false positives explicitly. Run against inputs known-good in reality (popular repos, official servers). Every finding on a known-good input is a false positive — fix the tool, do not whitelist the input.
  • Capture evidence per attack: exact command, exit code, key output. If you cannot re-run it, it did not happen.
  • Fix-then-rerun: a gauntlet finding is only closed after the fixed tool re-passes the SAME real-world attack, plus a regression test derived from it.

Platform-only bugs: the debug-branch technique

When something fails on CI (Linux) but not locally (Windows), do not guess. Create a throwaway branch that adds diagnostics at the failure point (print the rendered command, child stderr, env vars), push it, let the real runner execute it, read the log, then delete the branch. Ten minutes of ground truth beats an hour of local theorizing. Real example: a sh: 3: Replace: not found line in CI logs revealed a multi-line prompt being executed as shell commands (""path"" double-quoting) — invisible on Windows where cmd.exe forgives it.

Common real-world-only failure classes

  1. Normalized echoes — your detector strips the payload you sent, but the real system returns it transformed (Windows /→\, case changes, wrapper text). Strip on normalized forms, not exact strings.
  2. Shell quoting asymmetry — Windows cmd.exe forgives nested quotes; POSIX sh executes the tail of a split command. Test prompt-carrying command lines on Linux always.
  3. Vocabulary vs data-flow — a scanner that fires on words ("env vars") will flag debugging lessons in popular repos. Gate on actual data flow (file paths, $VAR expansions, network sinks).
  4. Runner-injected environment — CI sets GITHUB_EVENT_PATH/GITHUB_TOKEN in every step; tests asserting "no environment" flip code paths. Strip the runner's injected variables in the test launcher.
  5. Cold-start vs warm timings — first npx run downloads packages and blows handshake timeouts. Warm the cache, or raise the specific timeout.

Exit criteria

The gauntlet is done when: every attack has captured evidence, every finding is fixed with a regression test, known-good inputs produce zero false positives, and both OS CI matrices are green. Then say exactly what was validated and what was not — "not-inspected ≠ clean" applies to gauntlets too.

See references/bug-case-studies.md for the five bugs this method caught: each has symptom → investigation → root cause → fix → generalized lesson.

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.