noir-idioms

Evaluates TypeScript code for common syntax and semantics errors.

1.4k|409|Updated Aug 4, 2020
One-click install
npx skills add https://github.com/noir-lang/noir --skill noir-idioms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: noir-idioms
Source: https://github.com/noir-lang/noir/tree/main/.claude/skills/noir-idioms
Command: npx skills add https://github.com/noir-lang/noir --skill noir-idioms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Noir programming often suffers from inconsistent idioms, unclear patterns for hinting and safety comments, and divergent approaches to ACIR vs Brillig. This Skill provides a concise set of idiomatic guidelines to improve readability, safety, and performance of Noir code.

Core Features & Use Cases

  • Idiom Guidelines: Standardized patterns for common tasks such as hints, unsafe blocks, and verification to enhance clarity.
  • Safety Best Practices: Guidance on adding clear Safety comments and minimizing risky constructs.
  • Education & Review: Useful for onboarding new Noir developers, code reviews, and teaching best practices for scalable circuits.

Quick Start

Review the idioms guide and apply its recommendations to your next Noir function to improve readability and circuit efficiency.

Frequently Asked Questions about noir-idioms

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

FAQPage Schema
What are the best practices for writing idiomatic Noir code?

Idiomatic Noir code follows standardized patterns for hints, unsafe blocks, and verification to enhance readability, safety, and circuit efficiency. It enforces clear safety comments and optimized branching strategies for constrained and unconstrained paths.

How do I optimize branching between ACIR and Brillig in Noir?

Optimizing ACIR and Brillig branching involves applying specific idiomatic guidelines to choose the correct constrained and unconstrained execution paths. This ensures your Noir program maintains both safety and performance efficiency.

When should I use hinting versus verifying in Noir circuits?

Hinting versus verifying in Noir depends on applying specific idiomatic guidelines that balance circuit efficiency with safety. The skill provides patterns to standardize these approaches for clarity and performance.

Does this Noir coding guide help with code reviews and onboarding?

Yes, this Noir coding guide applies directly to code reviews and onboarding by providing concise idiomatic guidelines. It helps new developers learn best practices for writing scalable, safe circuits.

What is the safest way to write unsafe blocks in Noir?

The safest way to write unsafe blocks in Noir is to follow standardized idiom guidelines that require clear safety comments. This minimizes risky constructs and improves overall code readability.