
looplia-writer
Writing domain plugin - Content analysis, idea generation, and writing workflows
- GitHub stars
- 21
Install
/plugin install looplia-writer@loopliaRun it inside Claude Code after adding the marketplace with /plugin marketplace add memorysaver/looplia-core.
Contents
Discovered from sourceSkills 7
Content Documenter Skill
Transforms media-reviewer analysis into structured JSON documentation.
What This Skill Does
Takes your media-reviewer analysis and produces ContentSummary JSON with all 16 required fields.
Input
You should have already used media-reviewer skill which provides:
- Deep understanding of content structure
- Core ideas and their connections
- Narrative flow analysis
- Key moments and quotes with timestamps
- Thematic patterns
Output Fields
Core Fields (7)
-
contentId (string)
- Copy from input file frontmatter id field
-
headline (string, 10-200 chars)
- One compelling sentence capturing the essence
- Should make someone want to read more
- Focus on the unique value or insight
-
tldr (string, 20-500 chars)
- 3-5 sentence summary
- Cover the main points concisely
- Answer: "What is this about and why does it matter?"
-
bullets (string[], 1-10 items)
- Key points as bullet list
- Each bullet = one distinct insight
- Ordered by importance or logical flow
-
tags (string[], 1-20 items)
- Topic tags for categorization
- Include broad tags (e.g., "AI") and specific (e.g., "Constitutional AI")
- Lowercase, no special characters
-
sentiment ("positive" | "neutral" | "negative")
- Overall tone of content
- Based on language and framing, not topic
-
category (string)
- Content type: article, video, podcast, tutorial, interview, etc.
-
score.relevanceToUser (number, 0-1)
- Based on user-profile.json topics
- 1.0 = perfectly matches user interests
- 0.0 = no relevance to user interests
- Calculate: sum(matched topic weights) / sum(all topic weights)
Documentary Fields (8)
-
overview (string, min 50 chars)
- 2-3 rich paragraphs introducing the material
- Write for someone unfamiliar with the content
- Cover: what it is, who it's for, why it matters
- Set the stage for detailed analysis
-
keyThemes (string[], 3-7 items)
- Main topics/themes identified
- Broader than tags, more conceptual
- Examples: "The tension between safety and capability"
-
detailedAnalysis (string, min 100 chars)
- Documentary-style breakdown
- Follow the content's structure
- Explain each major section/segment
- Include specific details and examples
-
narrativeFlow (string, min 50 chars)
- How the content progresses
- Explain the arc and transitions
- Show how ideas build on each other
- Note pacing and structure choices
-
coreIdeas (CoreIdea[], 1-10 items) Each item has:
- concept: string - the idea name
- explanation: string (min 10 chars) - what it means in this context
- examples?: string[] - specific examples from content
-
importantQuotes (Quote[], 0-20 items) Each item has:
- text: string - EXACT verbatim quote (never paraphrase!)
- timestamp?: string - HH:MM:SS or MM:SS format (for video/audio)
- context?: string - what was being discussed when this was said
-
context (string, min 20 chars)
- Background needed to understand the content
- Prerequisites or prior knowledge assumed
- Historical or situational context
- Related work or references mentioned
-
relatedConcepts (string[], 0-15 items)
- Related topics mentioned or implied
- Connections to other ideas or fields
- What someone might want to learn next
Timestamp Format
For video/audio content:
0:30- 30 seconds2:45- 2 minutes 45 seconds1:30:00- 1 hour 30 minutes- Always use the format from the source (don't normalize)
JSON Output Example
{
"contentId": "abc123",
"headline": "Constitutional AI introduces a novel approach to aligning language models through self-critique",
"tldr": "This video explains Constitutional AI, Anthropic's method for training helpful and harmless AI assistants. The approach uses a set of principles (a 'constitution') to guide the model's self-improvement, reducing the need for human feedback while maintaining safety.",
"bullets": [
"Constitutional AI uses self-critique guided by explicit principles",
"The method reduces reliance on human feedback for safety training",
"Models learn to identify and correct their own harmful outputs"
],
"tags": ["ai", "safety", "alignment", "constitutional-ai", "anthropic", "rlhf"],
"sentiment": "positive",
"category": "video",
"score": { "relevanceToUser": 0.85 },
"overview": "This comprehensive video from Anthropic introduces Constitutional AI...",
"keyThemes": [
"AI Safety and Alignment",
"Self-supervised learning for safety",
"Reducing human feedback requirements",
"Explicit principles for AI behavior"
],
"detailedAnalysis": "The video opens with a clear problem statement...",
"narrativeFlow": "The presentation follows a classic problem-solution structure...",
"coreIdeas": [
{
"concept": "Constitutional AI",
"explanation": "An alignment approach where AI models critique and revise their own outputs based on explicit principles",
"examples": ["A model generating a harmful response, then self-critiquing"]
}
],
"importantQuotes": [
{
"text": "The key insight is that we can use AI to supervise AI",
"timestamp": "12:34",
"context": "Explaining the core mechanism that makes Constitutional AI scalable"
}
],
"context": "This video builds on prior work in RLHF...",
"relatedConcepts": ["RLHF", "red teaming", "scalable oversight", "AI alignment"]
}
Quality Checklist
Before outputting, verify:
- All 16 fields are present
- All minimum lengths are met
- Quotes are exact (verbatim)
- Timestamps are included for video/audio
- contentId matches input file
- relevanceToUser is calculated from user profile
- JSON is valid
Important Rules
- Include ALL 16 fields - never omit any
- Use exact verbatim quotes - never paraphrase
- Include timestamps when source has them
- Meet all minimum character requirements
- Follow the JSON schema exactly
- Base relevanceToUser on actual user profile
- Never paraphrase quotes
- Never add interpretation beyond source
- Never omit required fields
- Never guess timestamps - only include if known
ID Generator Skill
Expert at generating meaningful session IDs based on content source type and characteristics.
What This Skill Does
- Reads ContentSummary JSON with detectedSource field
- Analyzes source type and main topic/theme
- Generates human-readable, meaningful session ID
- Returns ID with confidence score and rationale
- Enables reusable content identification
ID Generation Process
Follow these 5 steps:
Step 1: Validate Input
- Confirm ContentSummary has required fields
- Check if detectedSource field exists
- Note the content's main topic/headline/category
Step 2: Analyze Source Type
- Review detectedSource value (podcast, transcript, article, youtube, twitter, text, other)
- Consider content characteristics:
- Podcast: Audio transcript with timestamps, speaker markers, conversational flow
- Transcript: Conversational content, dialogue, timestamps, multiple speakers
- Article: Written structure, sections, headlines, formal tone
- YouTube: Video description, channel info, timestamps
- Twitter: Social media context, short-form, engagement metrics
- Text: Unstructured thoughts, raw content, raw notes
- Other: Any other content type
Step 3: Extract Topic Keywords
- Identify main topic from headline, category, or keyThemes
- Select 1-2 most significant keywords
- Avoid generic terms, prefer specific subject matter
- Examples: "healthcare", "ai", "python", "productivity"
Step 4: Generate Base ID
- Format:
{source-type}-{date}-{topic} - Source prefix from detectedSource (lowercase)
- Date in YYYY-MM-DD format
- Topic as 1-2 words (hyphen-separated, lowercase)
- Example:
podcast-2024-12-08-ai-healthcare
Step 5: Quality Check & Return
- Ensure ID is lowercase, hyphen-separated
- Validate length (20-50 characters preferred)
- Return JSON with:
contentId: Generated IDdetectedSource: Confirmed source typesourceConfidence: 0.0-1.0 confidence in source detectionrationale: Brief explanation of why this source type
ID Generation Rules
Source-Based Naming
- Podcast:
podcast-{date}-{topic} - Transcript:
transcript-{date}-{topic} - Article:
article-{date}-{topic} - YouTube:
youtube-{date}-{topic} - Twitter:
tweet-{date}-{topic} - Text:
text-{date}-{topic} - Other:
content-{date}-{topic}
Topic Selection
- Extract from headline (first 2-3 words)
- If headline too generic, use category or first keyTheme
- Avoid articles (a, the, and, or)
- Use only letters, numbers, hyphens
- Maximum 3 words
Date Handling
- Use current date in YYYY-MM-DD format
- Or extract from context field if content has original date
- Format consistently
Examples
Input: Podcast about AI in Healthcare (2024-12-08)
Output: podcast-2024-12-08-ai-healthcare
Input: Whisper transcript of React conference talk (2024-12-07)
Output: transcript-2024-12-07-react-conference
Input: Article on productivity hacks (2024-12-06)
Output: article-2024-12-06-productivity-hacks
Input: YouTube tutorial on Python (2024-12-05)
Output: youtube-2024-12-05-python-tutorial
Output Format
Return structured JSON:
{
"contentId": "podcast-2024-12-08-ai-healthcare",
"detectedSource": "podcast",
"sourceConfidence": 0.95,
"rationale": "Audio transcript with speaker markers, timestamps, and conversational flow indicates podcast source."
}
Important Rules
- Always return valid JSON
- Confidence score reflects certainty in source detection (0.5-1.0 typical range)
- Rationale should be brief (1-2 sentences)
- ID must be unique and reusable
- Never include spaces or special characters (except hyphens)
- Generate ID even if source confidence is moderate (>0.5)
- Prefer readable IDs over random strings
- Keep ID length under 60 characters when possible
Idea Synthesis Skill
Generate creative content ideas from analyzed content, personalized for the user.
Purpose
Transform content analysis into actionable writing ideas:
- Attention-grabbing hooks
- Unique angles/perspectives
- Thought-provoking questions
Process
Step 1: Read User Profile
Use the user-profile-reader skill to get user context:
- Topics of interest and expertise levels
- Preferred writing style
- Target audience
Skill("user-profile-reader")
Step 2: Read Content Analysis
Read the input file containing content analysis from media-reviewer:
- Key themes
- Important quotes
- Narrative structure
- Core ideas
Step 3: Generate Hooks
Create 3-5 attention-grabbing openers:
| Hook Type | Description | Example |
|---|---|---|
| Question | Opens with a compelling question | "What if everything you knew about X was wrong?" |
| Statistic | Leads with surprising data | "90% of writers miss this critical step..." |
| Story | Starts with a brief narrative | "When I first discovered X, I was skeptical..." |
| Contrast | Highlights a surprising contradiction | "Most experts say X, but the data shows Y..." |
| Bold Statement | Makes a provocative claim | "X is dead. Here's what's replacing it..." |
Step 4: Generate Angles
Create 3-5 unique perspectives on the content:
For each angle:
- Perspective: What viewpoint does this take?
- Approach: How would you develop this angle?
- Target: Who would this appeal to?
Step 5: Generate Questions
Create 5-7 discussion starters:
| Depth | Description |
|---|---|
| Surface | Basic comprehension questions |
| Medium | Application and analysis questions |
| Deep | Synthesis and evaluation questions |
Step 6: Personalize
Apply user profile:
- Emphasize topics matching user interests
- Adjust complexity to user's expertise level
- Align with user's writing style
Step 7: Write Output
Output JSON with all generated ideas.
Input
Content analysis JSON from media-reviewer containing:
contentIdkeyThemesimportantQuotescoreIdeas
Output Schema
{
"contentId": "string",
"hooks": [
{
"text": "What if the key to X isn't Y, but Z?",
"type": "question"
},
{
"text": "According to new research, 80% of...",
"type": "statistic"
}
],
"angles": [
{
"perspective": "Skeptic's view",
"approach": "Challenge the main premise with counterexamples",
"target": "Readers who question conventional wisdom"
},
{
"perspective": "Beginner's guide",
"approach": "Break down complex concepts for newcomers",
"target": "People new to this topic"
}
],
"questions": [
{
"text": "What would happen if we applied this to everyday life?",
"depth": "medium"
},
{
"text": "How does this change our understanding of X?",
"depth": "deep"
}
],
"personalization": {
"matchedTopics": ["ai", "productivity"],
"adjustedFor": "intermediate expertise"
}
}
Quality Guidelines
Good Hooks
- Specific, not generic
- Create curiosity
- Promise value
- Match content tone
Good Angles
- Unique perspective
- Actionable approach
- Clear target audience
- Connected to content themes
Good Questions
- Open-ended (not yes/no)
- Thought-provoking
- Multiple valid answers
- Encourage discussion
Important Rules
- Always read user profile first - Personalization is key
- Include all hook types - Variety in approaches
- Cover all depth levels - Questions for different readers
- Stay true to content - Ideas must derive from source
- Be specific - Avoid generic, cookie-cutter ideas
Media Reviewer Skill
Expert at analyzing media content to understand structure, ideas, and narrative flow.
What This Skill Does
- Reads content materials (text, captions, transcripts)
- Understands ideas and concepts being presented
- Identifies narrative structure and progression
- Discovers key moments, turning points, and themes
- Recognizes content organization patterns
Analysis Process
Follow these 9 steps in order:
Step 1: Read Everything
- Read the complete content file
- Note the metadata (title, source, date, type)
- Don't skim - read thoroughly
- If content is truncated, note what's missing
Step 2: Understand Context
- What is this content about?
- Who created it and why?
- What's the intended audience?
- What's the publication context?
- When was it created?
Step 3: Identify Structure
- How is the content organized?
- What are the main sections/segments?
- How long is each part?
- What's the logical flow?
- Are there chapters, timestamps, or markers?
Step 4: Extract Core Ideas
- What are the 3-7 main concepts?
- How are they explained?
- What examples are given?
- How do ideas connect to each other?
- What's the central thesis?
Step 5: Track Narrative Flow
- How does content progress?
- What's the arc (intro → development → conclusion)?
- Where are the key transitions?
- How do ideas build on each other?
- What's the pacing?
Step 6: Find Key Moments
- What are the most important points?
- Where are the "aha" moments?
- What would someone quote from this?
- What's most memorable?
- What's surprising or novel?
Step 7: Extract Quotes + Timestamps
- Find 5-20 verbatim quotes
- For video/audio: note exact timestamps (HH:MM:SS or MM:SS)
- Capture the most insightful statements
- Include context for each quote
- Never paraphrase - exact words only
Step 8: Identify Themes
- What recurring topics emerge?
- What patterns appear throughout?
- What's the underlying message?
- What values or perspectives are expressed?
Step 9: Documentary Angle
- If making a documentary about this, how would you structure it?
- What's the narrative hook that draws people in?
- What makes this content unique?
- What's the emotional arc?
Output
Your analysis is IMPLICIT - it stays in your thinking. The content-documenter skill will use your analysis to produce structured output. Do NOT output JSON directly from this skill.
Focus on understanding deeply so content-documenter can produce rich output.
Important Rules
- Be thorough and comprehensive
- Understand the material deeply
- Preserve nuance and detail
- Note what makes this content unique
- Always include timestamps for video/audio
- Read the ENTIRE content before analyzing
- Don't add interpretation or opinion
- Don't skip important details
- Don't oversimplify complex concepts
- Don't paraphrase quotes - keep verbatim
- Don't rush - thoroughness over speed
User Profile Reader Skill
Read and interpret user preferences for content personalization.
What This Skill Does
- Reads
user-profile.jsonfrom workspace root - Provides user context to other processing
- Calculates relevance scores for content
User Profile Location
~/.looplia/user-profile.json
User Profile Schema
{
"userId": "string",
"topics": [
{ "topic": "string", "interestLevel": 1-5 }
],
"style": {
"tone": "beginner" | "intermediate" | "expert" | "mixed",
"targetWordCount": 100-10000,
"voice": "first-person" | "third-person" | "instructional"
}
}
Relevance Scoring Algorithm
Calculate score.relevanceToUser (0-1):
1. For each user topic:
- weight = interestLevel / 5
- matched = content tags/themes contain topic (case-insensitive)
2. Calculate score:
- matchedWeight = sum of weights for matched topics
- totalWeight = sum of all topic weights
- score = matchedWeight / totalWeight
3. If no user topics defined:
- score = 0.5 (neutral)
Example Calculation
User profile:
{
"topics": [
{ "topic": "AI", "interestLevel": 5 },
{ "topic": "productivity", "interestLevel": 3 },
{ "topic": "cooking", "interestLevel": 2 }
]
}
Content tags: ["AI", "safety", "alignment"]
Calculation:
- AI: matched, weight = 5/5 = 1.0 (contributes to matchedWeight)
- productivity: not matched, weight = 3/5 = 0.6 (contributes to totalWeight only)
- cooking: not matched, weight = 2/5 = 0.4 (contributes to totalWeight only)
- matchedWeight = 1.0
- totalWeight = 1.0 + 0.6 + 0.4 = 2.0
- score = 1.0 / 2.0 = 0.5
Usage in Other Skills
When content-documenter needs relevance score:
- Read user-profile.json
- Compare content tags/themes to user topics
- Apply algorithm above
- Return score in
score.relevanceToUserfield
Handling Edge Cases
- No user profile file: Use score = 0.5
- Empty topics array: Use score = 0.5
- Invalid JSON: Use score = 0.5, log warning
- All topics matched: score = 1.0
- No topics matched: score = 0.0
Writing Enhancer Skill
Transform writing to match user's style preferences.
What This Skill Does
- Reads WritingKit + UserProfile
- Rephrases content in user's preferred tone/voice
- Generates complete article draft (future feature)
Input
- WritingKit JSON
- UserProfile JSON
Output
Enhanced content matching:
- tone: beginner, intermediate, expert, mixed
- voice: first-person, third-person, instructional
- targetWordCount: Desired article length
Important Rules
✅ Preserve original meaning and facts ✅ Match user's preferred style ✅ Maintain accuracy of quotes and data ❌ Don't add information not in source ❌ Don't change factual claims
Writing Kit Assembler Skill
Assemble comprehensive writing kits from analysis and ideas.
Purpose
Combine outputs from earlier workflow steps into a final, actionable writing kit:
- Content summary and metadata
- Generated ideas (hooks, angles, questions)
- Suggested outline with sections
- Supporting quotes and references
Process
Step 1: Read Analysis
Read content analysis JSON (first input):
- contentId
- source metadata
- summary (headline, tldr, bullets)
- keyThemes
- importantQuotes
- coreIdeas
Step 2: Read Ideas
Read idea synthesis JSON (second input):
- hooks
- angles
- questions
- personalization context
Step 3: Create Suggested Outline
Design a structured outline:
Introduction
├── Hook (from ideas)
├── Context/Background
└── Thesis/Main Point
Body Sections (3-5)
├── Section 1: {Theme from analysis}
│ ├── Key point
│ ├── Supporting quote
│ └── Transition
├── Section 2: {Theme from analysis}
│ └── ...
└── Section N: {Theme from analysis}
Conclusion
├── Summary of key points
├── Call to action (from angles)
└── Closing thought
Step 4: Map Content to Sections
For each body section:
- Choose a key theme from analysis
- Identify supporting quotes
- Connect to relevant ideas/angles
- Write section summary
Step 5: Assemble WritingKit
Combine all components into final structure.
Step 6: Write Output
Output complete WritingKit JSON.
Input
Two input files:
- Analysis JSON from media-reviewer
- Ideas JSON from idea-synthesis
Output Schema
{
"contentId": "string",
"source": {
"type": "video|audio|article|transcript",
"title": "Original content title",
"url": "Source URL if available",
"creator": "Author/creator name"
},
"summary": {
"headline": "One compelling sentence",
"tldr": "3-5 sentence summary",
"bullets": ["Key point 1", "Key point 2", "Key point 3"],
"keyThemes": ["theme1", "theme2"],
"importantQuotes": [
{
"text": "Exact quote from source",
"timestamp": "12:34",
"context": "What was being discussed"
}
]
},
"ideas": {
"hooks": [
{ "text": "Hook text", "type": "question" }
],
"angles": [
{ "perspective": "...", "approach": "..." }
],
"questions": [
{ "text": "...", "depth": "medium" }
]
},
"suggestedOutline": {
"title": "Suggested article title",
"sections": [
{
"heading": "Introduction",
"type": "intro",
"points": ["Hook with question", "Establish context", "Preview main argument"],
"suggestedHook": "What if...?"
},
{
"heading": "Section title based on theme",
"type": "body",
"points": ["Main point", "Evidence/quote", "Analysis"],
"supportingQuote": {
"text": "Quote from source",
"timestamp": "5:23"
},
"theme": "Related theme from analysis"
},
{
"heading": "Conclusion",
"type": "conclusion",
"points": ["Summarize key insights", "Call to action", "Final thought"],
"suggestedAngle": "Skeptic's view"
}
]
},
"meta": {
"generatedAt": "2025-01-15T10:30:00Z",
"workflowVersion": "2.0.0",
"stepsCompleted": ["analyze-content", "generate-ideas", "build-writing-kit"]
}
}
Outline Design Guidelines
Introduction Section
- Start with a hook from ideas
- Establish why this matters
- Preview the structure
Body Sections (3-5)
- One theme per section
- Include supporting quote when available
- Build logical progression
- Connect to angles where relevant
Conclusion Section
- Summarize (don't repeat)
- Include call to action
- End with memorable thought
Section Mapping
| Analysis Component | Outline Usage |
|---|---|
| keyThemes | Body section headings |
| importantQuotes | Section supporting quotes |
| coreIdeas | Section key points |
| hooks | Introduction opener |
| angles | Body perspectives, conclusion CTA |
| questions | Section discussion points |
Quality Checklist
Before outputting:
- All required fields present
- contentId matches across inputs
- At least 3 body sections
- Each body section has heading and points
- Quotes are properly attributed
- Meta includes timestamp
- JSON is valid
Important Rules
- Include all components - Don't omit summary, ideas, or outline
- Preserve quotes exactly - Never paraphrase
- Keep timestamps - If input has them, output has them
- Match contentId - Same ID across all components
- Design actionable outlines - Writer should be able to start immediately
- Use sonnet model - This requires synthesis and organization
Sponsors
Details
- Marketplace
- memorysaver/looplia-core
- Source
- plugins/looplia-writer
- Category
- Productivity