Skip to content

Recommend script files for errorHandling scripts in the build-plugin skill#92

Open
andrewmumblebee wants to merge 2 commits into
mainfrom
work/ah/skill-errorhandling-scripts
Open

Recommend script files for errorHandling scripts in the build-plugin skill#92
andrewmumblebee wants to merge 2 commits into
mainfrom
work/ah/skill-errorhandling-scripts

Conversation

@andrewmumblebee

@andrewmumblebee andrewmumblebee commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

The build-plugin skill only showed errorHandling scripts written inline in the stream JSON, which becomes unreadable beyond a one-liner. The deploy pipeline resolves errorHandling.script file references from dataStreams/scripts/ using exactly the same mechanism as postRequestScript (it's one of the two registered dataStreamScriptPaths, and plugin export already writes to an errorHandling/ sub-folder), so the skill now documents that form — and only that form, since script files are easier to review than inline JSON strings:

  • The errorHandling section of references/data-streams.md shows the file-reference form as the way to write a script (dataStreams/scripts/errorHandling/<streamName>.js), with a "Script files" subsection covering the reference-resolution rules (bare .js path marks a reference, deploy inlines the source, unresolvable references fail validation, {{ ... }} expressions work in script files too) and a script-file example. No inline example remains.
  • The post-request script wiring section cross-links the errorHandling equivalent.
  • The scaffold folder layout in SKILL.md shows the scripts/errorHandling/ sub-folder.

🔍 Scope of change

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

📚 Checklist

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated plugin scaffolding guidance to include the errorHandling/ script directory.
    • Clarified that error-handling scripts should be referenced as files rather than inline code.
    • Added examples and guidance on script placement, file paths, and required .js extensions.

The build-plugin skill only showed errorHandling scripts inline in
the stream JSON, which gets unreadable beyond a one-liner. The deploy
pipeline resolves errorHandling.script file references from
dataStreams/scripts/ exactly like postRequestScript, so the skill now
documents that form, shows the errorHandling/ sub-folder in the
scaffold layout, and cross-links it from the post-request script
wiring section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: d31f2c21-95bd-4994-92c3-1ce4dfad8c33

📥 Commits

Reviewing files that changed from the base of the PR and between 9dafcf7 and 70a72c1.

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

📝 Walkthrough

Walkthrough

The documentation updates define error-handling scripts as .js files stored in dataStreams/scripts/errorHandling/, referenced by path, and reflected in the plugin scaffold structure.

Changes

Error-handling script file guidance

Layer / File(s) Summary
Document error-handling script references
.claude/skills/build-plugin/references/data-streams.md
Error-handling examples now reference script files, document their required location and .js extension, and clarify wiring from the errorHandling/ folder.
Align plugin scaffolding
.claude/skills/build-plugin/SKILL.md
The scaffold structure now includes an errorHandling/ directory containing a path-referenced myStream.js script.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the main documentation change: recommending file-based errorHandling scripts in the build-plugin skill.
Description check ✅ Passed The description includes a clear summary, scope, and checklist, and it matches the docs-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

The section still hinted that inlining the script in the stream JSON
was fine for trivial one-liners, so agents kept inlining. Script files
are easier to review, so the exemption goes: the intro example now
shows the file-reference form and the wording that offered inline as
an option is removed, along with the wiring example that duplicated
the intro. No new guidance added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🧩 Plugin PR Summary

ℹ️ No plugins were modified in this PR.

@andrewmumblebee andrewmumblebee marked this pull request as ready for review July 16, 2026 07:27
@andrewmumblebee andrewmumblebee requested a review from a team July 16, 2026 07:27
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