midnightntwrk/midnight-expert/compact-review
Claude Code and agent skill by midnightntwrk/midnight-expert
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when reviewing Compact smart contract code, TypeScript witness implementations, or test files for a Midnight project. Applies when a user asks to "review my Compact contract", "audit this smart contract", "check my Midnight code", or "run a code review checklist". Provides category-specific checklists covering privacy, security, cryptographic correctness, token economics, concurrency, compilation, performance, architecture, code quality, testing, and documentation, plu…
Install
npx vskill@latest install midnightntwrk/midnight-expert/compact-reviewSKILL.md
Compact Code Review Checklists
This skill contains review checklists for 10 categories of Compact smart contract review. Each reference file provides a focused checklist for one review category.
How to Use
The assigned review category determines which reference file to load. Load the reference file for your assigned category and apply every checklist item to the code under review.
Category Reference Map
| Category | Reference File | Focus | |
|---|---|---|---|
| Privacy & Disclosure | references/privacy-review.md | disclose() usage, witness data leaks, Set vs MerkleTree, persistentHash vs persistentCommit, salt reuse, conditional disclosure | |
| Security & Cryptographic Correctness | references/security-review.md | Access control, hash/commit usage, domain separation, nullifiers, commitments, Merkle paths, error leakage | |
| Token & Economic Security | references/token-security-review.md | Double-spend, overflow, unsafe transfers, missing receiveShielded, authorization | |
| Concurrency & Contention | references/concurrency-review.md | Read-then-write patterns, Counter ops, transaction conflicts | |
| Compilation & Type Safety | references/compilation-review.md | Deprecated syntax, return types, disclosure errors, casts, generics | |
| Performance & Circuit Efficiency | references/performance-review.md | Proof cost, ledger reads, MerkleTree depth, redundant computation, loops | |
| Architecture, State Design & Composability | references/architecture-review.md | ADT selection, depth planning, visibility, modules, decomposition | |
| Code Quality & Best Practices | references/code-quality-review.md | Naming, complexity, dead code, stdlib hallucinations, idioms | |
| Testing Adequacy | references/testing-review.md | Edge cases, negative tests, private state testing, witness mocks | |
| Documentation | references/documentation-review.md | Circuit docs, witness contracts, ledger semantics |
Verification
Every review MUST include running /midnight-verify:verify on the contract:
For contracts with TypeScript witness implementations:
Verification results are authoritative for compilation correctness, type safety, witness consistency, and behavioral correctness. Include verification results alongside checklist findings in the review report.
Severity Classification
Apply these severity levels consistently across all categories:
| Level | Criteria | Examples | |
|---|---|---|---|
| Critical | Will cause loss of funds, data breach, or contract exploitation | Missing access control on mint, private key leaked to ledger, double-spend vulnerability | |
| High | Security vulnerability or privacy leak exploitable under certain conditions | Unnecessary disclose() on sensitive data, missing overflow check on token amounts | |
| Medium | Correctness issue, compilation problem, or significant performance concern | Wrong type cast that will fail at runtime, MerkleTree depth 32 when 10 suffices | |
| Low | Code quality, style, or minor best practice deviation | Inconsistent naming, unused import, missing sealed modifier | |
| Suggestion | Enhancement opportunity, not a problem | Could use pure circuit modifier for better reuse, consider adding assertion message |
Output Format
For each finding, use this format:
Group findings by severity within your category: Critical → High → Medium → Low → Suggestions. End with a Positive Highlights section noting what was done well.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/compact-core/skills/compact-review/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/midnightntwrk/midnight-expert/compact-review)