cairo-testing

Automate Cairo contract testing across unit, integration, fuzz, and fork workflows with Snforge.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/cartridge-gg/scoundrel --skill cairo-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cairo-testing
Source: https://github.com/cartridge-gg/scoundrel/tree/main/.agents/skills/cairo-testing
Command: npx skills add https://github.com/cartridge-gg/scoundrel --skill cairo-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cairo smart-contract testing is often fragmented across unit, integration, fuzz, and fork scenarios, making it hard to ensure security, correctness, and regression resilience in on-chain deployments.

Core Features & Use Cases

  • Structured testing strategy across unit, integration, fuzz, and fork tests for Cairo contracts.
  • Guidance for regression testing, cheatcodes usage, and security validation in CI pipelines.
  • Reusable workflow patterns with references to legacy-full.md and practical examples to accelerate QA.

Quick Start

Add unit tests for all state-mutating selectors and run the snforge test suite to cover fuzzing and fork scenarios.

Frequently Asked Questions about cairo-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Cairo smart contract testing for unit, integration, and fuzz scenarios?

Cairo contract testing can be structured across unit, integration, fuzz, and fork workflows using a Snforge-based toolchain to ensure verifiable on-chain behavior and regression safety in CI pipelines.

What is fork testing in Starknet and when do I need it?

Fork testing simulates interactions with actual Starknet network state, which is needed when validating contract behavior against live on-chain data and dependencies within your Cairo test suite.

Does this Cairo testing workflow require a specific toolchain setup?

Yes, this workflow requires a Snforge-compatible setup and a structured test workflow documented in SKILL.md to properly execute comprehensive Cairo contract testing.

How do I add fuzz tests to my Starknet project using snforge?

You can add fuzz tests by writing unit tests for all state-mutating selectors and running the snforge test suite, which automatically covers fuzzing and fork scenarios for your Cairo contracts.

What's the best way to ensure regression safety for Cairo contracts in CI pipelines?

The best way to ensure regression safety is applying structured testing strategies with cheatcodes and security validation directly integrated into your CI pipelines using snforge.

Why does my Cairo contract test suite fail to cover fork scenarios?

Fork scenario coverage fails if your testing strategy is fragmented; consolidating unit, integration, fuzz, and fork workflows into a unified Snforge-based toolchain resolves these testing gaps.