scroll-storyteller

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scroll Storyteller

滚动叙事工具

Create immersive, interactive storytelling experiences using Anthropic's authentic design language: strict duotone palette, organic Bézier SVG paths, custom cursors, and chapter-based narratives.
创建采用Anthropic原生设计语言的沉浸式交互式叙事体验:严格的双色调配色、有机贝塞尔SVG路径、自定义光标以及章节式叙事。

Workflow

工作流程

Use
AskUserQuestion
to gather preferences, then generate:
StepQuestionOptions
1Animation?GSAP (rich) vs CSS-only (lightweight)
2Mood?Warm vs Cool vs Creative
3Palette?(show 3-4 based on mood)
4Topic?Biblical/Tech/Business/Personal/Custom
5Chapters?3, 4, or 5
6Content per chapterTitle, description, keywords
Generate:
bash
bash ~/.claude/skills/scroll-storyteller/scripts/generate.sh my-story <palette> [--gsap] [--chapters N]
Post-generation: Customize content, create SVGs (see
references/structure-templates.md
)
使用
AskUserQuestion
收集偏好,然后生成:
步骤问题选项
1动画类型?GSAP(丰富效果) vs 纯CSS(轻量级)
2氛围风格?温暖风 vs 冷峻风 vs 创意风
3配色方案?(根据氛围展示3-4种)
4主题内容?圣经/科技/商业/个人/自定义
5章节数量?3、4或5
6单章内容标题、描述、关键词
生成命令:
bash
bash ~/.claude/skills/scroll-storyteller/scripts/generate.sh my-story <palette> [--gsap] [--chapters N]
生成后操作: 自定义内容,创建SVG(参考
references/structure-templates.md

SVG Illustration Workflow

SVG插画工作流程

Each chapter needs a topic-relevant SVG that matches the narrative position:
PositionPurposeCompositionExample
HeroSet scene, show contrastWide (1000x1000), 2 silhouettesDavid vs Goliath distant
Chapter 1Introduce protagonistCentered figure + contextShepherd with sheep
Chapter 2Show conflict/obstacleImposing, fills frameGiant warrior
Chapter 3Resolution/triumphDynamic, radiatingVictor + fallen + rays
Chapter 4Deepening conflict (optional)Crowded, escalatingArmy masses, threats multiply
Chapter 5Final climax (optional)Action, decisiveStone flying, impact moment
FinaleSymbolic summaryCentered symbolCrown + light
Light/Dark Pattern by Chapter Count:
  • 3 chapters: Ch1=Light → Ch2=Dark → Ch3=Light
  • 4 chapters: Ch1=Light → Ch2=Dark → Ch3=Light → Ch4=Dark
  • 5 chapters: Ch1=Light → Ch2=Dark → Ch3=Light → Ch4=Dark → Ch5=Light
Process:
  1. Load
    references/svg-illustration-guide.md
    for theme → element mapping
  2. Identify chapter position (hero/ch1/ch2/ch3/ch4/ch5/finale)
  3. Extract topic keywords from chapter content
  4. Select SVG elements from element library:
    • Characters: figure-small, figure-large, figure-triumphant, figure-action
    • Nature: hills, sun, tree, path, clouds, lightning, wind
    • Objects: staff, crown, shield, weapon, stone, obstacle
    • Abstract: radiate, rings, trajectory, converge, impact
  5. Compose using position template
  6. Apply palette mood style (see
    references/design-harmony.md
    → Palette Mood → SVG Style)
  7. Add animation classes:
    organic-path
    ,
    fade-path
    ,
    scale-path
SVG Checklist:
  • Uses only
    var(--deep)
    and
    var(--foam)
    colors
  • All paths are organic Bézier curves (Q/C commands)
  • No geometric primitives (circle, rect, ellipse)
  • Opacity range matches palette mood
  • Composition matches chapter position
  • Symbolically represents chapter content
每个章节需要与主题相关且符合叙事位置的SVG:
位置用途构图示例
Hero(开篇)设定场景,展现对比宽幅(1000x1000),2个剪影大卫与歌利亚远景
第1章介绍主角居中人物+背景环境牧羊人与羊群
第2章展现冲突/障碍极具压迫感,充满画面巨型战士
第3章解决/胜利动感十足,向外辐射胜利者+战败者+光线
第4章(可选)冲突升级画面拥挤,矛盾加剧军队集结,威胁倍增
第5章(可选)最终高潮动作场面,决定性时刻石块飞出,撞击瞬间
Finale(结尾)象征性总结居中符号王冠+光芒
按章节数量划分的明暗模式:
  • 3章节: 第1章=亮 → 第2章=暗 → 第3章=亮
  • 4章节: 第1章=亮 → 第2章=暗 → 第3章=亮 → 第4章=暗
  • 5章节: 第1章=亮 → 第2章=暗 → 第3章=亮 → 第4章=暗 → 第5章=亮
流程:
  1. 加载
    references/svg-illustration-guide.md
    获取主题→元素映射
  2. 确定章节位置(hero/ch1/ch2/ch3/ch4/ch5/finale)
  3. 从章节内容中提取主题关键词
  4. 从元素库中选择SVG元素:
    • 人物:figure-small, figure-large, figure-triumphant, figure-action
    • 自然:hills, sun, tree, path, clouds, lightning, wind
    • 物品:staff, crown, shield, weapon, stone, obstacle
    • 抽象元素:radiate, rings, trajectory, converge, impact
  5. 使用位置模板进行构图
  6. 应用配色氛围风格(参考
    references/design-harmony.md
    → 配色氛围 → SVG样式)
  7. 添加动画类:
    organic-path
    ,
    fade-path
    ,
    scale-path
SVG检查清单:
  • 仅使用
    var(--deep)
    var(--foam)
    颜色
  • 所有路径均为有机贝塞尔曲线(Q/C命令)
  • 无几何基本图形(circle、rect、ellipse)
  • 透明度范围符合配色氛围
  • 构图匹配章节位置
  • 象征性体现章节内容

Animation Styles

动画样式

StyleLibrarySizeBest For
GSAPGSAP 3.x + ScrollTrigger~45KBRich interactions, SVG draw, orbits, timelines
CSS-onlyNone (IntersectionObserver)0KBLightweight, fast load, simple reveals
样式依赖库大小最佳适用场景
GSAPGSAP 3.x + ScrollTrigger~45KB丰富交互、SVG绘制、轨道动画、时间线控制
纯CSS无(使用IntersectionObserver)0KB轻量级、加载快速、简单渐显效果

GSAP Features

GSAP特性

  • SVG path draw animations (strokeDasharray)
  • Continuous orbit/rotation effects
  • Scroll-linked timeline control
  • Parallax with scrub
  • Staggered animations with precise timing
  • SVG路径绘制动画(strokeDasharray)
  • 持续轨道/旋转效果
  • 滚动关联时间线控制
  • 视差滚动与 scrub 效果
  • 精确计时的交错动画

CSS-only Features

纯CSS特性

  • IntersectionObserver reveals
  • CSS transitions with delays
  • Transform-based animations
  • No external dependencies
  • Smaller bundle size
  • IntersectionObserver触发的渐显效果
  • 带延迟的CSS过渡
  • 基于Transform的动画
  • 无外部依赖
  • 更小的包体积

Duotone Palettes

双色调配色方案

#ThemeLightDarkMood
1Anthropic
#FAF9F5
cream
#141413
charcoal
Warm
2Midnight
#E8F4F8
ice
#0D1B2A
navy
Cool
3Sepia
#F5F0E6
parchment
#2C1810
espresso
Warm
4Forest
#F0F4F0
mist
#1A2E1A
evergreen
Creative
5Dusk
#F4F0F8
lavender
#1E1A2E
violet
Creative
6Ember
#FFF5F0
blush
#2A1A14
ember
Warm
7Steel
#F0F2F5
silver
#1A1C20
graphite
Cool
8Ocean
#F0F8F8
foam
#0A1A1A
deep
Cool
Mood → Palette mapping:
  • Warm: 1 (Anthropic), 3 (Sepia), 6 (Ember)
  • Cool: 2 (Midnight), 7 (Steel), 8 (Ocean)
  • Creative: 4 (Forest), 5 (Dusk)
#主题亮色暗色氛围
1Anthropic
#FAF9F5
米白
#141413
炭黑
温暖
2Midnight(午夜)
#E8F4F8
冰蓝
#0D1B2A
藏青
冷峻
3Sepia(棕褐)
#F5F0E6
羊皮纸色
#2C1810
浓咖啡
温暖
4Forest(森林)
#F0F4F0
雾绿
#1A2E1A
常绿
创意
5Dusk(黄昏)
#F4F0F8
淡紫
#1E1A2E
深紫
创意
6Ember(余烬)
#FFF5F0
淡粉
#2A1A14
烬黑
温暖
7Steel(钢铁)
#F0F2F5
银灰
#1A1C20
石墨黑
冷峻
8Ocean(海洋)
#F0F8F8
泡沫白
#0A1A1A
深海蓝
冷峻
氛围→配色映射:
  • 温暖: 1(Anthropic)、3(Sepia)、6(Ember)
  • 冷峻: 2(Midnight)、7(Steel)、8(Ocean)
  • 创意: 4(Forest)、5(Dusk)

Design Modes

设计模式

ModeDescriptionWhen to Use
Authentic (default)Strict duotone, organic pathsEditorial, brand storytelling
ExpressiveMulti-color accents allowedProduct showcases, demos
模式描述使用场景
Authentic(原生,默认)严格双色调,有机路径社论内容、品牌叙事
Expressive(表现力)允许多色点缀产品展示、演示

Core Features

核心特性

FeatureDescription
Custom CursorDual-layer cursor with smooth easing, mix-blend-mode
Hero SectionGSAP: Flowing organic lines (1000x1000 background). CSS-only: Desk lamp with animated light cone reveal
Spotlight LayerRadial gradient follows cursor on dark sections
Staggered RevealsTitle words animate in sequence on load
Chapter StructureAlternating light/dark sections with transitions
Organic SVGsHand-drawn Bézier paths, fill-only (no strokes)
ParallaxSubtle depth movement on scroll
特性描述
自定义光标双层光标,带平滑缓动效果,支持mix-blend-mode
Hero区域GSAP: 流动的有机线条(1000x1000背景)。纯CSS: 带动画光锥渐显效果的台灯
聚光灯层径向渐变跟随光标在深色区域移动
交错渐显标题文字在加载时按顺序动画显示
章节结构明暗交替的章节与过渡效果
有机SVG手绘风格贝塞尔路径,仅填充(无描边)
视差滚动滚动时的微妙深度移动效果

Anthropic Design Language

Anthropic设计语言

Strict Duotone Palette

严格双色调配色

ElementHexCSS Variable
Cream (light)
#FAF9F5
--cream
Charcoal (dark)
#141413
--charcoal
Rule: No other colors. All illustrations use exactly these two.
元素十六进制值CSS变量
米白(亮色)
#FAF9F5
--cream
炭黑(暗色)
#141413
--charcoal
规则: 禁止使用其他颜色。所有插画仅使用这两种颜色。

Typography

排版

RoleFontFallback
Display/HeadingsInstrument SerifGeorgia, serif
Body/UIInter-apple-system, sans-serif
Characteristics:
  • Large, editorial headings (clamp 3rem - 7rem)
  • Light weight (300-400)
  • Negative letter-spacing on display (-0.02em)
  • Generous line-height (1.5-1.8)
角色字体备选字体
标题/大标题Instrument SerifGeorgia, serif
正文/UIInter-apple-system, sans-serif
特点:
  • 大尺寸社论风格标题(clamp 3rem - 7rem)
  • 轻字重(300-400)
  • 标题字距为负(-0.02em)
  • 宽松行高(1.5-1.8)

SVG Design Rules

SVG设计规则

RuleDescription
Fills onlyNever use strokes for main shapes
Organic pathsComplex Bézier curves, hand-drawn feel
viewBoxAlways 1000x1000 or 500x500 (square)
2-4 pathsKeep compositions simple
LayeredLight shapes behind, dark in front
Anti-patterns:
❌ <circle>, <rect>, <ellipse> (geometric)
❌ stroke="..." on main elements
❌ Multiple colors
✅ <path d="M... Q... C..."> with organic curves
规则描述
仅填充主体形状绝不使用描边
有机路径复杂贝塞尔曲线,手绘质感
viewBox始终为1000x1000或500x500(正方形)
2-4条路径保持构图简洁
分层结构亮色形状在底层,暗色在顶层
反模式:
❌ <circle>, <rect>, <ellipse>(几何图形)
❌ 主体元素使用stroke="..."
❌ 多色使用
✅ <path d="M... Q... C..."> 有机曲线

Topic-Driven SVG Generation

主题驱动SVG生成

The
svg-generator.sh
helper automatically selects appropriate SVG templates based on chapter content:
KeywordsTemplateBest For
identity, profile, self, uniqueFingerprint + VerificationPersonal identity concepts
network, connect, distributed, systemCentral Hub + NetworkSystem architecture concepts
protect, secure, vault, lockProtected Vault + LinksSecurity concepts
growth, learn, knowledge, treeKnowledge TreeLearning/growth concepts
enforce, filter, gate, barrierGateway ArchesEnforcement/validation
trust, hand, collaborationHand Holding + ConnectionPartnership concepts
unify, finale, completeConcentric SymbolConclusion/unity
Usage:
bash
undefined
svg-generator.sh
辅助工具会根据章节内容自动选择合适的SVG模板:
关键词模板最佳适用场景
identity, profile, self, uniqueFingerprint + Verification(指纹+验证)个人身份概念
network, connect, distributed, systemCentral Hub + Network(中心枢纽+网络)系统架构概念
protect, secure, vault, lockProtected Vault + Links(受保护金库+链接)安全概念
growth, learn, knowledge, treeKnowledge Tree(知识树)学习/成长概念
enforce, filter, gate, barrierGateway Arches(拱门网关)执行/验证场景
trust, hand, collaborationHand Holding + Connection(牵手+连接)合作概念
unify, finale, completeConcentric Symbol(同心符号)结论/统一场景
用法:
bash
undefined

Source the generator in your script

在脚本中引入生成器

source scripts/svg-generator.sh
source scripts/svg-generator.sh

Generate SVG for a chapter (position: hero/ch1/ch2/ch3/ch4/ch5/finale)

为章节生成SVG(位置:hero/ch1/ch2/ch3/ch4/ch5/finale)

generate_svg_for_chapter
"ch1"
"Digital Identity"
"Your unique identity on the blockchain"
"var(--foam)"
"var(--deep)"
"fade-path"

**Positions:** `hero` | `ch1` | `ch2` | `ch3` | `ch4` | `ch5` | `finale`
generate_svg_for_chapter
"ch1"
"Digital Identity"
"Your unique identity on the blockchain"
"var(--foam)"
"var(--deep)"
"fade-path"

**位置选项:** `hero` | `ch1` | `ch2` | `ch3` | `ch4` | `ch5` | `finale`

Animation Patterns

动画模式

For detailed GSAP and CSS animation patterns, see
references/animation-patterns.md
Animation Classes:
ClassDescriptionUsage
organic-path
Base class for all SVG pathsAlways applied
fade-path
Fade in animationDefault for most paths
scale-path
Scale up animationCombined with fade-path
draw-path
Stroke draw animation (GSAP only)For line/path drawing effects
有关GSAP和CSS动画模式的详细内容,请参考
references/animation-patterns.md
动画类:
类名描述用法
organic-path
所有SVG路径的基础类始终添加
fade-path
渐显动画大多数路径的默认选择
scale-path
缩放动画与fade-path结合使用
draw-path
描边绘制动画(仅GSAP)用于线条/路径绘制效果

Narrative Structure

叙事结构

For narrative structure and HTML templates, see
references/structure-templates.md
有关叙事结构和HTML模板,请参考
references/structure-templates.md

Resources

资源

FilePurposeLoad When
scripts/generate.sh
Creates HTML (CSS-only or GSAP with --gsap)Starting new project
scripts/svg-generator.sh
Topic-driven SVG generation helperCreating custom illustrations
references/animation-patterns.md
GSAP + CSS animation patternsImplementing animations
references/structure-templates.md
Narrative structure + HTML templatesBuilding sections
references/svg-illustration-guide.md
Theme → SVG element mapping, templatesCreating topic-relevant illustrations
references/example-david-goliath.md
Complete worked example with all 5 SVGsLearning SVG composition patterns
references/anthropic-design.md
Full design system referenceDeep customization
references/gsap-patterns.md
GSAP + ScrollTrigger recipesUsing GSAP animation style
references/css-only-patterns.md
IntersectionObserver recipesUsing CSS-only animation style
references/design-harmony.md
Visual cohesion + palette-mood SVG stylingEnsuring consistent design quality
文件用途加载时机
scripts/generate.sh
创建HTML文件(纯CSS或带--gsap参数的GSAP版本)启动新项目时
scripts/svg-generator.sh
主题驱动的SVG生成辅助工具创建自定义插画时
references/animation-patterns.md
GSAP + CSS动画模式实现动画效果时
references/structure-templates.md
叙事结构 + HTML模板构建章节时
references/svg-illustration-guide.md
主题→SVG元素映射、模板创建主题相关插画时
references/example-david-goliath.md
包含全部5个SVG的完整示例学习SVG构图模式时
references/anthropic-design.md
完整设计系统参考深度自定义时
references/gsap-patterns.md
GSAP + ScrollTrigger配方使用GSAP动画风格时
references/css-only-patterns.md
IntersectionObserver配方使用纯CSS动画风格时
references/design-harmony.md
视觉一致性 + 配色氛围SVG样式确保设计质量一致时

Example Files

示例文件

FileAnimationDescription
agent-harness-gsap.html
GSAPFull experience with orbit SVGs, draw animations, parallax
agent-harness-anthropic.html
CSS-onlyLightweight with IntersectionObserver reveals
文件动画类型描述
agent-harness-gsap.html
GSAP完整体验,包含轨道SVG、绘制动画、视差滚动
agent-harness-anthropic.html
纯CSS轻量级,使用IntersectionObserver渐显效果

Usage Workflow

使用工作流

  1. Choose Animation Style: GSAP (rich) or CSS-only (lightweight)
  2. Choose Palette: Select mood → pick specific palette
  3. Select Chapter Count: Choose 3, 4, or 5 chapters
  4. Plan Narrative: Hero + selected chapters + finale
  5. Generate:
    bash scripts/generate.sh project-name <palette> [--gsap]
  6. Customize Content: Replace placeholder text
  7. Add Illustrations: Use organic path templates from assets/
  8. Test: Verify animations, cursor, scroll behavior
  9. Ship: Single self-contained HTML file
  1. 选择动画风格:GSAP(丰富效果)或纯CSS(轻量级)
  2. 选择配色方案:选择氛围→挑选具体配色
  3. 选择章节数量:3、4或5章
  4. 规划叙事:Hero区域+选定章节+结尾
  5. 生成项目
    bash scripts/generate.sh project-name <palette> [--gsap]
  6. 自定义内容:替换占位文本
  7. 添加插画:使用assets/中的有机路径模板
  8. 测试:验证动画、光标、滚动行为
  9. 发布:单个自包含HTML文件

Accessibility

无障碍支持

  • prefers-reduced-motion
    support (disables animations)
  • Touch device detection (hides custom cursor)
  • Semantic HTML structure
  • High contrast duotone
  • 支持
    prefers-reduced-motion
    (禁用动画)
  • 触摸设备检测(隐藏自定义光标)
  • 语义化HTML结构
  • 高对比度双色调

Token Efficiency

令牌效率

  • Scripts execute without loading context (0 tokens)
  • SVG templates are copy-paste patterns
  • Single HTML output, no build step
  • CSS custom properties for easy theming
  • 脚本执行无需加载上下文(0令牌)
  • SVG模板为复制粘贴式模式
  • 输出单个HTML文件,无需构建步骤
  • 使用CSS自定义属性实现轻松主题切换