kagi-search
Skill6 starsChanged 12 months agoMITView on GitHub
Search the web using Kagi's premium ad-free search engine, summarize web pages/PDFs/videos, and get AI-powered answers. Use when the user needs current information, wants to summarize a URL, or asks questions requiring web research. Kagi provides high-quality, unbiased results without SEO spam.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- kalaverin/skillstheir own version, first seen Nov 22, 2026
- joelazar/kagi-skillstheir own version, first seen Feb 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- joelazar/kagi-skills★ 18same name
- kalaverin/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
All APIs support caching - identical queries return cached results for free.
- Distinctive: line 30
Do NOT use for:
- Distinctive: line 74
Use multiple queries in parallel for related searches
- Distinctive: line 75
Default max-results=10 balances token cost vs completeness
- Distinctive: line 126
Follow these guidelines to minimize API costs:
- Distinctive: line 128
FastGPT first for questions: If the user asks a question, default to FastGPT unless they specifically need multiple sources
- Distinctive: line 129
Batch queries: Use multiple queries in a single call to Search/Enrichment rather than separate calls
- Very specific: line 131
Choose takeaway summaries: Default to --summary-type takeaway for token efficiency
- Distinctive: line 145
Never hardcode or expose the API key in prompts
- Distinctive: line 147
All scripts will fail gracefully if the key is missing
- Distinctive: line 165
Wait a moment and retry
- Distinctive: line 171
Check Kagi status if persistent: https://status.kagi.com
- Distinctive: line 193
Use specific terms: "TypeScript generics" not "typescript typing"
- Distinctive: line 252
Use Search API with focused query
- Distinctive: line 264
Use FastGPT for cost efficiency
- Distinctive: line 275
Use Summarizer with takeaway format
- Distinctive: line 286
Use Enrichment API for cost efficiency
- Distinctive: line 297
Use Search with multiple related queries
- Distinctive: line 319
Automatic: All results cached on first call
- Distinctive: line 353
All cached queries are free.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kagi Search Skill
Overview
This skill provides access to Kagi's premium search APIs, offering:
- Search: Ad-free web search with personalization
- FastGPT: AI-powered answers with citations ($0.015/query)
- Summarizer: Summarize URLs, PDFs, videos, audio ($0.03/1K tokens)
- Enrichment: Discover indie/small web content ($0.002/search)
All APIs support caching - identical queries return cached results for free.
When to Use This Skill
Invoke this skill when:
- User asks about current events, recent information, or real-time data
- User provides a URL to summarize or analyze
- User needs factual answers requiring web research
- User wants to find indie/alternative content sources
- User is comparing information across multiple sources
Do NOT use for:
- Information clearly within your knowledge cutoff
- Simple calculations or code generation
- Questions about local files or codebases
API Selection Decision Tree
Choose the right API based on the user's needs and optimize for cost:
Use FastGPT (scripts/fastgpt.py)
Cost: $0.015 per query (cheapest for Q&A)
When to use:
- User asks a direct question with a factual answer
- "What is quantum computing?"
- "When did the event happen?"
- "How does technology X work?"
- Speed and cost matter more than comprehensive sources
- A single authoritative answer suffices
- User wants quick facts, not deep research
Command format:
python scripts/fastgpt.py "What is quantum computing?"Use Search (scripts/search.py)
Cost: $0.025 per query
When to use:
- User needs multiple sources or perspectives
- Researching a topic broadly
- Comparing information across websites
- Finding specific types of content (articles, documentation)
- User wants to see original sources
Command format:
python scripts/search.py '["query1", "query2"]' --max-results 10Tips:
- Use multiple queries in parallel for related searches
- Default max-results=10 balances token cost vs completeness
- Queries are keyword-focused: "quantum computing 2025" not "tell me about quantum computing in 2025"
Use Summarizer (scripts/summarize.py)
Cost: $0.03 per 1K tokens (max $0.30)
When to use:
- User provides a specific URL to summarize
- Content is long-form (articles, research papers, videos)
- Translation needed (supports 30+ languages)
- User wants key takeaways from lengthy content
Command format:
python scripts/summarize.py "https://example.com/article" --summary-type takeaway
python scripts/summarize.py "https://youtube.com/watch?v=xxx" --target-language ESOptions:
--summary-type takeaway: Bulleted key points (default, more token-efficient)--summary-type summary: Paragraph prose (more detailed)--target-language: ISO code (EN, ES, FR, etc.) for translation--engine cecil: Fast, friendly (default)--engine agnes: Formal, technical
Supported content: Web pages, PDFs, Word/PowerPoint docs, audio, YouTube videos
Use Enrichment (scripts/enrich.py)
Cost: $0.002 per search (12x cheaper than main search!)
When to use:
- Looking for indie/personal blogs
- Finding non-commercial "small web" content
- Alternative news sources
- Discovering niche communities or publications
- User explicitly mentions wanting indie/alternative sources
Command format:
python scripts/enrich.py '["indie web", "personal blogs"]' --type web
python scripts/enrich.py '["alternative news"]' --type newsOptions:
--type web: Small web content (default)--type news: Alternative news sources
Cost Optimization Strategy
Follow these guidelines to minimize API costs:
- FastGPT first for questions: If the user asks a question, default to FastGPT unless they specifically need multiple sources
- Batch queries: Use multiple queries in a single call to Search/Enrichment rather than separate calls
- Leverage cache: Identical queries are free on repeat - don't reformulate unnecessarily
- Choose takeaway summaries: Default to
--summary-type takeawayfor token efficiency - Use Enrichment when appropriate: 12x cheaper than main search for indie content
Configuration
This skill requires a Kagi API key. Set it as an environment variable:
export KAGI_API_KEY="your-api-key-here"Get your API key from: https://kagi.com/settings/billing_api
Important:
- Never hardcode or expose the API key in prompts
- The skill reads credentials from the environment only
- All scripts will fail gracefully if the key is missing
Error Handling
The scripts return simple error messages. Interpret and guide the user as follows:
"KAGI_API_KEY environment variable not set"
- User hasn't configured their API key
- Guide them to:
export KAGI_API_KEY='their-key' - Link to: https://kagi.com/settings/billing_api
"Invalid API key or access not granted"
- API key is incorrect or expired
- For Search API: May need closed beta access - email support@kagi.com
- FastGPT, Summarizer, Enrichment are publicly available
"Rate limit exceeded"
- User is making requests too quickly
- Wait a moment and retry
- This is rare with normal usage
"Request failed after 3 attempts"
- Likely Kagi server issue or network problem
- Suggest user try again in a few moments
- Check Kagi status if persistent: https://status.kagi.com
"Insufficient credits" (if Kagi returns this)
- User's API balance is empty
- Direct them to add credits: https://kagi.com/settings/billing_api
Query Formulation Best Practices
Craft effective search queries:
Good queries (keyword-focused):
- "quantum computing breakthroughs 2025"
- "python async best practices"
- "climate change latest research"
Poor queries (too conversational):
- "can you tell me about quantum computing?"
- "I want to learn about python"
- "what's new with climate change?"
Tips:
- Include year for recent topics: "AI regulation 2025"
- Use specific terms: "TypeScript generics" not "typescript typing"
- Combine concepts: "kubernetes security hardening"
- For comparisons: "React vs Vue performance 2025"
Response Formatting
The scripts output markdown-formatted results optimized for token efficiency:
Search results (~500-800 tokens for 10 results):
1. **Article Title**
https://example.com/article
Article snippet truncated to 200 characters...
2. **Another Result**
...
### Related Searches
- related topic 1
- related topic 2FastGPT answers (~300-500 tokens):
## Answer
[AI-generated answer with web grounding]
### Sources
1. [Source Title](URL)
2. [Source Title](URL)
*Generated using 1,234 tokens*Summaries (~400-600 tokens):
## Summary
- Key point 1
- Key point 2
- Key point 3Enrichment results (~400-600 tokens):
## Indie Web / Small Web Results
1. **Blog Post Title**
https://personal-blog.com/post
Snippet...Common Usage Patterns
Pattern 1: Current Events Research
User asks: "What are the latest developments in AI regulation?"
Approach:
- Use Search API with focused query
- Include year for recency
- Request multiple results for perspective
python scripts/search.py '["AI regulation 2025", "AI policy developments"]' --max-results 10Pattern 2: Quick Factual Answer
User asks: "What is the difference between REST and GraphQL?"
Approach:
- Use FastGPT for cost efficiency
- Get answer with citations
python scripts/fastgpt.py "What is the difference between REST and GraphQL?"Pattern 3: Article Summary
User provides: "Can you summarize this article? [URL]"
Approach:
- Use Summarizer with takeaway format
- Efficient token usage with bullet points
python scripts/summarize.py "https://example.com/long-article" --summary-type takeawayPattern 4: Finding Indie Content
User asks: "Find some indie blogs about minimalism"
Approach:
- Use Enrichment API for cost efficiency
- Target small web sources
python scripts/enrich.py '["minimalism blogs", "simple living"]' --type webPattern 5: Multi-Source Research
User asks: "Compare different perspectives on remote work trends"
Approach:
- Use Search with multiple related queries
- Get diverse sources in one call
python scripts/search.py '["remote work trends 2025", "hybrid work future", "return to office debate"]'Pattern 6: Video/Podcast Summary
User provides: "Summarize this YouTube video"
Approach:
- Summarizer handles videos automatically
- Can translate if needed
python scripts/summarize.py "https://youtube.com/watch?v=xxx" --summary-type takeawayCaching Behavior
The skill implements session-scoped caching in /tmp/kagi-skill-cache/:
- Automatic: All results cached on first call
- Session-scoped: Cache cleared on system reboot
- Keyed by query + endpoint: Same query to different APIs cached separately
- Free on hit: Second call with identical query returns instantly
- No TTL: Fresh cache every boot session
Kagi server-side cache:
- Identical queries/URLs cached on Kagi's servers
- Cached responses are FREE (no API charges)
- TTL managed by Kagi
Token Efficiency Comparison
This skill achieves 74%+ token savings vs the Kagi MCP server:
| Scenario | MCP Server | Kagi Skill | Savings |
| 20-message conversation, 2 searches | ~16,000 tokens | ~4,200 tokens | 74% |
| Startup cost | ~800 tokens | ~100 tokens | 88% |
| Search results (10 items) | ~3,000 tokens | ~600 tokens | 80% |
| FastGPT answer | ~800 tokens | ~400 tokens | 50% |
How:
- Progressive disclosure: Only metadata loads until invoked
- Script-based filtering: Results truncated outside context window
- Markdown output: No JSON structural overhead
- Smart defaults: Fewer tokens per result
Privacy Notes
For sensitive searches, Kagi supports cache: false to prevent data retention. This skill defaults to caching enabled for performance. To disable:
- Modify scripts to add
cache=falseto API params - Note: This prevents both Kagi server cache and local cache
- All cached queries are free; uncached queries always cost
License
MIT License - See LICENSE file
Support
- Kagi API Documentation: https://help.kagi.com/kagi/api/overview.html
- Issues: Report to skill maintainer
- Kagi Support: support@kagi.com
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

