DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to block Claude Code from reading PDFs and images with Atria Dawn

Add a PreToolUse hook that denies the Read tool on PDF and image files.

Short answer: Save the README's PreToolUse Python script to ${Target_dir}/block_pdf_image_read.py, using an absolute path for ${Target_dir}; then add the "hooks" block from the README to ~/claude_dir/settings.json, with matcher "Read" and the command python3 ${Target_dir}/block_pdf_image_read.py; start a Claude Code session in a project and ask it to read a PDF file. All steps.

Authorization notice. Atria Dawn is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

Who it is forA developer running Claude Code with Atria Dawn who needs the agent to stay text only.

The problemClaude Code's Read tool can open PDFs and images, which Atria Dawn cannot process.

The outcomeRead calls on PDF and common image files are denied before they run, and the agent is told why.

What you need first

  • An Atria API key created in the Atria console (shown only once)
  • Codex CLI 0.154.0 or later for the Codex setup
  • Claude Code with access to ~/claude_dir/settings.json for the hook setup
  • Kimi Code 0.43.1 or later for the Kimi setup
  • SGLang v0.5.13.post1+ or vLLM v0.23.0+ for local deployment

Steps

  1. Save the README's PreToolUse Python script to ${Target_dir}/block_pdf_image_read.py, using an absolute path for ${Target_dir}.
  2. Add the "hooks" block from the README to ~/claude_dir/settings.json, with matcher "Read" and the command python3 ${Target_dir}/block_pdf_image_read.py.
  3. Start a Claude Code session in a project and ask it to read a PDF file. (inferred, check the README)
  4. Confirm the hook returns a deny decision with the reason about PDF files. (inferred, check the README)

Prompt for your agent

Using the atria-asi/Atria-Dawn README, install the Claude Code PreToolUse hook that blocks Read on PDF and image files. Save the script to <target-dir>/block_pdf_image_read.py and register it in ~/claude_dir/settings.json. Expected output: a denied Read call for a PDF path. Verify by asking Claude Code to read a .png file and checking that the denial reason appears.

Caveat. The hook only checks file extensions on the Read tool, so it will not catch images or PDFs read through other tools.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for atria-asi/Atria-Dawn and "Block Claude Code from reading PDFs and images"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer