---
name: agentrigs-submit
description: Submit the current AI-agent setup ("rig") to AgentRigs (https://agentrigs.dev), the public index of real Claude Code / Codex / Cursor setups. Use when the user asks to list, share or submit their agent rig.
---

# Submit your rig to AgentRigs

AgentRigs indexes public agent setups — MCP servers, skills, subagents, hooks and permission rules — and ranks components by real adoption. You (the agent) can submit your human's rig. **Nothing is listed until a human opens the claim link you return.**

## Hard rules (read first)

1. **Never send secrets.** Do not include values of env vars, headers, tokens, API keys, passwords, URLs with credentials or query tokens, or file contents. Send *names and counts only*.
2. **Show the human the exact JSON payload and get an explicit "yes" before sending.**
3. Only submit config the human is willing to make public. If the setup lives in a public GitHub repo, prefer sending `repo_url` — we re-read the public repo ourselves.
4. One submission per rig. Don't retry in a loop; if you get an error, show it to the human.

## Step 1 — Collect structure (read-only)

Look in the project and user config locations that exist:

- Claude Code: `.claude/settings.json`, `~/.claude/settings.json`, `.mcp.json`, `.claude/agents/*.md`, `.claude/commands/**/*.md`, `.claude/skills/*/SKILL.md`, `CLAUDE.md`
- Codex: `~/.codex/config.toml` (`[mcp_servers.*]`, `approval_policy`, `sandbox_mode`), `AGENTS.md`
- Cursor: `.cursor/mcp.json`, `.cursor/rules/*.mdc`, `.cursorrules`

Build this JSON (omit what doesn't exist):

```json
{
  "repo_url": "https://github.com/OWNER/REPO",        // optional; public repo containing this config
  "agent": "claude-code | codex | cursor | gemini | other",
  "harnesses": ["claude-code"],
  "mcp_servers": [
    { "name": "context7", "command": "npx", "package": "@upstash/context7-mcp", "transport": "stdio", "env_keys": ["CONTEXT7_API_KEY"] },
    { "name": "linear", "transport": "http", "host": "mcp.linear.app" }
  ],
  "skills": ["frontend-design", "pdf"],
  "subagents": ["code-reviewer", "test-runner"],
  "commands": ["review", "ship"],
  "hooks": [{ "event": "PreToolUse", "matcher": "Bash" }, { "event": "PostToolUse", "matcher": "Edit|Write" }],
  "permissions": { "deny": ["Bash(rm -rf:*)", "Read(./.env)"], "ask": ["Bash(git push:*)"], "allow_count": 14, "default_mode": "default" },
  "instructions": { "file": "CLAUDE.md", "lines": 84, "approx_tokens": 1200 },
  "codex": { "approval_policy": "on-request", "sandbox_mode": "workspace-write" },
  "notes": "optional one-liner from the human"
}
```

- `env_keys`: key **names** only, never values.
- `permissions.deny` / `ask`: the rule strings are fine to include (they contain no secrets); replace any path containing a username with `~`.
- `approx_tokens`: characters ÷ 4.

## Step 2 — Confirm with the human

Print the JSON. Ask: "Submit this to AgentRigs? It will be public after you click the claim link." Proceed only on an explicit yes.

## Step 3 — Send

```bash
curl -sS -X POST https://agentrigs.dev/api/agent-submit \
  -H 'content-type: application/json' \
  --data @rig.json
```

Response:

```json
{ "ok": true, "claim_url": "https://agentrigs.dev/claim?token=…", "expires_in_days": 14 }
```

## Step 4 — Hand off

Give the human the `claim_url` and tell them: "Open this link to review and publish your rig." Then stop.

Limits: payload ≤ 32 KB, ≤ 100 MCP servers, a few submissions per hour per network. Payloads containing anything that looks like a secret are rejected with HTTP 422 — remove it and ask the human again.

Questions or removal: https://agentrigs.dev/opt-out · hello@agentrigs.dev
