Cortex Query
Researchcortex-queryCortex Query is an Agent Skill for research published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Search and query your Knowledge Cortex (~/.cortex/). Use when asked to "cortex stats", "cortex search", "cortex client", "cortex contacts", "cortex export", "cortex prune", "search my knowledge base", or "what do I know about COMPANY". Queries portable JSONL/JSON files for contacts, clients, communications, and facts.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/cortex-query/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cortex-query, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Knowledge Cortex — Query
Search, browse, and export your Knowledge Cortex flat files.
When invoked
Read {skill_path}/references/file-schema.md for the storage format.
Commands
| What user says | Action |
|---|---|
| "cortex stats" | Show knowledge base stats |
| "cortex search QUERY" | Search across all records |
| "cortex client DOMAIN" | Full dossier for a client |
| "cortex contacts [filter]" | List contacts |
| "cortex export TYPE" | Export contacts, clients, knowledge, or comms |
| "cortex prune" | Remove low-value records |
Usage
python3 {skill_path}/scripts/cortex-query.py stats
python3 {skill_path}/scripts/cortex-query.py search "QUERY"
python3 {skill_path}/scripts/cortex-query.py client domain.com
python3 {skill_path}/scripts/cortex-query.py contacts [filter]
python3 {skill_path}/scripts/cortex-query.py export contacts --format csv
python3 {skill_path}/scripts/cortex-query.py export knowledge --format json
python3 {skill_path}/scripts/cortex-query.py prune --dry-run
python3 {skill_path}/scripts/cortex-query.py prune
Print output directly to the user.
Environment
| Variable | Default | Purpose |
|---|---|---|
CORTEX_DIR | ~/.cortex | Storage root |
References
- File schemas:
{skill_path}/references/file-schema.md