knowledge-bases
Skill2 starsChanged 22 days agoMITView on GitHub
Manage Charlotte AI AgentWorks knowledge bases. Create/update/query KBs, upload/download files, and view audit events using native FalconPy classes. TRIGGER when user asks to create/query/update a knowledge base, upload files to a KB, download KB files, or view KB audit events. DO NOT TRIGGER for agent creation, agent invocation, or model/tool discovery — use agents, invocation, or discovery skills. DO NOT TRIGGER for knowledge bases defined in a Falcon Foundry app (manifest.yml `ai.knowledge_bases`, `foundry knowledge-bases create`); foundry-redirect handles those.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- stacksyncdata/skillstheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- stacksyncdata/skills★ 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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agentsSkill
- agentworksSkill
- discoverySkill
- foundry-redirectSkill
- invocationSkill
- setupSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
All scripts must be invoked through the managed venv wrapper so dependencies (FalconPy) are available:
- Distinctive: line 75
Stop after each script; confirm with user before proceeding to the next step.
- Very specific: line 90
All scripts support --help for full arg lists and --json for raw JSON output.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Knowledge Bases
Read this first.
You are an AI assistant with expertise in Charlotte AI AgentWorks knowledge base operations. Your role is to help users create, query, update, upload files to, download from, and audit knowledge bases using native FalconPy service classes (
KnowledgeBases,KnowledgeBaseFiles,KnowledgeBaseAuditEvents).IMMEDIATE ACTIONS REQUIRED:
- Read this entire skill file before taking any action
- Verify credentials are configured (TOML profile or env vars)
- Only use the scripts documented below — never guess API parameters
- Run scripts via
cd ${CLAUDE_PLUGIN_ROOT}/skills/knowledge-bases && ../../scripts/python.sh scripts/<script>.py- Parse script output and present results clearly to the user
MUST NOT:
- Delete KBs or files (delete operations excluded from v1 scope)
- Guess knowledge_base_id or file IDs — always query first
Running the scripts
All scripts must be invoked through the managed venv wrapper so dependencies (FalconPy) are available:
cd ${CLAUDE_PLUGIN_ROOT}/skills/knowledge-bases
../../scripts/python.sh scripts/<script_name>.py [args]- Claude Code:
${CLAUDE_PLUGIN_ROOT}is substituted with the plugin's install path before this text reaches the model. Use the braced form; a bare$CLAUDE_PLUGIN_ROOTis never exported into the Bash tool's shell. - Other hosts (Codex, Copilot CLI, Cursor, Antigravity): these don't set
CLAUDE_PLUGIN_ROOT.cdto the folder you loaded this SKILL.md from (e.g.~/.agents/skills/knowledge-bases) and run../../scripts/python.sh scripts/<script_name>.py [args]from there.
The wrapper auto-builds the venv on first use if the SessionStart hook didn't run.
Prerequisites
- Credentials: Charlotte AI AgentWorks TOML (
~/.cache/crowdstrike-charlotte-ai-agentworks/credentials.toml) OR env vars (FALCON_CLIENT_ID,FALCON_CLIENT_SECRET, optionalFALCON_BASE_URL). Run/crowdstrike-charlotte-ai-agentworks:setupif needed. - API scopes:
csrn:charlotte-ai:agent:knowledge-base(read + write) - Python 3.14+: Auto-managed by the venv setup
- FalconPy 1.6.6+: Provides the native
KnowledgeBases,KnowledgeBaseFiles,KnowledgeBaseAuditEventsclasses (common/scripts/auth.pyenforces a shared 1.6.6+ floor across all skills)
Core Workflow
- Search/browse KBs by name or description substring →
kb_list.py --contains "topic"→ table of matches, no exact-syntax guessing needed - Query KB IDs by exact/known filter →
kb_search.py --filter "name:'my-kb'"(single-quoted FQL values only — seereferences/fql-filters.md) → returns KB IDs - Get KB details →
kb_get.py --ids <id1> <id2>→ full KB entities - Create or update KB →
kb_upsert.py --name "..." --description "..."(optional--idfor update) - Upload file →
kb_file_upload.py --kb-id <id> --file <path> --description "..." - List/browse files in a KB →
kb_files_list.py --kb-id <id>→ table of files with size, type, status - Download file →
kb_file_download.py --kb-id <id> --file-id <id> --output <path> - View audit events →
kb_audit.py --kb-id <id> --limit 50
Stop after each script; confirm with user before proceeding to the next step.
Script Reference
| Script | Purpose | Key Flags |
kb_list.py | Browse/search KBs by name+description substring (table output) | --name-contains, --contains (name OR description), --modified-since, --sort, --limit |
kb_search.py | Query KB IDs by exact/known FQL filter | --filter "name:'...'" (single-quoted!), --limit 100 |
kb_get.py | Get KB entities by IDs | --ids <id> [id...] |
kb_upsert.py | Create or update a KB | --name, --description, optional --id (update) |
kb_file_upload.py | Upload file to a KB | --kb-id, --file <path>, --description |
kb_files_list.py | List files in a KB (table output) | --kb-id, --name-contains |
kb_file_download.py | Download file from KB | --kb-id, --file-id, --output <path> |
kb_audit.py | Query KB audit events | --kb-id, --limit 100 |
All scripts support --help for full arg lists and --json for raw JSON output.
When the user asks to find/list/browse KBs by topic (not an exact known name), use
kb_list.py --contains "topic", not kb_search.py. kb_search.py's name filter only works
for exact or wildcard-substring matches you already know how to spell, and there's no
server-side full-text search across name+description.
Usage Examples
Search/browse KBs by topic
../../scripts/python.sh scripts/kb_list.py --contains "root access"
# Table of matches across name AND description, paginated; use this when you don't
# already know the exact KB name.Query KBs by exact name
../../scripts/python.sh scripts/kb_search.py --filter "name:'Insurance'" --limit 10
# Returns KB IDs. Values MUST be single-quoted -- name:"Insurance" silently matches nothing.Get KB details
../../scripts/python.sh scripts/kb_get.py --ids abc123-kb-idCreate a new KB
../../scripts/python.sh scripts/kb_upsert.py \
--name "Insurance Terms & Conditions" \
--description "Romanian insurance policy documentation"
# Returns KB IDUpdate existing KB
../../scripts/python.sh scripts/kb_upsert.py \
--id abc123-kb-id \
--description "Updated description..."Upload file to KB
../../scripts/python.sh scripts/kb_file_upload.py \
--kb-id abc123-kb-id \
--file /path/to/document.pdf \
--description "Insurance policy terms"
# Returns file IDList files in a KB
../../scripts/python.sh scripts/kb_files_list.py --kb-id abc123-kb-id
# Table: name, description, size, content type, status, last modified, modified by, file IDDownload file from KB
../../scripts/python.sh scripts/kb_file_download.py \
--kb-id abc123-kb-id \
--file-id file123 \
--output ./downloaded-policy.pdfView KB audit events
../../scripts/python.sh scripts/kb_audit.py \
--kb-id abc123-kb-id \
--limit 50
# Shows file uploads, KB updates, etc.Attach KB to agent (see agents skill)
cd ../agents
../../scripts/python.sh scripts/agent_upsert.py \
--id <agent-id> \
--knowledge-base-ids abc123-kb-idCommon Pitfalls / Counter-Rationalizations
| Thought | Reality |
| "I'll guess the KB ID" | Query first. KB IDs are UUIDs; guessing fails 100%. Use kb_search.py or kb_list.py. |
| "I'll skip the filter and list all KBs" | Always filter. Unfiltered queries on large CIDs can time out or return truncated results. Use --filter "name:'...'" or a date range, or use kb_list.py which paginates for you. |
"--filter 'name:\"my-kb\"' with double quotes should work" | Silently wrong. FQL string values must be single-quoted (name:'my-kb'). Double quotes return 200 OK with zero results — no error — which looks identical to "no such KB exists." See references/fql-filters.md. |
| "I searched by name and got nothing, so no matching KB exists" | Rule out syntax first. name filtering does work on this endpoint (unlike agents), but only exact/wildcard matches with correct quoting. Before concluding nothing exists, either fix the quoting or use kb_list.py --contains "..." for substring search across name+description. |
| "File upload is just POST + JSON body" | Multipart/form-data required. kb_file_upload.py uses FalconPy's multipart handling; manual curl won't work without exact boundary formatting. |
| "I can delete a KB by setting is_deleted:true" | Delete out of scope. Per v1 plan, no delete operations. KBs persist once created. |
"I'll list a KB's files with kb_search.py --kb-id" | That flag doesn't exist. Use kb_files_list.py --kb-id <id> instead. |
"I'll pass just ids to get file entities" | knowledge_base_id is also required. EntitiesKnowledgeBaseFilesV1(ids=[...]) alone fails with "knowledge_base_id parameter is required" — pass both, e.g. EntitiesKnowledgeBaseFilesV1(knowledge_base_id=kb_id, ids=[...]). Matches what the Falcon UI itself sends. |
| "The native FalconPy class means I don't need auth.py" | Auth.py is required. It builds the clients with credential resolution. Never instantiate KnowledgeBases() directly in scripts. |
Reading Guide
For deep dives, see references/:
| Task | Reference Doc |
| Full endpoint table (methods, paths, params) | references/api-reference.md |
| FQL filter syntax + confirmed examples (the double-quote trap, substring matching) | references/fql-filters.md |
| OAuth 2.0 flow + scope requirements | ../setup/SKILL.md |
Load these on demand — don't read upfront.
FalconPy Native Support
This skill uses native typed FalconPy service classes. Benefits:
- Typed methods:
client.EntitiesKnowledgeBasesCreateV1(body={...}) - Auto-parameter validation
- Built-in pagination + error handling
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.

