natspec-standards

Document Solidity smart contracts using NatSpec tags and best practices.

2|1|Updated Nov 13, 2025
One-click install
npx skills add https://github.com/MolcajeteAI/plugin --skill natspec-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: natspec-standards
Source: https://github.com/MolcajeteAI/plugin/tree/main/deprecated/tech-stacks/solidity/skills/natspec-standards
Command: npx skills add https://github.com/MolcajeteAI/plugin --skill natspec-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and best practices for documenting Solidity smart contracts using NatSpec, ensuring clarity, security, and auditability.

Core Features & Use Cases

  • NatSpec Tagging: Learn and apply correct tags for contracts, functions, parameters, and return values.
  • Documentation Standards: Understand best practices for documenting requirements, effects, security considerations, and complex logic.
  • Use Case: When writing a new smart contract or reviewing an existing one, use this Skill to ensure all public functions are clearly documented with @notice, @param, and @return tags, and that complex logic is explained in the @dev section.

Quick Start

Use the natspec-standards skill to generate documentation for the provided Solidity function.

Frequently Asked Questions about natspec-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write NatSpec documentation for Solidity smart contracts?

To write NatSpec documentation for Solidity smart contracts, apply standard tags like @notice, @param, and @return to public functions, and use @dev to explain complex internal logic, state variables, and modifiers. This ensures contract clarity and auditability.

What are the NatSpec standards for documenting Solidity events and errors?

NatSpec standards for Solidity events and errors require using specific tags to describe their purpose and parameters. Documenting events, errors, structs, and enums with proper NatSpec tags ensures that smart contract interfaces are clear and securely auditable.

When do I need to use the @dev tag in Solidity smart contract documentation?

You need to use the @dev tag in Solidity smart contract documentation when explaining implementation details, complex logic, effects, and security considerations. It is used alongside @notice to provide developers with deeper auditing context.

Does NatSpec documentation work with Foundry and Hardhat generation tools?

Yes, NatSpec documentation works with Foundry and Hardhat generation tools. These frameworks process standard Solidity NatSpec tags to automatically generate external documentation from your smart contract code.

What are common mistakes to avoid when auditing Solidity NatSpec?

Common mistakes to avoid when auditing Solidity NatSpec include missing @param or @return tags on public functions, failing to document complex logic in @dev blocks, and improperly tagging events, errors, and state variables.

What is the best way to document complex functions in Solidity smart contracts?

The best way to document complex functions in Solidity smart contracts is to use NatSpec patterns that outline requirements, effects, and security considerations within the @dev tag, while keeping user-facing information in the @notice tag.