-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Add eyeball plugin: document analysis with inline source screenshots 🤖🤖🤖 #1294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staged
Are you sure you want to change the base?
Changes from 3 commits
5bb464f
eeb7cb1
4626aaf
2c24c55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "name": "eyeball", | ||
| "description": "Document analysis with inline source screenshots. When you ask Copilot to analyze a document, Eyeball generates a Word doc where every factual claim includes a highlighted screenshot from the source material so you can verify it with your own eyes.", | ||
| "version": "1.0.0", | ||
| "author": { | ||
| "name": "Awesome Copilot Community" | ||
| }, | ||
| "repository": "https://github.com/github/awesome-copilot", | ||
| "license": "MIT", | ||
| "keywords": [ | ||
| "document-analysis", | ||
| "citation-verification", | ||
| "screenshot", | ||
| "contracts", | ||
| "legal", | ||
| "trust", | ||
| "visual-verification" | ||
| ], | ||
| "skills": [ | ||
| "./skills/eyeball/" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| A tool to help verify AI statements, without (or at least with fewer) context switching pains. | ||
|
|
||
| When AI analyzes a document and tells you "Section 10 requires mutual indemnification," how do you know Section 10 actually says that? Eyeball lets you see for yourself. | ||
|
|
||
| This is a Copilot CLI plugin that generates document analyses as Word files with inline screenshots of relevant portions from the source material. Every factual claim in the analysis includes a highlighted excerpt from the original document, so you can verify each assertion without switching between files or hunting for the right page. | ||
|
|
||
| ## What it does | ||
|
|
||
| You give Copilot a document (Word file, PDF, or web URL) and ask it to analyze something specific. Eyeball reads the source, writes the analysis, and for each claim, captures a screenshot of the relevant section from the original document with the cited text highlighted in yellow. The output is a Word document on your Desktop with analysis text and source screenshots interleaved. | ||
|
|
||
| If the analysis says "Section 9.3 allows termination for cause with a 30-day cure period," the screenshot below it shows Section 9.3 from the actual document with that language highlighted. If the screenshot shows something different, the analysis is wrong and you can see it immediately. | ||
|
|
||
| ## Installation | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) installed and authenticated | ||
| - Python 3.8 or later | ||
| - One of the following for Word document support (PDFs and web URLs work without these): | ||
| - Microsoft Word (macOS or Windows) | ||
| - LibreOffice (any platform) | ||
|
|
||
| ### Install the plugin | ||
|
|
||
| Point your CLI at this repo and ask it to install the plugin for you, with this prompt: | ||
|
|
||
| ``` | ||
| Install the plugin at github.com/dvelton/eyeball for me. | ||
| ``` | ||
|
|
||
| Or: | ||
|
|
||
| Install via the Copilot CLI plugin system, or clone the repo: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/dvelton/eyeball.git | ||
| ``` | ||
|
|
||
| ### Install dependencies | ||
|
|
||
| **macOS / Linux:** | ||
|
|
||
| ```bash | ||
| cd eyeball | ||
| bash setup.sh | ||
| ``` | ||
|
|
||
| **Windows (PowerShell):** | ||
|
|
||
| ```powershell | ||
| cd eyeball | ||
| .\setup.ps1 | ||
| ``` | ||
|
|
||
| **Manual install (any platform):** | ||
|
|
||
| ```bash | ||
| pip install pymupdf pillow python-docx playwright | ||
| python -m playwright install chromium | ||
| ``` | ||
|
|
||
| On Windows, `pywin32` is also needed for Microsoft Word automation and is installed automatically by the setup script. | ||
|
|
||
| ### Verify setup | ||
|
|
||
| ```bash | ||
| python3 skills/eyeball/tools/eyeball.py setup-check | ||
| ``` | ||
|
|
||
| This shows which source types are supported on your machine. | ||
|
|
||
| ## How to use it | ||
|
|
||
| In a Copilot CLI conversation, tell it to use eyeball and what you want analyzed: | ||
|
|
||
| ``` | ||
| use eyeball on ~/Desktop/vendor-agreement.docx -- analyze the indemnification | ||
| and liability provisions and flag anything unusual | ||
| ``` | ||
|
|
||
| ``` | ||
| run eyeball on https://example.com/terms-of-service -- identify the | ||
| developer-friendly aspects of these terms | ||
| ``` | ||
|
|
||
| ``` | ||
| use eyeball to analyze this NDA for non-compete provisions | ||
| ``` | ||
|
|
||
| Eyeball activates, reads the source document, writes the analysis with exact section references, and generates a Word document on your Desktop with source screenshots inline. | ||
|
|
||
| ## What it supports | ||
|
|
||
| | Source type | Requirements | | ||
| |---|---| | ||
| | PDF files | Python + PyMuPDF (included in setup) | | ||
| | Web pages | Python + Playwright + Chromium (included in setup) | | ||
| | Word documents (.docx) | Microsoft Word (macOS/Windows) or LibreOffice (any platform). On Windows, pywin32 is also required (included in setup). | | ||
|
|
||
| ## How it works | ||
|
|
||
| 1. Eyeball reads the full text of the source document | ||
| 2. It writes analysis with exact section numbers, page references, and verbatim quotes | ||
| 3. For each claim, it searches the rendered source for the cited text | ||
| 4. It captures a screenshot of the surrounding region with the cited text highlighted in yellow | ||
| 5. It assembles a Word document with analysis paragraphs and screenshots interleaved | ||
| 6. The output lands on your Desktop | ||
|
|
||
| The screenshots are dynamically sized: if a section of analysis references text that spans a large region, the screenshot expands to cover it. If the referenced text appears on multiple pages, the screenshots are stitched together. | ||
|
|
||
| ## Why screenshots instead of quoted text? | ||
|
|
||
| In hallucination-sensitive contexts, sometimes we need to see receipts. | ||
|
|
||
| Quoted text is easy to fabricate. A model can generate a plausible-sounding quote that doesn't actually appear in the source, and without checking, you'd never know. Screenshots from the rendered source are harder to fake; they show the actual formatting, layout, and surrounding context of the original document. You can see at a glance whether the highlighted text matches the claim, and the surrounding text provides context that a cherry-picked quote might omit. | ||
|
|
||
| ## Limitations | ||
|
|
||
| - Word document conversion requires Microsoft Word or LibreOffice. Without one of these, you can still use Eyeball with PDFs and web URLs. | ||
| - Text search is string-matching. If the source document uses unusual encoding, ligatures, or non-standard characters, some searches may not match. The skill instructions tell the AI to use verbatim phrases from the extracted text, which handles most cases. | ||
| - Web page rendering depends on Playwright and may not perfectly capture all dynamic content (e.g., content loaded by JavaScript after page load, content behind login walls). | ||
| - Screenshot quality depends on the source formatting. Dense multi-column layouts or very small text may produce less readable screenshots. Increase the DPI setting if needed. | ||
|
|
||
| ## License | ||
|
|
||
| MIT | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,170 @@ | ||||||||||||||||||||
| --- | ||||||||||||||||||||
| name: eyeball | ||||||||||||||||||||
| description: 'Document analysis with inline source screenshots. When you ask Copilot to analyze a document, Eyeball generates a Word doc where every factual claim includes a highlighted screenshot from the source material so you can verify it with your own eyes.' | ||||||||||||||||||||
| --- | ||||||||||||||||||||
|
|
||||||||||||||||||||
| # Eyeball | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Analyze documents with visual proof. When activated, Eyeball produces a Word document on the user's Desktop where every factual assertion includes an inline screenshot from the source material with the cited text highlighted in yellow. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## Activation | ||||||||||||||||||||
|
|
||||||||||||||||||||
| When the user invokes this skill (e.g., "use eyeball", "run eyeball on this", "eyeball this document"), respond with: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| > **Eyeball is active.** I'll analyze the document and produce a Word doc with inline source screenshots so you can verify every claim with your own eyes. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Then follow the workflow below. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## Supported Sources | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - **Local files:** Word documents (.docx, .doc), PDFs (.pdf), RTF files | ||||||||||||||||||||
| - **Web URLs:** Any publicly accessible web page | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## Tool Location | ||||||||||||||||||||
|
|
||||||||||||||||||||
| The Eyeball Python utility is located at: | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
| <plugin_dir>/skills/eyeball/tools/eyeball.py | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| To find the actual path, run: | ||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| find ~/.copilot/installed-plugins -name "eyeball.py" -path "*/eyeball/*" 2>/dev/null | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| If not found there, check the project directory or the user's home directory for the eyeball repo. | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ## First-Run Setup | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Before first use, check that dependencies are installed: | ||||||||||||||||||||
|
|
||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| python3 <path-to>/eyeball.py setup-check | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
|
||||||||||||||||||||
| If anything is missing, run the setup script from the eyeball plugin directory: | ||||||||||||||||||||
| ```bash | ||||||||||||||||||||
| bash <path-to>/setup.sh | ||||||||||||||||||||
| ``` | ||||||||||||||||||||
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| Or install manually: | ||||||||||||||||||||
| ```bash | ||||||||||||||||||||
|
||||||||||||||||||||
| If anything is missing, run the setup script from the eyeball plugin directory: | |
| ```bash | |
| bash <path-to>/setup.sh | |
| ``` | |
| Or install manually: | |
| ```bash | |
| If anything is missing, install the required dependencies manually: | |
| ```bash |
Outdated
Copilot
AI
Apr 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow commands alternate between python3 <path-to>/eyeball.py ... and python3 eyeball.py ... (no path). Unless the user is instructed to cd into the tools directory, the latter won’t work. Recommend using the explicit <path-to>/eyeball.py form consistently (or add a step to change directories).
This issue also appears on line 120 of the same file.
| python3 eyeball.py extract-text --source "<path-or-url>" | |
| python3 <path-to>/eyeball.py extract-text --source "<path-or-url>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The install instructions point to a different repository (github.com/dvelton/eyeball), but this plugin is packaged in this repo/marketplace (installed as
eyeball@awesome-copilot). This is likely to confuse users and send them to the wrong installation flow; update the instructions to match the standard plugin install pattern used elsewhere in this repo (e.g.,copilot plugin install eyeball@awesome-copilot).This issue also appears in the following locations of the same file: