Linear Pagination + Filtering
FreeNo executable scriptsNot checkedThis skill should be used when fetching large result sets from Linear — cursor pagination, filter DSL, sorting, and complexity budgeting. Activates on "linear…
by TheLobbi★ 22 GitHub starsAbout this skill
Linear Pagination + Filtering
References:
- Pagination: https://linear.app/developers/pagination
- Filtering: https://linear.app/developers/filtering
Cursor pagination
Linear uses opaque forward cursors. Pattern:
query Page($cursor: String, $filter: IssueFilter) {
issues(first: 50, after: $cursor, filter: $filter, orderBy: updatedAt) {
pageInfo { hasNextPage endCursor }
nodes { id }
}
}
first ranges 1-250. No last/before — Linear is forward-only. To paginate descending, use orderBy with the appropriate direction (e.g. createdAt).
Helper in lib/pagination.ts:
async function* paginateAll<T>(
fetch: (cursor: string | null) => Promise<{ nodes: T[]; pageInfo: { hasNextPage: boolean; endCursor: string } }>
): AsyncGenerator<T> {
let cursor: string | null = null;
while (true) {
const page = await fetch(cursor);
yield* page.nodes;
if (!page.pageInfo.hasNextPage) return;
cursor = page.pageInfo.endCursor;
}
}
Filter DSL
Filters are nested JSON trees:
filter: {
and: [
{ state: { type: { eq: "started" } } },
{ priority: { lte: 2 } },
{ or: [
{ assignee: { isMe: { eq: true } } },
{ team: { key: { eq: "ENG" } } }
] },
{ labels: { some: { name: { in: ["bug", "regression"] } } } }
]
}
Comparison operators
| Op | Strings | Numbers | Booleans | Dates |
|---|---|---|---|---|
eq |
✓ | ✓ | ✓ | ✓ |
neq |
✓ | ✓ | ✓ | ✓ |
in / nin |
✓ | ✓ | — | — |
contains / startsWith |
✓ | — | — | — |
lt / lte / gt / gte |
— | ✓ | — | ✓ |
null |
✓ | ✓ | ✓ | ✓ |
Connection filters
some: { ... }— at least one related entity matchesevery: { ... }— all related entities matchnone: { ... }— no related entity matches
Common filter recipes
Open issues in current cycle assigned to me:
filter: {
and: [
{ state: { type: { neq: "completed" } } },
{ cycle: { isActive: { eq: true } } },
{ assignee: { isMe: { eq: true } } }
]
}
Issues blocked by something:
filter: { hasRelatedRelations: { eq: true } }
Triage queue for ENG team older than 24h:
filter: {
and: [
{ team: { key: { eq: "ENG" } } },
{ state: { type: { eq: "triage" } } },
{ createdAt: { lt: "2026-04-29T00:00:00Z" } }
]
}
Sorting
orderBy: updatedAt | createdAt | priority | manual. For complex sorts, fetch unsorted and sort client-side (only feasible for small result sets).
Complexity budgeting
Each filter clause adds to query complexity. Reduce by:
- Selecting only needed fields
- Using
first: <smaller>on connections within nodes - Splitting one big query into two parallel smaller ones (Linear allows up to 4 in-flight)
Install Linear Pagination + Filtering in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
ReadGrepGlobBashFAQ
What does the Linear Pagination + Filtering skill do?
This skill should be used when fetching large result sets from Linear — cursor pagination, filter DSL, sorting, and complexity budgeting. Activates on "linear pagination", "linear filter", "linear cursor", "linear filtering".
How do I install the Linear Pagination + Filtering skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the Linear Pagination + Filtering skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic