The solidity-auditor skill facilitates parallelized auditing of smart contracts for security vulnerabilities. It's designed for developers and auditors aiming to ensure the security of Solidity code before deployment.
$ npx skills add https://github.com/pashov/skills --skill solidity-auditorSolidity Auditor is a security agent that scans smart contracts for vulnerabilities using parallelized analysis, delivering findings in minutes rather than weeks. Built for Solidity developers, security researchers, and teams who need rapid security checks before deployment or commit. The tool targets specific contracts to maximize context density and catch high-confidence vulnerabilities through repeated passes. While not a replacement for formal audits, it provides essential pre-review screening to identify issues early in development. Run it on active contracts to catch security problems before they reach production.
Install using the command `$ npx skills add https://github.com/pashov/skills --skill solidity-auditor` and execute with desired flags.
Audit smart contracts for security flaws
Generate markdown reports for audit findings
Skip unnecessary files during audits
$ npx skills add https://github.com/pashov/skills --skill solidity-auditorgit clone https://github.com/pashov/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as a Solidity security auditor. Review the following Solidity smart contract code for vulnerabilities, gas inefficiencies, and best practice violations. Focus on reentrancy, overflow/underflow, access control, and upgradeability risks. Provide a detailed report with line numbers, severity ratings (Critical/High/Medium/Low), and suggested fixes. Contract: [SOLIDITY_CODE] Additional context: [CONTRACT_PURPOSE_OR_ENVIRONMENT]
# Solidity Security Audit Report
## Contract Overview
**File:** `TokenSale.sol`
**Purpose:** ERC-20 token sale with staking functionality
**Lines Audited:** 1-156
---
## Critical Issues (Fix Immediately)
### 1. Reentrancy Vulnerability (Line 42-47)
**Severity:** Critical
**Location:** `buyTokens()` function
**Issue:** External call (`transfer`) occurs after state change (token minting).
```solidity
function buyTokens(uint256 amount) external payable {
require(msg.value >= amount * tokenPrice, "Insufficient ETH");
totalTokensSold += amount; // State change
IERC20(token).transfer(msg.sender, amount); // External call
}
```
**Fix:** Use Checks-Effects-Interactions pattern. Move state change after the external call.
---
## High Issues
### 2. Integer Overflow Risk (Line 112)
**Severity:** High
**Location:** `stake()` function
**Issue:** No overflow protection for `stakedAmounts[msg.sender]`.
```solidity
stakedAmounts[msg.sender] += amount;
```
**Fix:** Use OpenZeppelin's `SafeMath` or Solidity 0.8+ built-in checks.
---
## Medium Issues
### 3. Centralization Risk (Line 78-82)
**Severity:** Medium
**Location:** `setTokenPrice()` function
**Issue:** Owner-only function with no timelock or multi-sig requirement.
**Fix:** Implement a 48-hour delay for critical parameters.
---
## Low Issues
### 4. Gas Inefficiency (Line 33-35)
**Severity:** Low
**Issue:** Unnecessary `public` visibility for `tokenPrice` variable.
**Fix:** Change to `private` or `internal`.
---
## Recommendations
- Add NatSpec comments for all functions
- Implement a circuit breaker pattern for emergency stops
- Use `immutable` for `tokenPrice` if it's set only once
**Overall Risk Score:** 7.2/10 (High Risk)
**Estimated Fix Time:** 3-5 daysTake a free 3-minute scan and get personalized AI skill recommendations.
Take free scan