skill-scrape
- Repo stars 435
- Author updated Live
- Author repo nvim
- Domain
- Data
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @benbrastmckie · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-scrape
description: PDF annotation extraction routing to scrape-agent Thin wrapper that routes PDF annotation extrac…
category: data
runtime: no special runtime
---
# skill-scrape output preview
## PART A: Task fit
- Use case: PDF annotation extraction routing to scrape-agent Thin wrapper that routes PDF annotation extraction to the scrape-agent, which extracts highlights, comments, notes, and other annotations from PDF files. Reference (do not load eagerly): This skill activates when: When an implementing agent encounters any of these patterns: Do not invoke for: runs entirely….
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Context Pointers / Trigger Conditions / Direct Invocation” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “PDF annotation extraction routing to scrape-agent Thin wrapper that routes PDF annotation extraction to the scrape-agent, which extracts highlights, comments, notes, and other annotations from PDF files. Reference (do not load eagerly): This skill activates when: When an implementing agent encounters any of these patterns: Do not invoke for: runs entirely…”.
- **02** When the source has headings, the agent prioritizes “Context Pointers / Trigger Conditions / Direct Invocation” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source mentions slash commands such as `/scrape`; use them first when your agent supports command triggers.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands.
Start with a small task and check whether the result follows “Context Pointers / Trigger Conditions / Direct Invocation”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-scrape
description: PDF annotation extraction routing to scrape-agent Thin wrapper that routes PDF annotation extrac…
category: data
source: benbrastmckie/nvim
---
# skill-scrape
## When to use
- PDF annotation extraction routing to scrape-agent Thin wrapper that routes PDF annotation extraction to the scrape-age…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Context Pointers / Trigger Conditions / Direct Invocation” and keep inference separate from source facts.
- read files, write/modify files, run shell commands; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-scrape" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Context Pointers / Trigger Conditions / Direct Invocation
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Scrape Skill
Thin wrapper that routes PDF annotation extraction to the scrape-agent, which extracts highlights, comments, notes, and other annotations from PDF files.
Context Pointers
Reference (do not load eagerly):
- Path:
.claude/context/formats/subagent-return.md - Purpose: Return validation
- Load at: Subagent execution only
Note: This skill is a thin wrapper. Context is loaded by the delegated agent, not this skill.
Trigger Conditions
This skill activates when:
Direct Invocation
- User explicitly runs
/scrapecommand - User requests annotation extraction in conversation
Implicit Invocation (during task implementation)
When an implementing agent encounters any of these patterns:
Plan step language patterns:
- "Extract annotations from [file].pdf"
- "Extract highlights from [file].pdf"
- "Extract comments from [file]"
- "Scrape notes from [file].pdf"
- "Collect annotations in [file]"
- "Export PDF comments to markdown"
- "Gather highlights and notes from [file]"
File extension detection:
- Source file has extension:
.pdf - Target mentions: "annotations", "highlights", "comments", "notes"
Task description keywords:
- "annotation extraction"
- "PDF scraping"
- "extract highlights"
- "collect comments"
- "gather notes from PDF"
When NOT to Trigger
Do not invoke for:
- Non-PDF files (.docx, .html, .txt, etc.)
- General document conversion (use skill-filetypes)
- Reading PDF text content without annotation context (use skill-filetypes)
- Operations on spreadsheets or presentations (use skill-spreadsheet, skill-presentation)
Execution
1. Input Validation
Validate required inputs:
pdf_path- Must be provided, must exist, must be a .pdf fileoutput_path- Optional, defaults to{basename}_annotations.mdin same directoryannotation_types- Optional array, defaults to all typesoutput_format- Optional, defaults to "markdown"
# Validate source exists
if [ ! -f "$pdf_path" ]; then
return error "PDF file not found: $pdf_path"
fi
# Validate source is a PDF
if [[ "${pdf_path##*.}" != "pdf" ]]; then
return error "Source must be a .pdf file: $pdf_path"
fi
# Determine output path if not provided
if [ -z "$output_path" ]; then
source_dir=$(dirname "$pdf_path")
source_base=$(basename "$pdf_path" .pdf)
output_path="${source_dir}/${source_base}_annotations.md"
fi
2. Context Preparation
Prepare delegation context:
{
"pdf_path": "/absolute/path/to/document.pdf",
"output_path": "/absolute/path/to/document_annotations.md",
"annotation_types": ["highlights", "comments", "notes", "bookmarks"],
"output_format": "markdown",
"metadata": {
"session_id": "sess_{timestamp}_{random}",
"delegation_depth": 1,
"delegation_path": ["orchestrator", "scrape", "skill-scrape"]
}
}
3. Invoke Agent
CRITICAL: You MUST use the Agent tool to spawn the scrape agent.
Required Tool Invocation:
Tool: Agent (NOT Skill, NOT Plan)
Parameters:
- subagent_type: "scrape-agent"
- prompt: [Include pdf_path, output_path, annotation_types, output_format, metadata]
- description: "Extract annotations from {pdf_path} to {output_path}"
DO NOT use Skill(scrape-agent) - this will FAIL.
Agents live in .claude/agents/ or extension agent directories, not .claude/skills/.
The Skill tool can only invoke skills from .claude/skills/.
The agent will:
- Open the PDF and enumerate all annotation objects
- Filter by requested annotation types
- Format annotations according to output_format
- Write structured output to output_path
- Return standardized JSON result
4. Return Validation
Validate return matches subagent-return.md schema:
- Status is one of: scraped, partial, failed
- Summary is non-empty and <100 tokens
- Artifacts array present with output file path
- Metadata contains session_id, agent_type, delegation info
5. Return Propagation
Return validated result to caller without modification.
Return Format
See .claude/context/formats/subagent-return.md for full specification.
Expected successful return:
{
"status": "scraped",
"summary": "Extracted 42 annotations from document.pdf: 28 highlights, 10 comments, 4 notes",
"artifacts": [
{
"type": "implementation",
"path": "/absolute/path/to/document_annotations.md",
"summary": "Extracted annotations in markdown format"
}
],
"metadata": {
"session_id": "sess_...",
"agent_type": "scrape-agent",
"delegation_depth": 2,
"delegation_path": ["orchestrator", "scrape", "skill-scrape", "scrape-agent"],
"annotation_count": 42,
"annotation_breakdown": {
"highlights": 28,
"comments": 10,
"notes": 4
}
},
"next_steps": "Review extracted annotations"
}
Error Handling
Input Validation Errors
Return immediately with failed status if PDF not found or not a .pdf file.
Unsupported Format
Return failed status with clear message about supported annotation types.
Agent Errors
Pass through the agent's error return verbatim.
Tool Not Available
Return failed status with installation instructions for PDF annotation tools (e.g., pdfannots, PyMuPDF).
MUST NOT
- Run the postflight step (git commit, status update) — that is the command's responsibility
- Modify the return from scrape-agent before propagating
- Load context files eagerly — only reference them when needed
- Use the Skill tool to invoke scrape-agent (use Agent tool instead)
Decide Fit First
Design Intent
How To Use It
Boundaries And Review