SR-9 POST /agents/<type>/skills/preview + "Preview rendered prompt" button #877
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#877
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As an operator, I want a "Preview rendered prompt" button on the Skills page that shows me the exact final string the dispatcher would send to Claude — body + interpolation + prompt_appendix + caveman + artifact-style — so the skill subsystem stops being a black box.
Acceptance criteria
Endpoint
POST /agents/<type>/skills/previewbody{ name, vars?, instance_id? }→ returns{ rendered: string, applied: { caveman: boolean, artifact_style: boolean, prompt_appendix: boolean } }.renderPrompt(...)from SR-2 — no parallel rendering path.varsdefaults to a minimal stub set ({ issue_number: 0, repo: '<preview>', title: '<preview>' }) so the preview renders even with no real issue context. Caller can override.UI
Tests
preview-endpoint.test.ts— happy path (every appendix on/off combination), 404 on missing skill, vars override, instance-scope override returns the instance body.skills-tab.preview.test.tsx— button click, modal renders, copy button copies.Out of scope
References
specs/skills-rework.md§API surface (preview endpoint), §Risks (closes the "black box" gap raised in design discussion).SR-9 POST /agents/<type>/skills/preview + "Preview rendered prompt" buttonto SR-9 POST /agents/<type>/skills/preview + "Preview rendered prompt" button