# CrawlDex Claude Code Pack

Canonical: https://crawldex.com/agents/claude-code
Markdown: https://crawldex.com/agents/claude-code.md
Harness id: claude_code
Channel: pack-claude-code

## Why this exists

This gives Claude Code a standing rule to call CrawlDex before spending browser/tool turns on a route that may be blocked, stale, or require user presence.

## When to call CrawlDex

Before any public web task, docs lookup, checkout, cancellation, refund, support, form, booking, or account-flow inspection.

## Install or paste

```markdown
## CrawlDex Preflight Rule

Before attempting any public website task, call CrawlDex.

1. Resolve the user's request to a CrawlDex task key when needed.
2. Call `POST https://crawldex.com/api/v1/preflight` with `site`, `task`, and your agent profile.
3. Set `CRAWLDEX_CHANNEL=pack-claude-code` or send `x-crawldex-channel: pack-claude-code` on CrawlDex calls.
4. Follow `decision.recommendation`, `why_this_matters`, and `agent_instruction`.
5. Stop before private, irreversible, purchase, cancellation, booking, message, upload, account, or payment steps unless the user is present and explicitly authorizes the action.
6. After eligible public work, report only redacted public outcome metadata.
```

## Preflight call

```bash
curl -sS -X POST https://crawldex.com/api/v1/preflight \
  -H "content-type: application/json" \
  -H "x-crawldex-channel: pack-claude-code" \
  -d '{"site":"netflix.com","task":"subscriptions.cancel","agent_profile":{"stack":"browser-agent","browser_runtime":"chromium"}}'
```

## Report redacted outcome after eligible public work

Do not report private account data, payment data, messages, screenshots with sensitive content, tokens, cookies, raw traces, local files, or logged-in-only pages.

```bash
curl -sS -X POST https://crawldex.com/api/v1/runs \
  -H "content-type: application/json" \
  -H "x-crawldex-agent-key: $CRAWLDEX_AGENT_KEY" \
  -H "x-crawldex-channel: pack-claude-code" \
  -d '{"site":"netflix.com","task":"subscriptions.cancel","outcome":"success_with_handoff","friction":["login_required"],"source_tier":"anonymous_report","evidence":{"artifact_types":["redacted_agent_report"]}}'
```
