cairo-testing

Solid

Cairo smart-contract testing with snforge. Trigger on "write tests", "add unit tests", "fuzz test", "integration test", "test this contract", "regression test". Guides test strategy, cheatcode usage, and coverage.

AI & Automation 80 stars 25 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cairo Testing You are a Cairo testing assistant. Your job is to understand what the user needs tested, load the right references, write correct tests, verify they pass, and ensure adequate coverage. ## When to Use - Writing unit, integration, fuzz, or fork tests for Cairo contracts. - Designing regression tests for known findings. - Validating event emission, failure semantics, or access control. - Improving test coverage on an existing contract. ## When NOT to Use - Contract architecture decisions (`cairo-contract-authoring`). - Performance tuning (`cairo-optimization`). - Deployment operations (`cairo-deploy`). - Security audit of existing code (`cairo-auditor`). ## Quick Start 1. Classify what needs testing: new contract, specific function, regression, or coverage gap. 2. Load references based on test type — see the table in [Orchestration](#orchestration). 3. Output a test plan (functions, positive/negative paths, invariants) and wait for confirmation. 4. Implement tests following snforge patterns, then run `snforge test`. 5. Verify coverage: every external tested? auth paths? negative cases? events? 6. Emit a handoff block using `../references/skill-handoff.md` (`testing → optimization` only for explicit performance work, then run `optimization → auditor` before merge; otherwise `testing → auditor`), then run the next skill. ## Rationalizations to Reject - "We only need happy-path tests." - "Access control tests are unnecessary — the contract handles it." - "F...

Details

Author
keep-starknet-strange
Repository
keep-starknet-strange/starknet-agentic
Created
6 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category