corpus-persona-extraction
Ingest a corpus of session logs (JSONL transcripts, chat exports) and extract a persona profile — vocabulary frequency, unique idioms and coinages, structural analogies — then synthesize an ideal_yearning and archetypal_pattern and append the result to a {persona_id}.lexicon.yaml. Triggers on "extract persona", "build a lexicon", "map the domain language", or any request to process conversation logs into a voice/vocabulary model.
What this skill does
# Corpus Persona-Extraction
Distill *how a specific voice thinks and speaks* from a pile of session logs, and persist it as a machine-usable lexicon that downstream agents can write against.
## Why this exists
Agents that work with a long-running human collaborator keep re-learning the same voice from scratch: the coinages, the load-bearing metaphors, the sentence shapes that mean "yes, proceed" versus "you've missed the point." A lexicon file makes that knowledge durable and composable — voice-enforcement gates can score against it, drafting skills can imitate it, and translation layers (persona storefronts) can project from it.
## Core doctrine
- **User coinages outrank standard vocabulary.** When the corpus shows an idiosyncratic term for a concept ("vacuum", "organ", "cartridge", "liturgy"), the lexicon records the coinage as primary and the standard term as gloss — never the reverse.
- **Append-only.** Each extraction run adds a dated block. Prior blocks are evidence of drift, not errors to clean up.
- **Separate speakers ruthlessly.** A transcript interleaves human, assistant, and tool text. Only the persona's own turns feed frequency analysis; assistant paraphrase contaminates the signal.
## Workflow
### 1. Assemble and filter the corpus
- Gather session files; record provenance (paths, date range, message counts) in the extraction header.
- Parse each format to (speaker, timestamp, text) tuples; keep only `speaker == persona_id` turns.
- Strip quoted/pasted material (code blocks, tool output, copied text) — the persona's *own* prose only.
- **Redact before analysis**: run the corpus through secret/PII patterns first; a lexicon must be shareable.
### 2. Vocabulary frequency
- Tokenize; compute frequency ranks for unigrams/bigrams/trigrams.
- Diff against a general-English baseline: the interesting set is terms whose corpus rank vastly exceeds baseline rank (keyness), not raw frequency.
- Bucket results: domain terms (shared with field), **coinages** (absent from baseline entirely), and inflections (standard words used in non-standard senses).
### 3. Idioms and structural analogies
- Idioms: recurring multiword expressions with stable meaning ("fix bases, not outputs", "the soul persists").
- Structural analogies: the source domains the persona habitually maps from — music, anatomy, liturgy, architecture. Record each as `analogy: {source_domain} → {target_domain}` with 2-3 verbatim examples.
- Register markers: profanity patterns, emphasis habits (caps, em-dashes), sentence-length distribution, imperative density.
### 4. Synthesize ideal_yearning and archetypal_pattern
These two fields are the lexicon's soul — short synthesized statements, each grounded in ≥3 verbatim quotes:
- **`ideal_yearning`** — what the persona is reaching toward across all sessions; the recurring wish underneath the tasks. Written as one sentence in the persona's own idiom.
- **`archetypal_pattern`** — the recurring role/shape the persona enacts (e.g. "the conductor who builds the orchestra rather than playing the instrument"). One sentence plus the evidence quotes.
These are *hypotheses*, marked with extraction date and confidence — later blocks may revise them.
### 5. Append to the lexicon
```yaml
# {persona_id}.lexicon.yaml — append block, never rewrite
- extraction:
date: 2026-06-07
corpus: {files: 128, persona_turns: 1432, date_range: [2026-04-17, 2026-06-07]}
redaction: {patterns_run: true, hits_scrubbed: 0}
vocabulary:
coinages:
- term: vacuum
gloss: "an absence that is unrepresented anywhere durable; never a resting state"
examples: ["N/A is a vacuum", "vacuum field burn"]
domain_terms: [...]
inflections: [...]
idioms:
- phrase: "fix bases, not outputs"
meaning: "modify the source/template/pipeline, never the rendered artifact"
analogies:
- source: liturgy/theology
target: configuration management
examples: ["Tier-0 Liturgy", "the Reliquary", "testament"]
register:
profanity: "affection-marker, not hostility"
emphasis: ["em-dash chains", "bold imperatives"]
ideal_yearning: "…" # one sentence, persona's idiom, ≥3 quote citations
archetypal_pattern: "…"
```
### 6. Report
Emit a short extraction report: new coinages since last block, terms that dropped out (candidate drift), and any revision to yearning/pattern with the evidence that forced it. Commit lexicon + report together.
## Anti-patterns
- **Extracting from assistant turns.** The most common contamination; the lexicon ends up describing the model, not the persona.
- **Overwriting prior blocks.** Drift between blocks is the most valuable longitudinal signal; preserve it.
- **Unredacted lexicons.** Verbatim example quotes can carry credentials/PII from the source sessions; redact at extraction time, not later.
- **Synthesizing yearning from one loud session.** Require cross-session recurrence (≥3 sessions) before a theme reaches the yearning/pattern fields.
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.