midnightntwrk/midnight-expert/compact-review

Claude Code and agent skill by midnightntwrk/midnight-expert

Trust tier 2
  • community
LLM review pending
Source check pending

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-review

SKILL.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

CategoryReference FileFocus
Privacy & Disclosurereferences/privacy-review.mddisclose() usage, witness data leaks, Set vs MerkleTree, persistentHash vs persistentCommit, salt reuse, conditional disclosure
Security & Cryptographic Correctnessreferences/security-review.mdAccess control, hash/commit usage, domain separation, nullifiers, commitments, Merkle paths, error leakage
Token & Economic Securityreferences/token-security-review.mdDouble-spend, overflow, unsafe transfers, missing receiveShielded, authorization
Concurrency & Contentionreferences/concurrency-review.mdRead-then-write patterns, Counter ops, transaction conflicts
Compilation & Type Safetyreferences/compilation-review.mdDeprecated syntax, return types, disclosure errors, casts, generics
Performance & Circuit Efficiencyreferences/performance-review.mdProof cost, ledger reads, MerkleTree depth, redundant computation, loops
Architecture, State Design & Composabilityreferences/architecture-review.mdADT selection, depth planning, visibility, modules, decomposition
Code Quality & Best Practicesreferences/code-quality-review.mdNaming, complexity, dead code, stdlib hallucinations, idioms
Testing Adequacyreferences/testing-review.mdEdge cases, negative tests, private state testing, witness mocks
Documentationreferences/documentation-review.mdCircuit docs, witness contracts, ledger semantics

Verification

Every review MUST include running /midnight-verify:verify on the contract:

bash
/midnight-verify:verify <contract.compact>

For contracts with TypeScript witness implementations:

bash
/midnight-verify:verify <contract.compact> <witnesses.ts>

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:

LevelCriteriaExamples
CriticalWill cause loss of funds, data breach, or contract exploitationMissing access control on mint, private key leaked to ledger, double-spend vulnerability
HighSecurity vulnerability or privacy leak exploitable under certain conditionsUnnecessary disclose() on sensitive data, missing overflow check on token amounts
MediumCorrectness issue, compilation problem, or significant performance concernWrong type cast that will fail at runtime, MerkleTree depth 32 when 10 suffices
LowCode quality, style, or minor best practice deviationInconsistent naming, unused import, missing sealed modifier
SuggestionEnhancement opportunity, not a problemCould use pure circuit modifier for better reuse, consider adding assertion message

Output Format

For each finding, use this format:

- **[Issue title]** (`file:line`)
- **Problem:** Clear description of what is wrong
- **Impact:** Why this matters (security, privacy, correctness, performance)
- **Fix:** Suggested fix with code example when applicable

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/midnightntwrk/midnight-expert/compact-review/badge)](https://verified-skill.com/skills/midnightntwrk/midnight-expert/compact-review)

Something wrong with this skill or its page? Tell us.