near/agent-skills

near-contract-audit

Comprehensive security audit skill for NEAR Protocol smart contracts written in Rust.

First seen Feb 16, 2026

Installation

$ npx skills add near/agent-skills --skill near-contract-audit

Summary

  • Comprehensive security audit skill for NEAR Protocol smart contracts written in Rust.
  • Use when auditing NEAR contracts, reviewing security vulnerabilities, or analyzing contract code for issues like reentrancy, unhandled promises, unsafe math, access control flaws, and callback security.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from near/agent-skills · top by installs.

npx skills add near/agent-skills

Browse all from near/agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 14
Default branch main
Open issues 1
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,197 B
  • docs SUMMARY.md 315 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 38 installs

SKILL.md

NEAR Contract Audit

Security audit skill for NEAR smart contracts in Rust.

Audit Workflow

Phase 1: Automated Analysis

Run your preferred Rust static analysis and NEAR-focused security tools on the contract to:

  • Scan for common vulnerability patterns (reentrancy, unsafe math, unhandled promises, access control issues, etc.)
  • Highlight potentially risky patterns for deeper manual review

Phase 2: Manual Review

After automated analysis, perform manual review for:

  • Business logic vulnerabilities
  • Access control patterns
  • Economic attack vectors
  • Cross-contract interaction safety

Phase 3: Code-Specific Analysis

For each finding, verify:

  1. Is it a true positive?
  2. What is the exploitability?
  3. What is the recommended fix?

Phase 4: Report Generation

Document findings with severity, location, description, and remediation.

Vulnerability Quick Reference

Severity Detector ID Description
High non-private-callback Callback missing #[private] macro
High reentrancy State change after cross-contract call
High incorrect-argument-or-return-types Using native integer types in JSON interfaces
High unsaved-changes Collection modifications not persisted
High owner-check Missing caller/owner verification
High yocto-attach Missing assertoneyocto on sensitive functions
High storage-collision Same storage prefix for different collections
High required-initialization-macro Missing #[init] on initialization method
Medium gas-griefing Unbounded loops causing DoS
Medium insecure-random Predictable randomness from block data
Medium prepaid-gas Insufficient gas reserved for callbacks
Low cover-storage-cost Missing storage deposit verification
Low unsafe-math Arithmetic without overflow checks
Low float-math Using floating point types for financial math

Reference Files

For detailed vulnerability documentation with code examples:

  • [high-severity.md](references/high-severity.md) - Critical vulnerabilities (8 detectors)
  • [medium-severity.md](references/medium-severity.md) - Medium vulnerabilities (4 detectors)
  • [low-severity.md](references/low-severity.md) - Low severity findings (3 detectors)