andyhuo520/vibe-knowledge / skills/ai-teardown
ai-teardown
Unverified「AI 拆机课」系列课工作室:输入一个主题(AI 产品、开源项目/书、人物历史、软件教程),产出由浅入深、每句话有出处的中文讲解视频系列 + 每节互动版 + 课程总页。流水线:收集资料 → 确认对象与课时 → 大纲 → 逐节旁白(MiMo 克隆音色 + 逐字对齐)→ scenes.json 画面编排(Notion 极简手绘引擎 / 马卡龙模板引擎,IconPark 图标与插画、Noto 动态 emoji、AntV X6 流程图、像素讲解小人、截图圈注、终端录屏)或 film.js 代码成片(cine 引擎:Three.js、粒子、着色器、真片段叠加、曲库配乐)→ Hyperframes / 无头 GPU 逐帧 1080p 渲染 → Artifact 发布 → 课程总页 + 导学视频。触发:做系列课 / 做课程视频 / 把某本书或某个开源项目做成课 / 科普讲解视频 / 教学视频 / 课程地图 / 导学视频 / 互动课件 / 「拆机课」「上手课」「实战课」「编排课」/ 王炸讲解片 / 用真实会话和成片教人做视频。不用于:单支宣传片(用 promo-video)、单张信息图、纯文章写作。
engine/runtime/iconify.js
View on GitHub/**
* 开源图标(Iconify 格式:IconPark、tabler、lucide、iconoir),构建时由 scripts/icons.py 抽成小 JSON 打进 bundle,渲染不联网。
* registerIcons(json) 注册一批图标
* ico("icon-park:robot", 48, {tone: "m6"}) 建一个 <svg>;线条图标描边跟 currentColor
* drawIcon(svg, p) 线条图标「自己画出来」:p 从 0 到 1;有填色的在后半段淡入
*
* IconPark 多色图标(前缀 icon-park:)原本是四个固定色:#000 描边、#2F88FF 填充、#FFF 内描边、#43CCF8 内填充。
* 这里换成 CSS 变量 --ic-s / --ic-f / --ic-i / --ic-if,用 ico(name, size, {tone: "m5"}) 一次换成某个马卡龙色位。
*/
import { s } from "./dom.js";
const REG = {};
export const registerIcons = (json) => Object.assign(REG, json);
export const hasIcon = (name) => name in REG;
const SHAPES = "path,circle,rect,line,polyline,polygon,ellipse";
const PARK = { "#000": "--ic-s", "#000000": "--ic-s", "#2f88ff": "--ic-f", "#fff": "--ic-i", "#ffffff": "--ic-i", "#43ccf8": "--ic-if" };
export const ico = (name, size = 24, { color = "currentColor", stroke = null, draw = false, tone = null } = {}) => {
const rec = REG[name];
if (!rec) throw new Error(`图标没注册:${name}(先跑 scripts/icons.py)`);
const svg = s("svg", { viewBox: `0 0 ${rec.w} ${rec.h}`, width: size, height: size, style: { color, overflow: "visible", display: "block" } });
svg.innerHTML = rec.body;
if (name.startsWith("icon-park:")) {
// 表现属性里不能写 var(),改成内联样式
for (const el of svg.querySelectorAll("*")) {
for (const a of ["fill", "stroke"]) {
const v = PARK[(el.getAttribute(a) || "").toLowerCase()];
if (v) el.style[a] = `var(${v})`;
}
}
const c = tone ?? "m6";
for (const [k, v] of Object.entries({ "--ic-s": `var(--${c}-d)`, "--ic-f": `var(--${c})`, "--ic-i": "var(--surface)", "--ic-if": `var(--${c}-t)` })) svg.style.setProperty(k, v);
}
// stroke 按 24 网格给;IconPark 是 48 网格,要等比放大
if (stroke != null) for (const el of svg.querySelectorAll("[stroke-width]")) el.setAttribute("stroke-width", ((stroke * rec.w) / 24).toFixed(2));
if (draw) {
// pathLength=1 让每段描边都按 0..1 计长,dashoffset 就能统一驱动
for (const el of svg.querySelectorAll(SHAPES)) {
el.setAttribute("pathLength", "1");
el.setAttribute("stroke-dasharray", "1 1");
el.setAttribute("stroke-dashoffset", "1");
}
svg.dataset.draw = "1";
}
return svg;
};
export const drawIcon = (svg, p) => {
// 线条在前 70% 画完,填色在后半段淡入(纯线条图标没有填色,不受影响)
const pc = Math.min(1, Math.max(0, p));
const v = (1 - Math.min(1, pc / 0.7)).toFixed(4);
const f = Math.min(1, Math.max(0, (pc - 0.5) / 0.5)).toFixed(3);
for (const el of svg.querySelectorAll(SHAPES)) {
if (el.getAttribute("stroke-dashoffset") !== v) el.setAttribute("stroke-dashoffset", v);
if (el.style.fillOpacity !== f) el.style.fillOpacity = f;
}
for (const g of svg.querySelectorAll("g")) if (g.style.fillOpacity !== f) g.style.fillOpacity = f;
};
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |