# Zk Shark Agent

> Drive ZK Shark, the Shark of All Streets agent, for nullifiers, Groth16 proofs, Light Protocol compressed state, model attestations, encrypted-state commitments, proof checks, nullifier derivation, and deterministic natural-language routing.

- Skill: `solizardking/zk-shark-agent` (Agent Skill, multi-file: 13 files)
- Install (CLI): `npx get-skill add solizardking/zk-shark-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/solizardking/zk-shark-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Solizardking (https://skillmd.com/u/solizardking)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/solizardking/zk-shark-agent

---


# ZK Shark Agent

ZK Shark is the Shark of All Streets agent, named in honor of zk Shark,
the legend of ordinals. It wraps the lower-level `@clawd/zk-client` SDK
and exposes the four operations an agent needs most:

| Method | Purpose |
|---|---|
| `agent.attestModel({ modelHash, payloadCommitment, proof, context })` | Build a `publish_attestation` instruction. |
| `agent.commitEncryptedState({ modelHash, ciphertextCommitment, stateVersion, proof })` | Build a `commit_encrypted_state` instruction. |
| `agent.verifyProof({ proof, publicInputs?, ... })` | Off-chain Groth16 sanity check. |
| `agent.computeNullifierFor(secret, context)` | Deterministic 32-byte nullifier. |

The class name is `ZkSharkAgent`. `ClawdZkAgent` remains exported as a
compatibility alias.

## Quick Start

```ts
import { ZkSharkAgent, routeIntent, dispatchRoute } from "@clawd/zk-shark-agent";

const agent = await ZkSharkAgent.fromEnv();

const route = routeIntent(
  "attest this model 0xab12cd34... with my proof.json",
  agent,
  { payloadCommitment: "0x" + "ab".repeat(32), proofPath: "./proof.json" },
);

const result = await dispatchRoute(route, agent);
console.log(result);
```

The router is deterministic and rule-based. It makes no model calls.

## Recognised Intents

| Verb pattern | Routed action | Required context |
|---|---|---|
| `attest`, `attestation`, `publish`, `publish_attestation` | `attestModel` | `modelHash`, `payloadCommitment`, `proofPath` |
| `commit`, `commit_state`, `encrypted state`, `ciphertext` | `commitEncryptedState` | `ciphertextCommitment`, `stateVersion`, `proofPath` |
| `verify`, `check`, `validate` | `verifyProof` | `proofPath` |
| `nullifier`, `derive`, `compute_nullifier` | `computeNullifier` | `context` |
| `inspect`, `config`, `status`, `show` | `describe` | none |
| `help`, `usage`, `how`, `what` | `help` | none |

## CLI

```bash
zk-shark-agent inspect
zk-shark-agent attest  <modelHash> <payloadCommitment> <proof.json> [--context "..."]
zk-shark-agent commit  <ciphertextCommitment> <stateVersion> <proof.json> [--model <modelHash>]
zk-shark-agent verify  <proof.json>
zk-shark-agent nullifier "context-tag"
zk-shark-agent ask     "natural language"
```

`shark-of-all-streets` is also available as a binary alias. The legacy
`clawd-zk-agent` binary remains available for older scripts.

The proof JSON shape is:

```json
{
  "a": "0x...",
  "b": "0x...",
  "c": "0x...",
  "verifyingKey": "0x..."
}
```

## Configuration

Use `ZK_SHARK_RPC_URL` plus the optional `ZK_SHARK_*` variables declared
in the frontmatter. Legacy `CLAWD_ZK_*` variables are still accepted as
fallbacks.

Named program aliases:

| Alias | Purpose |
|---|---|
| `ZK_SHARK_MAINNET` | Default mainnet placeholder. |
| `ZK_SHARK_DEVNET` | Devnet placeholder. |
| `ZK_SHARK_LOCALNET` | Localnet placeholder. |

Legacy `CLAWDZK_MAINNET`, `CLAWDZK_DEVNET`, and `CLAWDZK_LOCALNET` are
also accepted.

## Failure Modes

- `ZK_SHARK_RPC_URL is not set` - add it to the environment, or keep
  using legacy `CLAWD_ZK_RPC_URL`.
- `Invalid ZK_SHARK_PROGRAM_ID/CLAWD_ZK_PROGRAM_ID` - the value is not
  a base58 pubkey and not a known alias.
- `proof.a must be 64 bytes` - the proof JSON is malformed; re-export
  from the prover.
- `Secret must be at least 16 bytes` - supply a real nullifier secret.

## Cross-References

- Lower-level SDK: `zk-primitives/client/`
- Anchor program: `zk-primitives/programs/clawd-zk/`
- Architecture notes: `zk-primitives/docs/ARCHITECTURE.md`
- Agent catalog: `AGENTS.md`

