skills/developing-smart-contracts/SKILL.md
Solidity smart contract development guidelines. Covers NatSpec documentation, naming conventions, file layout, and code style. Use when writing, reviewing, or refactoring Solidity contracts, or when the user asks about Solidity best practices, contract structure, or NatSpec.
npx skillsauth add kyzooghost/audit-code-health-skill developing-smart-contractsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Best practices for developing Solidity smart contracts. Contains rules covering documentation, naming, structure, and code style.
Reference these guidelines when:
// SPDX-License-Identifier: Apache-2.0// SPDX-License-Identifier: AGPL-3.0| Priority | Category | Impact | Rule File |
| -------- | -------------- | -------- | ------------------------ |
| 1 | NatSpec | CRITICAL | rules/natspec.md |
| 2 | File Layout | HIGH | rules/file-layout.md |
| 3 | Naming | HIGH | rules/naming-conventions.md |
| 4 | Imports | MEDIUM | rules/imports.md |
| 5 | Visibility | MEDIUM | rules/visibility.md |
| 6 | General Rules | LOW | rules/general-rules.md |
ALWAYS use NatSpec for all public/external items.
@notice@param _paramName (in signature order)@return variableNameSee rules/natspec.md for examples.
Interface structure:
Contract structure:
See rules/file-layout.md for templates.
| Item | Convention | Example |
| ----------------------- | ---------------- | -------------------------------- |
| Public state | camelCase | uint256 messageCount |
| Private/internal state | _camelCase | uint256 _internalCounter |
| Constants | UPPER_SNAKE_CASE | bytes32 DEFAULT_ADMIN_ROLE |
| Function params | _camelCase | function send(address _to) |
| Return variables | camelCase | returns (bytes32 messageHash) |
| Mappings | descriptive keys | mapping(uint256 id => bytes32) |
| Init functions | __Contract_init | __PauseManager_init() |
See rules/naming-conventions.md for details.
Always use named imports:
// CORRECT
import { IMessageService } from "../interfaces/IMessageService.sol";
// WRONG
import "../interfaces/IMessageService.sol";
See rules/imports.md for details.
internal unless explicitly needed publicexternal/public surface areathis.functionCall() patternSee rules/visibility.md for details.
pnpm run lint:fix before committingSee rules/general-rules.md for deployment, testing, and more.
Before submitting a PR:
@notice, @param, @return)internal unless needed publicpnpm run lint:fix)Read individual rule files for detailed explanations and code examples:
rules/natspec.md
rules/file-layout.md
rules/naming-conventions.md
Each rule file contains:
For the complete guide with all rules expanded: AGENTS.md
development
Sync a skill from this repo into the local machine's skill directories. Use when the user asks to make a repo skill available locally, sync a local skill for Claude, Agents, or Codex, update local skill symlinks, or follow the .claude/skills source link pattern with .agents/skills and .codex/skills symlinks.
development
Sync a command from this repo into local agent surfaces. Use when the user asks to make a repo command available locally, sync a local command for Claude, Agents, or Codex, update command symlinks, or expose a command to Codex as a skill.
testing
Use when the user asks to grill, interrogate, pressure-test, or relentlessly interview them about a plan until requirements, tradeoffs, dependencies, and implementation decisions are clear.
tools
Use when the user asks to create, update, draft, or generate a GitHub pull request, including /create-pr behavior or equivalent workflow.