kb-search
Skill134 starsChanged 3 months agoMITView on GitHub
Query the APIView Copilot knowledge base for guidelines, examples, and memories. Use for: search KB, search knowledge base, find guideline, lookup guideline, search guidelines, search examples, search memories, KB query, knowledge base search, find rule, what does the KB say about.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- EthanReedLabs/suldetheir own version, first seen Sep 13, 2026
- dingshuxin353/ai-knowledge-vaulttheir own version, first seen Sep 8, 2026
- gumbertnntu-cloud/hermes-kb-searchtheir own version, first seen Jun 24, 2026
- vakovalskii/ontoshiptheir own version, first seen Jun 15, 2026
- GoogleCloudPlatform/knowledge-catalogtheir own version, first seen May 13, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- GoogleCloudPlatform/knowledge-catalog★ 9.4ksame name
- EthanReedLabs/sulde★ 99same name
- vakovalskii/ontoship★ 80same name
- dingshuxin353/ai-knowledge-vault★ 18same name
- gumbertnntu-cloud/hermes-kb-search★ 0same 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.
In this repository42 other files it gives its agents.
- packages/python-packages/apiview-copilot/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-generate-sdk-pipelineSkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-breaking-changeSkill
- azsdk-common-sdk-releaseSkill
- azure-typespec-assessmentSkill
- azure-typespec-authorSkill
- code-reviewSkill
- eval-authoring-skillSkill
- eval-authoring-toolSkill
- eval-authoring-workflowSkill
- markdown-token-optimizerSkill
- sdk-ai-bot-eval-datasetSkill
- sdk-ai-bot-run-evaluationSkill
- skill-authoringSkill
- add-endpointSkill
- audit-filtersSkill
- dev-setupSkill
- report-active-reviewsSkill
- report-apiview-metricsSkill
- report-architect-commentsSkill
- report-feedbackSkill
- report-memorySkill
- report-revisionsSkill
- run-evalsSkill
- run-metricsSkill
- update-guidelinesSkill
- apiview-feedback-resolutionSkill
- azure-typespec-authorSkill
- generate-sdk-locallySkill
- azsdk-common-live-and-recorded-testsSkill
- markdown-token-optimizerSkill
- pipeline-troubleshootingSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-releaseSkill
- skill-authoringSkill
- pr-review-helpSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Output: Use --markdown for text/path queries (easier for the agent to read and summarize).
- Very specific: line 30
Query mode: Use --text for natural language queries.
- Very specific: line 60
Run directly in a foreground terminal with a 60-second timeout (timeout: 60000).
- Very specific: line 66
Do not use > — it produces UTF-16 in PowerShell 5.1.
- Distinctive: line 85
After the command completes, read the terminal output and summarize the findings for the user.
- Very specific: line 138
--idsis exclusive: When using --ids, do not pass --language, --text, --markdown, or --path. - Distinctive: line 144
Scores are normalized: Search result scores use Z-score normalization (mean=50).
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Knowledge Base Search
When to Use
- Looking up Azure SDK design guidelines for a specific language
- Finding examples (good or bad) related to an API pattern
- Retrieving specific knowledge base items by ID
- Understanding what RAG context the AI reviewer sees for a given query
- Investigating what guidance exists for a topic (e.g. naming, async, pagination)
How It Works
The knowledge base contains three entity types linked in a graph:
- Guidelines — Azure SDK design rules (e.g. "Methods returning collections should use paging")
- Examples — Good/bad code snippets linked to guidelines
- Memories — Lessons learned from reviewer feedback, linked to guidelines and examples
A search query hits the Azure AI Search index (semantic + vector search), then resolves all linked entities from Cosmos DB via breadth-first traversal. The result is the same RAG context the AI reviewer would see.
Defaults
Unless the user says otherwise, always apply these defaults:
- Language: Required for all non-
--idsqueries (both--textand--path). Use the language the user is asking about. - Output: Use
--markdownfor text/path queries (easier for the agent to read and summarize).--markdownis not allowed with--ids. - Query mode: Use
--textfor natural language queries. Use--pathto search from a file. Use--idsonly when the user provides specific knowledge base IDs.
Three Query Modes
1. Text Search (--text)
Requires --language. Searches the index semantically and returns linked guidelines, examples, and memories.
python cli.py kb search -l <language> --text "<query>" --markdown2. File Search (--path)
Requires --language. Reads query text from a file and searches the index.
python cli.py kb search -l <language> --path <file> --markdown3. ID Lookup (--ids)
Retrieves specific items by ID. No other flags allowed (no --language, --text, --markdown, --path).
python cli.py kb search --ids <id1> <id2> ...Running the Command
Run directly in a foreground terminal with a 60-second timeout (timeout: 60000). By default, let the terminal capture the output so the agent can read it directly. If the output appears truncated (terminal truncates at ~60 KB), re-run with redirection to a file and read it back:
python cli.py kb search -l <language> --text "<query>" --markdown | Out-File -Encoding UTF8 scratch/kb_output.mdDo not use > — it produces UTF-16 in PowerShell 5.1. Always use | Out-File -Encoding UTF8.
Then use read_file on scratch/kb_output.md to get the full results.
Text search:
python cli.py kb search -l <language> --text "<query>" --markdownFile search:
python cli.py kb search -l <language> --path <file> --markdownID lookup:
python cli.py kb search --ids <id1> <id2>After the command completes, read the terminal output and summarize the findings for the user.
Examples
# Search Python guidelines about async
python cli.py kb search -l python --text "async client methods" --markdown
# Search TypeScript guidelines about naming
python cli.py kb search -l typescript --text "method naming conventions" --markdown
# Search Java guidelines about pagination
python cli.py kb search -l java --text "pagination list operations" --markdown
# Retrieve specific items by ID
python cli.py kb search --ids guideline-abc123 example-def456
# JSON output instead of markdown (for structured processing)
python cli.py kb search -l dotnet --text "dispose pattern"Available Flags
| Flag | Type | Default | Description |
--text | string | — | Natural language search query (mutually exclusive with --path) |
--path | string | — | Path to a file containing query text or code (mutually exclusive with --text) |
--ids | list | — | One or more knowledge base item IDs to retrieve directly (no other flags allowed) |
--language / -l | string | — | Language to search (required for all non---ids queries) |
--markdown | flag | off | Render output as markdown instead of JSON (not allowed with --ids) |
Understanding the Output
Markdown Format (--markdown)
Each result is rendered as a section with:
- Metadata block:
{kind}_id(e.g.guideline_idormemory_id), score (if available), and exception status (if true) - Title: The guideline or memory title
- Content: The full guideline or memory text
- Examples: Good and bad code examples in fenced code blocks
This is the same format the AI reviewer sees during RAG-based reviews.
JSON Format (default)
Returns the full Context object with nested guidelines, examples, and memories including scores and all linked entities. Useful for programmatic inspection.
ID Lookup Format
Returns SearchItem objects as a JSON array with a curated projection of index fields: id, kind, title, content, language, service, is_exception, example_type, and search scores.
Gotchas
--idsis exclusive: When using--ids, do not pass--language,--text,--markdown, or--path. The command will error.--languageis required for all non---idsqueries: Both--textand--pathrequire--languageto filter the index.- Exactly one of
--textor--path: For non-ID queries, provide one but not both. - Use
python cli.pynotavc/avc.bat: The wrapper scripts (avcon Linux/macOS,avc.baton Windows) invoke the systempython/python3, which may not be the correct virtual environment. Runpython cli.pydirectly to ensure the right interpreter is used. - Do NOT use
2>&1: This merges stderr log messages into the output, corrupting it. - Prefer
--markdownfor text/path queries: The markdown output is more readable and is what the AI reviewer actually sees. Use JSON only when you need structured data. - Scores are normalized: Search result scores use Z-score normalization (mean=50). Higher is more relevant.
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.

