agent-feedback-artifact/SKILL.md
Add, remove, serve, test, and operate a server-backed in-page agent feedback capability for HTML artifacts, static pages, or local app builds. Use when the user wants Browser-style annotation inside the artifact/app itself, marker-local chat, comment-triggered agent work, queued marker processing, deterministic install/remove scripts, preflight/closeout checks, browser acceptance evidence, or progressive-disclosure access to marker context.
npx skillsauth add ingpoc/skills agent-feedback-artifactInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Self-validate after edits. Any change to this skill's files (
SKILL.md,scripts/,references/,templates/,assets/) must be followed by./scripts/validate.shfrom the skill directory. Hard findings require optimizing the skill before closeout.
This skill turns an HTML artifact or local app page into an interaction space between the operator and an agent. It injects a managed annotation widget, serves the page through a local feedback server, queues marker-scoped user comments as agent work items, and lets agents fetch only the context tier they need.
| Field | Decision | |---|---| | Primary archetype | Server / API workflow | | Secondary archetypes | Browser / UI workflow, deterministic script workflow, artifact modifier, agent orchestration | | Operator trigger | The user wants in-page feedback, annotation, or marker chat inside an HTML artifact/app instead of screenshot/chat-window feedback. | | Output | The target page is served with the feedback capability; marker comments are queued, processed, and replied to inside marker-local chat. | | Success evidence | Browser-visible marker flow works; server queue/status confirms processing; closeout reports no unexpected queued/processing work. | | Deterministic surface | Add/remove/preflight/closeout/server/next/details/mark/routing/dispatch scripts and validation checks. | | Judgment surface | Deciding whether a marker needs direct main-agent handling, a cheap marker worker, or a deeper context worker. | | Context loading | Default packet first; marker details on demand; full artifact/app/source context only when the marker requires it. |
Use this skill when the user asks for:
Do not use this for a plain static HTML artifact that does not need in-page feedback, server APIs, marker state, or agent processing.
node scripts/agent-feedback-preflight.mjs <artifact.html> --port <port>
</body>node scripts/add-agent-feedback.mjs <artifact.html>
AGENT_FEEDBACK_WEBHOOK_URL=http://127.0.0.1:<worker-port>/hook \
node scripts/artifact-feedback-server.mjs <serve-root> <port>
The managed block is bounded by AGENT_FEEDBACK_WIDGET_START and AGENT_FEEDBACK_WIDGET_END. Do not hand-edit the injected block. Use remove-agent-feedback.mjs when removal is requested.
The target must be served by artifact-feedback-server.mjs; file:// cannot submit feedback.
Browser verification is mandatory before calling the capability working. Use Chrome when the user asks for Chrome-backed testing.
Minimum browser checks:
Comment-triggered processing acceptance:
queued -> processing -> done/blocked/canceledMulti-marker acceptance:
Use the progressive-disclosure scripts instead of loading the whole artifact by default:
node scripts/agent-feedback-next.mjs
node scripts/agent-feedback-details.mjs <work-id>
node scripts/agent-feedback-mark.mjs <work-id> processing
node scripts/agent-feedback-mark.mjs <work-id> done "Agent-visible reply"
Default work packets should include only:
Fetch full details only when the marker requires geometry, viewport, selected text, UI snapshot, raw payload, source, data, or broader artifact context.
threadSummary and spawn or resume work only when new marker feedback arrives.Routing expectations:
no_worker_main_agent_directdeep_marker_worker with narrow context firstdata-*| Script | Owns |
|---|---|
| scripts/add-agent-feedback.mjs | Deterministic install into target HTML. |
| scripts/remove-agent-feedback.mjs | Deterministic removal of only the managed block/meta. |
| scripts/artifact-feedback-server.mjs | Static serving, feedback APIs, queue storage, webhook dispatch. |
| scripts/agent-feedback-preflight.mjs | Readiness checks and exact next commands. |
| scripts/agent-feedback-closeout.mjs | Read-only state/evidence report by default. |
| scripts/agent-feedback-next.mjs | Next queued marker packet. |
| scripts/agent-feedback-details.mjs | Full marker payload on demand. |
| scripts/agent-feedback-mark.mjs | Status updates and marker-visible replies. |
| scripts/agent-feedback-routing.mjs | Context-efficient route selection. |
| scripts/agent-feedback-dispatch.mjs | Direct/worker processing decision. |
| scripts/test-agent-feedback-webhook-receiver.mjs | Webhook delivery smoke receiver. |
| scripts/test-agent-feedback-auto-runtime.mjs | Event-triggered processing harness for acceptance testing. |
The widget should feel like a capability layer, not page content. Use a permanent small top-right launcher icon, similar in weight to a light/dark mode toggle. When toggled on, reveal small standalone annotate/count/trash/menu icons next to it with transparent chrome and soft hover states. Do not use a large capsule or persistent panel for the idle state. When toggled off, only the launcher remains visible.
The marker popover should stay compact by default. The configure icon expands it into Agent and UI tabs. Agent replies stay attached to the marker. The UI tab shows selected element identity and UI snapshot. Marker trash releases that marker; global trash clears all markers.
Run the skill validation wrapper:
./scripts/validate.sh
Minimum manual checks when changing scripts:
node --check scripts/add-agent-feedback.mjs
node --check scripts/remove-agent-feedback.mjs
node --check scripts/artifact-feedback-server.mjs
node --check scripts/agent-feedback-preflight.mjs
node --check scripts/agent-feedback-closeout.mjs
node --check scripts/agent-feedback-next.mjs
node --check scripts/agent-feedback-details.mjs
node --check scripts/agent-feedback-mark.mjs
node --check scripts/agent-feedback-routing.mjs
node --check scripts/agent-feedback-dispatch.mjs
node --check scripts/test-agent-feedback-webhook-receiver.mjs
node --check scripts/test-agent-feedback-auto-runtime.mjs
For deterministic removal:
cp original.html roundtrip.html
node scripts/add-agent-feedback.mjs roundtrip.html
node scripts/remove-agent-feedback.mjs roundtrip.html
cmp -s original.html roundtrip.html
For comment-triggered processing, start test-agent-feedback-auto-runtime.mjs, start the artifact server with AGENT_FEEDBACK_WEBHOOK_URL, submit marker comments in Chrome, and verify queue status plus marker-local replies.
Always run:
node scripts/agent-feedback-closeout.mjs <artifact.html> --port <port>
Report:
Stop any temporary test servers you started and verify their ports are clear.
Before updating this skill, classify any friction:
| Friction source | Action | |---|---| | Agent bypassed comment-triggered processing, missed preflight/closeout, over-loaded context, or lacked browser acceptance criteria | Update this skill. | | Add/remove/server/routing/overlay/test script bug | Fix the script and add/adjust validation. | | Target artifact/app bug or page-specific request | Fix the target, not this skill. | | Chrome/plugin flake, auth, provider error, or rate limit | Improve diagnostics only when the check is reusable. | | One-off operator preference | Do not update the skill unless it becomes repeated workflow need. |
file://.Agent feedback on visual artifacts is otherwise lossy: operators describe screen regions in chat, agents guess the target, and context balloons. This skill makes the artifact itself the feedback surface, captures marker-scoped intent at the source, and gives agents a small default packet with deeper context available only when needed.
devops
Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.
tools
Design or review CLIs so both coding agents and humans can use them reliably: dual-audience output, non-interactive paths, layered help, machine-readable data, predictable flags, safe mutations, and actionable errors. Use when building a CLI, adding commands, writing --help, or when the user mentions agents, terminals, automation-friendly CLIs, JSON output, or headless usage.
tools
Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read/write commands, return stable JSON, manage auth, and pair with a companion skill.
development
Use when configuring apps to use z.ai GLM 4.7 proxy instead of standard Anthropic API. Works with any frontend (Next.js, Vite) or backend (Python, Node.js) framework.