Extract the functional DNA from existing works (TV, film, books, plays). Use when adapting a source work, when analyzing what makes something work, when creating trope maps for reuse, or when you need to separate structural necessity from stylistic choice.
npx claudepluginhub joshuarweaver/cascade-content-creation-misc-1 --plugin jwynia-agent-skills-1This skill uses the workspace's default tool permissions.
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.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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 |