# Using Packages in Agents `context build` turns approved knowledge into a **knowledge package** under `dist//`: a plain folder of Markdown that any Agent can read, with a bundled Skill that teaches it how. The package is what you hand to Agents that should *use* the knowledge without the Context knowledge workspace that produced it. ## What is inside ```text dist// ├── AGENTS.md # how to use this package ├── skills/knowledge-query/ # bundled query Skill and search script ├── wikis/index.md # entities and relationships ├── guides/ # architecture, procedures, FAQs, decisions ├── rules/ # standards, constraints, test scenarios ├── context-build-inventory.json # package coverage ├── context-site-map.json # page → website URL └── others/assets/ # images and files the pages use ``` Approved collections map to roots: `codeindex`, `business` and `product` go to `wikis/`; `architecture`, `sop`, `faq`, `decision` and `incident` go to `guides/`; `standards` and `test` go to `rules/`. A root that was not selected is simply absent. ## How the query Skill reads it The bundled `knowledge-query` Skill makes the Agent navigate before it searches: 1. Classify the request: lookup, explanation, procedure, rule, relationship, detail or coverage. 2. Open the matching root index and follow links to a likely page. 3. Read only the needed sections; titles and descriptions select scope but do not support claims. 4. Answer from visible section content and cite the page and heading. 5. When the package lacks evidence, report the gap and what was checked. When indexes do not narrow the scope, it searches: `rg` for an exact name or error string, and for several terms or non-English phrases the bundled BM25 script: ```bash node /scripts/search.mjs --query '' --limit 8 ``` Hits are leads; the Agent opens the page before answering. ## Making it available A package can be used where it was built, from a global installation, or from any directory your Agent host can read. Point the Agent at the folder, or install `skills/knowledge-query` into the host's skills directory; if the Skill ends up outside the package tree, the search script takes `--root `, or `--base ` to find the package by its inventory name. Before publishing a package, replace or edit the generic query Skill template with your project's terminology, common intents and preferred entry pages — or explicitly accept the default during package-template review. ## Going back to the sources Package pages carry exported source attributions. When the package is not enough, `/c4a:context-inspect-search` can trace those attributions to the original documents and code at their recorded versions. See [Asking Questions]() and [Reading Code Evidence Remotely](). --- ## Sources - [context/packages/context/docs/guides/package-outputs.md L3–L5 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/AGENTS.md L9–L15 · 3b0ce0a]() - [context/packages/context/docs/reference/package-templates.md L124–L147 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/AGENTS.md L17–L26 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L39–L47 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L12–L24 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L85–L107 · 3b0ce0a]() - [context/plugins/context/skills/context-inspect-search/SKILL.md L109–L122 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L97–L101 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L141–L149 · 3b0ce0a]() - [context/packages/context/templates/package-templates/kb/skills/knowledge-query/SKILL.md L74–L83 · 3b0ce0a]() - [context/plugins/context/skills/context-inspect-search/SKILL.md L237–L243 · 3b0ce0a]()