Skip to content

Update skill to handle web links and have better pagination guidance#79

Draft
andrewmumblebee wants to merge 5 commits into
mainfrom
work/ah/skill-pagination
Draft

Update skill to handle web links and have better pagination guidance#79
andrewmumblebee wants to merge 5 commits into
mainfrom
work/ah/skill-pagination

Conversation

@andrewmumblebee

@andrewmumblebee andrewmumblebee commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

Noticed some inconsistencies and missing documentation on how to do pagination on a plugin for the agent skill


🔍 Scope of change

  • Documentation only
  • Repository metadata or configuration
  • CI / automation
  • Other (please describe):

📚 Checklist

Summary by CodeRabbit

  • Documentation
    • Clarified pagination and request-body behavior for Data Streams, including how body-based paging works with JSON payloads.
    • Added guidance for using nextUrl with HTTP Link headers and requirements for valid URL extraction.
    • Explained array-based payload path handling and how "." is interpreted for response bodies.
    • Expanded the pagination configuration reference with valid options and clearer offset increment behavior.

…e-URL requirement

The webLink realm (Link-header pagination) is used by every GitHub and
Checkly nextUrl stream but wasn't documented at all. Also note that the
extracted next-page value is used verbatim as the next request URL, so
it must be absolute — relative URLs aren't handled by the runtime.
paging.out/pageSize with realm "body" writes into postBody via a
path-based set that's a no-op against a string. The POST-requests
section documents postBody-as-string as valid, so call out the
silent-failure interaction explicitly where it applies.
Every prior example includes pageSize, implying it's required. In
practice many nextUrl streams (e.g. all of AutoTask's) omit it because
the returned URL already encodes the page size.
…ging

payload/payloadArraySize paths use a literal "." for a root-level
array, which looks like the pathToData convention but isn't the same
(pathToData is omitted for a root array; paging paths are not).
…th a per-field table

The single "realm options: queryArg, header, body, payload,
payloadArraySize" line implied one shared enum, but each paging field
(pageSize, out, in, rowCountIn) actually accepts a different subset —
queryArg is never valid for in/rowCountIn, and payload/payloadArraySize
are never valid for pageSize/out. Following the old line would produce
a config that fails schema validation with no indication why.
@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d5b7b4e8-605b-46c5-92ba-7f97a8730c6b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🧩 Plugin PR Summary

ℹ️ No plugins were modified in this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/build-plugin/references/data-streams.md:
- Around line 407-429: The markdown block in data-streams.md has an extra blank
line between the two warning callouts, which breaks the contiguous blockquote
expected by markdownlint MD028. Remove the empty line inside the quoted section
so the `Link` header note and the `pageSize` note remain directly adjacent,
keeping the blockquote contiguous without changing the surrounding `paging`
examples or the `realm: "webLink"` guidance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 40071585-3cb5-4661-ace6-edca7e1cf6c2

📥 Commits

Reviewing files that changed from the base of the PR and between 05aeeab and e308888.

📒 Files selected for processing (1)
  • .claude/skills/build-plugin/references/data-streams.md

Comment on lines +407 to +429
**Next-URL via `Link` header** — API returns pagination links in a standard HTTP `Link` header (RFC 8288) instead of the body, e.g. GitHub, Checkly:

```json
"paging": {
"mode": "nextUrl",
"pageSize": { "realm": "queryArg", "path": "per_page", "value": "100" },
"in": { "realm": "webLink", "path": "next" }
}
```

> ⚠️ For `realm: "webLink"`, `path` is the link's **rel name** (`next`, `prev`, `last`, `first`), not a JSON path — the server parses the `Link` header and looks up that rel. This differs from every other realm, where `path` is a dot-notation path or header name.

> ⚠️ Whatever value `in` extracts (`payload`, `header`, or `webLink`) is used as the **complete URL for the next request** — it is not appended to `baseUrl`/`endpointPath`. The API must return a fully-qualified URL; a relative path will break pagination.

`pageSize` is optional on every mode — omit it (or set `"pageSize": { "realm": "none" }`) when the API has no separate page-size parameter, e.g. a `nextUrl` response whose URL already encodes the page size:

```json
"paging": {
"mode": "nextUrl",
"in": { "realm": "payload", "path": "pageDetails.nextPageUrl" }
}
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the blank line inside the blockquote.

markdownlint will flag this as MD028, so the docs build will fail until the two warning callouts are contiguous.

♻️ Proposed fix
 > ⚠️ For `realm: "webLink"`, `path` is the link's **rel name** (`next`, `prev`, `last`, `first`), not a JSON path — the server parses the `Link` header and looks up that rel. This differs from every other realm, where `path` is a dot-notation path or header name.
-
 > ⚠️ Whatever value `in` extracts (`payload`, `header`, or `webLink`) is used as the **complete URL for the next request** — it is not appended to `baseUrl`/`endpointPath`. The API must return a fully-qualified URL; a relative path will break pagination.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Next-URL via `Link` header** — API returns pagination links in a standard HTTP `Link` header (RFC 8288) instead of the body, e.g. GitHub, Checkly:
```json
"paging": {
"mode": "nextUrl",
"pageSize": { "realm": "queryArg", "path": "per_page", "value": "100" },
"in": { "realm": "webLink", "path": "next" }
}
```
> ⚠️ For `realm: "webLink"`, `path` is the link's **rel name** (`next`, `prev`, `last`, `first`), not a JSON path — the server parses the `Link` header and looks up that rel. This differs from every other realm, where `path` is a dot-notation path or header name.
> ⚠️ Whatever value `in` extracts (`payload`, `header`, or `webLink`) is used as the **complete URL for the next request** — it is not appended to `baseUrl`/`endpointPath`. The API must return a fully-qualified URL; a relative path will break pagination.
`pageSize` is optional on every mode — omit it (or set `"pageSize": { "realm": "none" }`) when the API has no separate page-size parameter, e.g. a `nextUrl` response whose URL already encodes the page size:
```json
"paging": {
"mode": "nextUrl",
"in": { "realm": "payload", "path": "pageDetails.nextPageUrl" }
}
```
**Next-URL via `Link` header** — API returns pagination links in a standard HTTP `Link` header (RFC 8288) instead of the body, e.g. GitHub, Checkly:
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 418-418: Blank line inside blockquote

(MD028, no-blanks-blockquote)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.claude/skills/build-plugin/references/data-streams.md around lines 407 -
429, The markdown block in data-streams.md has an extra blank line between the
two warning callouts, which breaks the contiguous blockquote expected by
markdownlint MD028. Remove the empty line inside the quoted section so the
`Link` header note and the `pageSize` note remain directly adjacent, keeping the
blockquote contiguous without changing the surrounding `paging` examples or the
`realm: "webLink"` guidance.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant