Audit Skill

SkillSecurity

Security audit and code review for Solidity smart contracts. Trigger phrases - audit, check PR, security review, pre-audit preparation, vulnerability check, or when preparing code for external audit.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Audit Skill skill

What this skill tells your AI

The instructions your AI receives, as published by sablier-labs/evm-monorepo in .agents/skills/audit/SKILL.md and read by ahel’s review.

Audit and code review guidance for Solidity smart contracts. For detailed vulnerability patterns, see bundled references.

Bundled References

ReferenceContentWhen to Read
.claude/skills/audit/references/vulnerability-checklist.md17 vulnerability categoriesDuring security reviews
.claude/skills/audit/references/audit-workflow.mdStep-by-step audit processWhen conducting formal audits
.claude/skills/audit/references/pre-audit-checklist.mdCode quality + testing prepBefore external audit

Workflow: Use pre-audit-checklist to prepare → vulnerability-checklist to review → audit-workflow for formal process.

Review Types

TypePurposeDepthWhen to Use
Self-ReviewPre-submission sanity checkQuickBefore creating a PR
PR ReviewVerify changes meet standardModerateWhen reviewing others' PRs
Deep ReviewThorough security analysisDeepBefore mainnet deployment
AuditComprehensive security auditThoroughPre-launch or after major change

Self-Review Checklist

Code Quality

  • Code compiles without warnings
  • All tests pass
  • No commented-out code or debug statements
  • No hardcoded test values in production code

Style & Conventions

  • Follows naming conventions
  • Imports ordered: external → internal → local
  • Functions ordered: external → public → internal → private
  • NatSpec complete for public/external functions

Logic

  • Edge cases handled (zero amounts, empty arrays)
  • Error messages are descriptive
  • Events emitted for all state changes
  • Access control is appropriate

Security

  • CEI pattern followed (no state changes after external calls)
  • SafeERC20 used for token transfers
  • No unchecked arithmetic on user input
  • No unbounded loops

Tests

  • New functionality has tests
  • Edge cases tested
  • BTT tree updated (if applicable)

PR Review Issues

IssueDetection
Missing access controlNew external functions without modifiers
State after external.call{}/transfer followed by state changes
Unchecked return values.call() without checking success
Missing eventsState changes without event emission
Incomplete error infoErrors without diagnostic parameters
Test coverage gapsNew code paths without corresponding tests
Breaking changesInterface modifications without deprecation
Gas regressionNew loops, storage operations in hot paths

Severity Classification

SeverityDefinition
Critical (C)Direct fund loss or permanent freeze
High (H)Significant loss under specific conditions
Medium (M)Limited loss or functionality impairment
Low (L)Minor issues, deviations from best practices
InformationalSuggestions and observations

Quick Vulnerability Reference

Full checklist: See .claude/skills/audit/references/vulnerability-checklist.md for comprehensive patterns.

SeverityKey Checks
CriticalReentrancy (CEI), Access control, Unchecked .call(), Delegatecall targets, Signature replay
HighFlash loan assumptions, Oracle manipulation, Front-running, Integer overflow, Price inflation
MediumFee-on-transfer tokens, Rebasing tokens, Unbounded loops, Timestamp dependence

Comment Prefixes

PrefixMeaning
BLOCKING:Must fix before merge
IMPORTANT:Should fix, but can be follow-up
SUGGESTION:Nice to have, optional
NIT:Minor style preference
QUESTION:Clarification needed

Protocol Invariants

Security properties that MUST always hold. Read the authoritative invariants from the codebase.

Invariant README Locations

PackageLocation
Lockuplockup/tests/invariant/README.md
Flowflow/tests/invariant/README.md

What to Verify

When reviewing code, read the package's invariant README and verify:

  1. No new code violates existing invariants
  2. New features have corresponding invariants added
  3. State transitions follow documented valid paths
  4. Aggregate amounts remain consistent

Universal Invariants (all protocols)

CategoryCheck
Value conservationTotal in = total out + total remaining
Monotonic stateWithdrawn/streamed amounts never decrease
Access controlOnly authorized roles modify state
State machineOnly valid transitions occur (see README)

Final Checklists

Before Approving Any Code

  • Compiles without warnings
  • All tests pass
  • Follows project conventions
  • No obvious security issues
  • Adequate test coverage

For Security-Critical Code

  • CEI pattern followed
  • Access control verified
  • External calls checked
  • Edge cases handled
  • Static analysis clean

Before Marking Audit Complete

  • All external entry points reviewed
  • All state-changing functions checked for reentrancy
  • Access control verified on every sensitive function
  • External call return values handled
  • Token integration patterns validated
  • Oracle dependencies assessed
  • Flash loan attack vectors considered
  • Slither run with no unreviewed findings

Example Invocations

Test this skill with these prompts:

  1. PR review: "Review this PR for security issues: [diff content]"
  2. Self-review: "Run through the self-review checklist for my new withdraw function"
  3. Deep review: "Perform a security audit of the SablierFlow.sol contract"
  4. Invariant check: "Verify this code doesn't violate the value conservation invariant"

Signals

GitHub stars
352
Forks
82
Last commit
Aug 2026
Hacker News mentions
20
Advanced
Catalog kind
skill
Gateway key
audit-sablier-labs
Source
github.com/sablier-labs/evm-monorepo