query-grammar

query-grammar is a skill for Claude Code from kavo-labs/kavo. It costs 83 tokens per session (2,253 once invoked), scanned A, original, MIT.

Reference documentation for the query-string grammar used by Kavo API routes. It explains how to filter, sort, select, include, and paginate database results through request parameters.

In plain words
What is it for?
Use it when writing API consumer documentation or building requests for filtering, sorting, field selection, relations, pagination, or deleted records.
Why use it?
It helps API users construct valid queries and understand the available operators and data-shaping options.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the kavo-skills plugin — 15 skills shipped together

Good fit Use it when writing API consumer documentation or building requests for filtering, sorting, field selection, relations, pagination, or deleted records.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kavo-labs/kavo/query-grammar
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kavo-labs/kavo --skill query-grammar
Clone the repo
git clone --depth 1 https://github.com/kavo-labs/kavo

Made for: Claude Code.

Or install kavo-skills, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for query-grammar

README.md
[![agentmods](https://agentmods.dev/badge/skills/kavo-labs/kavo/query-grammar/github.svg)](https://agentmods.dev/skills/kavo-labs/kavo/query-grammar)
Your own site
<a href="https://agentmods.dev/skills/kavo-labs/kavo/query-grammar"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/query-grammar/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for query-grammar

Your own site · 80×15
<a href="https://agentmods.dev/skills/kavo-labs/kavo/query-grammar"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/query-grammar.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.02253
Opus 5.5 $0.00033 $0.00901
Sonnet 5.5 $0.00017 $0.00451
Haiku 4.5 $0.00008 $0.00225

Measured 1mo ago against content hash 330fc1fd07c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query-grammar scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

extensions/skills/query-grammar/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Query grammar reference

Every generated findMany/findOne route (and the programmatic findMany({ filter, sort, ... }) equivalent) is driven by one query model, normalized in core/src/query/ (DefaultFilterParser, QueryNormalizer, PaginationStrategy). This doc is end-user-safe — hand it to an API consumer as-is. Full source: docs/internals/architecture/05-query-grammar.md (operators/grammar) and docs/internals/architecture/12-relations-and-includes.md (includes). What an entity allows through these params is configured via allowed/relations on @Kavo — see the kavo-decorator skill.

Filtering — filter[field][operator]=value

AST operator Wire token Example
EQ eq filter[status][eq]=active
NE ne filter[status][ne]=banned
GT / GTE gt / gte filter[age][gte]=18
LT / LTE lt / lte filter[age][lt]=65
IN in filter[status][in]=active,pending
NOT_IN notIn filter[role][notIn]=bot,test
LIKE like filter[name][like]=%25john%25
ILIKE ilike filter[name][ilike]=%25john%25
BETWEEN between filter[createdAt][between]=2026-01-01,2026-06-01
IS_NULL isNull filter[deletedAt][isNull]=true
IS_NOT_NULL isNotNull filter[deletedAt][isNotNull]=true

Logical operators: AND (implicit), OR, NOT — wire tokens and, or, not. Wire tokens are camelCase and exact-case matched, no aliases (GTE/Gte are 400s).

  • Multiple filter[...] params AND together implicitly, including repeats on the same field: filter[age][gte]=18&filter[age][lt]=65.
  • in/notIn: comma-separated by default (in=active,pending); the repeated-key form filter[status][in][]=a&filter[status][in][]=b also works. Capped by limits.inValues (default 100).
  • between: exactly two comma-separated bounds.
  • isNull/isNotNull: boolean-valued; isNull=false ≡ isNotNull=true — both spellings mean what they read as.
  • like/ilike: never auto-wrap wildcards — pass %/_ explicitly. Literal %/_ escape with a backslash (\%, \_). ilike is portable (LOWER(col) LIKE LOWER(:v)), identical across drivers. String columns only.
  • Relation-path filtering: dot notation (filter[profile.city][eq]=Helsinki), permitted only on the filterable allowlist. This restricts root rows via a non-selecting join — it never loads or filters the included collection.
  • Nested boolean trees: filter also accepts one JSON-encoded value — ?filter={"or":[{"name":{"eq":"admin"}},{"not":{"status":{"eq":"x"}}}]} — producing the identical AST as the bracket form. Bracket notation is sugar for the flat common case; JSON is the full-power escape hatch. When both appear on the same request, they AND together.
  • Nesting depth is capped by limits.filterDepth (default 3).

Read the full file on GitHub · 162 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +2 lines 330fc1fd07c2
  2. 2mo ago Changed 252729269246
  3. 2mo ago First seen · 160 lines · 83 tokens per session scan A 2cdfe0770991

Subscribe to this mod's changes

query-grammar is a skill published in the GitHub repository kavo-labs/kavo (17 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 2,253 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-02.

Related

query-grammar compared with skills from other repositories

query-grammar next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
query-grammarkavo-labs/kavoSkill17yesterdayMITA83Claude Code
prisma-8prisma/ormSkill48kyesterdayApache-2.0A220Claude Code, Codex
webiny-api-opensearch-catalogwebiny/webiny-jsSkill8.0kyesterdaynoneA19Claude Code, Codex
nestjs-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A81Claude Code
create-prprisma/ormSkill48kyesterdayApache-2.0A48Claude Code, Codex
draft-release-notesprisma/ormSkill48kyesterdayApache-2.0A174Claude Code, Codex
publish-npm-versionprisma/ormSkill48kyesterdayApache-2.0A182Claude Code, Codex