Recommend script files for errorHandling scripts in the build-plugin skill#92
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe documentation updates define error-handling scripts as ChangesError-handling script file guidance
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
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>
🧩 Plugin PR Summaryℹ️ No plugins were modified in this PR. |
|
Ah - you can probably ignore some of the comments on your Sanity PR! |
@clarkd yeah I still need to clean those up, don't even need errorHandling on that PR, as I changed how the objects are indexed, so we only index ones we have apiKeys for so the errorHandling should never be hit |
📋 Summary
The build-plugin skill only showed
errorHandlingscripts written inline in the stream JSON, which becomes unreadable beyond a one-liner. The deploy pipeline resolveserrorHandling.scriptfile references fromdataStreams/scripts/using exactly the same mechanism aspostRequestScript(it's one of the two registereddataStreamScriptPaths, and plugin export already writes to anerrorHandling/sub-folder), so the skill now documents that form — and only that form, since script files are easier to review than inline JSON strings:references/data-streams.mdshows 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.jspath 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.SKILL.mdshows thescripts/errorHandling/sub-folder.🔍 Scope of change
📚 Checklist
🤖 Generated with Claude Code
Summary by CodeRabbit
errorHandling/script directory..jsextensions.