DEDUPED Hot AI repos, turned into use cases Get 5 a day

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.

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.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page