Skip to content

[refactoring] Consolidate manual MCP pagination guidance via shared/mcp-pagination.md #49043

Description

@github-actions

Skill: Consolidate manual MCP pagination guidance via shared/mcp-pagination.md

Current usage / duplication

21 workflows manually reference per_page/pagination parameters when calling GitHub MCP tools (list_pull_requests, search_issues, search_code, etc.) without importing the existing shared/mcp-pagination.md best-practices component. Each workflow re-derives its own guidance on safe perPage values and retry-on-oversized-response handling, leading to inconsistent thresholds (some using 10, others 20, others no explicit cap) and repeated prose explaining the same 25,000-token MCP response limit.

This is lower priority than the two adoption gaps above because:

  • The duplication is prose/guidance rather than executable code (lower token/maintenance cost per instance)
  • Existing shared/github-mcp-pagination-wrappers.md (mcp-scripts based) already covers the highest-risk cases (list_workflows, etc.) for 2 workflows

Proposed shared component

Already exists: shared/mcp-pagination.md (guidance) and shared/github-mcp-pagination-wrappers.md (executable wrapper scripts for list_workflows and similar large-response calls). No new component required.

Estimated impact

  • ~21 workflows affected
  • Modest line savings (5-15 lines of repeated pagination guidance per workflow) but meaningful consistency benefit: a single source of truth for the 25k-token MCP limit and recommended perPage values
  • Reduces risk of a workflow silently omitting pagination guidance and hitting oversized-response failures

Migration plan

  1. Audit the 21 workflows with manual per_page/pagination references for which ones perform large list/search calls without a perPage cap.
  2. Add imports: [shared/mcp-pagination.md] to those workflows; for workflows calling list_workflows or similar bulk endpoints, additionally import shared/github-mcp-pagination-wrappers.md.
  3. Remove now-redundant inline pagination explanation prose from the workflow's markdown body.
  4. Recompile and verify prompt token count doesn't increase (shared import should net-reduce duplicated prose across the repo even though token count of an individual workflow may rise slightly).

Example usage

imports:
  - shared/mcp-pagination.md

Generated by 🔍 Workflow Skill Extractor · aut00 · 63.5 AIC · ⌖ 5.58 AIC · ⊞ 6.8K ·

  • expires on Jul 31, 2026, 8:46 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions