Install
npx skillscat add greentechgear/blogclaw Install via the SkillsCat registry.
BlogClaw
A self-improving blog system that learns from your WordPress edits.
Description
BlogClaw watches you edit blog posts in WordPress and automatically learns your writing voice. After analyzing your revision patterns, it updates style guides that help your AI agent write better first drafts.
Real results: 23 revisions → 8 revisions in one week
How It Works
- Fetch Revisions - WordPress REST API provides full revision history
- Normalize & Strip - Strips HTML, normalizes placeholders (
${VAR},{{var}},%VAR%) so they don't pollute diffs - Content Diff Analysis - Paragraph-level diff via SequenceMatcher extracts what was added/removed, not just word counts
- Classify Content Blocks - Each added block classified as: business context, example/case study, technical detail, edge case, personal anecdote, or general expansion
- Categorize Patterns - Content Expansion (100+ words), Structure Refinement (headers, reordering), Iterative Polish (<50 words)
- Semantic Pattern Detection - Explains why patterns matter with confidence scores and suggested actions
- Detect Patterns - When 3+ posts show same pattern, log to PATTERN_ANALYSIS.md
- Update Style Guide - When 5+ posts show same pattern, codify as rule
Usage
Analyze Specific Post
python3 analyze_revisions.py --site yourdomain.com --post-id 1926
python3 analyze_revisions.py --site yourdomain.com --post-title "Your Post Title"Analyze From Config File
python3 analyze_revisions.py --config posts.json --jsonAutomated Heartbeats
Schedule with NanoClaw's task scheduler:
# Daily (11 PM) - Analyze today's posts
schedule_task(
prompt="Run BlogClaw revision analysis for posts published today on yourdomain.com",
schedule_type="cron",
schedule_value="0 23 * * *",
context_mode="group"
)
# Weekly (Sun 9 AM) - Detect patterns (3+ threshold)
schedule_task(
prompt="Run BlogClaw weekly pattern analysis to identify recurring editing patterns",
schedule_type="cron",
schedule_value="0 9 * * 0",
context_mode="group"
)
# Monthly (1st 8 AM) - Update style guides (5+ threshold)
schedule_task(
prompt="Run BlogClaw monthly evolution check to update style guides with codified patterns",
schedule_type="cron",
schedule_value="0 8 1 * *",
context_mode="group"
)Configuration
Create .env in the blogclaw directory:
WORDPRESS_URL=https://yourdomain.com
WORDPRESS_USERNAME=admin
WORDPRESS_PASSWORD=xxxx_xxxx_xxxx_xxxxTriggers
Use this skill when:
- "analyze my blog revisions"
- "what patterns am I editing?"
- "what kind of content am I adding?"
- "run BlogClaw on [post]"
- "check WordPress revisions for [site]"
- "why does the AI keep missing [X] in drafts?"
- "update my writing style guide"
- Any request about learning from WordPress edits
Dependencies
- requests (HTTP client for WordPress REST API)
Installed automatically by install.sh
Traffic Analysis (Clicky Analytics)
BlogClaw also integrates with Clicky to analyze referral traffic
patterns and generate engagement recommendations.
Analyze Traffic
python3 analyze_traffic.py --site yourblog.com
python3 analyze_traffic.py --site anotherblog.com --days 7
python3 analyze_traffic.py --all --jsonWhat It Does
- Fetches referral traffic — Categorizes sources (social, search, community, direct referrals)
- Identifies trending articles — Detects content gaining momentum with growth percentages
- Analyzes search terms — Shows which keywords drive organic traffic
- Generates engagement recommendations — Specific actions: where to comment, what to promote, which communities to engage in
- Cross-site patterns — Identifies shared referral sources across multiple sites
Traffic Heartbeat
# Weekly (Sun 10 AM) - Full referral analysis
schedule_task(
prompt="Run BlogClaw traffic analysis for all sites",
schedule_type="cron",
schedule_value="0 10 * * 0",
context_mode="group"
)
# Daily (10 PM) - Quick spike detection
schedule_task(
prompt="Run BlogClaw daily traffic check for spikes",
schedule_type="cron",
schedule_value="0 22 * * *",
context_mode="group"
)Traffic Configuration
- Copy
sites.example.jsontosites.jsonand configure your sites:
{
"sites": [
{
"domain": "yourblog.com",
"name": "Your Blog",
"wordpress_url": "https://yourblog.com",
"clicky_site_id_env": "CLICKY_SITE_ID_YOURBLOG",
"clicky_sitekey_env": "CLICKY_SITEKEY_YOURBLOG"
}
]
}- Add corresponding credentials to
.env:
CLICKY_SITE_ID_YOURBLOG=your_site_id
CLICKY_SITEKEY_YOURBLOG=your_sitekeyTraffic Triggers
Use this skill when:
- "analyze my traffic"
- "where is my referral traffic coming from?"
- "what articles are trending?"
- "where should I engage/comment?"
- "run traffic analysis for [site]"
- "what search terms are driving traffic?"
- "compare traffic between my sites"
- Any request about Clicky analytics or traffic patterns
Unpublished Draft Analysis
BlogClaw can analyze drafts you haven't published to identify patterns in what you choose NOT to ship.
Analyze Unpublished Drafts
python3 scripts/analyze_unpublished.py --age-threshold 7
python3 scripts/analyze_unpublished.py --drafts-dir /path/to/drafts --learning-dir /path/to/learningWhat It Detects
- Content issues - Lacking data, personal voice, specific examples
- Style violations - Em-dashes, hedging language, weak structure
- Length problems - Too short (<800 words), too long (>4000 words)
- Structural weaknesses - Insufficient sections, poor hierarchy
- Pattern recognition - Common characteristics across unpublished drafts
Unpublished Draft Heartbeat
# Bi-weekly (1st and 15th at 9 AM) - Analyze drafts not published after 7 days
schedule_task(
prompt="Run BlogClaw unpublished draft analysis to identify patterns in drafts Brian chose not to publish",
schedule_type="cron",
schedule_value="0 9 1,15 * *",
context_mode="group"
)Unpublished Analysis Triggers
Use this analysis when:
- "why didn't I publish that draft?"
- "analyze my unpublished drafts"
- "what patterns are in drafts I rejected?"
- "learn from drafts I didn't ship"
- Any request about understanding draft rejection patterns
Learning Files
BlogClaw generates these learning files in the learning/ directory:
- DAILY_ACTIVITY_LOG.md - Every post published, revisions, patterns
- PATTERN_ANALYSIS.md - Recurring patterns (3+ occurrences)
- STYLE_GUIDE.md - Codified rules (5+ occurrences)
- SKILL_IMPROVEMENTS.md - Script enhancements and fixes
- CONTENT_LEARNINGS.md - Site-specific voice patterns
- TRAFFIC_ANALYSIS.md - Referral traffic patterns and engagement recommendations
- UNPUBLISHED_DRAFTS_ANALYSIS.md - Patterns in drafts not published after 7+ days
Version
0.6.0 - Unpublished draft analysis, learning from rejection patterns
0.5.0 - Clicky analytics integration, referral traffic analysis, engagement recommendations
0.3.0 - Content diff analyzer, placeholder detection, semantic pattern matching
0.2.0 - Added NanoClaw plugin structure with install.sh and SKILL.md
More Info
Read the full story: https://github.com/greentechgear/blogclaw
GitHub: https://github.com/greentechgear/blogclaw