{"id":"7738920d-a060-49a3-af1c-4b37e3df1ae3","shortId":"RW4hB7","kind":"skill","title":"knowledge-base","tagline":"Ingest URLs, documents, and transcripts into a searchable knowledge base. Query past research and curated documentation using full-text search. Trigger words: ingest, knowledge base, look up, search knowledge, what do we know about, research, index this, add to knowledge base.","description":"# knowledge-base -- Searchable Knowledge Base for Instar Agents\n\nBuild a searchable knowledge base from external sources -- URLs, documents, transcripts, PDFs. Uses the existing MemoryIndex (FTS5) for search, so no new dependencies.\n\n---\n\n## How It Works\n\nThe knowledge base is a set of markdown files in `.instar/knowledge/` that MemoryIndex indexes alongside your other memory files. Each file has YAML frontmatter for metadata and is tracked in a catalog for browsing.\n\n```\n.instar/knowledge/\n  catalog.json            # Registry of all ingested sources\n  articles/               # Ingested web articles\n  transcripts/            # Video/audio transcripts\n  docs/                   # Curated reference documentation\n```\n\n---\n\n## Ingesting Content\n\n### Via CLI\n\n```bash\n# Ingest text content directly\ninstar knowledge ingest \"Article content here...\" --title \"My Article\" --tags \"AI,agents\"\n\n# Ingest from a URL (fetch first, then ingest)\n# Step 1: Fetch the content\npython3 .claude/scripts/smart-fetch.py \"https://example.com/article\" --auto > /tmp/fetched.md\n# Step 2: Ingest it\ninstar knowledge ingest \"$(cat /tmp/fetched.md)\" --title \"Article Title\" --url \"https://example.com/article\" --tags \"topic1,topic2\"\n```\n\n### Via API\n\n```bash\ncurl -X POST http://localhost:4040/knowledge/ingest \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"The article content...\",\n    \"title\": \"Article Title\",\n    \"url\": \"https://example.com/article\",\n    \"type\": \"article\",\n    \"tags\": [\"AI\", \"infrastructure\"],\n    \"summary\": \"Brief description\"\n  }'\n```\n\n### Via Agent Workflow\n\nWhen the agent wants to ingest content during a session:\n\n1. Fetch the content (WebFetch, smart-fetch, transcript tools, or Read for local files)\n2. Clean it (strip navigation, ads, boilerplate)\n3. Call the ingest API or write the file manually:\n\n```bash\n# Write the markdown file with frontmatter\ncat > .instar/knowledge/articles/2026-02-25-my-article.md << 'EOF'\n---\ntitle: \"My Article\"\nsource: \"https://example.com/article\"\ningested: \"2026-02-25\"\ntags: [\"AI\", \"infrastructure\"]\n---\n\n# My Article\n\n[Cleaned article content here]\nEOF\n\n# Sync the index to pick up the new file\ninstar memory sync\n```\n\n---\n\n## Searching Knowledge\n\n### CLI\n\n```bash\n# Search within knowledge base only\ninstar knowledge search \"notification batching\"\n\n# Search all memory (including knowledge)\ninstar memory search \"notification batching\"\n```\n\n### API\n\n```bash\n# Knowledge-scoped search\ncurl \"http://localhost:4040/memory/search?q=notification+batching&source=knowledge/&limit=5\"\n\n# Browse the catalog\ncurl \"http://localhost:4040/knowledge/catalog\"\ncurl \"http://localhost:4040/knowledge/catalog?tag=AI\"\n```\n\n---\n\n## Managing Sources\n\n### List all sources\n\n```bash\ninstar knowledge list\ninstar knowledge list --tag AI\n```\n\n### Remove a source\n\n```bash\n# Find the source ID from the list\ninstar knowledge list\n\n# Remove it\ninstar knowledge remove kb_20260225123456_abc123\n\n# Re-sync the index\ninstar memory sync\n```\n\n### Via API\n\n```bash\n# Remove\ncurl -X DELETE \"http://localhost:4040/knowledge/kb_20260225123456_abc123\"\n```\n\n---\n\n## MemoryIndex Configuration\n\nTo enable knowledge base indexing, add these sources to your `.instar/config.json` memory section:\n\n```json\n{\n  \"memory\": {\n    \"enabled\": true,\n    \"sources\": [\n      { \"path\": \"AGENT.md\", \"type\": \"markdown\", \"evergreen\": true },\n      { \"path\": \"USER.md\", \"type\": \"markdown\", \"evergreen\": true },\n      { \"path\": \"knowledge/articles/\", \"type\": \"markdown\", \"evergreen\": false },\n      { \"path\": \"knowledge/transcripts/\", \"type\": \"markdown\", \"evergreen\": false },\n      { \"path\": \"knowledge/docs/\", \"type\": \"markdown\", \"evergreen\": true }\n    ]\n  }\n}\n```\n\n**Source behavior:**\n- `articles/` and `transcripts/` use `evergreen: false` -- recent content ranks higher (30-day temporal decay)\n- `docs/` uses `evergreen: true` -- reference documentation doesn't decay\n\n---\n\n## Content Types\n\n| Type | Directory | Temporal Decay | Best For |\n|------|-----------|----------------|----------|\n| `article` | `articles/` | Yes (30-day) | Web articles, blog posts, news |\n| `transcript` | `transcripts/` | Yes (30-day) | YouTube videos, podcasts, meetings |\n| `doc` | `docs/` | No (evergreen) | API docs, manuals, reference material |\n\n---\n\n## Tips\n\n- **Always sync after ingesting**: `instar memory sync` updates the FTS5 index\n- **Use tags consistently**: Tags enable filtered browsing via `instar knowledge list --tag X`\n- **Include source URLs**: Helps trace back to original content\n- **Clean before ingesting**: Strip navigation, ads, cookie banners for better search results\n- **Use smart-fetch for URLs**: `python3 .claude/scripts/smart-fetch.py URL --auto` gets clean markdown","tags":["knowledge","base","instar","jkheadley","agent-framework","agent-identity","agent-infrastructure","agent-memory","agent-skills","ai-agents","ai-safety","autonomous-agents"],"capabilities":["skill","source-jkheadley","skill-knowledge-base","topic-agent-framework","topic-agent-identity","topic-agent-infrastructure","topic-agent-memory","topic-agent-skills","topic-ai-agents","topic-ai-safety","topic-autonomous-agents","topic-claude-code","topic-cli","topic-cron","topic-job-scheduler"],"categories":["instar"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/JKHeadley/instar/knowledge-base","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add JKHeadley/instar","source_repo":"https://github.com/JKHeadley/instar","install_from":"skills.sh"}},"qualityScore":"0.479","qualityRationale":"deterministic score 0.48 from registry signals: · indexed on github topic:agent-skills · 59 github stars · SKILL.md body (4,698 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-02T06:55:53.661Z","embedding":null,"createdAt":"2026-04-18T22:14:38.419Z","updatedAt":"2026-05-02T06:55:53.661Z","lastSeenAt":"2026-05-02T06:55:53.661Z","tsv":"'-02':290 '-25':291 '/article':171,189,217,287 '/tmp/fetched.md':173,182 '1':163,239 '2':175,254 '2026':289 '20260225123456':399 '3':261 '30':480,504,514 '4040/knowledge/catalog':359,362 '4040/knowledge/ingest':200 '4040/knowledge/kb_20260225123456_abc123':417 '4040/memory/search':346 '5':353 'abc123':400 'ad':259,568 'add':42,425 'agent':54,153,227,231 'agent.md':439 'ai':152,221,293,364,378 'alongsid':95 'alway':530 'api':194,265,338,410,524 'application/json':205 'articl':122,125,145,150,184,209,212,219,283,296,298,470,501,502,507 'auto':172,584 'back':559 'banner':570 'base':3,13,29,45,48,51,59,83,321,423 'bash':137,195,271,317,339,370,382,411 'batch':327,337,349 'behavior':469 'best':499 'better':572 'blog':508 'boilerpl':260 'brief':224 'brows':114,354,547 'build':55 'call':262 'cat':181,278 'catalog':112,356 'catalog.json':116 'claude/scripts/smart-fetch.py':168,582 'clean':255,297,563,586 'cli':136,316 'configur':419 'consist':543 'content':134,140,146,166,203,207,210,235,242,299,477,493,562 'content-typ':202 'cooki':569 'curat':18,130 'curl':196,344,357,360,413 'd':206 'day':481,505,515 'decay':483,492,498 'delet':415 'depend':77 'descript':225 'direct':141 'directori':496 'doc':129,484,520,521,525 'document':6,19,64,132,489 'doesn':490 'enabl':421,435,545 'eof':280,301 'evergreen':442,448,454,460,466,474,486,523 'example.com':170,188,216,286 'example.com/article':169,187,215,285 'exist':69 'extern':61 'fals':455,461,475 'fetch':158,164,240,246,578 'file':89,99,101,253,269,275,310 'filter':546 'find':383 'first':159 'frontmatt':104,277 'fts5':71,539 'full':22 'full-text':21 'get':585 'h':201 'help':557 'higher':479 'id':386 'includ':331,554 'index':40,94,304,405,424,540 'infrastructur':222,294 'ingest':4,27,120,123,133,138,144,154,161,176,180,234,264,288,533,565 'instar':53,142,178,311,323,333,371,374,390,395,406,534,549 'instar/config.json':430 'instar/knowledge':91,115 'instar/knowledge/articles/2026-02-25-my-article.md':279 'json':433 'kb':398 'know':37 'knowledg':2,12,28,33,44,47,50,58,82,143,179,315,320,324,332,341,351,372,375,391,396,422,550 'knowledge-bas':1,46 'knowledge-scop':340 'knowledge/articles':451 'knowledge/docs':463 'knowledge/transcripts':457 'limit':352 'list':367,373,376,389,392,551 'local':252 'localhost':199,345,358,361,416 'look':30 'manag':365 'manual':270,526 'markdown':88,274,441,447,453,459,465,587 'materi':528 'meet':519 'memori':98,312,330,334,407,431,434,535 'memoryindex':70,93,418 'metadata':106 'navig':258,567 'new':76,309 'news':510 'notif':326,336,348 'origin':561 'past':15 'path':438,444,450,456,462 'pdfs':66 'pick':306 'podcast':518 'post':198,509 'python3':167,581 'q':347 'queri':14 'rank':478 're':402 're-sync':401 'read':250 'recent':476 'refer':131,488,527 'registri':117 'remov':379,393,397,412 'research':16,39 'result':574 'scope':342 'search':24,32,73,314,318,325,328,335,343,573 'searchabl':11,49,57 'section':432 'session':238 'set':86 'skill' 'skill-knowledge-base' 'smart':245,577 'smart-fetch':244,576 'sourc':62,121,284,350,366,369,381,385,427,437,468,555 'source-jkheadley' 'step':162,174 'strip':257,566 'summari':223 'sync':302,313,403,408,531,536 'tag':151,190,220,292,363,377,542,544,552 'tempor':482,497 'text':23,139 'tip':529 'titl':148,183,185,211,213,281 'tool':248 'topic-agent-framework' 'topic-agent-identity' 'topic-agent-infrastructure' 'topic-agent-memory' 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-safety' 'topic-autonomous-agents' 'topic-claude-code' 'topic-cli' 'topic-cron' 'topic-job-scheduler' 'topic1':191 'topic2':192 'trace':558 'track':109 'transcript':8,65,126,128,247,472,511,512 'trigger':25 'true':436,443,449,467,487 'type':204,218,440,446,452,458,464,494,495 'updat':537 'url':5,63,157,186,214,556,580,583 'use':20,67,473,485,541,575 'user.md':445 'via':135,193,226,409,548 'video':517 'video/audio':127 'want':232 'web':124,506 'webfetch':243 'within':319 'word':26 'work':80 'workflow':228 'write':267,272 'x':197,414,553 'yaml':103 'yes':503,513 'youtub':516","prices":[{"id":"4a0d4576-b42d-43ae-a8a0-c485b2387712","listingId":"7738920d-a060-49a3-af1c-4b37e3df1ae3","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"JKHeadley","category":"instar","install_from":"skills.sh"},"createdAt":"2026-04-18T22:14:38.419Z"}],"sources":[{"listingId":"7738920d-a060-49a3-af1c-4b37e3df1ae3","source":"github","sourceId":"JKHeadley/instar/knowledge-base","sourceUrl":"https://github.com/JKHeadley/instar/tree/main/skills/knowledge-base","isPrimary":false,"firstSeenAt":"2026-04-18T22:14:38.419Z","lastSeenAt":"2026-05-02T06:55:53.661Z"}],"details":{"listingId":"7738920d-a060-49a3-af1c-4b37e3df1ae3","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"JKHeadley","slug":"knowledge-base","github":{"repo":"JKHeadley/instar","stars":59,"topics":["agent-framework","agent-identity","agent-infrastructure","agent-memory","agent-skills","ai-agents","ai-safety","autonomous-agents","claude-code","cli","cron","job-scheduler","llm","mcp","npm-package","open-source","persistency","telegram-bot","typescript","whatsapp"],"license":"mit","html_url":"https://github.com/JKHeadley/instar","pushed_at":"2026-05-02T05:23:59Z","description":"Persistent Claude Code agents with scheduling, sessions, memory, and Telegram.","skill_md_sha":"d2b794d0229071b71060f1e0040967c4228f01c5","skill_md_path":"skills/knowledge-base/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/JKHeadley/instar/tree/main/skills/knowledge-base"},"layout":"multi","source":"github","category":"instar","frontmatter":{"name":"knowledge-base","license":"MIT","description":"Ingest URLs, documents, and transcripts into a searchable knowledge base. Query past research and curated documentation using full-text search. Trigger words: ingest, knowledge base, look up, search knowledge, what do we know about, research, index this, add to knowledge base."},"skills_sh_url":"https://skills.sh/JKHeadley/instar/knowledge-base"},"updatedAt":"2026-05-02T06:55:53.661Z"}}