kb-ingest
Ingest a source (URL, file, or freeform note) into the knowledge base. Creates a source summary and updates or creates relevant entity and concept pages.
What this skill does
# KB Ingest
Ingest any source — a URL, local file, or freeform note — into the knowledge base. Produces a source summary, then creates or updates entity and concept pages with new information.
## Triggers
- "ingest this article" → fetch URL and ingest
- "add to KB: ..." → treat the text as a freeform note
- "summarize this book and add it to my KB" → ingest file or freeform content
- `/kb-ingest <source>` → direct invocation
## Parameters
### `<source>` (required)
| Format | Behavior |
|--------|----------|
| `https://...` | Fetch with WebFetch, extract content |
| File path | Read the file directly |
| Quoted text | Treat as freeform note or paste |
### `--topic <tag>` (optional)
Tag this source with a topic hint (e.g., `--topic "machine-learning"`). Influences which entity/concept pages to touch.
### `--kb <path>` (optional)
Root of the knowledge base. **Default**: resolved by `aiwg kb path` (#965), which reads `resolveStorage('kb')` and honors any `roots.kb` override in `.aiwg/storage.config`. On the default `fs` backend this is `.aiwg/kb/`. To redirect the KB to an Obsidian vault or other backend without changing this skill, configure `.aiwg/storage.config` (#934).
When this skill needs to resolve the root from inside a Bash step:
```bash
KB_ROOT=$(aiwg kb path)
# write a page through the adapter (preferred — honors all backends):
echo "# Foo" | aiwg kb put entities/foo.md
# or write directly to the resolved fs path (fs backend only):
echo "# Foo" > "$KB_ROOT/entities/foo.md"
```
### `--dry-run` (optional)
Show what would be created or updated without writing files.
---
## Execution Flow
### Phase 1: Acquire Content
1. Resolve the source type (URL, file, freeform text).
2. For URLs: fetch with WebFetch. Extract title, author, date, and body text.
3. For files: read directly. Infer type from extension or content.
4. For freeform text: treat as a note; title defaults to first sentence (truncated to 60 chars).
### Phase 2: Summarize
Using the source-summary template at `$AIWG_ROOT/agentic/code/frameworks/knowledge-base/templates/source-summary.md`:
- Extract 3–7 key takeaways
- Identify notable quotes (verbatim, with location if available)
- Write a 2–5 sentence summary
- Note strengths and weaknesses
Determine the slug: lowercase title, spaces to hyphens, strip punctuation.
Save to: `<kb>/sources/<slug>.md`
### Phase 3: Identify Entities and Concepts
Scan the source content for:
- Named entities (people, tools, companies, places, products)
- Concepts, techniques, patterns, or frameworks mentioned
For each identified item:
1. Check whether a page already exists in `<kb>/entities/` or `<kb>/concepts/`.
2. If it exists: read the current page, add new facts or sources if not already present.
3. If it does not exist: create a new page from the appropriate template.
Use the entity-page template for discrete things.
Use the concept-page template for ideas and techniques.
### Phase 4: Cross-Link
In the new source summary, populate the **Connections** section with `[[wiki-links]]` to pages touched.
In each touched entity/concept page, add the source to the **Sources** table.
### Phase 5: Report
```
KB Ingest complete
Source summary: .aiwg/kb/sources/article-slug.md
Pages created:
+ .aiwg/kb/entities/person-name.md
+ .aiwg/kb/concepts/technique-name.md
Pages updated:
~ .aiwg/kb/entities/existing-entity.md (added source)
Next steps:
- Review created pages and fill placeholder sections
- Run /kb-health to check for orphan pages
```
---
## Scope Limits
- Create or update at most 5 entity/concept pages per ingest run. If more are identified, list them in the report as "candidates for future pages" rather than creating stubs automatically.
- Do not fetch URLs found within the source content. Ingest one source at a time.
- Do not remove or overwrite existing content in updated pages — only append to Sources tables and add missing facts clearly marked with the source.
## References
- @$AIWG_ROOT/agentic/code/frameworks/knowledge-base/templates/source-summary.md
- @$AIWG_ROOT/agentic/code/frameworks/knowledge-base/templates/entity-page.md
- @$AIWG_ROOT/agentic/code/frameworks/knowledge-base/templates/concept-page.md
- @$AIWG_ROOT/agentic/code/frameworks/knowledge-base/skills/kb-health/SKILL.md
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.