nexu-io/openmotion / library/skills/openmotion-design-remix
openmotion-design-remix
VerifiedOpenMotion — Adapt one of six bundled motion compositions using its MOTION_DESIGN.md, preserving timing and movement while replacing the user's copy. Use for these source-backed examples or as a concrete pattern for a reusable motion design package.
scripts/localize.mjs
View on GitHubimport { readFile } from 'node:fs/promises';
// Keep upstream HTML byte-for-byte for provenance. Localize its working copy.
const manifest = JSON.parse(await readFile(new URL('../vendor/manifest.json', import.meta.url), 'utf8'));
const families = { Inter: 'inter', Gelasio: 'gelasio', 'DM Sans': 'dm-sans', 'Libre Baskerville': 'libre-baskerville', 'Libre Franklin': 'libre-franklin' };
export function localize(html, prefix = './vendor/') {
for (const [url, file] of Object.entries(manifest.replacements).sort((a, b) => b[0].length - a[0].length)) {
html = html.replaceAll(url, prefix + file.slice('vendor/'.length));
}
html = html.replace(/<link\s+rel="preconnect"[^>]*>/g, '');
html = html.replace(/https:\/\/fonts\.googleapis\.com\/css2\?family=([^"'\s<)]+)/g, (_url, query) => {
if (query.startsWith('Libre+Baskerville:') && query.includes('&family=Libre+Franklin:')) return prefix + 'fonts/libre.css';
const family = decodeURIComponent(query.split(':')[0].replaceAll('+', ' '));
if (!families[family] || query.includes('&family=')) throw new Error('Unexpected font query: ' + query);
return prefix + 'fonts/' + families[family] + '.css';
});
// Custom family names use an explicitly supplied local @font-face or system font.
// Never silently make a new Google Fonts request from a portable project.
html = html.replace(/ if \(!\/\^\(Helvetica\|Arial\|Gelasio[\s\S]*?document\.head\.appendChild\(fl\);\n }/, ' // Custom fonts must be supplied locally; no dynamic font download.');
return html;
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |