query
Skill8.2k starsChanged 57 days agoApache-2.0View on GitHub
How list endpoints take filters and sorts, modelled on Stream's query syntax. Read before adding a filter, a sort, or a query endpoint.
41 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- mphaxise/gstack-port-for-codextheir own version, first seen Nov 29, 2026
- HurricaHjz/second-yourselftheir own version, first seen Nov 24, 2026
- jakubtobiasz/second-brain-templatetheir own version, first seen Nov 15, 2026
- aibtcdev/skillstheir own version, first seen Nov 10, 2026
- hydra-db/hydradb-claude-codetheir own version, first seen Nov 8, 2026
- justmytwospence/strava-mcptheir own version, first seen Nov 8, 2026
Who's talking about GetStream/Agents
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.404 → 0.6.405”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.403 → 0.6.404”GitHub · Nov 30, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.402 → 0.6.403”GitHub · Nov 29, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.6.399 → 0.6.402”GitHub · Nov 27, 2026
- sudosubin/agents.nix“agent-skills.github.getstream.agents: 0.7.1 → 0.6.399”GitHub · Nov 27, 2026
The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 8
Talked about on GitHub (8 times).
On GitHub · 8
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.404 → 0.6.405 — sudosubin/agents.nix0 reactions
- Nov 30, 2026agent-skills.github.getstream.agents: 0.6.403 → 0.6.404 — sudosubin/agents.nix0 reactions
- Nov 29, 2026agent-skills.github.getstream.agents: 0.6.402 → 0.6.403 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.6.399 → 0.6.402 — sudosubin/agents.nix0 reactions
- Nov 27, 2026agent-skills.github.getstream.agents: 0.7.1 → 0.6.399 — sudosubin/agents.nix0 reactions
3 more on GitHub
- Nov 25, 2026fix: retain 7 reviewed references that left discovery (Nov 25) — tekvisions/voice-index0 reactions
- Nov 24, 2026agent-skills.github.getstream.agents: 0.7.0 → 0.7.1 — sudosubin/agents.nix0 reactions
- Nov 17, 2026agent-skills.github.getstream.agents: init at 0.7.0 — sudosubin/agents.nix0 reactions
Used with
Projects with it also use attach-db, install-duckdb and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
duckdbSkillattach-db
Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.
Also in 3 projects that use this
carlopiSkillinstall-duckdb
Install or update DuckDB extensions. Each argument is either a plain extension name (installs from core) or name@repo (e.g. magic@community). Pass --update to update extensions instead of installing.
Also in 3 projects that use this
carlopiSkillread-file
Read and explore any data file (CSV, JSON, Parquet, Avro, Excel, spatial, …) by filename only — resolves the path automatically. Uses DuckDB + the magic extension for format auto-detection. Installs magic if needed.
Also in 4 projects that use this
Microsoft AzureSkilllint
Run all linting and spell checking for TypeScript and Rust code. Run this before committing to catch style issues, clippy warnings, and misspellings.
Also in 18 projects that use this
Google CloudSkillingest
Extracts, distills, and compiles raw sources (PPTX slide decks, PDFs, Word docs, Excel sheets, web URLs, transcripts, codebases, or raw/ directories) into persistent, structured Knowledge Compiler markdown wikis following the Open Knowledge Format (OKF v0.2) and Andrej Karpathy LLM-Wiki standard. Use when the user invokes /ingest, asks to ingest raw files or a target path, compile knowledge, update the wiki, or extract unstructured files into markdown knowledge bases. Don't use for retrospectively compiling the active chat conversation without external files (use distill-session) or for read-only vault lookups (use vault-query).
Also in 19 projects that use this
NVIDIASkillsave
Persist the working library to the run dir and durable catalog. Use for /save.
Also in 4 projects that use this
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- garrytan/gbrain★ 34ksame name
- facebookincubator/velox★ 4.3ksame name
- jason-effi-lab/karpathy-llm-wiki-vault★ 718same name
- duckdb/duckdb-skills★ 623same name
- ArtemXTech/claude-code-obsidian-starter★ 225same name
- HurricaHjz/second-yourself★ 157same name
- HurricaHjz/SecondSelf★ 157same name
- romarayt/raytsystem-public-os★ 140same name
- StarRocks/starrocks-debug-skills★ 77same name
- MetamusicX/zissa-wiki★ 63same name
31 more not listed
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 repository55 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/python.mdcCursor rule
- pr-reviewSkill
- typesafe-aiSkill
- vgpuSkill
- accelerate-sales-engineerSkill
- add-connectorSkill
- check_pricesSkill
- cliSkill
- commitSkill
- connectorsSkill
- dashboardSkill
- decision_modelSkill
- deploySkill
- docsSkill
- generative-uiSkill
- good_morningSkill
- goSkill
- go-testingSkill
- integrate_new_modelsSkill
- llm-interfaceSkill
- loop_performance_benchSkill
- migrate-to-accelerateSkill
- new_modelsSkill
- paginationSkill
- parallel-agentsSkill
- performance_benchmarkSkill
- phonecheckSkill
- pricingSkill
- prospect-competitor-researchSkill
- provider_auditSkill
- prSkill
- refresh_model_statsSkill
- router-detectionSkill
- router-interfaceSkill
- router-llmSkill
- router-searchSkill
- router-stsSkill
- router-sttSkill
- router-ttsSkill
- scheduled-tasksSkill
- sdk-dartSkill
- sdk-dotnetSkill
- sdk-goSkill
- sdk-jsSkill
- sdk-kotlinSkill
- sdk-phpSkill
- sdk-rubySkill
- sdk-rustSkill
- sdkSkill
- sdk-swiftSkill
- securitySkill
- sttSkill
- telnyxSkill
- ttsSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 34 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 57
Not supported, and a 400: $ne, $nin, $nor, $not, regexes.
- Very specific: line 67
Only allow what an index serves.
- Distinctive: line 104
Put the grammar in one package and reuse it.
- Distinctive: line 119
Document the allowed fields, operators and sorts in the operation's description.
“Common” is measured: kept by at least 6 in 10 of the 34 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
Query
One filter language for every list, the one getstream.io uses for users, channels, messages and calls. A caller who has written one Stream query can write ours.
Paging is the pagination skill (.claude/skills/pagination/SKILL.md). Read it first:
this skill decides which rows, that one decides where the page starts.
Shape
A resource that needs more than a couple of equality filters gets
POST /v1/<resource>/query, operationId query<Resources>:
{
"filter": {"state": "closed", "created_at": {"$gte": "2026-09-01T00:00:00Z"}},
"sort": [{"field": "created_at", "direction": -1}],
"limit": 25,
"cursor": "…"
}The answer is a page, {items, has_more, next_cursor}, as in pagination.
- POST because a filter is a tree, and a tree in a query string is unreadable. It still reads and nothing changes.
- A simple
GETlist with a couple of query parameters stays as it is. Addquery<Resources>beside it when it outgrows them; don't add a tenth query parameter. filteris optional. An empty filter is every row the caller may see.
Stream calls the field filter_conditions. We call it filter; the grammar is the same.
Filter grammar
A filter is a JSON object. Keys are field names or logical operators, and all keys at one level are ANDed.
| Operator | Meaning | Example |
$eq | equal; a bare value is shorthand | {"state": "closed"} |
$in | equal to any of a list | {"agent": {"$in": ["a", "b"]}} |
$gt $gte $lt $lte | range, on numbers and RFC3339 times | {"created_at": {"$lt": "…"}} |
$exists | the field is set or not | {"ended_at": {"$exists": false}} |
$contains | array holds the value; object holds every key and value | {"custom": {"$contains": {"team": "x"}}} |
$autocomplete | prefix match on a name | {"title": {"$autocomplete": "sup"}} |
$q | full-text match | {"title": {"$q": "billing refund"}} |
$and $or | a list of filters | {"$or": [{"state": "running"}, {"agent": "x"}]} |
custom.<key> is shorthand for $contains on the custom object:
{"custom.team": "x"} is {"custom": {"$contains": {"team": "x"}}}.
Not supported, and a 400: $ne, $nin, $nor, $not, regexes. Negative filters walk
every row that does not match instead of seeking to the ones that do. Rewrite them as a
positive $in. Stream allows $ne only on id and booleans; we allow $ne only on booleans,
where it is just $eq with the other value.
Rules
- Each endpoint declares an allow-list: field → operators, and the column each field reads. Anything else is a 400 that names the field and the operator. Never pass a caller's field name into SQL; it is looked up in the allow-list and the column comes from there.
- Only allow what an index serves. If
(customer_id, agent, created_at, id)exists,agentgets$eqand$in; a field with no index gets nothing until it has one. Custom fields get$eq/$containsonly, as containment (@>), which ajsonb_path_opsGIN index on the JSONB column answers. Never$existson a custom key: key-exists (?,?|,?&) needs the defaultjsonb_opsindex, which is several times larger. $and/$ornest one level deep at most, and$intakes at most 100 values. Deeper trees are a 400; they are how a list becomes a table scan.- Scope is not a filter. The handler ANDs the customer, and for end users the user, onto
whatever arrived, as
SessionFilter.UserIDdoes. A caller cannot widen it by writing$or. - Values are typed by the field: a time must parse as RFC3339, a number as a number, an enum as one of its values. A wrong type is a 400, not an empty page.
Sort
sort is a list of {"field", "direction"}, direction 1 ascending or -1 descending, as
Stream does it. Fields come from a sort allow-list, usually two or three indexed columns.
- Omitted, the endpoint's default applies, e.g.
created_atdescending. - The server appends
idin the direction of the last key, so the order is total. - The cursor holds every sort key and a fingerprint of the sort. A cursor sent with a different sort is a 400. See pagination for why the keys are in the cursor.
- One index per allowed sort, behind the filters it is used with.
Paging
As in pagination: limit + cursor, never offset. Stream Chat's queries page by offset
with a 1,000 row ceiling; Stream Video's queryCalls hands back a next pointer. We do what
Video does.
filterandsortare resent with every page. The cursor is only a position.- The next page is the filter ANDed with
(sort keys, id) < (cursor values), flipped to>for ascending keys. - Fetch
limit + 1forhas_more. No counts.
Go
Put the grammar in one package and reuse it; an endpoint only supplies its allow-lists.
- A short allow-list needs no parser.
querySessions(internal/api/session_query.go) declares its filter as closed Huma structs, with one struct per operator (Equals,TextMatch), so the schema validates the request and documents it too. Combinations the schema cannot express, such as a text search withproject_id, are refused insessionQueryOf. The cursor carries the sort, so a cursor from one sort is refused by another. Start here, and move to a tree only when$and,$oror$inare needed. - Parse the body into a tree once, validating against the allow-list as you go. The
handler gets a typed tree or an
invalidRequestAPIError. - Compile the tree to bun
Whereclauses with bound values. Field names never reach SQL as text. - Where a list merges rows held in memory with rows in Postgres, like live sessions in
Manager.find, the same tree needs aMatch(item)too, so both halves filter and sort alike. - Document the allowed fields, operators and sorts in the operation's description; that is what a caller reads.
- Tests follow the
go-testingskill: one per allowed operator, one for a rejected field and a rejected operator, one for a nested$or, and one that pages a filtered, sorted list to the end without repeating or skipping a row.
SDKs
Go first, as AGENTS.md says. The filter is a plain map in every SDK (map[string]any, a
dict, an object), which is how Stream's SDKs take filter_conditions. Sort is a typed list.
List methods follow the cursor the way Items.Unwind does.
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.

