🎥 Make videos programmatically with React
Skills: Fix ambiguous embedded skill links (#9981)
Jonny Burger20f492dcfd25
diff --git a/packages/skills/scripts/sync-embedded-skills.ts b/packages/skills/scripts/sync-embedded-skills.tsindex d4b2da8464..32d7d99c43 100644--- a/packages/skills/scripts/sync-embedded-skills.ts+++ b/packages/skills/scripts/sync-embedded-skills.ts@@ -70,7 +70,11 @@ for (const {parentSkill, skillNames} of embeddedSkillSets) {for (const skillName of skillNames) {skillContents = skillContents.replaceAll(`../${skillName}/`,- `${skillName}/`,+ `./${skillName}/`,+ );+ skillContents = skillContents.replaceAll(+ `](${skillName}/`,+ `](./${skillName}/`,);}diff --git a/packages/skills/scripts/validate-links.ts b/packages/skills/scripts/validate-links.tsindex c882000e03..5db828772e 100644--- a/packages/skills/scripts/validate-links.ts+++ b/packages/skills/scripts/validate-links.ts@@ -176,18 +176,33 @@ const validateEmbeddedSkills = () => {const parentSkillFile = path.join(parentRoot, 'SKILL.md');const contents = readFileSync(parentSkillFile, 'utf-8');- const siblingSkillLinks = [...contents.matchAll(markdownLinkRegex)]- .map((match) => stripMarkdownTitle(match[1] as string))- .filter((link) =>- skillNames.some((skillName) => link.startsWith(`../${skillName}/`)),+ const links = [...contents.matchAll(markdownLinkRegex)].map((match) =>+ stripMarkdownTitle(match[1] as string),+ );++ for (const link of links) {+ const siblingSkill = skillNames.find((skillName) =>+ link.startsWith(`../${skillName}/`),);+ if (siblingSkill) {+ issues.push({+ file: parentSkillFile,+ link,+ message: `Link from ${parentSkill} should point to the embedded copy, not a sibling skill folder`,+ });+ continue;+ }- for (const link of siblingSkillLinks) {- issues.push({- file: parentSkillFile,- link,- message: `Link from ${parentSkill} should point to the embedded copy, not a sibling skill folder`,- });+ const ambiguousSkill = skillNames.find((skillName) =>+ link.startsWith(`${skillName}/`),+ );+ if (ambiguousSkill) {+ issues.push({+ file: parentSkillFile,+ link,+ message: `Link to embedded skill "${ambiguousSkill}" must start with "./" so it resolves relative to ${parentSkill}`,+ });+ }}}diff --git a/packages/skills/skills/remotion-best-practices/SKILL.md b/packages/skills/skills/remotion-best-practices/SKILL.mdindex 32837845e4..f93639b238 100644--- a/packages/skills/skills/remotion-best-practices/SKILL.md+++ b/packages/skills/skills/remotion-best-practices/SKILL.md@@ -8,40 +8,40 @@ metadata:## New project setup-If no Remotion project currently exists, load [Create a new Remotion project](remotion-create/SKILL.md)+If no Remotion project currently exists, load [Create a new Remotion project](./remotion-create/SKILL.md)## React Markup Best Practices-If you are writing Remotion React Markup, load [Remotion Markup Best Practices](remotion-markup/SKILL.md)+If you are writing Remotion React Markup, load [Remotion Markup Best Practices](./remotion-markup/SKILL.md)## Maps-For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load [Remotion Maps](remotion-maps/SKILL.md).+For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load [Remotion Maps](./remotion-maps/SKILL.md).## Multimedia-For achieving multimedia tasks in the browser, such as trimming, cropping videos, or getting metadata from them, load [Remotion Multimedia](remotion-multimedia/SKILL.md)+For achieving multimedia tasks in the browser, such as trimming, cropping videos, or getting metadata from them, load [Remotion Multimedia](./remotion-multimedia/SKILL.md)## Improving Interactivity-By structuring the Remotion markup well, we can allow users to interactively change things in the Studio and write back to code. If relevant: [Interactivity Best Practices](remotion-interactivity/SKILL.md)+By structuring the Remotion markup well, we can allow users to interactively change things in the Studio and write back to code. If relevant: [Interactivity Best Practices](./remotion-interactivity/SKILL.md)## Rendering-For advanced rendering beyond simple `npx remotion render`, see: [Rendering Best Practices](remotion-render/SKILL.md)+For advanced rendering beyond simple `npx remotion render`, see: [Rendering Best Practices](./remotion-render/SKILL.md)## Captions-When working with Captions, load [Remotion Captions](remotion-captions/SKILL.md).+When working with Captions, load [Remotion Captions](./remotion-captions/SKILL.md).## Creating a SaaS, automation or application-Use the [Remotion SaaS skill](remotion-saas/SKILL.md) for knowledge about Remotion-powered SaaS apps, such as `<Player>`, rendering on Lambda, Vercel, Cloudflare, via Express.js, client-side rendering, or for finding the right SaaS template.+Use the [Remotion SaaS skill](./remotion-saas/SKILL.md) for knowledge about Remotion-powered SaaS apps, such as `<Player>`, rendering on Lambda, Vercel, Cloudflare, via Express.js, client-side rendering, or for finding the right SaaS template.## Looking up Remotion APIs and documentation-To find and read current Remotion documentation, load [Remotion Docs](remotion-docs/SKILL.md).+To find and read current Remotion documentation, load [Remotion Docs](./remotion-docs/SKILL.md).## Upgrading-To upgrade Remotion, related packages, compatible Mediabunny packages, and installed Remotion Agent Skills, load [Remotion Upgrade](remotion-upgrade/SKILL.md).+To upgrade Remotion, related packages, compatible Mediabunny packages, and installed Remotion Agent Skills, load [Remotion Upgrade](./remotion-upgrade/SKILL.md).diff --git a/packages/skills/skills/remotion-markup/SKILL.md b/packages/skills/skills/remotion-markup/SKILL.mdindex 2df7d48df9..4ab85adca9 100644--- a/packages/skills/skills/remotion-markup/SKILL.md+++ b/packages/skills/skills/remotion-markup/SKILL.md@@ -208,7 +208,7 @@ If a component does not support these props, wrap it in`<Sequence>` from `remoti## Maps-See [Remotion Maps](remotion-maps/SKILL.md) if wanting to include maps in the video.+See [Remotion Maps](./remotion-maps/SKILL.md) if wanting to include maps in the video.## Text highlights and annotations@@ -267,7 +267,7 @@ When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects## Maps-For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load [Remotion Maps](remotion-maps/SKILL.md).+For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load [Remotion Maps](./remotion-maps/SKILL.md).## Captions