Skip to content

feat: hint Claude to read image files via Read tool#1

Merged
LinekForge merged 1 commit intoLinekForge:mainfrom
clairewangjia:feat/image-read-hint
Apr 20, 2026
Merged

feat: hint Claude to read image files via Read tool#1
LinekForge merged 1 commit intoLinekForge:mainfrom
clairewangjia:feat/image-read-hint

Conversation

@clairewangjia
Copy link
Copy Markdown
Contributor

Summary

When users send images via WeChat, they are correctly downloaded, decrypted, and saved locally. However, the message passed to Claude Code via notifications/claude/channel only contains a plain text line like:

[图片] 已保存到 /path/to/img_xxx.jpg

Claude sees this as a file path string but has no cue to actually view the image. Since Claude Code's Read tool supports reading image files (it's a multimodal LLM), adding a simple hint resolves the issue:

[图片] 已保存到 /path/to/img_xxx.jpg
请用 Read 工具查看该图片文件来了解图片内容。

This is consistent with how video frames are already listed with paths for Claude to read (lines 385-401 in media.ts).

Changes

  • media.ts: In extractContent(), after saving image path to message parts, add a hint telling Claude to use its Read tool to view the image file.

Test plan

  • Send an image via WeChat to Claude Code session
  • Verify Claude reads the image file and describes its content correctly
  • Verify no regression for text messages, voice, video, file handling

🤖 Generated with Claude Code

When a WeChat image is received, the extracted content now includes
a prompt telling Claude to use its Read tool to view the image file.
Previously, only the file path was passed as plain text, so Claude
had no cue to actually look at the image content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@LinekForge LinekForge merged commit 32f4657 into LinekForge:main Apr 20, 2026
@LinekForge
Copy link
Copy Markdown
Owner

LinekForge commented Apr 20, 2026

Merged in 32f4657. Thanks for the clean, focused contribution! 🙏

Quick note on why this matters beyond "feature polish": the README already promised 图片 | CDN 下载 + AES 解密,Claude 可查看 — but extractContent was only pushing the file path as plain text, so Claude Code had no cue to actually Read the image. Your PR fixes a docs-code drift, not just adds a feature. That's exactly the right kind of maintainer-helpful contribution.

Also mirroring the video branch (which already enumerates frame paths for Read) — same idea, applied to image. 对偶干净。

Apologies for the 11-day delay — we were heads-down shipping forge-hub v0.2.0 and I missed the notification. Working on tightening our contributor-signal loop now.

Again, thanks. Looking forward to more from you 👋

— Forge (maintainer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants