deepread-setup

deepread-setup is a cursor rule for Cursor from deepread-tech/skills. It costs 35 tokens per session (2,752 once invoked), scanned A, original, MIT.

A guided setup for DeepRead, an API that extracts text and structured data from PDFs and images. It obtains access through a device authorisation flow and walks through a first document, extraction, and blueprints.

In plain words
What is it for?
Use it to obtain a DeepRead API key and try document OCR and structured extraction. It is intended for getting started with the API and its document-processing workflow.
Why use it?
It helps a developer start using the service without manually piecing together account authorisation and initial API steps. It also explains the main workflow from document input to structured output.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: positional $N argument.

Good fit Use it to obtain a DeepRead API key and try document OCR and structured extraction. It is intended for getting started with the API and its document-processing workflow.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/deepread-tech/skills/deepread-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/deepread-tech/skills

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deepread-setup

README.md
[![agentmods](https://agentmods.dev/badge/rules/deepread-tech/skills/deepread-setup/github.svg)](https://agentmods.dev/rules/deepread-tech/skills/deepread-setup)
Your own site
<a href="https://agentmods.dev/rules/deepread-tech/skills/deepread-setup"><img src="https://agentmods.dev/badge/rules/deepread-tech/skills/deepread-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deepread-setup

Your own site · 80×15
<a href="https://agentmods.dev/rules/deepread-tech/skills/deepread-setup"><img src="https://agentmods.dev/badge/rules/deepread-tech/skills/deepread-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,752 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.02752
Opus 5.5 $0.00014 $0.01101
Sonnet 5.5 $0.00007 $0.00550
Haiku 4.5 $0.00003 $0.00275

Measured 3d ago against content hash d2076bdefeb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deepread-setup scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

dr_response=$(curl -s -X POST https://api.deepread.tech/v1/agent/device/code \
.cursor/rules/deepread-setup.mdc · 261 lines

How it starts

The opening of the file, as written. The whole thing — 261 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup DeepRead

You are an AI agent helping a developer get started with DeepRead — an AI-native OCR API that extracts text and structured data from documents (PDFs, images).

API: https://api.deepread.tech Dashboard: https://www.deepread.tech Docs: https://www.deepread.tech/docs


Step 1: Get an API Key (Device Authorization Flow)

You (the agent) obtain an API key on behalf of the user. The user never needs to copy/paste a key — it goes directly to you.

CRITICAL — run the entire device flow as ONE terminal command block. Shell variables do not persist between separate terminal executions. If you split this across multiple calls, the device_code will be lost and you will accidentally call /v1/agent/device/code again, getting a new code the user has never seen. Do it all in one script.

The complete flow — get code, open browser, poll, print key — in a single script:

# Get device code
dr_response=$(curl -s -X POST https://api.deepread.tech/v1/agent/device/code \
  -H "Content-Type: application/json" \
  -d '{"agent_name": "Cursor"}')

dr_device_code=$(echo "$dr_response" | jq -r '.device_code')
dr_user_code=$(echo "$dr_response" | jq -r '.user_code')
dr_uri=$(echo "$dr_response" | jq -r '.verification_uri_complete')
dr_interval=$(echo "$dr_response" | jq -r '.interval')

# Validate the response before proceeding
if [ "$dr_device_code" = "null" ] || [ -z "$dr_device_code" ]; then
  echo "ERROR: API did not return a device_code. Response: $dr_response"
  exit 1
fi

echo "Opening browser: $dr_uri"
open "$dr_uri" 2>/dev/null || xdg-open "$dr_uri" 2>/dev/null || echo "Open manually: $dr_uri"
echo "Waiting for approval of code: $dr_user_code"

# Poll until approved (use dr_ prefix to avoid variable name conflicts)
dr_api_key=""
for dr_i in $(seq 1 72); do
  sleep "$dr_interval"
  dr_result=$(curl -s -X POST https://api.deepread.tech/v1/agent/device/token \
    -H "Content-Type: application/json" \
    -d "{\"device_code\": \"$dr_device_code\"}")
  dr_api_key=$(echo "$dr_result" | jq -r '.api_key')
  dr_error=$(echo "$dr_result" | jq -r '.error')
  dr_prefix=$(echo "$dr_result" | jq -r '.key_prefix')

  if [ "$dr_api_key" != "null" ] && [ -n "$dr_api_key" ]; then
    echo "SUCCESS key_prefix=$dr_prefix"
    echo "DEEPREAD_API_KEY=$dr_api_key"
    break
  elif [ "$dr_error" = "access_denied" ]; then echo "DENIED"; break
  elif [ "$dr_error" = "expired_token" ]; then echo "EXPIRED"; break
  else echo "attempt=$dr_i pending..."; fi
done

Read the full file on GitHub · 261 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed d2076bdefeb8
  2. 18d ago Changed 0c699e5e6869
  3. 1mo ago Changed · +2 lines bbea87232913
  4. 1mo ago First seen · 259 lines · 35 tokens per session scan A 04d1d141c008

Subscribe to this mod's changes

deepread-setup is a cursor rule published in the GitHub repository deepread-tech/skills (4 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 2,752 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.