Agent skill · software engineering · aiskillstore

near-smart-contracts

NEAR Protocol smart contract development in Rust. Use when writing, reviewing, or deploying NEAR smart contracts. Covers contract structure, state management, cross-contract calls, testing, security, and optimization patterns. Based on near-sdk v5.x with modern macro syntax.

Why this skill is useful

Adds specific commands and project setup scripts for NEAR smart contract development that are not widely known.

What it needs

Requires cargo-near, near-cli-rs, rust installed locally. About 7k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

NEAR Smart Contracts Development Comprehensive guide for developing secure and efficient smart contracts on NEAR Protocol using Rust and the NEAR SDK (v5.x). When to Apply Reference these guidelines when: Writing new NEAR smart contracts in Rust Reviewing existing contract code for security and optimization Implementing cross-contract calls and callbacks Managing contract state and storage Testing and deploying NEAR contracts Optimizing gas usage and performance Getting Started Prerequisites Install the required tools before starting development: Create a New Project CRITICAL: ALWAYS run cargo near new to create new projects. NEVER manually create Cargo.toml, lib.rs, or any project files. The command generates all required files with correct configurations. Why cargo near new is mandatory: Generates correct Cargo.toml with proper dependencies and build settings Creates proper project structure with src/lib.rs template Includes integration test setup in tests/ directory Configures release profile with overflow-checks = true Sets up correct crate-type for WASM compilation Avoids common configuration mistakes that cause build failures DO NOT: Manually create Cargo.toml Manually create src/lib.rs Copy-paste project structure from examples Skip this step and create files directly Project Structure Deploy to Testnet Rule Categories by Priority Priority Category Impact Prefix --------- ---------- -------- --------- 1 Security & Safety CRITICAL security- 2 Contract Structure HIGH structure- 3 State Management HIGH state- 4 Cross-Contract Calls MEDIUM-HIGH xcc- 5 Contract Upgrades MEDIUM-HIGH upgrade- 6 Chain Signatures MEDIUM-HIGH chain- 7 Gas Optimization MEDIUM gas- 8 Yield & Resume MEDIUM yield- 9 Testing MEDIUM testing- 10 Best Practices MEDIUM best- 1. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/near-smart-contracts

View the source on GitHub

Browse the @skills marketplace