Pagination, Search, and Sorting

Implement server-side pagination, search filtering, and column sorting across API endpoints and frontend list pages.

16 stars

Best use case

Pagination, Search, and Sorting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Implement server-side pagination, search filtering, and column sorting across API endpoints and frontend list pages.

Teams using Pagination, Search, and Sorting should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/pagination-search-and-sorting/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/backend/pagination-search-and-sorting/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/pagination-search-and-sorting/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Pagination, Search, and Sorting Compares

Feature / AgentPagination, Search, and SortingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Implement server-side pagination, search filtering, and column sorting across API endpoints and frontend list pages.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Pagination, Search, and Sorting

## Backend

### Query Parameters
All list endpoints accept:
- `page` (int, default: 1) — current page number
- `pageSize` (int, default: 10) — items per page
- `search` (string?, optional) — text to filter results
- `sortBy` (string, default varies) — field name to sort by
- `sortDirection` (string, default: "asc") — `asc` or `desc`

### Default Sort Orders
- **Patients**: by `lastName` then `firstName`
- **Doctors**: by `specialty` then `lastName`
- **Exams**: by `scheduledDate`

### Store Implementation
```csharp
public (IReadOnlyList<T> Items, int TotalCount) GetPaged(int page, int pageSize, string sortBy, string sortDirection)
{
    var totalCount = _collection.Count();
    var items = ApplySort(_collection.FindAll(), sortBy, sortDirection)
        .Skip((page - 1) * pageSize).Take(pageSize).ToList();
    return (items, totalCount);
}

public (IReadOnlyList<T> Items, int TotalCount) SearchPaged(string search, int page, int pageSize, string sortBy, string sortDirection)
{
    var filtered = _collection.FindAll()
        .Where(item => /* case-insensitive string matching on relevant fields */)
        .ToList();
    var totalCount = filtered.Count;
    var items = ApplySort(filtered, sortBy, sortDirection)
        .Skip((page - 1) * pageSize).Take(pageSize).ToList();
    return (items, totalCount);
}
```

### Response Structure
```csharp
public record {Entity}ListResponse(
    IReadOnlyList<{Entity}Response> Items,
    PaginationInfo Pagination,
    SortInfo Sort,
    IReadOnlyList<Link> Links);
```

### Pagination Links
Use `PaginationLinks.Build(basePath, page, pageSize, totalPages, search, sortBy, sortDirection, additionalLinks)`.

## Frontend

### List Page Pattern
- State: `page`, `pageSize`, `search`, `sortBy`, `sortDirection`, `data`.
- Fetch with query params appended to the HATEOAS-discovered base URL.
- MUI `TablePagination` for page navigation.
- MUI `TextField` + `Button` for search input.
- MUI `TableSortLabel` on column headers for sort toggle.
- Clicking a column header cycles: default → asc → desc.

Related Skills

multi-ai-research

16
from diegosouzapw/awesome-omni-skill

Comprehensive research and analysis using Claude (subagents), Gemini CLI, and Codex CLI. Multi-perspective research with cross-verification, iterative refinement, and 100% citation coverage. Use for security analysis, architecture research, code quality assessment, performance analysis, or any research requiring rigorous verification and multiple AI perspectives.

gpt-researcher

16
from diegosouzapw/awesome-omni-skill

Run GPT-Researcher multi-agent deep research framework locally using OpenAI GPT-5.2. Replaces ChatGPT Deep Research with local control. Researches 100+ sources in parallel, provides comprehensive citations. Use for Phase 3 industry/technical research or comprehensive synthesis. Takes 6-20 min depending on report type. Supports multiple LLM providers.

deep-research

16
from diegosouzapw/awesome-omni-skill

Web research with Graph-of-Thoughts for fast-changing topics. Use when user requests research, analysis, investigation, or comparison requiring current information. Features hypothesis testing, source triangulation, claim verification, Red Team, self-critique, and gap analysis. Supports Quick/Standard/Deep/Exhaustive tiers. Creative Mode for cross-industry innovation.

brutal-deepresearch

16
from diegosouzapw/awesome-omni-skill

Structured deep research pipeline with confirmation gates and resume support. Generates outline, launches parallel research agents, produces validated JSON results and markdown report.

agent-market-researcher

16
from diegosouzapw/awesome-omni-skill

Expert market researcher specializing in market analysis, consumer insights, and competitive intelligence. Masters market sizing, segmentation, and trend analysis with focus on identifying opportunities and informing strategic business decisions.

agent-data-researcher

16
from diegosouzapw/awesome-omni-skill

Expert data researcher specializing in discovering, collecting, and analyzing diverse data sources. Masters data mining, statistical analysis, and pattern recognition with focus on extracting meaningful insights from complex datasets to support evidence-based decisions.

agency-researcher

16
from diegosouzapw/awesome-omni-skill

Find and qualify real estate agencies in a given suburb

add-search-engine

16
from diegosouzapw/awesome-omni-skill

Integrate a new LLM search provider into Mentha

academic-search

16
from diegosouzapw/awesome-omni-skill

Search academic paper repositories (arXiv, Semantic Scholar) for scholarly articles in physics, mathematics, computer science, quantitative biology, AI/ML, and related fields

academic-benchmark-researcher

16
from diegosouzapw/awesome-omni-skill

When the user requests information about academic benchmarks, datasets, or research papers, particularly in machine learning, deep learning, or logical reasoning domains. This skill enables systematic research of academic benchmarks by searching web sources, downloading and analyzing arXiv papers, extracting key metadata (number of tasks, training availability, difficulty levels), and compiling comparative summaries. It triggers on requests involving dataset comparisons, benchmark analysis, or academic paper research for table creation.

content-research-writer

16
from diegosouzapw/awesome-omni-skill

Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.

Automate YouTube Top-Ten Video Creation with OpenAI and Safe Image Search

16
from diegosouzapw/awesome-omni-skill

Integrates OpenAI API for content generation, Bing Image Search API for safe image retrieval, and Pexels API for video footage. Handles authentication via Bearer token, enforces safe search, formats ChatGPT responses into a top-ten list, and includes error handling for API failures.