首页 / 全部技能 / 内容创作 / session-story
内容创作 · heygen-com/hyperframes-community-skills

session-story

An agent makes an animated film of an average session with its own user, beginning to end, told with that user's real messages: whatever their routine is (code, writing, data, design, video). The agent sits at a desk in a room decorated from what it knows about the user, and the monitor shows their kind of work. Requests glide in as paper planes and unfold. Corrections are a 3D cartoon mallet that bonks, then turns to show the words on its face. Praise is a butterfly towing the words on a ribbon. The agent types each reply onto a sheet, folds it and throws it back. The film opens with the agent asleep until the monitor boots: "Initiating session with <name>". The agent composes its own orchestral score, cued to every action. p5.brush watercolour, rendered in HyperFrames. Trigger on: "a video of our session", "animate a session with me", "session story", "show what working with me is like", "make a film about me and my agent".

风险提醒:蓝色 · 知晓即可AI 侦查报告
作者 heygen-comGitHub heygen-com/hyperframes-community-skills ↗Stars 156许可 Apache-2.0(仓库根 LICENSE)commit ba7a0bb6d3
agent 宿主通常会约束 skill 执行权限;风险提醒为 AI 侦查观点,不构成质量或安全保证。第三方 skill 仅作拆解与展示,安装使用风险自负,版权归原作者。

1实现原理 · 为什么它能做到

整条链路的输入是 agent 自己的历史:找出用户的常态,把一次典型会话按发生顺序做成 40-70 秒的片子;素材是用户的原话,画面里的房间与桌面从 agent 对用户的了解里长出来。

skills/session-story/SKILL.md
The agent reads its own history with its user, finds their routine, and turns one typical session into a 40 to 70 s film, in the order it happened:
注:这里在做什么:把「纪录片」的可信度建立在真实引用上——不是让模型编一段用户台词,而是从 transcript 里取连续片段。

只有一份创作输入:story.json。编排(滑入、折叠、投掷、挥锤、蝶翼)由引擎 scenes/*.js 负责,agent 不该动;上屏的每一句都是引用,且渲染前每句都要用户批准。

skills/session-story/SKILL.md
Write `story.json` and the engine does the choreography. Nothing on screen is invented: every line is a quote, and the user approves every line before a frame is rendered.
注:这里在做什么:把「模型即兴」压缩到 story.json 这一层,运动层被冻结成已调好的物理动作,降低每次出片的漂移。

取材是本地行为,且以用户明确同意为前置:harvest.py 读当前项目的 Claude Code(~/.claude/projects/<slug>/*.jsonl)与 Codex(~/.codex/sessions)记录,按「最典型」排序而不是「最戏剧」;每条消息带本地时间、类型猜测与敏感标记。

skills/session-story/references/sources.md
It prints the routine first: messages and minutes in a median session, the usual start time, the mix of kinds, and the words that come up most.
注:这里在做什么:先量后选——常态优先保证「这就是我和它平常的样子」;flag(secret/email/path/url/number/name?)只是线索,文档明说漏网的要人自己看(小写人名不会被标)。

schedule.mjs 用「片子自己跑的同一份代码」编译 story.json:在 vm 里执行 scenes/compile.js,产出 story.js、score/timeline.json、index.html 时长与 kit/config.js;同时充当校验器——拒收示例故事冒充、校验房间道具名与槽位、缺 source 的引用告警、>80 秒告警、开篇即回复或超长引用直接 exit 1。

skills/session-story/scripts/schedule.mjs
// schedule.mjs: compile a project's story.json with the same code the film runs (scenes/compile.js) … refusing: this is the example story ( … vm.runInContext(fs.readFileSync(P('scenes/compile.js'), 'utf8'), ctx, { filename: 'compile.js' });
注:这里在做什么:编译即预览——时长与关键帧由引擎给出,避免「做完才发现长度不对」;示例保护则防止 agent 用作者的会话糊弄用户。

隐私门是硬门:设计 pass 之前要给用户一张表(hook、铭牌、每条引用、每条回复、每件道具及其理由)并注明来源,拿到显式 yes 才写 approved: true;未批准前每帧盖 DRAFT 章。除用户外的人名、客户、公司、NDA 产品、路径、URL、邮箱、可识别数字与密钥都要剪掉。

skills/session-story/SKILL.md
7. **Privacy gate:** show the user one table of every on-screen line (hook, nameplate, each quote, each reply, each prop and why), each with its source. Take their edits, get an explicit yes, then set `"approved": true`. Until then every frame carries a DRAFT stamp.
注:这里在做什么:把「上屏前的人工确认」写进流水线,而不是留给礼貌——story.json 没 approved 就连快照都带 DRAFT。

配乐是自作曲但有数值门禁:写 score/score.py(自定主题/调/音色),build.sh 走 compose→render→master→check;macOS 用 swift 走系统 General MIDI,其他平台要 fluidsynth + SOUNDFONT,ffmpeg loudnorm 到 -16 LUFS,最后 qc.py 逐 beat 检响度与死气。

skills/session-story/scripts/score/build.sh
# build.sh: compose → render → master → check. Run from anywhere: sh score/build.sh … python3 qc.py ../assets/audio/score.wav timeline.json
注:这里在做什么:乐谱必须踩在片子的时间轴上(timeline.json 由 schedule.mjs 产出),『fails on dead air』把空拍当缺陷而不是风格。

2核心能力

01从本地 transcript 里选出「一次典型会话」,并给出常态画像(中位消息数/时长、常见开始时间、类型构成、高频词)
02逐字引用上屏:用户台词是连续片段(可截断不可改写),回复取该轮原话,每条都要有 source 供隐私门核对
03数据驱动的房间与演员:房间填槽 + 道具必须真实存在且槽位匹配(shelf ≤3 件),非 Claude 的 agent 按 cast.md 画自己
04自作曲配乐链:写 score.py → swift/fluidsynth 渲染 → ffmpeg loudnorm 到 -16 LUFS → qc.py 逐 beat 验响度与死气
05本地成片与验收:24fps / crf 12 渲出 MP4,长度须等于 schedule.mjs 打印值、必须有音轨、关键帧要抽帧回看
06明确的失败路径(可测):开篇即回复或引用超限会让 schedule.mjs exit 1 并点名该 beat

3外部依赖

类型依赖
cliHyperFrames CLI(钉版 npx --yes [email protected];check/preview/render/snapshot)
cliffmpeg(配乐母带 loudnorm/afade + 渲染后抽帧核对)
packagep5 2.3.3(LGPL-2.1)/ p5.brush 2.2.3(MIT)/ @fontsource/permanent-marker 5.3.0(Apache-2.0),经 npm ci 按锁文件安装
cli配乐渲染器:macOS 的 swift(系统 General MIDI 音色库)或其他平台的 fluidsynth + 用户自备 SOUNDFONT
network构建期声明无网络;唯一潜在外发是 snapshot 把帧送 Gemini(仅在 GEMINI_API_KEY 存在时),skill 要求一律带 --describe false 规避
network本地隐私数据读取(非凭证):当前项目的 Claude Code / Codex 会话记录,以及用于填房间的 memory 与指令文件

4风险提醒 风险提醒:蓝色 · 知晓即可

风险提醒:蓝色 · 知晓即可
  • 读的是用户的私密历史 — harvest 读 ~/.claude/projects 与 ~/.codex/sessions 的会话原文,还读 memory 与 CLAUDE.md/AGENTS.md 来填房间;虽然全程本地且有『先问用户』的要求,但同意是提示级约束。
  • 用户原话会落盘 — story.json 与 session-story-candidates.json 都含用户原话;文档明说 never commit or share them,但项目一旦被提交/同步即外泄。
  • 脱敏靠正则 + 人眼 — FLAGS 会漏(小写人名、非英语姓名、间接可识别信息),最终责任在那张人工隐私表上——用之前得真的逐行看。
  • 平台依赖会阻断成片 — 非 macOS 且没有 fluidsynth + General MIDI 音色库时,配乐渲染直接失败;macOS 也需要 swift/Xcode CLT。
  • snapshot 的默认行为在 CLI 一侧 — 帧上传 Gemini 的开关由 HyperFrames CLI 决定,skill 只能以文档要求 --describe false 规避;agent 漏参数即等于把用户的话送出去。
  • 身份与形象表达 — 片子按 agent 自己的形象演出(非 Claude 需按 cast.md 自绘),涉及品牌/身份表达,属创作判断而非技术风险。
风险提醒:蓝色,知晓即可。判级对象=skill 自身目录(SKILL.md + scripts/ 六个入口 + scripts/score/ + assets/engine + assets/example + references×6)。自身行为全部落在本地:harvest.py 只读本地会话 jsonl(Python 标准库)、schedule.mjs 在 vm 里跑随包引擎编译、score/* 走本地 python/ffmpeg/swift|fluidsynth、engine 构图从 assets/vendor/p5.min.js 载 p5(无 CDN,渲染可完全离线)。零凭证读取(SKILL.md:No credentials, no paid calls.),零素材外发,并把 snapshot 的上传行为写成禁止条款(一律 --describe false)。唯一的联网是官方源的固定版本依赖安装(setup.sh 的 npm ci 与 npx 取 [email protected]),属安装而非运行期外发——按批4 先例(baoyu-translate 的 npm 依赖判蓝)落蓝。真正需要知晓的是本地隐私与产物归属:读取的是用户会话原文,story.json 与 candidates.json 会把用户原话落盘,文档要求 never commit or share them。

5第二遍独立确认

  • [ok] 『No credentials』与『Network at build time: none』是否成立 — 目录内 process.env 命中只有 SOUNDFONT(build.sh 交给 fluidsynth 的音色库路径)与 GEMINI_API_KEY 的**提示文本**;无键值读取、无 fetch。engine/index.html 引用 assets/vendor/p5.min.js(本地),渲染链路不需联网。
  • [discrepancy] harvest 的敏感 flag 能否替代人工审核 — 不能,文档自己说明了:FLAGS 是正则模式匹配(secret/email/path/url/number/name?/person?),sources.md 明写 'The flags miss what they can't see: a name typed in lowercase ("like peter said") has no flag.'。故能力清单不写成『自动脱敏』,隐私门本质是人读。
  • [ok] 示例故事冒充是否真会被拦 — schedule.mjs 读取随包 assets/example/story.json,用 quotes() 归一化小写比对引用;命中 ≥2 条且未加 --example 时 exit 1 并提示写自己用户的故事。防糊弄逻辑真实存在。
  • [ok] 配乐链是否真有三平台分支与母带门禁 — build.sh 依序判断:Darwin + 系统 gs_instruments.dls + swift → swift 渲染;否则 fluidsynth + SOUNDFONT → 渲染;都不满足则报错退出(并明说两者都不下载东西)。母带为 ffmpeg loudnorm=I=-16:TP=-1.5:LRA=14 + 首尾淡入淡出,最后 python3 qc.py 检响度与死气。
  • [ok] 引擎代码来源是否交代 — assets/engine/NOTICE.md 写明 kit/core.js、kit/clawd.js、kit/timeline.js 改编自 ClaudeAnimationBase(commit b1d7e89,MIT),并随包分发 LICENSE-ClaudeAnimationBase;非自有代码有交代。
  • [unlocatable] 『40 到 70 s 抓得住注意力』的时长论断 — 该区间是设计声明(schedule.mjs 仅对 >80s 打 warning),源码内无实测依据;本次只读侦查未运行 harvest 与渲染,故不作为已核事实使用。

6结论

  • 真实性纪律硬:上屏的每句都必须是本地历史里的连续片段,回复用自己的原话,禁止改写与拼凑
  • 隐私门做成状态机而非礼貌:未写 approved: true 时每帧带 DRAFT 章,设计 pass 前必须交一张带来源的台帐给人逐行批准
  • 创作与编排分层:agent 只写 story.json/房间/演员/配乐,运动层冻结,出片稳定性来自引擎而非每次重新发明动画
  • 可验收:schedule.mjs 打印 beat 表与关键帧、配乐以 'ok: no dead air' 收尾、失败路径有明确 exit 1 用例
  • 完全本地:构图不依赖 CDN(p5 随包)、配乐用系统/本地合成器、无凭证无付费调用
  • 适合:适合 agent 与某位用户有真实交往历史(Claude Code / Codex 本地记录)且愿意先过一遍隐私表再出片的场景:把「我们平时怎么合作」做成 40-70 秒、有实体感的短片(纸飞机请求、木槌纠错、蝴蝶表扬、折纸回复、自作曲配乐,p5.brush 水彩渲染)。也适合给固定用户的一份纪念性产出,或用来演示「agent 观察自己的历史」这件事。
    不适合:不适合:① 别人的历史、团队共享日志、或用编造引用的营销片——SKILL.md 明确写了不要这么用;② 完全没有历史且用户不愿提供消息(无素材即无从取材);③ 需要长片/多场景叙事(40-70 秒是设计区间,>80 秒会被警告);④ 非 macOS 又没有 fluidsynth + 音色库的环境(配乐链会失败);⑤ 无法接受把用户原话写进项目文件的工作流;⑥ 想一键出片、不愿做逐行隐私审阅的使用者。
    安装 agent 直装可复制
    ① 本站镜像 更新 2026-09-28
    方式 A · 人下载镜像包下载 session-story.tar.gz
    sha256: 0e83cbb985854ae8…
    方式 B · JSON 格式安装指南,复制给 agent
    安装指南
    agent 读 JSON 指南后会自动从本站下载安装,无需更多说明。
    ② 上游 GitHub · 原始来源
    能访问 GitHub?直接去上游安装(实时版,可能已更新)GitHub 原始 ↗
    本页镜像锁定 commit ba7a0bb6d3;上游为实时仓库。
    来源信息 GitHub 原始
    作者 / 仓库heygen-com / heygen-com/hyperframes-community-skills
    Stars156
    最近推送2026-09-24
    本 skill commitba7a0bb6d3
    许可Apache-2.0(仓库根 LICENSE)
    本站信息
    收录日期2026-09-06
    分类内容创作
    侦查报告AI 侦查 · 2 遍 · 2026-09-06
    本站镜像与 GitHub 原始是不同来源:本站锁定 commit 快照经 /r2 分发;GitHub 为实时上游,内容可能已更新。
    同分类邻近