docs: turn the srcset-cli skill into a skill for writing code - #38
Merged
Conversation
The two skills split by moment rather than by package: `setup-srcset` wires an integration into a project once, and `srcset` is what an agent reads afterwards, when something has to display an image. So the cli skill is renamed and gains the image module contract, rendering with the components and the runtime helpers, the `sizes` and retina reasoning, and the import query, with the command line kept as the section that generates and bakes the variants. Both skills also lose a few claims that did not survive a check against the sources.
Coverage Report for CI Build 33631606453Coverage remained the same at 93.847%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
The two skills were split by package - one for the integrations, one for the cli. They now split by moment instead:
setup-srcsetwires an integration into a project, once.srcsetis what an agent reads afterwards, when something has to display an image.So
srcset-cliis renamed tosrcsetand grows the half it was missing: the image module contract, rendering with thePictureandImagecomponents or withgetSourceProps/getImageProps, the per-framework differences in refs and prop casing, thesizesand retina reasoning, and the import query. The command line stays as the section that generates and bakes the variants, and the rules move up, since they are the same for the plugin, the loader, the cli config and a query.The point the rename is for: an image module from a bundler integration and one baked by the cli have identical exports, so the rendering half applies to both. That was only true of the cli before.
Corrections along the way
Both skills carried claims that did not survive a check against the sources:
styleprop row was wrong for all three frameworks. React and Preact take an object; Svelte takes a string, because the placeholder is merged into it as a template literal.-d src/bakedwith sources undersrc/images/writessrc/baked/src/images/photo.ts, notsrc/baked/images/photo.ts- output paths mirror the source tree relative to the current directory. The example and two recipes said otherwise.setup-srcsetrender example passedsrcSetonly toPicture, which is the first pitfall thesrcsetskill lists: the fallback<img>is then a single fixed url.@srcset/runtimewas installed with-Dthere, and the hashed asset url in its exports table was invented rather than a real Vite one.