feat(skills): reworked skills and rules
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s

This commit is contained in:
Julian Lechner committed 2026-11-18 14:17:49 +01:00
1 parent 29632ff0ce
commit f5d8f6f11b
124 files changed
+1250 -8138

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
---
name: media
description: Use when integrating, optimizing, or reviewing images, screenshots, video, or audio in an app or site, including formats, responsive delivery, captions and transcripts, playback, social previews, and media SEO.
---
# Media Assets
Use the project's existing assets, components, players, and media pipeline. Ask only for missing information that affects the result.
When this work belongs to a UI design or build task, follow the roles in `plugin-workflow`'s UI section: prepare media inside Impeccable's visual world.
## Workflow
1. Inspect the source media and its placement: display size, responsive layout, duration, whether it carries meaning or is decorative, and the supported clients. Apply `technical-research` when format support, codec support, or framework behavior needs verification.
2. Choose the format for the media type and target clients (see the focused references). Avoid unnecessary conversions, new dependencies, and new hosting or streaming services without approval.
3. Resize, transcode, and compress for actual display sizes, pixel densities, and bitrates. Preserve originals, write outputs separately, and compare file size and quality before replacing references.
4. Deliver through the existing component, player, or pipeline. Reserve layout space, load only what the first view needs, and never delay critical visible content.
5. Make media accessible: meaningful alternative text for informative images and empty alternative text for decorative ones; captions for prerecorded video with speech; a transcript for audio-only content; audio description or a text alternative when video carries information the audio does not; and user controls for any audio that plays.
6. Protect people and rights: remove sensitive data from screenshots and recordings, strip location and device metadata from published files, use only media the project may use, and handle untrusted uploads, SVGs, and media files through the project's validation and sanitization boundary.
7. Verify paths, dimensions, aspect ratio, playback in the target clients, captions, and rendering at relevant viewport sizes. For link previews, check the metadata and that the preview URL is reachable by the intended consumer.
Report changed assets, measured size or bitrate savings, and any playback, accessibility, or compatibility checks not performed.
## Focused references
Load only the reference matching the task:
- [Image optimization](references/image-optimization.md): formats, responsive delivery, loading priority, and image SEO.
- [Video](references/video.md): containers and codecs, autoplay rules, loading, posters, captions, and streaming.
- [Audio](references/audio.md): formats, playback controls, transcripts, and desktop or mobile playback.
- [OG and social previews](references/og-social-preview-images.md): Open Graph metadata, image tags, and preview validation.
- [Marketing media workflows](references/marketing-media-workflows.md): product screenshots, demo videos, heroes, banners, and templates.
- [Design tools](references/design-tools.md): selecting existing design, screenshot, recording, and export tools.
- [Common mistakes](references/common-mistakes.md): final checks when delivering or reviewing media changes.
+86
View File
@@ -0,0 +1,86 @@
{
"skill_name": "media",
"evals": [
{
"id": 1,
"prompt": "Our Next.js marketing page loads slowly. The hero is `public/hero.png` (4000x2500, 6.8 MB) rendered with a plain `<img src=\"/hero.png\" loading=\"lazy\">` inside a container that is at most 1200px wide. There's also a `public/logo.png` (2000x2000) shown at 40x40 in the header; we have `logo.svg` in the design repo. Can you optimize these?",
"expected_output": "Should inspect display size and placement before choosing formats. Should use the project's existing image pipeline (next/image) instead of a raw img tag for responsive sizing. Should resize/compress the hero for the actual display width and pixel densities, writing optimized output to separate files while preserving the original. Should not lazy-load the hero because it is critical above-the-fold content. Should reserve layout space (width/height or aspect ratio) and provide meaningful alt text. Should reuse the SVG for the logo. Should report changed assets and measured size savings, and list rendering checks not performed.",
"assertions": [
"Uses the existing Next.js image component or pipeline rather than adding a new dependency",
"Sizes the hero for the ~1200px display width and relevant pixel densities",
"Preserves the original hero and writes optimized output separately",
"Removes lazy loading or deprioritization from the above-the-fold hero",
"Reserves layout space via dimensions or aspect ratio",
"Recommends reusing the SVG for the logo",
"Reports measured size savings or states that sizes were not measured",
"Lists rendering or compatibility checks that were not performed"
],
"files": []
},
{
"id": 2,
"prompt": "When I share our blog post links on LinkedIn and Slack there's no preview image. The page head currently has only `<title>` and `<meta name=\"description\">`. We have a 1200x630 banner at https://cdn.example.com/blog/banner.jpg, but the CDN bucket requires a signed cookie. Set up the previews.",
"expected_output": "Should add Open Graph metadata including the required og:title, og:type, og:url, and og:image, plus og:image:width, og:image:height and og:image:alt. Should use the project's existing metadata mechanism. Should flag that the image URL must be accessible to the intended consumer, so a CDN requiring a signed cookie will block crawlers and must be addressed. Should report checks not performed, such as validating the preview with the platforms.",
"assertions": [
"Adds og:title, og:type, og:url, and og:image",
"Adds og:image:width 1200 and og:image:height 630",
"Adds og:image:alt with meaningful alternative text",
"Flags that the signed-cookie CDN will prevent link-preview crawlers from fetching the image",
"Uses an absolute image URL",
"States that preview validation on the target platforms was not performed or how to perform it"
],
"files": []
},
{
"id": 3,
"prompt": "Grab a screenshot of our admin dashboard for the docs page \"Managing users\". Just use the one from my laptop I took yesterday, it shows the real customer list with emails so people see what it looks like. Also add a small decorative divider image between sections.",
"expected_output": "Should require removing sensitive data (real customer names and emails) before using the screenshot, preferring a capture of the real application with sanitized or seeded data. Should check readability of screenshot text at the final display size. Should give the screenshot meaningful alt text and give the decorative divider empty alt text. Should not publish the screenshot with real customer emails as-is.",
"assertions": [
"Refuses or declines to use the screenshot as-is because it contains real customer emails",
"Recommends removing sensitive data or capturing with non-sensitive data",
"Mentions checking screenshot text readability at the final display size",
"Gives the informative screenshot meaningful alt text",
"Gives the decorative divider empty alt text",
"Does not keyword-stuff the alt text"
],
"files": []
},
{
"id": 4,
"prompt": "Generate a brand-new AI illustration of a robot holding our logo for the homepage hero. Make it look photorealistic.",
"expected_output": "Should recognize that generating new AI images is out of scope for this skill, which integrates, optimizes, and prepares existing assets with existing design tools. Should state this clearly and not claim to have generated an image. May offer to integrate and optimize the illustration once the user supplies it, including sizing, format, loading priority, and alt text.",
"assertions": [
"States that generating new AI images is out of scope for this skill",
"Does not claim to have generated an image",
"Offers to integrate or optimize the image once it is supplied"
],
"files": []
},
{
"id": 5,
"prompt": "Add our 90-second product demo (demo.mov, 400 MB, with narration) to the landing page. It should start playing automatically when the page loads.",
"expected_output": "Transcodes into WebM (AV1 and Opus) plus an MP4 (H.264 and AAC) fallback sized for the display, or uses the project's video service or adaptive streaming for a file this large. Does not autoplay with sound: either autoplays muted with playsinline and visible controls, or starts on user action, and explains the browser autoplay rule. Adds a poster, intrinsic dimensions, appropriate preload, and WebVTT captions for the narration. Keeps the original file and reports size savings and untested clients.",
"assertions": [
"Provides a compressed modern format with a broadly supported fallback, or adaptive streaming",
"Does not autoplay the video with sound",
"Adds playsinline and controls when autoplaying muted",
"Adds captions for the narration",
"Adds a poster and reserves layout space",
"Reports size savings and checks not performed"
],
"files": []
},
{
"id": 6,
"prompt": "We publish a weekly podcast episode on our site as an MP3 link. Make it a proper player on the episode page.",
"expected_output": "Uses native audio controls or an accessible player, does not autoplay, uses preload none or metadata, offers suitable formats, and provides a transcript for the audio-only content, including relevant non-speech sounds. Reports what was not verified, such as playback in specific browsers.",
"assertions": [
"Uses accessible playback controls",
"Does not autoplay the audio",
"Provides or requests a transcript for the episode",
"Uses a lazy preload setting"
],
"files": []
}
]
}
+24
View File
@@ -0,0 +1,24 @@
# Audio
## Formats
- Use Opus (in WebM or Ogg) for the best quality per byte, and AAC (in MP4/M4A) or MP3 where broad compatibility matters. Offer more than one `<source>` when the target clients differ. Keep lossless masters (such as FLAC or WAV) as originals, not as delivery files.
- Encode speech at a lower bitrate than music, and normalize loudness across clips so users do not need to change volume between them.
## Playback
- Never autoplay audio. Start playback only after a user action.
- Use native `<audio controls>` or an accessible custom player with keyboard support, visible focus, and labeled play, pause, and volume controls.
- Any audio that plays for more than 3 seconds needs a way to pause or stop it or to set its volume independently of the system volume (WCAG 1.4.2, level A).
- Use `preload="none"` or `metadata` for audio the user may not play.
## Accessibility
- Provide a transcript for prerecorded audio-only content, such as podcasts or recorded announcements (WCAG 1.2.1, level A), including relevant non-speech sounds.
- Never convey information through sound alone; pair notification sounds with a visible indicator.
## Desktop and mobile apps
- In WPF, play audio with `MediaElement` or the project's audio service; in .NET MAUI, use `MediaElement` from `CommunityToolkit.Maui.MediaElement` or the project's audio library. Respect the platform's mute switch, audio focus, and background audio permissions, and release players when pages close.
References: [MDN autoplay](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Autoplay), [WCAG 2.2](https://www.w3.org/TR/WCAG22/).
@@ -0,0 +1,15 @@
# Common Mistakes
Check only issues relevant to the change:
- Oversized downloads or incorrect responsive candidates: inspect the resource actually selected at each target viewport.
- Lazy-loaded LCP image, excessive high-priority images, or late discovery: inspect the loading waterfall.
- Missing dimensions or wrong aspect ratio: check layout shifts and cropping.
- Blurry screenshot text, compression artifacts, or lost transparency: compare at final display size.
- Missing or keyword-stuffed alternative text; essential information available only inside an image: check accessibility.
- Broken, authenticated, blocked, or expired preview URLs; duplicate metadata or stale cached previews: inspect responses and the target preview.
- Sensitive data in screenshots, untrusted SVG markup, or overwritten originals: use sanitized inputs and preserve editable sources.
- Autoplay with sound, missing `playsinline`, missing controls, or no way to pause moving or playing media: check playback in each target client.
- Missing captions, transcripts, or audio description; a single proprietary format without fallback; one huge video file instead of adaptive streaming: check the media references.
- Location or device metadata left in published photos and recordings: strip it before publishing.
- Stale platform dimensions, unreadable banner text, or stretched variants: verify current requirements and inspect each export.
@@ -0,0 +1,15 @@
# Design Tools
Prefer the team's existing tools and editable assets. Choose by task rather than introducing a new subscription or integration.
| Task | Practical route |
| --- | --- |
| Product UI or documentation screenshot | Browser screenshot tooling or the existing capture tool; show the real UI. |
| Screen recording or demo video | The existing recording tool, exported through the project's transcoding step. |
| Transcoding video or audio | The installed media pipeline or a tool such as ffmpeg; keep source files. |
| Asset tied to a design system | Existing Figma components and export workflow; use the applicable Figma skill when interacting with Figma. |
| Repeated banners or social graphics | Existing Canva or Figma template; verify current export and resize capabilities before relying on them. |
| Dynamic link-preview images | Existing framework or build-time template renderer. |
| Resize, crop, or compression | Installed image pipeline or utility; preserve source files. |
Keep editable originals, export only needed variants, and inspect font rendering, transparency, cropping, and file size. Use `technical-research` before depending on a tool API or version-specific feature.
@@ -0,0 +1,11 @@
# Image Optimization and SEO
- Start with measured transfer size, rendered dimensions, and the page's LCP element. Keep originals; compare optimized output at its actual display size.
- Use SVG for suitable vector assets, lossless formats for sharp UI text, and compare WebP/AVIF with existing raster formats for photographs. Choose against target-client support, transparency, quality, and measured size; avoid fixed quality or byte targets for every asset.
- Match `srcset` and `sizes` to the layout, or use the framework's existing image component. Set intrinsic `width` and `height` to reserve the correct aspect ratio.
- Lazy-load offscreen images. Keep the LCP image discoverable in initial HTML and eagerly loaded; consider `fetchpriority="high"` for that image, not every image.
- Use descriptive filenames, relevant surrounding text, and useful `alt` text without keyword stuffing. Decorative images need empty alternative text.
- For images intended for search, verify crawlable image URLs and standard image markup with a usable `src`. CSS backgrounds are not a substitute for indexable content images.
- Reuse existing transformation and caching infrastructure. Measure transferred bytes, rendering quality, LCP, and layout shifts after the change; distinguish lab results from real-user data.
References: [HTML images](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img), [LCP optimization](https://web.dev/articles/optimize-lcp), [Google image SEO](https://developers.google.com/search/docs/appearance/google-images).
@@ -0,0 +1,21 @@
# Marketing Media Workflows
## Article Heroes and Landing Pages
Choose an existing, appropriately licensed visual or real product screenshot that supports the page's message. Compose around the actual layout, keep essential text in HTML, and export responsive variants. Apply [image optimization](image-optimization.md); an above-the-fold hero must not inherit blanket lazy loading.
## Product Screenshots and Mockups
Capture the real application with representative, non-sensitive data. Use sufficient resolution for the final pixel density, crop irrelevant chrome, and add only useful annotations. Device frames are optional. Check small-screen readability and preserve an unannotated original.
## Demo and Tutorial Videos
Record the real application with representative, non-sensitive data at the final resolution, hide notifications and personal details, keep clips short, and add captions. Export with the formats in [video](video.md) and a poster frame that works as a still.
## Social Graphics, Banners, and Listings
Reuse brand assets and one editable template. Verify the target platform's current dimensions and crop/overlay safe areas before export. Produce only requested variants; inspect each crop rather than stretching a single image to every ratio.
## Repeated Publishing
Keep titles, product shots, and layout separate so an existing template or build pipeline can produce variants consistently. Connect link-preview exports to [OG metadata](og-social-preview-images.md). Automate only repeated work, and validate fonts, long titles, missing images, and output caching.
@@ -0,0 +1,26 @@
# OG and Social Preview Images
## Required Meta Tags
Open Graph requires `og:title`, `og:type`, `og:url`, and `og:image`. Image dimensions and alternative text supplement those fields. Set the page type appropriately and keep the canonical page URL consistent.
```html
<meta property="og:title" content="Product guide" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://example.com/guides/product" />
<meta property="og:image" content="https://example.com/images/product-guide.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Product dashboard showing the project overview" />
```
Dimensions above describe the example asset, not a universal platform requirement. Verify current format, crop, and size requirements for the intended consumer. Add platform-specific card metadata through the existing framework integration when needed; confirm its current contract with `technical-research`.
## Delivery and Validation
- Put metadata in the delivered document head using the existing metadata API; avoid duplicate or conflicting tags.
- Use stable absolute HTTPS image URLs. Public previews must load without authentication and return the correct image content type. Keep private assets private.
- For recurring pages, reuse a template populated with page metadata. Prefer existing build-time generation or cache generated outputs; avoid adding a rendering service for a few static images.
- Check the actual response, metadata, crop, text readability, and target preview tool. Allow for consumer caching when validating updates. Social-preview metadata does not itself guarantee search ranking improvements.
Source: [Open Graph protocol](https://ogp.me/).
+36
View File
@@ -0,0 +1,36 @@
# Video
## Formats
- Offer more than one source and let the browser pick: WebM with AV1 video and Opus audio first for the best compression, then MP4 with AVC (H.264) video and AAC audio as the broadly supported fallback. Check licensing for proprietary codecs, and check that the target clients decode AV1 before relying on it alone.
```html
<video controls width="1280" height="720" poster="demo-poster.jpg" preload="metadata">
<source type="video/webm; codecs=av01,opus" src="demo.webm" />
<source type="video/mp4" src="demo.mp4" />
<track kind="captions" src="demo.en.vtt" srclang="en" label="English" default />
</video>
```
- Replace animated GIFs with a short muted, looping video (`autoplay muted loop playsinline`); it is usually far smaller.
- For long or large videos, use adaptive streaming (HLS or DASH) through the project's existing player or video service instead of serving one large file.
## Playback and loading
- Autoplay only muted video or video without an audio track; browsers block autoplay with sound until the user interacts. Add `playsinline` for inline autoplay on iOS Safari. Never autoplay audio.
- Keep `controls` unless the design provides its own accessible controls, and give users a way to pause any moving content.
- Set `preload="none"` or `metadata` for videos the user may not play, and add `loading="lazy"` for offscreen videos where supported.
- Give every video a poster and intrinsic `width` and `height` to reserve space. When a video is the largest contentful element, preload its poster with high fetch priority and do not lazy-load it.
## Accessibility
- Provide captions (WebVTT `<track kind="captions">`) for prerecorded video with speech or meaningful sound (WCAG 1.2.2, level A).
- When the picture carries information the audio does not, provide audio description or a full text alternative (WCAG 1.2.3 level A; 1.2.5 level AA requires audio description).
- Live video with audio needs live captions (WCAG 1.2.4, level AA).
- Video-only content needs a text or audio alternative (WCAG 1.2.1, level A).
## Desktop and mobile apps
- In WPF, play media with `MediaElement`; in .NET MAUI, use `MediaElement` from `CommunityToolkit.Maui.MediaElement`, initialized with `UseMauiCommunityToolkitMediaElement` (enable the Android foreground service only when background playback or media notifications are required).
References: [MDN video codecs](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs), [MDN autoplay](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Autoplay), [web.dev lazy-loading video](https://web.dev/articles/lazy-loading-video), [WCAG 2.2](https://www.w3.org/TR/WCAG22/).