Skip to content

Instantly share code, notes, and snippets.

View justi's full-sized avatar
:octocat:

Justyna Wojtczak justi

:octocat:
View GitHub Profile
@justi
justi / README.md
Last active April 6, 2026 09:38
Claude Code hook: safe image read with subprocess proxy — unlimited images per session, auto-context from transcript, prompt injection resistant

Claude Code Hook: Safe Image Read (with Proxy Mode)

Problem

Claude Code's Read tool fails with API Error 400: "Could not process image" when reading:

  • PNG files with transparency (the #1 trigger)
  • Large images (>30KB) — especially when reading multiple images in one session
  • Images with unusual encoding (Selenium screenshots, macOS native screenshots, RGBA PNGs)

Once this error enters the conversation context, the entire session breaks permanently — every subsequent message fails with the same error. Recovery: press Esc Esc to open Rewind menu and restore conversation before the error, or /clear (loses all context).

@justi
justi / network_traffic.rake
Last active June 13, 2019 14:02
Parse network traffic with PhantomJS browser and Ruby
# MIT License
# Copyright (c) 2019 Justyna Wojtczak
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@justi
justi / SassMeister-input.scss
Created December 8, 2013 08:30
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
.abc{
@at-root{
#{&}__element{
background: red;
}