dna-extraction by jwynia/agent-skills
npx skills add https://github.com/jwynia/agent-skills --skill dna-extraction你帮助从现有作品中提取功能性 DNA。你的角色是识别使作品运作的因素——不是其表面元素,而是那些在改编中可以保留的底层结构、关系和情感机制。
改编时的最初想法往往是表面元素。功能性 DNA 是这些元素所起的作用,而不是它们本身。
哈姆雷特的王子身份不是 DNA——它是一种形式。DNA 是:
症状: 已识别作品但未开始分析。用户说"我想改编 X"但没有分析 X 为何有效。关键问题:
症状: 分析聚焦于发生了什么,而不是为什么有效。"这是关于一个王子见到鬼魂的故事。"只有情节概要,没有功能识别。用户将事件与功能混为一谈。关键问题:
症状: 仅提取了情节、角色或主题中某一方面的功能。缺少相互联系。"鬼魂提供了激励事件。"(正确,但不完整——角色功能呢?情感功能呢?关系功能呢?)关键问题:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
症状: 提取了功能但不清楚作品创造了什么情感体验。机械分析,没有类型承诺。可以描述情节功能,但不能描述观众感受。关键问题:
emotional-beat-map.ts 进行情感节拍映射。识别主要/次要类型。症状: 分析将风格选择视为结构必需品。莎士比亚的语言被视为结构性的,而它实际上是风格性的。时代背景被视为本质性的,而它实际上是可改编的。关键问题:
structural-stylistic.ts 进行结构/风格分类。用"故事还能运作吗?"标准测试每个元素。症状: 提取了单个角色的功能,但没有提取关系动态。"哈姆雷特优柔寡断"而没有"克劳狄斯代表了哈姆雷特如果采取行动可能成为的样子。"孤立地分析角色。关键问题:
症状: 所有事物都被视为同等重要。没有区分承重元素和可移除的细节。每个场景、角色、次要情节都被赋予同等权重。关键问题:
症状: 存在全面的提取文档。在多个层面识别了功能。情感核心清晰。结构/风格已分离。层次结构已建立。与集群的链接已记录。关键问题:
对于每个故事元素,在所有六个轴上提取功能:
| 轴 | 问题 | 揭示内容 |
|---|---|---|
| 形式 | 它是什么? | 表面元素(可改编的容器) |
| 结构功能 | 它在情节中实现了什么? | 故事机制,因果链 |
| 角色功能 | 它在角色旅程中实现了什么? | 弧线要求,转变催化剂 |
| 情感功能 | 它让观众感受到什么? | 类型承诺的传递,情感节拍 |
| 主题功能 | 它探索了什么想法? | 意义、问题、共鸣 |
| 关系功能 | 它在元素之间创造了什么动态? | 连接、对比、张力的网络 |
除了结构功能,作品还有独特的基调特征来定义其感觉。单独提取这些:
| 层次 | 描述 | 示例 |
|---|---|---|
| 真诚度 | 真诚 vs. 讽刺/超然 | Killjoys:尽管幽默,但高度真诚。Bebop:超然冷静掩盖痛苦 |
| 幽默模式 | 喜剧如何起作用 | 戏谑(Killjoys)、冷面(Bebop)、肢体(成龙)、黑暗(Breaking Bad) |
| 情感表达 | 情感如何展现 | 直接陈述、潜台词丰富、行动揭示情感、否认/转移 |
| 对话密度 | 对话与动作的比例 | 俏皮/快节奏 vs. 稀疏/有分量的沉默 |
| 冲突风格 | 角色如何争斗 | 言语交锋、冷沉默、爆发性发作、被动攻击 |
角色声音独特性:
对话功能:
基调一致性:
| 元素 | Killjoys | Cowboy Bebop |
|---|---|---|
| 真诚度 | 高 - 角色言出必行 | 低 - 讽刺距离掩盖脆弱性 |
| 幽默 | 戏谑、俏皮话、俏皮对抗 | 冷面、荒诞主义、忧郁喜剧 |
| 情感表达 | 直接 - "我爱你,混蛋" | 转移 - 通过行动而非言语展现 |
| 对话密度 | 高 - 持续的言语游戏 | 多变 - 沉重的沉默点缀着稀疏的台词 |
| 冲突风格 | 大声、直接、快速解决 | 回避、酝酿、通常未解决 |
两者都服务于"赏金猎人科幻"的结构功能,但由于基调选择,感觉完全不同。
| 轴 | 提取 |
|---|---|
| 形式 | 被谋杀父亲的超自然造访 |
| 结构 | 提供主角无法验证的特权信息;创造激励性义务 |
| 角色 | 迫使哈姆雷特面对不可能的义务;代表被腐败者取代的理想化父亲 |
| 情感 | 揭露的恐怖;义务的恐惧;可靠性的不确定性 |
| 主题 | 质疑证词的可靠性;探索对死者的义务;引入超自然/道德不确定性 |
| 关系 | 创造哈姆雷特-克劳狄斯动态(秘密知识);创造哈姆雷特-格特鲁德张力(她不知道) |
| 深度 | 范围 | 用例 |
|---|---|---|
| quick | 核心功能、主要类型、3-5 个关键角色 | 探索、比较多个作品、可行性检查 |
| standard | 完整的六轴提取、关系、情节结构 | 大多数改编项目 |
| detailed | 节拍级映射、剧集结构、基调变化、对话模式 | 严肃的长篇改编、学术分析 |
在提取工具中使用 --depth quick|standard|detailed。
模式: 提取结果读起来像是附加了"功能"标签的情节概要。问题: 混淆了事件与目的。"鬼魂出现并揭露谋杀"不是功能。修复: 对每个元素,强制提问"这个实现了什么?"而不是"这个做了什么?"检测: 如果你的提取可以由不理解作品的人写出来,那就太表面化了。
模式: 过度提取喜爱的元素,而对其他元素提取不足。问题: 创建不平衡的提取,强调分析师喜欢的内容,而不是作品需要的内容。修复: 强迫自己从你觉得无聊或讨厌的元素中提取功能。检测: 如果提取深度在不同元素之间差异巨大且没有正当理由,则存在偏见。
模式: 将所有元素标记为结构上必需,以避免艰难决定。问题: 创建无法使用的提取——如果一切都必不可少,就无法改编。修复: 强制建立层次结构。哪 5 个东西不能改变?接下来是哪 5 个?检测: 如果你的"可改编"列表比"必不可少"列表短,你可能错了。
模式: 将特定形式视为功能。"剑斗的功能是进行剑斗。"问题: 使改编变得不可能,因为你无法看透表面。修复: 问"如果我们移除这个,会发生什么?"答案揭示了功能。检测: 如果你的功能描述包含了元素的名称,你描述的是形式,而不是功能。
用于逐元素提取的交互式问卷。指导完成六轴分析。
# 开始提取会话
deno run --allow-read scripts/extract-functions.ts "Hamlet"
# 以特定深度提取
deno run --allow-read scripts/extract-functions.ts "Killjoys" --depth quick
# 提取特定元素
deno run --allow-read scripts/extract-functions.ts --element "The Ghost"
# 验证现有提取
deno run --allow-read scripts/extract-functions.ts --validate extraction.json
映射作品时间线上的情感高潮/低谷。
# 生成节拍映射模板
deno run --allow-read scripts/emotional-beat-map.ts "Hamlet" --acts 5
# 对于剧集式作品
deno run --allow-read scripts/emotional-beat-map.ts "Killjoys S1" --episodes 10
# 与类型期望比较
deno run --allow-read scripts/emotional-beat-map.ts --compare drama,thriller
用于将元素分类为结构性的(必须保留)与风格性的(可以改编)的检查表。
# 分类问卷
deno run --allow-read scripts/structural-stylistic.ts "royal court setting"
# 批量分类
deno run --allow-read scripts/structural-stylistic.ts --file elements.json
提取内容保存到链接的网络:
{project}/dna-library/
├── extractions/ # 作品特定提取
│ ├── hamlet.json
│ └── killjoys.json
├── clusters/ # 套路集群文档
│ └── bounty-hunter-scifi.json
└── syntheses/ # 生成的合成计划
└── my-project.json
{
"_meta": {
"type": "work-extraction",
"source_work": "Hamlet",
"source_author": "William Shakespeare",
"source_medium": "stage play",
"extraction_date": "2025-01-15",
"extraction_depth": "standard",
"clusters": ["revenge-tragedy", "political-drama"]
},
"emotional_core": {
"primary_genre": "drama",
"secondary_genres": ["thriller", "horror"],
"emotional_experience": "知道真相却无法行动的恐惧",
"emotional_beats": [
{"position": 0.05, "emotion": "unease", "element": "Guards report ghost"},
{"position": 0.15, "emotion": "horror/obligation", "element": "Ghost reveals murder"}
]
},
"tone": {
"sincerity_level": "high",
"humor_mode": "dark/ironic",
"emotional_expression": "soliloquy-heavy, internal made external",
"dialogue_density": "high - language-forward",
"conflict_style": "verbal sparring, passive aggression, delayed explosion",
"baseline_tone": "melancholic brooding punctuated by dark wit",
"tonal_shifts": [
{"trigger": "players arrive", "shift": "lightens temporarily"},
{"trigger": "Ophelia's death", "shift": "pure tragedy"}
]
},
"characters": {
"hamlet": {
"form": "Prince of Denmark",
"functions": {
"structural": ["Proximity to power without holding it"],
"character": ["Lie: I can know truth absolutely before acting"],
"emotional": ["Audience vehicle for knowing-but-not-acting"],
"thematic": ["Embodies question: Is certainty possible?"],
"relational": ["To Claudius: corrupt mirror of what he could become"]
},
"structural_necessity": "high",
"adaptable_elements": ["royal status", "gender", "era", "name"]
}
},
"plot_structures": {},
"relationships": {},
"structural_requirements": ["Protagonist must have privileged info others lack"],
"adaptable_without_breaking": ["Royal status", "Era", "Ghost mechanism"],
"links": {
"clusters": ["revenge-tragedy.json"],
"similar_works": [],
"derived_syntheses": []
}
}
{
"_meta": {
"type": "trope-cluster",
"cluster_name": "bounty-hunter-scifi",
"description": "科幻背景下的剧集式赏金/逮捕令结构"
},
"core_functions": {
"structural": ["Case-of-the-week provides episodic entry points"],
"character": ["Found family dynamics among crew"],
"emotional": ["Competence satisfaction"]
},
"required_elements": ["Mission structure", "Mobile base", "Team with complementary skills"],
"variance_axes": [
{"axis": "tone", "range": ["noir/melancholic", "action/humor"]}
],
"source_works": ["killjoys.json", "cowboy-bebop.json"],
"links": {
"parent_clusters": ["found-family.json"],
"overlapping_clusters": ["space-western.json"]
}
}
用户: "我想改编《哈姆雷特》,但背景设定在反乌托邦企业世界。"
你的方法:
在提取之前:
dna-library/dna-library/extractions/"context/output-config.md 中对于此技能,持久化:
dna-library/extractions/ 中的 JSON 文件dna-library/clusters/ 中的 JSON 文件| 存入文件 | 保留在对话中 |
|---|---|
| 已完成的提取 JSON | 迭代提取讨论 |
| 节拍映射数据 | 关于特定元素的问题 |
| 集群定义 | 状态诊断 |
| 验证结果 | "为什么这个元素重要?"的对话 |
| 来源技能 | 来源状态 | 导致状态 |
|---|---|---|
| story-sense | SS7: Ready for Evaluation | EX0: analyze existing work |
| genre-conventions | Genre identified | EX3: use for emotional core |
| 此状态 | 导致技能 | 目标状态 |
|---|---|---|
| EX3: Missing Emotional Core | genre-conventions | G1: identify genre |
| EX7: Extraction Complete | adaptation-synthesis | SYN1: DNA Ready |
| EX5: Missing Relationships | character-arc | analyze character dynamics |
| 技能 | 关系 |
|---|---|
| cliche-transcendence | Orthogonality principle for testing adaptations |
| genre-conventions | Elemental genres for emotional core |
| character-arc | Lie/Want/Need structure for character functions |
| story-sense | Diagnostic states for analyzing existing works |
每周安装数
88
仓库
GitHub 星标数
40
首次出现
Jan 20, 2026
安全审计
安装于
opencode76
codex76
gemini-cli74
cursor70
github-copilot69
claude-code64
You help extract the functional DNA from existing works. Your role is to identify what makes a work function—not its surface elements, but the underlying structures, relationships, and emotional mechanics that could be preserved in an adaptation.
The first ideas when adapting are surface elements. The functional DNA is what those elements DO, not what they ARE.
Hamlet's prince status is not the DNA—it's a form. The DNA is:
Symptoms: Work identified but no analysis started. User says "I want to adapt X" without having analyzed what makes X work. Key Questions:
Symptoms: Analysis focuses on what happens, not why it works. "It's about a prince who sees a ghost." Plot summaries without function identification. User conflates events with functions. Key Questions:
Symptoms: Functions extracted only for plot OR character OR theme. Missing interconnections. "The ghost provides inciting incident." (True, but incomplete—what about character function? Emotional function? Relational function?) Key Questions:
Symptoms: Functions extracted but no clarity on what emotional experience the work creates. Mechanical analysis without genre promise. Can describe plot functions but not audience feeling. Key Questions:
emotional-beat-map.ts. Primary/secondary genre identification.Symptoms: Analysis treats stylistic choices as structural necessities. Shakespeare's language treated as structural when it's stylistic. Period setting treated as essential when it's adaptable. Key Questions:
structural-stylistic.ts. Test each element against "would the story still work?" criterion.Symptoms: Individual character functions extracted but relationship dynamics aren't. "Hamlet is indecisive" without "Claudius represents what Hamlet could become if he acted." Characters analyzed in isolation. Key Questions:
Symptoms: Everything treated as equally important. No distinction between load-bearing elements and removable details. Every scene, character, subplot given equal weight. Key Questions:
Symptoms: Comprehensive extraction document exists. Functions identified at multiple levels. Emotional core clear. Structural/stylistic separated. Hierarchy established. Links to clusters documented. Key Questions:
For every story element, extract functions across all six axes:
| Axis | Question | What It Reveals |
|---|---|---|
| Form | What is it? | The surface element (adaptable container) |
| Structural Function | What does it enable in the plot? | Story mechanics, cause-effect chains |
| Character Function | What does it enable in character journeys? | Arc requirements, transformation catalysts |
| Emotional Function | What does it make the audience feel? | Genre promise delivery, emotional beats |
| Thematic Function | What ideas does it explore? | Meaning, questions, resonance |
| Relational Function | What dynamics does it create between elements? | Web of connections, contrasts, tensions |
Beyond structural functions, works have distinctive tonal signatures that define their feel. Extract these separately:
| Register | Description | Examples |
|---|---|---|
| Sincerity Level | Earnest vs. ironic/detached | Killjoys: high sincerity despite humor. Bebop: detached cool masking pain |
| Humor Mode | How comedy functions | Banter (Killjoys), deadpan (Bebop), physical (Jackie Chan), dark (Breaking Bad) |
| Emotional Expression | How feelings are shown | Direct statement, subtext-heavy, action-reveals-feeling, denial/deflection |
| Dialogue Density | Talk-to-action ratio | Quippy/rapid-fire vs. sparse/weighted silence |
| Conflict Style | How characters fight | Verbal sparring, cold silence, explosive outbursts, passive aggression |
Character Voice Distinctiveness:
Dialogue Functions:
Tonal Consistency:
| Element | Killjoys | Cowboy Bebop |
|---|---|---|
| Sincerity | High - characters mean what they say | Low - ironic distance masks vulnerability |
| Humor | Banter, quips, playful antagonism | Deadpan, absurdist, melancholy comedy |
| Emotional expression | Direct - "I love you, asshole" | Deflected - shown through action, not words |
| Dialogue density | High - constant verbal play | Varied - heavy silence punctuated by sparse lines |
| Conflict style | Loud, direct, resolved quickly | Avoidant, simmering, often unresolved |
Both serve "bounty hunter sci-fi" structural functions but feel completely different because of tonal choices.
| Axis | Extraction |
|---|---|
| Form | Supernatural visitation from murdered father |
| Structural | Provides privileged information protagonist cannot verify; creates inciting obligation |
| Character | Forces Hamlet to confront impossible duty; represents idealized father replaced by corrupt one |
| Emotional | Horror at revelation; dread of obligation; uncertainty about reliability |
| Thematic | Questions reliability of testimony; explores duty to the dead; introduces supernatural/moral uncertainty |
| Relational | Creates Hamlet-Claudius dynamic (secret knowledge); creates Hamlet-Gertrude tension (she doesn't know) |
| Depth | Scope | Use Case |
|---|---|---|
| quick | Core functions, primary genre, 3-5 key characters | Exploration, comparing multiple works, feasibility check |
| standard | Full six-axis extraction, relationships, plot structures | Most adaptation projects |
| detailed | Beat-level mapping, episode structures, tonal variations, dialogue patterns | Serious long-form adaptation, academic analysis |
Use --depth quick|standard|detailed with extraction tools.
Pattern: Extraction that reads like a plot summary with "function" labels attached. Problem: Confuses events with purposes. "The ghost appears and reveals the murder" is not a function. Fix: For every element, force the question "What does this ENABLE?" not "What does this DO?" Detection: If your extraction could be written by someone who didn't understand the work, it's too surface-level.
Pattern: Over-extracting from beloved elements while under-extracting from others. Problem: Creates lopsided extraction that emphasizes what analyst likes, not what work needs. Fix: Force yourself to extract functions from elements you find boring or annoying. Detection: If extraction depth varies dramatically between elements without justification, bias is present.
Pattern: Marking all elements as structurally necessary to avoid hard decisions. Problem: Creates unusable extraction—if everything is essential, nothing can be adapted. Fix: Force hierarchy. What are the 5 things that CANNOT change? Now what are the next 5? Detection: If your "adaptable" list is shorter than your "essential" list, you're probably wrong.
Pattern: Treating the specific form as the function. "The function of the sword fight is to have a sword fight." Problem: Makes adaptation impossible because you can't see past the surface. Fix: Ask "What would HAPPEN if we removed this?" The answer reveals the function. Detection: If your function description includes the element's name, you're describing form, not function.
Interactive questionnaire for element-by-element extraction. Guides through six-axis analysis.
# Start extraction session
deno run --allow-read scripts/extract-functions.ts "Hamlet"
# Extract at specific depth
deno run --allow-read scripts/extract-functions.ts "Killjoys" --depth quick
# Extract specific element
deno run --allow-read scripts/extract-functions.ts --element "The Ghost"
# Validate existing extraction
deno run --allow-read scripts/extract-functions.ts --validate extraction.json
Maps emotional peaks/valleys across a work's timeline.
# Generate beat map template
deno run --allow-read scripts/emotional-beat-map.ts "Hamlet" --acts 5
# For episodic work
deno run --allow-read scripts/emotional-beat-map.ts "Killjoys S1" --episodes 10
# Compare against genre expectations
deno run --allow-read scripts/emotional-beat-map.ts --compare drama,thriller
Checklist for classifying elements as structural (must keep) vs stylistic (can adapt).
# Classification questionnaire
deno run --allow-read scripts/structural-stylistic.ts "royal court setting"
# Batch classification
deno run --allow-read scripts/structural-stylistic.ts --file elements.json
Extractions are saved to a linked network:
{project}/dna-library/
├── extractions/ # Work-specific extractions
│ ├── hamlet.json
│ └── killjoys.json
├── clusters/ # Trope cluster documents
│ └── bounty-hunter-scifi.json
└── syntheses/ # Generated synthesis plans
└── my-project.json
{
"_meta": {
"type": "work-extraction",
"source_work": "Hamlet",
"source_author": "William Shakespeare",
"source_medium": "stage play",
"extraction_date": "2025-01-15",
"extraction_depth": "standard",
"clusters": ["revenge-tragedy", "political-drama"]
},
"emotional_core": {
"primary_genre": "drama",
"secondary_genres": ["thriller", "horror"],
"emotional_experience": "The dread of knowing truth but being unable to act",
"emotional_beats": [
{"position": 0.05, "emotion": "unease", "element": "Guards report ghost"},
{"position": 0.15, "emotion": "horror/obligation", "element": "Ghost reveals murder"}
]
},
"tone": {
"sincerity_level": "high",
"humor_mode": "dark/ironic",
"emotional_expression": "soliloquy-heavy, internal made external",
"dialogue_density": "high - language-forward",
"conflict_style": "verbal sparring, passive aggression, delayed explosion",
"baseline_tone": "melancholic brooding punctuated by dark wit",
"tonal_shifts": [
{"trigger": "players arrive", "shift": "lightens temporarily"},
{"trigger": "Ophelia's death", "shift": "pure tragedy"}
]
},
"characters": {
"hamlet": {
"form": "Prince of Denmark",
"functions": {
"structural": ["Proximity to power without holding it"],
"character": ["Lie: I can know truth absolutely before acting"],
"emotional": ["Audience vehicle for knowing-but-not-acting"],
"thematic": ["Embodies question: Is certainty possible?"],
"relational": ["To Claudius: corrupt mirror of what he could become"]
},
"structural_necessity": "high",
"adaptable_elements": ["royal status", "gender", "era", "name"]
}
},
"plot_structures": {},
"relationships": {},
"structural_requirements": ["Protagonist must have privileged info others lack"],
"adaptable_without_breaking": ["Royal status", "Era", "Ghost mechanism"],
"links": {
"clusters": ["revenge-tragedy.json"],
"similar_works": [],
"derived_syntheses": []
}
}
{
"_meta": {
"type": "trope-cluster",
"cluster_name": "bounty-hunter-scifi",
"description": "Episodic bounty/warrant structure in sci-fi setting"
},
"core_functions": {
"structural": ["Case-of-the-week provides episodic entry points"],
"character": ["Found family dynamics among crew"],
"emotional": ["Competence satisfaction"]
},
"required_elements": ["Mission structure", "Mobile base", "Team with complementary skills"],
"variance_axes": [
{"axis": "tone", "range": ["noir/melancholic", "action/humor"]}
],
"source_works": ["killjoys.json", "cowboy-bebop.json"],
"links": {
"parent_clusters": ["found-family.json"],
"overlapping_clusters": ["space-western.json"]
}
}
User: "I want to adapt Hamlet but set it in a corporate dystopia."
Your approach:
Before extracting:
dna-library/ in the projectdna-library/extractions/"context/output-config.md if context network existsFor this skill, persist:
dna-library/extractions/dna-library/clusters/| Goes to File | Stays in Conversation |
|---|---|
| Completed extraction JSON | Iterative extraction discussion |
| Beat map data | Questions about specific elements |
| Cluster definitions | State diagnosis |
| Validation results | "Why does this element matter?" dialogue |
| Source Skill | Source State | Leads to State |
|---|---|---|
| story-sense | SS7: Ready for Evaluation | EX0: analyze existing work |
| genre-conventions | Genre identified | EX3: use for emotional core |
| This State | Leads to Skill | Target State |
|---|---|---|
| EX3: Missing Emotional Core | genre-conventions | G1: identify genre |
| EX7: Extraction Complete | adaptation-synthesis | SYN1: DNA Ready |
| EX5: Missing Relationships | character-arc | analyze character dynamics |
| Skill | Relationship |
|---|---|
| cliche-transcendence | Orthogonality principle for testing adaptations |
| genre-conventions | Elemental genres for emotional core |
| character-arc | Lie/Want/Need structure for character functions |
| story-sense | Diagnostic states for analyzing existing works |
Weekly Installs
88
Repository
GitHub Stars
40
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode76
codex76
gemini-cli74
cursor70
github-copilot69
claude-code64
冲刺回顾模板:敏捷团队回顾会议指南与模板(开始-停止-继续/愤怒-悲伤-高兴/4Ls)
10,400 周安装
Claude 文件规划技能:使用 Markdown 文件作为持久工作记忆,提升 AI 协作效率
13,700 周安装
潜在客户吸引策略指南:高效捕获邮件、生成合格线索与引导产品采用
14,000 周安装
Obsidian Markdown 语法完全指南:维基链接、嵌入、标注框与属性详解
14,300 周安装
知识漫画创作器 - AI漫画生成工具,支持多种画风和基调组合
14,000 周安装
OpenClaw技能安全审计指南:skill-vetter工具详解与安装前安全检查
14,100 周安装
Google Sheets API 命令行工具 - gws-sheets 操作电子表格数据
14,300 周安装