Usage
How to use the Struktur agent skill with your AI coding assistant.
How to use the Struktur agent skill with your AI coding assistant.
How It Works
The skill uses progressive disclosure to minimize token usage:
- Metadata Phase (~100 tokens): Agent loads only the skill name and description
- Activation Phase: When your request matches the description, the agent asks permission to load the full skill
- Full Load (up to 5,000 tokens): Complete skill instructions load into context
- On-Demand: Supporting files (scripts, references) load as needed
This means you can have hundreds of skills installed without bloating the agent's context window.
Triggering the Skill
The skill automatically activates when you mention Struktur-related tasks:
"Use struktur to extract product data from this PDF"
"Set up struktur to parse invoices with parallel strategy"
"Help me configure the struktur CLI for my project"
"Import extract from @struktur/sdk and set up a schema"The agent will recognize these requests and load the skill automatically.
Example Conversations
What the Skill Knows
When loaded, the skill provides the agent with:
API Knowledge
- How to import and use
extract() - All strategy options and when to use them
- Schema definition patterns (JSON Schema and fields shorthand)
- Artifact building from files and URLs
- Event hooks for monitoring progress
Strategy Selection
The skill teaches the agent to choose strategies based on:
| Input Size | Output Shape | Recommended Strategy |
|---|---|---|
Small (<10K tokens) | Any | simple |
| Large | Array/list | parallel or parallelAutoMerge |
| Large | Object with context | sequential |
| Large | Maximum accuracy | doublePass |
CLI Commands
All struktur CLI commands and options:
struktur extractwith all flagsstruktur modelsfor model managementstruktur providersfor API key setup- Field shorthand syntax
- Debug and logging options
Best Practices
- Token budget recommendations
- Validation retry patterns
- Merge and deduplication rules
- Schema strict mode usage
- Common pitfalls and how to avoid them
Manual Invocation
Some tools allow manual skill invocation:
Claude Code:
/strukturOpenCode:
/load-skill strukturCheck your tool's documentation for manual skill loading commands.
Troubleshooting
Advanced Usage
Custom Instructions
You can add project-specific instructions alongside the skill:
In .agents/AGENTS.md or CLAUDE.md:
When using struktur for this project:
- Always use the parallel strategy for invoice extraction
- Set chunkSize to 8000 for our PDF format
- Use the "smart" model alias for better accuracyCombining with Other Skills
The Struktur skill works alongside other skills:
Database Skills
For saving extracted data
Testing Skills
For validating extraction results
Deployment Skills
For CI/CD integration