smithery.ai

cairo-snforge-troubleshooting

Diagnose and fix common snforge test errors including Sierra compilation failures, cost computation cycles, and version mismatches; use when tests fail with cryptic errors even though `scarb build` succeeds.

First seen Mar 19, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,792 B
  • docs SUMMARY.md 244 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Cairo snforge Troubleshooting

Overview

Guide debugging snforge test failures, particularly Sierra compilation errors that occur after successful Cairo compilation.

Quick Use

  • Read references/common-errors.md before diagnosing.
  • Check Scarb.toml settings first - enable-gas = false causes many issues.
  • Verify toolchain version compatibility (snforge, universal-sierra-compiler, Cairo).
  • Generic implementations need proper trait bounds.

Response Checklist

  • If error mentions "cycle during cost computation": check enable-gas setting.
  • If error mentions "universal-sierra-compiler": check version compatibility.
  • If generic code fails: ensure +Drop<T>, +Copy<T> bounds and struct derives.
  • If scarb build passes but scarb test fails: issue is test-specific compilation.

Common Error Patterns

"unexpected cycle during cost computation"

Cause: enable-gas = false in [cairo] section of Scarb.toml Fix: Remove enable-gas = false or set to true

"Error while compiling Sierra"

Cause: Version mismatch between Cairo and universal-sierra-compiler Fix: Run snfoundryup to update toolchain

Generic impl compilation issues

Cause: Missing trait bounds on generic implementations Fix: Add +Drop<T>, +Copy<T> to impl and #[derive(Drop, Copy)] to structs

Example Requests

  • "My tests fail with 'unexpected cycle during cost computation'"
  • "snforge test fails but scarb build works"
  • "universal-sierra-compiler error after Cairo upgrade"