Logo de Noir

Noir

Comunidade
austintgriffith
noir

Use when building, reviewing, or shipping a privacy app with Noir circuits verified onchain. The boundaries agents get wrong unprompted — in-circuit hash choice, in-browser proving with NoirJS, note persistence and the offchain tree mirror, and who sends the transaction.

Visão geral

Publicado poraustintgriffith
Repositórioethskills
Nome da habilidadenoir
Estrelas
298
Forks
64
Arquivos incluídos
Somente instruções
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por austintgriffith no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Noir no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/austintgriffith/ethskills/tree/master/noir
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/austintgriffith/ethskills.git /tmp/ethskills
mkdir -p .claude/skills
cp -r /tmp/ethskills/noir .claude/skills/noir
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Noir em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Noir automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Noir não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Privacy Apps with Noir

A sound circuit is not a private app. These are the boundaries around it, where the failures actually happen.

Hash in-circuit with Poseidon, never keccak or SHA256. Poseidon costs ~600 gates against ~30,000 for a bit-oriented hash, and members prove in a browser. It is not in the stdlib — add the dependency and import it:

toml
poseidon = { git = "https://github.com/noir-lang/poseidon", tag = "v0.3.0" }

use poseidon::poseidon::bn254::hash_2 — not std::hash::poseidon (removed). Whatever you pick, every layer must use the same algorithm and input order: commitment creation, Merkle parent hashing, the offchain mirror, the onchain tree. Poseidon and Poseidon2 are different functions with different outputs. Test one leaf hash and one parent hash across every layer before building on them.

Prove in-process with NoirJS, not by shelling out to the bb CLI. A script that spawns bb prove and reads the proof off disk works on your laptop and can never become the browser prover the app needs. The packages are @noir-lang/noir_js + @aztec/bb.js (not backend_barretenberg), and the class is UltraHonkBackend (not UltraPlonkBackend):

typescript
const backend = new UltraHonkBackend(circuit.bytecode, await Barretenberg.new());
const proof = await backend.generateProof(witness, { verifierTarget: "evm" });

The API argument is required — the one-argument form docs still show throws Cannot read properties of undefined (reading 'circuitProve'). Ask for EVM serialization explicitly with { verifierTarget: "evm" } (keccak transcript, ZK); the default serialization will not verify onchain, and the older { keccak: true } is deprecated for evm-no-zk — a different target, whose proofs an evm verifier rejects. Keep @aztec/bb.js on the exact version of your bb CLI:

bash
npm install @noir-lang/noir_js "@aztec/bb.js@$(bb --version)"

Persist the note, and rebuild the path from events. At commitment time generate a nullifier and a secret, and save them with the leafIndex — lose them and the user can never spend or vote. Anything you commit to that lives in a small domain — a bid, an age, a vote — needs one of those random fields as a blinding factor in the preimage, or the onchain commitment is brute-forceable. The client derives its Merkle witness by replaying the contract's insert events into an offchain mirror (@zk-kit/lean-imt), so the contract has to emit the commitment, its leaf index, and the resulting root. Not a contract call returning a path, and not a hardcoded one. A model that writes only the circuit forgets all of this.

Nobody's wallet should send its own proof. The ZK proof hides the commitment-nullifier link; msg.sender is public and links the two transactions anyway. Registering from the known wallet is fine when membership is public — acting from it is not. Route the acting transaction through a relayer, or send it from a fresh account whose gas an ERC-4337 paymaster sponsors — a paymaster alone hides nothing, since the UserOperation's sender is public, so reusing the registering account keeps the link. A burner funded from the user's own wallet recreates the link, and unlinkability is still bounded by the size of the anonymity set.

Also required, and usually already habit — confirm rather than rebuild:

  • nargo compile builds the circuit and nargo execute produces the witness from Prover.toml; everything else is bb — bb prove, bb verify, bb write_vk, and bb write_solidity_verifier fed by that VK. nargo prove / nargo verify / nargo codegen-verifier were removed. Generate the VK feeding the Solidity verifier with --verifier_target evm and keep prove, verify and VK on the same target: it names the transcript hash and the ZK setting together, which is the pair that has to match. The older --oracle_hash keccak still works, but it names only the hash. Smoke-test a real prove-and-verify before wiring a frontend.
  • Public inputs use post-colon syntax: root: pub Field.
  • Scope the nullifier to the action in-circuit — hash the proposal or pool id into it, or one member's votes link across proposals.
  • Bind the proof to what it authorizes: make the recipient (and any amount or fee) a public input the contract checks. A proof that does not commit to the recipient can be copied from the mempool and redirected by a front-runner or a relayer.
  • Keep hash domains separate: commitment and nullifier hash must not be the same function over overlapping inputs (add a domain tag or use different arities), or one value can stand in for the other.
  • Every private input must be constrained by an assert or by feeding a checked hash. An input the circuit never constrains can be set to anything, and the proof still verifies.
  • Count the vote or release the funds only after verify() returns true, recording the nullifier hash so a replay reverts. Never leave a MockVerifier in a deploy path.
  • Public input order must match across the circuit's pub params, the script's publicInputs, and the array the contract hands to verify(). Read the generated verifier's ABI rather than assuming its signature.
  • Merkle path indices are [bool; DEPTH].
  • Accept any recent root (mapping(bytes32 => bool) knownRoots), not only the current one — an insert landing between proving and submitting otherwise reverts an honest proof.
  • The onchain tree is @zk-kit/lean-imt.sol with a separately deployed PoseidonT3, the pair that matches the offchain @zk-kit/lean-imt. A hand-rolled onchain tree drifts from the mirror.
  • Next.js / Scaffold-ETH 2: set config.experiments.asyncWebAssembly = true in next.config, load the prover with dynamic(..., { ssr: false }), and copy the circuit JSON to public/ and fetch() it — a cross-package JSON import fails.
  • The generated verifier needs pragma solidity >=0.8.27 and evm_version = 'cancun'; if the project's floor is lower, set solc_version = '0.8.27' and evm_version = 'cancun' in foundry.toml. Build it optimized or it exceeds the 24KB limit.

Install with noirup -v <version>, then bbup -v <version> — bare bbup resolves through a version map that lags nargo and 404s. Finish by compiling the circuit and building the contracts.

Perguntas frequentes

O que a habilidade de IA Noir faz?

Use when building, reviewing, or shipping a privacy app with Noir circuits verified onchain. The boundaries agents get wrong unprompted — in-circuit hash choice, in-browser proving with NoirJS, note persistence and the offchain tree mirror, and who sends the transaction.

Por que usar Noir no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Noir é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Noir no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/austintgriffith/ethskills/tree/master/noir. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Noir?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Noir?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Noir com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Noir é gratuita?

A habilidade é publicada no GitHub por austintgriffith. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇