tejas0111/pharos/code-review-templates-and-checklists
Claude Code and agent skill by tejas0111/pharos
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install tejas0111/pharos/code-review-templates-and-checklistsSKILL.md
The same SKILL.md was published earlier as tejas0111/pharos/code-review-templates-and-checklists.
Code Review Templates & Checklists
Overview
Standardized code review process for Pharos smart contracts. Every review must follow the universal checklist below and apply contract-specific templates where applicable.
Severity Ratings
| Severity | Label | Definition | Action | |
|---|---|---|---|---|
| ๐ด Critical | C- | Direct loss of funds or bricked contract | Must fix before any deployment | |
| ๐ก High | H- | Incorrect behavior under edge cases | Must fix before mainnet | |
| ๐ข Medium | M- | Gas inefficiency or poor DX | Should fix, document if deferred | |
| โช Low | L- | Style / naming / warnings | Note for cleanup |
Sample Review Report Format
// BAD: State updated after external call function liquidate(address user, uint256 debt) external { _seizeCollateral(user); // External call before state update s_positions[user].borrowed -= debt; }
// GOOD: Checks-Effects-Interactions pattern function liquidate(address user, uint256 debt) external { uint256 penalty = debt * s_liquidationBonus / 10000; s_positions[user].borrowed -= debt; // State first _seizeCollateral(user, penalty); // Then external }
Universal Review Checklist
๐ Security (check each)
- [ ] Custom errors used instead of
requirestrings (gas / DX) - [ ] Reentrancy guard on all state-changing
externalfunctions - [ ]
SafeERC20used for all token transfers (returns checked) - [ ] Pull-over-push pattern for withdrawals (user pulls, not contract pushes)
- [ ] Input validation: zero-address, zero-amount, bounds checks
- [ ] Access control:
onlyOwner/onlyRoleon all admin functions - [ ] No
tx.originfor authentication (usemsg.sender)
โฝ Gas Optimization (check applicable)
- [ ] Structs packed to fit in fewer slots (โค 32 bytes per field where possible)
- [ ]
calldatainstead ofmemoryfor read-only params - [ ]
uncheckedblocks used safely for increment operations - [ ] Events emitted for all state changes
- [ ] Redundant
SLOADs cached in local variables
โ Pharos-Specific (check each)
- [ ]
i_chainIddeclared asuint256 public immutablefor replay protection - [ ] Storage layout compatible with SPN Paymaster (no delegatecall conflicts)
- [ ] EntryPoint address verified for AA contracts (
0x0000...a032) - [ ] Correct chain ID used: Atlantic (688689) vs Pacific (1672)
- [ ] zkLogin ephemeral keys use 1-hour expiry
- [ ]
vm.createSelectFork("pharos_testnet")used in integration tests
๐งช Testing (check each)
- [ ] Unit test for every public/external function
- [ ] Fuzz tests for critical math (liquidation, swap, interest)
- [ ] Invariant tests for DeFi contracts (DEXPool, LendingPool, StakingPool)
- [ ] Revert paths tested (
vm.expectRevert) - [ ] Fork tests for multi-contract interactions
๐ Deployment (check each)
- [ ] Constructor arguments validated (no zero-addresses, bounds)
- [ ] PharosScan verification configured (
--verifier-url) - [ ] Broadcast simulation run before real deployment
- [ ] Contract address saved to DEPLOYMENTS.md with explorer link
Contract-Specific Templates
ERC-20 Token
DeFi Protocol (Lending / Staking)
AMM / DEX
CI/CD Checklist
- [ ]
forge buildpasses with 0 errors - [ ]
forge testpasses with 0 failures - [ ] Gas report reviewed for regressions (
forge snapshot --diff) - [ ]
forge scriptwith--broadcastsimulated first - [ ] Slither or other static analysis clean (optional but recommended)
Related Subskills
security-auditโ Deep security analysis patternscontract-reviewโ Technical review workflowtesting-strategyโ How to write tests for review coveragegas-optimizationโ Gas-focused review patterns
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskill/subskills/code-review-templates-and-checklists/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tejas0111/pharos/code-review-templates-and-checklists)