--- name: text-trainer description: "Analyze someone's writing samples and generate a reusable voice profile. Use when asked to train a voice, create a writing profile, analyze someone's writing style, or build a voice profile for any person. Works with any writing type: tweets, emails, memos, Slack messages, LinkedIn posts, customer service replies, etc." metadata: version: "1.0.0" --- # Text Trainer Analyze real writing samples and produce a structured voice profile that any skill can use to match that person's voice. ## When to Use This Skill ALWAYS read this skill and its references when the user asks to: - "Train a voice profile for [name]" - "Analyze [name]'s writing style" - "Create a voice profile for [name]" - "Build a writing profile" - "Learn how [name] writes" - "Train on these writing samples" - "Here are some [tweets/emails/messages] from [name]" - "Make a voice profile from this" - "Update [name]'s voice profile" - "Retrain [name]'s profile with new samples" ## Before Starting ### Step 0: Load GTM Context If `.agents/gtm-context.md` exists, read it for context about the company and communication style. This helps inform voice analysis — understanding the business context improves profile quality. ### Step 1: Identify Who Determine whose voice you're training. If the user doesn't specify a name, ask: > "Whose voice am I training? I'll save the profile under their name." ### Step 2: Collect Writing Samples You need real writing samples. The more, the better — aim for 10+ samples across different contexts if possible. **How samples can be provided:** | Method | What to do | |--------|-----------| | **Pasted in chat** | User pastes text directly. Ask them to tag each sample with its type (tweet, email, memo, etc.) | | **Single file** | User points to a file containing samples. Read it. | | **Directory** | User points to a folder. Read all files in it. | | **Mixed** | Any combination of the above. | **If samples are untagged**, look at the content and infer the type (tweet = short, punchy; email = has greeting/sign-off; memo = longer form, etc.). Ask the user to confirm your guesses if unsure. **Minimum viable input:** 5 samples of any type. Fewer than 5 and the profile will be thin — warn the user but proceed anyway. **Ideal input:** 15-30 samples across 2-3 different writing types (e.g., 10 tweets + 5 emails + 5 Slack messages). More variety = richer profile. ### Step 3: Run the Analysis Read `references/analysis-framework.md` and execute all 8 passes against the collected samples. This is the engine. Do not skip passes or combine them — each pass catches different patterns. ### Step 4: Assemble the Profile Read `references/profile-template.md` for the output structure. Fill in every section using findings from the 8 passes. Only include "Tone by Context" subsections for writing types that had samples (don't guess at types you haven't seen). ### Step 5: Save the Profile Save the completed profile to: ``` .agents/voice-profiles/{name}.md ``` Where `{name}` is lowercase, no spaces (use hyphens for multi-word names). Examples: - `.agents/voice-profiles/john.md` - `.agents/voice-profiles/sarah-chen.md` - `.agents/voice-profiles/alex.md` ### Step 6: Confirm to the User After saving, tell the user: > "Voice profile for [Name] saved to `.agents/voice-profiles/{name}.md`. Any skill that uses voice profiles (like email-writer) will now automatically use this when writing as [Name]." If multiple profiles exist, mention: > "You now have profiles for: [list names]. When writing, I'll ask who's sending if it's not clear from context." ## Updating an Existing Profile When the user wants to update a profile with new samples: 1. Read the existing profile from `.agents/voice-profiles/{name}.md` 2. Collect the new samples 3. Run the full 8-pass analysis on the NEW samples 4. Merge findings: keep patterns that appear in both old and new, add new patterns, remove patterns contradicted by new evidence 5. Save the updated profile (overwrite the old one) 6. Tell the user what changed ## Reference Documents - **[analysis-framework.md](references/analysis-framework.md)** — The 8-pass extraction process. This is the engine that powers voice analysis. ALWAYS READ. - **[profile-template.md](references/profile-template.md)** — The output format. Every profile follows this structure. ALWAYS READ. ## Output Location All profiles are saved to `.agents/voice-profiles/`. This is a shared directory — any skill can read from it. The email-writer skill automatically loads profiles from here. ## Related Skills - **[gtm-context](../gtm-context/)** — Foundation context that helps inform voice analysis - **[email-writer](../email-writer/)** — Uses voice profiles generated by this skill for email writing