ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
GitHub 仓库 · 发布者 mareksulik

contentshot

macOS 專用的 Claude Code 模改,按下兩個 ⌥ 鍵就能把目前瀏覽的文章、YouTube 字幕、Reddit 討論串、表格、PDF、郵件或 Finder 檔案內容附到下一次提示,並可存成 Obsidian Clippings 筆記。

已翻译

关于这个 mod

contentshot 讓你按兩下 ⌥ 鍵,把眼前內容(選取文字、文章、YouTube 字幕、Reddit 討論串、社群貼文、廣告與分析後台表格、試算表、Google Docs、PDF、郵件、Finder 檔案等)以純文字擷取,附加到下一次 Claude Code 提示,也可依 Obsidian Web Clipper 格式存入指定的 Clippings 資料夾。內建 /contentshot 指令管理儲存資料夾、權限、重新啟動監聽器與狀態。需要 macOS、Xcode Command Line Tools,以及 Accessibility、Screen Recording、Input Monitoring 與瀏覽器 JavaScript from Apple Events 權限;所有資料留在本機,但擷取範圍可能包含私人內容。

安装

请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。

claude plugin marketplace add mareksulik/contentshot
claude plugin install contentshot
原文 / README

contentshot

Press both ⌥ keys in any app and Claude gets the content you are looking at, not a picture of it: the article without the menus, the YouTube transcript, the Reddit thread with its comments, the table you selected. It is attached to your next Claude Code prompt and, if you choose a folder, saved as a note in Obsidian Clippings/ in the same format as the Obsidian Web Clipper.

contentshot is a Claude Code mod for the terminal and the Code tab of the Claude desktop app, macOS only. Its sibling appshot (⌘+⌘) sends a screenshot of the window instead.

What ⌥+⌥ takes

The most specific thing in front of you wins: selected text first, then the kind of page or app, else the window.

| Where you are | What it takes | Note tag | | --- | --- | --- | | Text selected anywhere | the selection and where it came from | selection | | Article in Safari, Chrome, Arc, Brave, Edge | the article text, title, author, date, URL | article | | YouTube video | transcript with timestamps, description, channel, the moment you are at | youtube | | Reddit thread | post and the whole comment tree, nested by reply | reddit | | X post | the post, the thread before it and the replies, without ads | x | | LinkedIn, Instagram, Threads, TikTok post | author, text, comments | linkedin, instagram, … | | Meta Ads Manager, GA4, Google Ads | the tables on screen, as Markdown | meta-ads, ga4, google-ads | | Google Sheets, Excel, Numbers | the selected cells; in Sheets with one cell selected, the whole sheet | sheet | | Google Docs | the document text | google-docs | | PDF in Preview or Acrobat | the whole text, page by page | pdf | | An image opened on its own in the browser | the image file | image | | Mail (selected message) | sender, recipients, date, attachments, body | email | | Finder with files selected | the files (prompt only) | — | | Finder with nothing selected | the folder and its contents (prompt only) | — | | Anything else | screenshot and window text (prompt only) | — |

The cards above the prompt show what is attached: 🔍 opens the saved note in Obsidian (or the source), ✕ drops it, and Odoslať ➤ sends it without typing a question (the desktop app keeps its own send button off while the prompt is empty).

Commands

| Command | What it does | | --- | --- | | /contentshot clippings <folder> | Save notes to this folder (your vault's Clippings); off stops saving | | /contentshot clear | Drop the pending contentshots | | /contentshot permissions | Ask macOS for the permissions contentshot needs | | /contentshot restart | Restart the ⌥+⌥ listener | | /contentshot status | Listener state, Clippings folder, pending count |

Requirements

  • macOS with the Xcode Command Line Tools (xcode-select --install), which provide swiftc.
  • In System Settings › Privacy & Security, allow the app that runs Claude Code under Accessibility, Screen Recording and Input Monitoring. /contentshot permissions raises the prompts.
  • Automation: macOS asks once per app (Safari, Chrome, Finder, Mail) the first time contentshot reads it.
  • Browsers: turn on Allow JavaScript from Apple Events (Safari › Settings › Developer; Chrome › View › Developer).

Privacy

contentshot has no server and collects nothing. What it takes stays on your Mac, in ~/.claude/contentshot/ and in the Clippings folder you choose, and reaches Anthropic only inside the Claude Code conversation you send it in, under your own account. What it reads can include private things (an email, an ad account's numbers), so press ⌥+⌥ only on what you mean to share with Claude and keep in your notes.

What it runs, reads and writes

  • Helper program. On first start the mod compiles helper/contentshot.swift with swiftc into ~/.claude/contentshot/bin/contentshot. It listens only to modifier keys, to notice both ⌥ keys; it does not see what you type. It reads the front app's name, window title, open document and selected text through the Accessibility API, extracts PDF text with PDFKit, and for tables presses ⌘C and puts your clipboard back right after.
  • Browser tabs. Through osascript it runs a read-only script in the front tab. That script may fetch, with your own login, the page's own data from the same site: a Reddit thread's .json, a Google Sheet's CSV export, a Google Doc's text export.
  • Other apps. osascript reads the Finder selection and the selected Mail message. screencapture takes the window when nothing else fits.
  • Downloads. An image opened on its own is fetched with curl from its own URL.
  • Files. Pending clips, screenshots and settings in ~/.claude/contentshot/; notes and images in your Clippings folder.
  • What Claude receives. Each pending clip is added to your next prompt as a <contentshot> block. The mod submits a prompt only when you press Odoslať ➤.

License

MIT

更多类似作品