0xmiden/agent-tools/felt-construction

Claude Code and agent skill by 0xmiden/agent-tools

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when constructing a `Felt` from a numeric value in Rust — avoid silently producing a non-canonical Felt that no longer equals the original input.

Install

npx vskill@latest install 0xmiden/agent-tools/felt-construction

SKILL.md

Felt Construction From Untrusted Numeric Inputs

Rule

Felt::new(x) is checked and returns Result, rejecting values greater than or equal to Felt::ORDER. Use it when a u64 input may exceed the field modulus.

Use one of:

  • Felt::from(x) where x is a u32 or smaller (infallible).
  • Felt::new(x) or Felt::try_from(x) for u64 inputs; both return Result and check the bound.
  • Felt::new_unchecked(x) only when x < Felt::ORDER has already been proved.

Why

The field modulus sits just below 2^64, so out-of-range inputs occupy a narrow band that tests can miss. Checked construction makes those inputs explicit errors; new_unchecked skips that protection.

Examples

rust
// Good: u32 input, infallible conversion
let f = Felt::from(slot_index as u32);
// Good: untrusted u64 input, checked conversion returning Result
let f = Felt::new(user_value).map_err(|_| Error::FeltOverflow)?;
// Good: unchecked construction only after proving the canonical bound
assert!(bounded_value < Felt::ORDER);
let f = Felt::new_unchecked(bounded_value);
// Bad: unchecked construction on an untrusted value
let f = Felt::new_unchecked(user_value);

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
2
Repository forks
3
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. 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/0xmiden/agent-tools/felt-construction/badge)](https://verified-skill.com/skills/0xmiden/agent-tools/felt-construction)

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