1
---
2
name: eyeball
3
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.'
4
---
5
6
# Eyeball
7
8
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.
9
10
## Activation
11
12
When the user invokes this skill (e.g., "use eyeball", "run eyeball on this", "eyeball this document"), respond with:
13
14
> **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.
15
16
Then follow the workflow below.
17
18
## Supported Sources
19
20
- **Local files:** Word documents (.docx, .doc), PDFs (.pdf), RTF files
21
- **Web URLs:** Any publicly accessible web page
22
23
## Tool Location
24
25
The Eyeball Python utility is located at:
26
```
27
<plugin_dir>/skills/eyeball/tools/eyeball.py
28
```
29
30
To find the actual path, run:
31
```bash
32
find ~/.copilot/installed-plugins -name "eyeball.py" -path "*/eyeball/*" 2>/dev/null
33
```
34
35
If not found there, check the project directory or the user's home directory for the eyeball repo.
36
37
## First-Run Setup
38
39
Before first use, check that dependencies are installed:
40
41
```bash
42
python3 <path-to>/eyeball.py setup-check
43
```
44
45
If anything is missing, install the required dependencies:
46
```bash
47
pip3 install pymupdf pillow python-docx playwright
48
python3 -m playwright install chromium
49
```
50
51
On Windows, also install pywin32 for Word automation:
52
```bash
53
pip install pywin32
54
```
55
56
## Workflow
57
58
Follow these steps exactly. The order matters.
59
60
### Step 1: Read the source text
61
62
Before writing any analysis, extract and read the full text of the source document:
63
64
```bash
65
python3 <path-to>/eyeball.py extract-text --source "<path-or-url>"
66
```
67
68
Read the output carefully. Identify actual section numbers, headings, page numbers, and key language.
69
70
**CRITICAL:** Do not skip this step. Do not write analysis based on assumptions about how the document is structured. Read the actual text.
71
72
### Step 2: Write analysis with exact citations
73
74
For each point in your analysis, you must:
75
76
1. **Reference the correct section number as it appears in the document** (e.g., "Section 9" not "Section 8" because you assumed the numbering).
77
2. **Reference the correct page number** where the section appears in the extracted text.
78
3. **Select anchors that are verbatim phrases from the source** that directly support your claim.
79
80
### Step 3: Select anchors correctly
81
82
This is the most important step. Anchors determine what gets highlighted in the screenshots.
83
84
**DO:**
85
- Use verbatim phrases from the source text that directly support your assertion
86
- Use multiple anchors to span the full range of text the reader should see
87
- Use specific, uncommon phrases that appear only where you intend
88
89
**DO NOT:**
90
- Use generic topic labels (e.g., "Confidentiality") that appear throughout the document
91
- Use section titles alone when they appear as cross-references elsewhere
92
- Use single common words that match in many places
93
94
**Examples:**
95
96
WRONG -- uses a generic topic label that matches everywhere:
97
```json
98
{"anchors": ["User-Generated Content"], "target_page": 8}
99
```
100
101
RIGHT -- uses the specific language that supports the claim:
102
```json
103
{"anchors": ["retain ownership", "Ownership of Content, Right to Post"], "target_page": 8}
104
```
105
106
WRONG -- section title appears as a cross-reference on earlier pages:
107
```json
108
{"anchors": ["LIMITATION OF LIABILITY"]}
109
```
110
111
RIGHT -- includes the section number for precision, targets the correct page:
112
```json
113
{"anchors": ["12. LIMITATION OF LIABILITY", "INDIRECT", "CONSEQUENTIAL"], "target_page": 13}
114
```
115
116
### Step 4: Build the analysis document
117
118
Construct a JSON array of sections and call the build command:
119
120
```bash
121
python3 <path-to>/eyeball.py build \
122
--source "<path-or-url>" \
123
--output ~/Desktop/<title>.docx \
124
--title "Analysis Title" \
125
--subtitle "Source description" \
126
--sections '[
127
{
128
"heading": "1. Section Title",
129
"analysis": "Your analysis text here. Reference Section X on page Y...",
130
"anchors": ["verbatim phrase 1", "verbatim phrase 2"],
131
"target_page": 5,
132
"context_padding": 40
133
},
134
{
135
"heading": "2. Another Section",
136
"analysis": "More analysis...",
137
"anchors": ["exact quote from source"],
138
"target_pages": [10, 11],
139
"context_padding": 50
140
}
141
]'
142
```
143
144
Section object fields:
145
- `heading` (required): Section heading in the output document
146
- `analysis` (required): Your analysis text
147
- `anchors` (required): List of verbatim phrases from the source to search for and highlight
148
- `target_page` (optional): Single page number (1-indexed) to search on
149
- `target_pages` (optional): List of page numbers to search across (screenshots stitched vertically)
150
- `context_padding` (optional): Padding in PDF points above/below the anchor region (default: 40). Increase for more context.
151
152
### Step 5: Deliver the output
153
154
Save the output to the user's Desktop. Tell the user the filename and that they can open it to verify each claim against the highlighted source screenshots.
155
156
## Self-Check Before Delivery
157
158
Before saving the final document, mentally verify:
159
160
1. Does each section's analysis text reference the correct section number from the source?
161
2. Are the anchors verbatim phrases that appear on the target page?
162
3. Does each anchor directly support the claim in the analysis, not just relate to the same topic?
163
4. If the screenshot doesn't match the analysis, is the analysis wrong or is the anchor wrong? Fix whichever is incorrect.
164
165
## Notes
166
167
- The output document includes highlighted screenshots that are dynamically sized. If you provide multiple anchors, the screenshot expands to cover all of them.
168
- When a search term is not found, the output document will note this. If this happens, the anchor was likely not verbatim enough. Adjust and rebuild.
169
- For web pages, Playwright renders the page to PDF first. The resulting page numbers may differ from what you see in a browser. Use the extracted text output (step 1) to determine correct page numbers.
170
- If the user has already provided the source text or you have already read it in the current conversation, you can skip step 1. But always verify section numbers and page references against the actual text before writing analysis.
171