agentleFS
MicrockMicrock/kagi-cli/skills/kagi-usage/SKILL.md

kagi-usage

Skill190 starsChanged 8 months agoMITView on GitHub

Search the web, extract or summarize a page, translate it, or check the news with the kagi CLI instead of WebSearch or WebFetch. Load this first for any Kagi task: it covers search and page content, and routes Assistant, automation, and account work to the right skill.

  • Reads credentials

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 8 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Search the web and read pages with kagi.

    line 9
  2. Very specific:

    Start with one broad search, or quick for a bounded factual question.

    line 53
  3. Distinctive:

    Prefer primary sources and direct evidence.

    line 55
  4. Very specific:

    Use --follow only when the user needs the top result pages summarized.

    line 56
  5. Very specific:

    Add official domains with site: when a primary source is known.

    line 81
  6. Distinctive:

    Use native-language query terms for regional or multilingual research.

    line 82
  7. Very specific:

    Use --region as a result bias, never as a language guarantee.

    line 84
  8. Very specific:

    Use news for the public Kagi News feed.

    line 104
  9. Very specific:

    Use extract when downstream work needs the article body rather than a summary.

    line 121
  10. Distinctive:

    Prefer subscriber mode when a session token is available.

    line 131
  11. Distinctive:

    Use the public API mode only when the legacy API token is configured or the task needs its engine controls.

    line 141
  12. Distinctive:

    Never summarize content that must be quoted or checked precisely.

    line 149
  13. Very specific:

    Use ask-page for a focused question whose evidence should come from one URL.

    line 154
  14. Distinctive:

    When the question needs outside evidence or comparison, search the web instead.

    line 163
  15. Very specific:

    Run kagi auth status before treating a command as unavailable.

    line 178
  16. Very specific:

    Use --format json for programmatic parsing.

    line 180
  17. Very specific:

    Use --format toon for compact LLM context.

    line 181
  18. Very specific:

    Use --format markdown for prose that a person will read.

    line 182
  19. Very specific:

    Run kagi auth check when credentials exist but a request fails.

    line 183
  20. Distinctive:

    Never print credential values.

    line 184
  21. Distinctive:

    Search API keys and session tokens do not grant mail access.

    line 213
  22. Very specific:

    Use exact search for known words, senders, subjects, or dates.

    line 223

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Kagi CLI

Search the web and read pages with kagi. Route every other Kagi task to the skill named below.

Route the task

User intentWhere
Find, compare, or verify information from the webSearch the web (below)
Read, summarize, question, or translate a known pageWork with one page (below)
Use paid AI for reasoning, coding, research, or fileskagi-ai
Continue a conversation or manage Assistant statekagi-assistant
Run searches in bulk or monitor changes over timekagi-monitoring
Configure credentials or account search behaviorkagi-account-config
Search or read mailkagi mail (below)

Load the skill when it appears in the available skills listing. Otherwise run kagi skills get <name> for the same guidance.

kagi skills list
kagi skills get kagi-assistant

Search the web

Discover sources, narrow the question, and return evidence that matches the depth the user asked for.

NeedCommand
Direct answer with referenceskagi quick
Ranked web resultskagi search
Search and summarize top pageskagi search --follow N
Image results with original URLskagi search --images (subscriber session only; no paid API fallback)
Current news storieskagi news or kagi search --news
Independent personal siteskagi smallweb
Several independent querieskagi batch

quick, session-only search controls, and the subscriber search path require session auth. The current Search API uses KAGI_API_KEY. Public news and smallweb need no credentials.

  1. Define the claim or question that needs evidence.
  2. Start with one broad search, or quick for a bounded factual question.
  3. Split the topic into distinct queries when one query cannot cover it.
  4. Prefer primary sources and direct evidence.
  5. Use --follow only when the user needs the top result pages summarized.
  6. Report source disagreement instead of flattening it.
kagi search "rust async cancellation" --format toon --limit 5
kagi quick "what is the current Kagi Search API endpoint?" --format markdown

Search controls

kagi search "query" --region us --format toon --limit 10
kagi search "query" --time month --order recency --format json
kagi search "query" --snap reddit --format toon
kagi search "query" --lens 2 --format toon
kagi search "query" --follow 3 --format markdown

Session-only controls include --lens, --time, --order, --verbatim, personalization flags, and News vertical search. Use --local-cache only when stale results are acceptable.

Query design

  • Quote exact error messages or disputed phrases.
  • Add official domains with site: when a primary source is known.
  • Use native-language query terms for regional or multilingual research.
  • Separate discovery, counterevidence, and recency into different queries.
  • Use --region as a result bias, never as a language guarantee.
kagi batch \
  "topic official documentation" \
  "topic limitations" \
  "topic independent review" \
  --format toon --limit 5

News and discovery

kagi news --category tech --limit 10
kagi news --list-categories
kagi news --chaos
kagi search "open source ai" --news --format toon
kagi smallweb

Use news for the public Kagi News feed. Use search --news when the query must filter the News vertical.

Work with one page

Work from the source the user supplied. Search the web only when the task needs evidence that page cannot give.

OutcomeCommandCredential
Full readable page markdownkagi extractKAGI_API_KEY
Summary of a URL or textkagi summarizesession or legacy API token
Answer about one pagekagi ask-pagesession token
Translationkagi translatesession token

Extract a page

Use extract when downstream work needs the article body rather than a summary. Prefer extract over browser scraping for readable main content. It requires the current KAGI_API_KEY, never the legacy KAGI_API_TOKEN.

kagi extract "https://example.com/article"

Summarize

Prefer subscriber mode when a session token is available.

kagi summarize --subscriber --url "https://example.com/article"
kagi summarize --subscriber --text "long text"
kagi summarize --subscriber \
  --url "https://example.com/article" \
  --summary-type keypoints

Use the public API mode only when the legacy API token is configured or the task needs its engine controls.

kagi summarize --url "https://example.com/article"
kagi summarize --text "long text" --engine cecil

Never summarize content that must be quoted or checked precisely. Extract it and inspect the relevant passage instead.

Ask one page

Use ask-page for a focused question whose evidence should come from one URL.

kagi ask-page \
  "https://example.com/article" \
  "what evidence supports the main claim?" \
  --format markdown

When the question needs outside evidence or comparison, search the web instead.

Translate

kagi translate \
  --text "Bonjour tout le monde" \
  --target-language EN

Preserve code, URLs, product names, and other text that must stay untranslated. State the target language explicitly.

Shared rules

  1. Run kagi auth status before treating a command as unavailable.
  2. Choose the narrowest command that produces the requested outcome.
  3. Use --format json for programmatic parsing.
  4. Use --format toon for compact LLM context.
  5. Use --format markdown for prose that a person will read.
  6. Run kagi auth check when credentials exist but a request fails.
  7. Never print credential values.
kagi auth status
kagi auth check

Completion criteria

Web research is complete when:

  • the answer addresses the exact question;
  • important claims trace to source URLs;
  • source quality and recency match the claim;
  • disagreement and uncertainty appear in the output; and
  • the output uses the requested format and depth.

Page work is complete when:

  • the command matches the requested transformation;
  • the output stays grounded in the supplied URL or text;
  • quotes remain distinguishable from summaries;
  • the output keeps the requested language and format; and
  • you report a source-access failure instead of guessing past it.

Mail

Mail uses separate OAuth credentials and private connection settings. Run kagi mail login after configuring [mail].endpoint and [mail].client_id. Search API keys and session tokens do not grant mail access.

kagi mail boxes
kagi mail search --mailbox Inbox --unread --limit 10
kagi mail search "contract renewal" --semantic --format toon
kagi mail read MESSAGE_ID --format pretty
kagi mail read --thread THREAD_ID --new-text-only

Use exact search for known words, senders, subjects, or dates. Add --semantic for a topic described in natural language. Use returned IDs to read messages. The MCP exposes no send, delete, mark-read, or attachment-download operation. Mail content stays out of the CLI's local history and response cache.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.