diff --git a/CLAUDE.md b/CLAUDE.md index 479404431e..834c8cc8dc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -26,7 +26,7 @@ Make any video by asking for it; the `/hyperframes` skill carries the render con - `/media-use` — get or make any media for a video (music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks) with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden. - `/reverse-any-video` — rebuild any video file as an editable HyperFrames project (motion graphics, talking heads, live action or AI-generated footage) and check the render against the original frame by frame. A HyperFrames Pro feature. - `/style-sampling` — make a new episode on your topic in one of five proven styles (Collage Explainer, Finance Explainer, Animated Science Explainer, 3D Brand Explainer, 3D True Crime). A HyperFrames Pro feature. -- `/figma` — bring Figma into a video: rendered assets, brand tokens, components, storyboard frames as reconstructed motion, shaders and connector-assisted motion. Use when the person pastes a figma.com link or asks to use a Figma design, frame, logo or brand. +- `/figma` — bring Figma into a video: rendered assets, brand tokens, components, storyboard frames as reconstructed motion, shaders and connector-assisted motion. Use when the person asks to use a Figma design, frame, logo or brand in a video; a bare figma.com link is not that ask. - `/slideshow` — a presentation, pitch deck or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation and presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. - `/remotion-to-hyperframes` — bring existing video code or footage into HyperFrames (Remotion first; also Motion Canvas, Lottie, Three.js, canvas, or renders from other tools) and verify it frame by frame against the original. diff --git a/scripts/lint-skills.test.mjs b/scripts/lint-skills.test.mjs index 5aed038199..f8002ac153 100644 --- a/scripts/lint-skills.test.mjs +++ b/scripts/lint-skills.test.mjs @@ -75,6 +75,27 @@ test("valid: description with a colon inside a quoted string", () => { const has = (violations, needle) => violations.some((v) => v.message.toLowerCase().includes(needle.toLowerCase())); +test("invalid: a description that a pasted link alone triggers (#8530)", () => { + for (const said of [ + "Bring Figma into a video. Use when the person pastes a figma.com link or asks to use a Figma design.", + "Turn a site into a video. Use when the user shares a URL.", + "Capture a website. Use when someone drops a link to a page.", + "Capture a website. Use when the user has pasted a link.", + "Capture a website. Use when a link is pasted with no other request.", + "Capture a website. Use when given a URL.", + "Capture a website. Use for pasted links.", + ]) { + const violations = lintFrontmatter(wrap(`name: foo\ndescription: ${said}`)); + assert.ok(has(violations, "a pasted link alone"), said); + } +}); + +test("valid: a description that names the task a link comes with", () => { + const said = + "Bring Figma into a video. Use when the person asks to use a Figma design, frame or logo in a video; a link with no task is not that ask."; + assert.deepEqual(lintFrontmatter(wrap(`name: foo\ndescription: ${said}`)), []); +}); + test("invalid: missing frontmatter block", () => { const violations = lintFrontmatter("# just a body, no dashes\n"); assert.ok(has(violations, "Missing SKILL.md YAML frontmatter")); diff --git a/scripts/lint-skills.ts b/scripts/lint-skills.ts index 9c3e88a25e..3e7ad56856 100644 --- a/scripts/lint-skills.ts +++ b/scripts/lint-skills.ts @@ -197,10 +197,28 @@ function validateMetadata(data: Record): LineViolation | null { ); } +// A link with no task picks the skill whose description claims it (#8530): name the task a link comes with instead. +// Any tense, active or passive, verb before or after the link; a dot inside "figma.com" does not end the clause. +const SHARING = String.raw`\b(?:past(?:e|es|ed|ing)|shar(?:e|es|ed|ing)|drop(?:s|ped|ping)?|sen(?:d|ds|ding|t)|g(?:ive|ives|iven|iving|ave)|provid(?:e|es|ed|ing))\b`; +const LINK = String.raw`\b(?:links?|urls?)\b`; +const CLAUSE = String.raw`(?:[^.;]|\.(?=\S)){0,40}?`; +const LINK_ALONE_TRIGGER = new RegExp(`${SHARING}${CLAUSE}${LINK}|${LINK}${CLAUSE}${SHARING}`, "i"); + +function validateTrigger(data: Record): LineViolation | null { + const said = data.description; + if (typeof said !== "string" || !LINK_ALONE_TRIGGER.test(said)) return null; + return violation( + 1, + `The description makes a pasted link alone pick this skill; say which task the link comes with instead.`, + said.match(LINK_ALONE_TRIGGER)?.[0] ?? said, + ); +} + function validateShape(data: Record): LineViolation[] { const fieldChecks = [ validateStringField(data, "name", false), validateStringField(data, "description", false), + validateTrigger(data), validateStringField(data, "license", true), validateAllowedTools(data), validateMetadata(data), diff --git a/skills-manifest.json b/skills-manifest.json index 61143030f9..03e6a41c69 100644 --- a/skills-manifest.json +++ b/skills-manifest.json @@ -2,7 +2,7 @@ "source": "heygen-com/hyperframes", "skills": { "figma": { - "hash": "674455e54a2df3f5", + "hash": "757f5a8b9b35d9ec", "files": 3 }, "hyperframes": { diff --git a/skills/figma/SKILL.md b/skills/figma/SKILL.md index 5d491eb58a..23b93a839a 100644 --- a/skills/figma/SKILL.md +++ b/skills/figma/SKILL.md @@ -1,6 +1,6 @@ --- name: figma -description: Bring Figma into a HyperFrames video - rendered assets, brand tokens, components, storyboard frames as reconstructed motion (frames read as states, not slides), shaders and connector-assisted motion. Use when the person pastes a figma.com link or asks to use a Figma design, frame, logo or brand. +description: Bring Figma into a HyperFrames video - rendered assets, brand tokens, components, storyboard frames as reconstructed motion (frames read as states, not slides), shaders and connector-assisted motion. Use when the person asks to use a Figma design, frame, logo or brand in a video; a bare figma.com link is not that ask. --- **Running the CLI:** every `npx hyperframes ` here, the beacon included, means `node /hyperframes/scripts/plugin-cli.mjs ` run in the project, where `` holds this skill's folder ([rules](../hyperframes/references/plugin-installation.md)).