Conversation
Add a Prism Runtime agent skill for AI coding agents. The skill teaches agents how to use Prism's runtime contract correctly: register DOM-authored HTML/CSS/SVG surfaces, compose them inside Canvas 2D paint passes, wait for paint readiness before export, use CSS-pixel bounds, and clean up surfaces/runtime state. The skill also documents common forbidden patterns: - screenshot/export libraries such as html2canvas and dom-to-image - raw HTML-in-Canvas platform API calls in app code - deep imports from Prism internals - storing drawSurface() for later - registering handlers inside render loops or React render bodies - mixing CSS-pixel surface bounds with backing-store canvas drawing Update the README with an Agent Skill section linking to the new skill. Verification: - pnpm lint - pnpm typecheck - pnpm test - pnpm --filter @prism/docs build Install check: - pnpm add @synthesisengineering/prism works from a clean temp project. - pnpm add @synthesisengineering/prism@alpha resolves the current alpha. No runtime behavior changes.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Prism Runtime agent skill for AI coding agents.
Changes
skills/prism-runtime/SKILL.md.Agent Skillsection to the README.Why
The skill gives agents a clear contract for building with Prism and helps prevent common bad integrations, including:
html2canvasordom-to-imageruntime.paintOnce()Verification
Passed:
pnpm lintpnpm typecheckpnpm testpnpm --filter @prism/docs buildInstall check
Verified in
/private/tmp/prism-install-check:pnpm add @synthesisengineering/prismworks.pnpm add @synthesisengineering/prism@alpharesolves the current alpha.Notes
Follow-up: npm dist-tags should be fixed if bare
pnpm add @synthesisengineering/prismis expected to install the latest alpha.