# Cortex Query

> >

- **Type:** Skill
- **Install:** `agentstack add skill-xbluesky-cortexes-cortex-query`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [XBlueSky](https://agentstack.voostack.com/s/xbluesky)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [XBlueSky](https://github.com/XBlueSky)
- **Source:** https://github.com/XBlueSky/cortexes/tree/plugin/skills/cortex-query
- **Website:** https://cortexes.pages.dev

## Install

```sh
agentstack add skill-xbluesky-cortexes-cortex-query
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Cortex Query — Search the Vault

Search the cortex Obsidian vault using semantic search.

## Resolve Vault Path

Read `~/.cortex/config.json` to get `vault_path`.
If the file doesn't exist, tell the user to run `/cortex:genesis` first.

## Search Strategy (Layered)

### Layer 1: Vector Search (primary)

Use `cortex-vec` for semantic search:

```bash
cortex-vec search "" --n 5
```

`cortex-vec` is installed as a CLI tool (from PyPI via `uv tool install
cortex-vec` or pip — see the README's Quick Start; `/cortex:genesis` offers
the install when it is missing).

**Context-aware filtering:** If the current session is inside a git repo,
detect the repo name and add `--repo` filter as default scope:

```bash
cortex-vec search "" --repo  --n 5
```

The user can override this by saying "search all" or "search across everything".

**Additional filters:** Apply when the user specifies:
- `--type note|project|weekly` — filter by content type
- `--category Nginx|Linux|...` — filter by category

**Interpreting scores:**
- Score > 0.80: High confidence match — present prominently
- Score 0.60-0.80: Possible match — present as suggestions
- Score " /Notes/ /Projects/
```

Show matching files with brief excerpts.

### Layer 3: Raw Search (archive, on request)

Only when the user specifically asks about recent sessions or raw data:

```bash
grep -ri "" /Raw/
```

Show matches with date and repo context.

## Response Format

Present results to the user:

```
Found N results for "":

1. [score] Title (Type, Category/Repo)
   → one-line summary

2. [score] Title (Type, Category/Repo)
   → one-line summary
```

- Use wikilink format when referencing notes: `[[note-name]]`
- If multiple matches, list them and ask which one to read
- If user wants details → read the full file
- For Weekly entries, show the date and summary line

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [XBlueSky](https://github.com/XBlueSky)
- **Source:** [XBlueSky/cortexes](https://github.com/XBlueSky/cortexes)
- **License:** Apache-2.0
- **Homepage:** https://cortexes.pages.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-xbluesky-cortexes-cortex-query
- Seller: https://agentstack.voostack.com/s/xbluesky
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
