feat: add web-fragments skill#29
Open
oto-macenauer-absa wants to merge 1 commit into
Open
Conversation
Skill for building, embedding, debugging, and deploying micro-frontends with the Web Fragments framework (web-fragments npm package). - SKILL.md hub: mental model, exact v0.8.x API, workflow, gotchas (progressive disclosure, token-optimized) - references/: api-reference, host-integration (per-framework middleware), fragment-authoring, troubleshooting, css-and-styling, csp-and-iframe, piercing-and-performance, frameworks-astro - scripts/: scaffold-fragment.mjs (generate a Vite fragment + gateway snippet), doctor.mjs (static-check a host/fragment project for v0.8.x gotchas) - scripts/experiments/: reproducible Playwright experiments backing the verified CSS-isolation and Astro findings Knowledge verified against the library source and Playwright; includes the head-style-accumulation bug filed upstream as web-fragments#297 and a verified smooth-transition-without-ClientRouter workaround.
a8f9ed5 to
febec37
Compare
miroslavpojer
left a comment
Contributor
There was a problem hiding this comment.
Wow, this is big and complex.
From skill point of view I do not see an issue.
I suggest to invite UI developer as reviewer here.
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 web-fragments skill: building, embedding, debugging, and deploying micro-frontends with the Web Fragments framework (the
web-fragmentsnpm package).The skill encodes the real v0.8.x API (from the library source, not stale public docs) so an agent can write correct code without reading
node_modulesor re-researching the basics.Structure (progressive disclosure, token-optimized)
How it was validated
web-fragments/middlewareimport path).:rootis dead inside a fragment,:hostworks,@layeris tree-scoped), and Astro<ClientRouter />behavior.<style>/<link>accumulate across ClientRouter navigation), plus a verified smooth-transition-without-ClientRouter workaround.doctor.mjschecks (wrong import path,registervsregisterFragment, asset/routePattern mismatch, missing middleware,X-Frame-Options: DENY, unscoped static before middleware) are smoke-tested.Notes
scripts/experiments/are source-only (nonode_modules/build output); re-running them needs Node + a Chromium from@playwright/test./web-fragments:*slash commands proposed in web-fragments PR #294 — this skill supplies auto-triggered knowledge; those commands run specific tasks.