A Python tool that analyzes your social media posts to extract writing style characteristics and generates Claude.ai-compatible prompts for style adoption.
- Comprehensive Style Analysis: Analyzes vocabulary, sentence structure, tone, punctuation patterns, and more
- Multiple Input Formats: Supports both plain text files and JSON format
- Facebook Integration: Automatic processor for Facebook data archives
- Claude.ai Integration: Generates ready-to-use prompts for Claude.ai
- Detailed Metrics: Provides readability scores, vocabulary richness, and writing quirks
- Export Capabilities: Saves analysis results in JSON format for future use
- Install Python dependencies:
pip install -r requirements.txt
# If you get an "externally-managed-environment" error:
pip install -r requirements.txt --break-system-packages
# Alternative: Use virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- The script will automatically download required NLTK data on first run.
-
Download your Facebook data:
- Go to Facebook Settings β Privacy β Download Your Information
- Select "Posts" and choose JSON format
- Download and extract the ZIP file
-
Process your Facebook archive:
python3 facebook_processor.py /path/to/facebook-data/
- Analyze your posts:
python3 simple_analyzer.py facebook_posts.txt --prompt
python3 style_analyzer.py your_posts.txt
python3 style_analyzer.py your_posts.txt --output my_style.json --prompt
python3 simple_analyzer.py your_posts.txt --prompt
-
Download Your Facebook Data:
# Go to Facebook Settings β Privacy β Download Your Information # Select "Posts" and choose JSON format # Download and extract the ZIP file
-
Process Your Facebook Archive:
python3 facebook_processor.py /path/to/facebook-data/
-
Analyze Your Posts:
python3 simple_analyzer.py facebook_posts.txt --prompt
# Basic processing
python3 facebook_processor.py /path/to/facebook-data/
# With custom options
python3 facebook_processor.py /path/to/facebook-data/ \
--output my_facebook_posts.txt \
--min-length 20 \
--include-comments \
--stats
Options:
--output
: Output filename (default: facebook_posts.txt)--format
: txt or json (default: txt)--min-length
: Minimum post length (default: 10)--max-length
: Maximum post length (default: 1000)--include-comments
: Include your comments on posts--stats
: Show processing statistics
python3 facebook_demo.py
This demo uses example Facebook posts to show you how the analysis works before you process your own data.
Create a text file with one post per line:
Just had the most amazing coffee! β Really makes my morning better.
Working on some exciting projects today. Can't wait to share more details!
Does anyone else think Mondays are actually underrated? π€
{
"posts": [
"Just had the most amazing coffee! β Really makes my morning better.",
"Working on some exciting projects today. Can't wait to share more details!",
"Does anyone else think Mondays are actually underrated? π€"
]
}
Or as a simple array:
[
"Just had the most amazing coffee! β Really makes my morning better.",
"Working on some exciting projects today. Can't wait to share more details!",
"Does anyone else think Mondays are actually underrated? π€"
]
- Average sentence length
- Average word length
- Readability score (Flesch Reading Ease)
- Grade level (Flesch-Kincaid)
- Vocabulary richness
- Most frequently used words
- Common phrases and expressions
- Sentence starters
- Punctuation usage patterns
- Capitalization preferences
- Exclamation point frequency
- Question frequency
- Emoji usage patterns
- Formality level assessment
- Common topics and themes
- Hashtag patterns
- Mention patterns (@username)
- Writing quirks and unique characteristics
The tool generates two main outputs:
- JSON Profile: A detailed analysis saved to a JSON file containing all extracted characteristics
- Claude.ai Prompt: A formatted prompt that you can copy and paste to Claude.ai
Please adopt the following writing style based on my social media posts analysis:
## Writing Characteristics:
- **Formality Level**: Informal
- **Average Sentence Length**: 12.3 words
- **Reading Level**: Grade 8.2
## Tone:
- Enthusiastic, Inquisitive
## Vocabulary Preferences:
- Frequently used words: really, amazing, excited, love, think
## Common Phrases:
- "can't wait", "really excited", "love this"
## Sentence Patterns:
- Often starts sentences with: just, really, love, think, can't
## Writing Quirks:
- uses ellipses for emphasis
- frequently uses 'really' for emphasis
## Punctuation Style:
- uses exclamation points frequently for emphasis
- asks questions to engage readers
## Instructions:
- Match this writing style in your responses
- Use similar vocabulary and sentence structures
- Maintain the same level of formality
- Incorporate the identified tone and quirks naturally
- Keep responses engaging and authentic to this style
- Quantity Matters: Include at least 20-50 posts for accurate analysis
- Consistency: Use posts from a similar time period to capture your current style
- Variety: Include different types of posts (questions, statements, reactions)
- Clean Data: Remove or replace sensitive information before analysis
- Platform Consistency: Use posts from the same platform for consistent style analysis
input_file
: Path to your posts file (required)--output
,-o
: Output file for the JSON profile (default: writing_style_profile.json)--prompt
,-p
: Display the generated Claude.ai prompt
- Collect Your Posts: Export or copy your social media posts into a text file
- Run Analysis:
python style_analyzer.py my_posts.txt --prompt
- Review Results: Check the generated profile and prompt
- Use with Claude: Copy the prompt and paste it into Claude.ai
- Refine: Add more posts or adjust the analysis as needed
This tool runs entirely locally on your machine. Your posts and analysis results are not sent to any external services unless you choose to use the generated prompt with Claude.ai.