agentleFS
poorvith-mppoorvith-mp/skills-developer/skills/smart-contract-audit/SKILL.md

smart-contract-audit

Skill0 starsChanged 3 months agoMITView on GitHub

Audit contracts for reentrancy, access control flaws and oracle manipulation. Use when auditing smart contracts for reentrancy, gas, or exploit risks.

8 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 7 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:

    NEVER weaken or skip a failing test to make a change land.

    line 37
  2. Distinctive:

    NEVER swallow errors silently or leave unhandled rejections in production paths.

    line 38
  3. Distinctive:

    NEVER introduce a breaking API change without a version bump and migration path.

    line 39

“Common” is measured: kept by at least 6 in 10 of the 7 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

Smart Contract Audit

Audit smart contracts for the failure modes that actually drain funds.

Process

  1. Map value flow and trust boundaries first. Where does value enter, leave, and who can move it? Most exploits live at a boundary the developer did not think of as one.
  2. Check access control on every state-changing function. Missing or wrong modifiers remain the most common serious finding.
  3. Trace reentrancy paths, including cross-function and cross-contract. Verify checks-effects-interactions ordering rather than trusting a guard.
  4. Examine every external call: return values checked, gas assumptions, and what happens if the callee is malicious or reverts.
  5. Scrutinise price and oracle dependencies. Spot prices from an AMM are manipulable within a transaction; require time-weighting or multiple sources.
  6. Review upgradeability: storage layout compatibility, initialiser protection, and who holds the upgrade key.
  7. Model the economics, not just the code. Flash-loan-funded manipulation is a design flaw, not a bug.

Deliverables

  • Findings by severity with a concrete exploit path per issue
  • Proof-of-concept test for each critical and high finding
  • Remediation with the fix and why it closes the path

Verification & Quality Checklist

  • Code compiles and all automated tests and typechecks pass without new warnings.
  • Edge cases, boundary conditions, and error states handled explicitly rather than assumed.
  • No hardcoded secrets, credentials, or insecure defaults introduced.
  • Changes are covered by a test that fails without them.

Anti-Patterns & Constraints

  • NEVER weaken or skip a failing test to make a change land.
  • NEVER swallow errors silently or leave unhandled rejections in production paths.
  • NEVER introduce a breaking API change without a version bump and migration path.

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.