agentleFS
phatnguyen03022001phatnguyen03022001/agent-skills/adversarial-audit/SKILL.md

adversarial-audit

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Use when correctness or governance depends on assumptions about stale state, retries, concurrency, partial failure, process death, dependency behavior, or policy compliance under pressure.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    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:

    Use only relevant faults, including:

    line 18
  2. Distinctive:

    Prefer high-consequence or likely faults over theatrical edge cases.

    line 44
  3. Distinctive:

    Do not demand distributed-systems machinery for a local deterministic problem simply because exotic failures can be imagined.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Adversarial Audit

Try to make the proposed system or workflow fail before reality does.

Start from invariants

List the guarantees that must survive failure: data consistency, at-most/at-least-once effects, authorization, branch/HEAD identity, ordering, uniqueness, durability, rollback ability, or execution-policy boundaries.

Then challenge the mechanisms that protect them.

Fault-oriented questions

Use only relevant faults, including:

  • stale reads, stale contracts, clocks, caches, or configuration;
  • duplicate, delayed, reordered, or lost requests/events;
  • retry after an operation succeeded but acknowledgement failed;
  • concurrent writers and races;
  • process death between multi-step effects;
  • partial success across service or storage boundaries;
  • timeout, throttling, network partition, storage exhaustion, or unavailable dependency;
  • malformed or surprising dependency responses;
  • interrupted deployment or migration;
  • cleanup that never runs;
  • future maintainers misunderstanding an implicit invariant.

For agent-governed workflows, explicitly test rationalizations: “the branch is probably unchanged,” “CI passed so promotion is safe,” “this adjacent cleanup is harmless,” or “the missing skill can be approximated from memory.” Convert important rules into observable gates or deterministic validation where possible.

Produce actionable findings

For each plausible failure, state:

  1. precondition/fault;
  2. resulting incorrect state or policy violation;
  3. earliest detectable signal;
  4. containment/recovery path;
  5. prevention or invariant-strengthening change.

Prefer high-consequence or likely faults over theatrical edge cases. Fault injection or simulation is useful only when authorized, bounded, and safer than speculation.

Look especially for single observations being mistaken for guarantees: one successful deploy, one passing retry, one clean shutdown, or one agent obeying a rule. Where policy matters, ask how the next agent can verify the invariant mechanically instead of relying on memory, wording, or good intentions.

Boundaries

This is a generic failure and governance-pressure audit, not a substitute for security-review threat modeling, reliability production operating design, debugging root-cause work on an observed failure, or gap-analysis completeness review.

Do not demand distributed-systems machinery for a local deterministic problem simply because exotic failures can be imagined.

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.