Update skill to handle web links and have better pagination guidance#79
Update skill to handle web links and have better pagination guidance#79andrewmumblebee wants to merge 5 commits into
Conversation
…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.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🧩 Plugin PR Summaryℹ️ No plugins were modified in this PR. |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
.claude/skills/build-plugin/references/data-streams.md
| **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" } | ||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
📐 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.
| **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
📋 Summary
Noticed some inconsistencies and missing documentation on how to do pagination on a plugin for the agent skill
🔍 Scope of change
📚 Checklist
Summary by CodeRabbit
nextUrlwith HTTPLinkheaders and requirements for valid URL extraction."."is interpreted for response bodies.