Install
$ agentstack add skill-hasna-skills-extract ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Extraction Skill
Extract text, data, and structured content from images and PDF documents using OpenAI Vision.
Capabilities
- Image OCR: Extract text from images using GPT-4 Vision
- PDF Text Extraction: Parse text from PDF documents
- Structured Output: Output as plain text, Markdown, or JSON
- Custom Prompts: Direct the extraction with specific instructions
Supported Formats
Input
- Images: PNG, JPG, JPEG, GIF, WEBP, BMP, TIFF
- Documents: PDF
Output
- text: Clean, readable plain text
- markdown: Structured Markdown with headings, lists, and tables
- json: Structured JSON with sections, tables, and metadata
Usage
# Extract text from an image
bun run src/index.ts extract --input ./receipt.png --output ./receipt.txt
# Extract as Markdown from a PDF
bun run src/index.ts extract -i ./document.pdf -o ./document.md -f markdown
# Extract with custom prompt
bun run src/index.ts extract \
--input ./invoice.png \
--format json \
--prompt "Extract invoice number, date, total amount, and line items"
# High-detail extraction for small text
bun run src/index.ts extract \
--input ./handwriting.jpg \
--detail high \
--format text
Options
| Option | Short | Description | |--------|-------|-------------| | --input | -i | Input file path (required) | | --output | -o | Output file path (optional) | | --format | -f | Output format: text, markdown, json | | --prompt | -p | Custom extraction prompt | | --model | -m | OpenAI model (default: gpt-4o) | | --detail | -d | Image detail: low, high, auto |
Environment Variables
export OPENAI_API_KEY="your-openai-key"
Examples
Receipt Extraction
bun run src/index.ts extract \
--input ./receipt.jpg \
--format json \
--prompt "Extract store name, date, items with prices, subtotal, tax, and total"
Document to Markdown
bun run src/index.ts extract \
--input ./report.pdf \
--format markdown \
--output ./report.md
Handwritten Notes
bun run src/index.ts extract \
--input ./notes.jpg \
--detail high \
--prompt "Transcribe the handwritten text, preserving the structure"
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: hasna
- Source: hasna/skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.