cratis-arc-query-paging

cratis-arc-query-paging is a skill for Claude Code, Codex from Cratis/AI. It costs 84 tokens per session (1,941 once invoked), scanned A, original, MIT.

A guide for adding server-side paging and sorting to a Cratis Arc query. Paging returns one bounded part of a large list, while sorting orders the results before they are sent to the client.

In plain words
What is it for?
Use it for Arc list queries that need page size, page number, field sorting, or ascending and descending order.
Why use it?
It avoids fetching every row when a list becomes large and keeps sorting work on the server. It also explains the query-string options and frontend hooks needed for paged results.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for Arc list queries that need page size, page number…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cratis/ai/cratis-arc-query-paging
View source ↗ Cratis/AI
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 Cratis/AI --skill cratis-arc-query-paging
Clone the repo
git clone --depth 1 https://github.com/Cratis/AI

Made for: Claude Code, Codex.

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 cratis-arc-query-paging

README.md
[![agentmods](https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-query-paging.svg)](https://agentmods.dev/skills/cratis/ai/cratis-arc-query-paging)
Your own site
<a href="https://agentmods.dev/skills/cratis/ai/cratis-arc-query-paging"><img src="https://agentmods.dev/badge/skills/cratis/ai/cratis-arc-query-paging.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,941 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.
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.00084 $0.01941
Opus 5 $0.00042 $0.00971
Sonnet 5 $0.00017 $0.00388
Haiku 4.5 $0.00008 $0.00194

Measured today against content hash 940c6c55b17e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

cratis-arc-query-paging 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 today.

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.

skills/cratis-arc-query-paging/SKILL.md · 174 lines

How it starts

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

Page and sort an Arc query

Arc applies paging and sorting for you. You never write Skip/Take or read the query string — you choose a return shape that the framework can narrow.

Verified product sources

Package Version Purpose
Cratis.Arc.Core 22.10.4 QueryableQueryRenderer, Paging, Sorting, PagingInfo
Cratis.Arc.MongoDB 22.10.4 Observe helpers that page at the source
Cratis.Arc.EntityFrameworkCore 22.10.4 DbSet<T> observe helpers that page at the source
@cratis/arc.react 22.10.4 useWithPaging, useSuspenseWithPaging

Reverify before claiming support for another version. A small, bounded result set does not need any of this — IEnumerable<T> is fine.

The wire contract

Query-string key Effect
pageSize Required to page at all. Must be greater than 0
page Zero-based. Defaults to 0 when pageSize is present
sortby Field name; PascalCased before use, so ?sortby=name sorts on Name
sortDirection desc (case-insensitive) sorts descending; anything else, including a missing value, is ascending

Two consequences that surprise people:

  • page alone does nothing. Without pageSize the request is not paged.
  • Sorting needs both keys. sortby without sortDirection is ignored entirely.

Paging is validated before the query runs: page must be >= 0 and pageSize must be > 0, and a violation comes back as a validation failure rather than a crash.

Which return shapes page

A query is a public static method on the [ReadModel] type, discovered by its return type.

Return Paged? How
T, T?, IEnumerable<T>, List<T>, T[] No Nothing narrows the result
IQueryable<T> Yes The query renderer counts, orders, then applies Skip/Take
Task<IQueryable<T>> Yes Awaited first, then rendered as the queryable it unwraps to
ISubject<IEnumerable<T>> Yes Not by the renderer — the storage Observe() helpers read the ambient query context and page at the source, reapplying on every change
ISubject<IQueryable<T>> No No Observe overload returns it, and the renderer matches on the outer type

Read the full file on GitHub · 174 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. today First seen · 174 lines · 84 tokens per session scan A 940c6c55b17e

Subscribe to this mod's changes

cratis-arc-query-paging is a skill published in the GitHub repository Cratis/AI (2 stars, last pushed today), licensed MIT. It adds 84 tokens to every session and 1,941 once invoked, about $0.0004 per session on Opus 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-06.