agentleFS
bradautomatesbradautomates/head-of-content/CLAUDE.md

head-of-content

CLAUDE.md257 starsChanged 11 months agoMITView on GitHub

This is a Claude Code skills repository for social media content research and marketing automation. It contains skills that research high-performing content across X/Twitter, Instagram, YouTube, and TikTok, then analyze videos with AI to extract replicable hooks and patterns. CRITICAL: When asked to research content on social media: - NEVER use web search, WebFetch, or browse the internet - ALWAYS use the appropriate research skill. These skills use specialized APIs that provide better data than web scraping - NEVER modify…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    NEVER use web search, WebFetch, or browse the internet

    line 12
  2. Distinctive:

    ALWAYS use the appropriate research skill.

    line 13
  3. Very specific:

    NEVER modify files in .claude/context/ - these are user-managed configuration files

    line 14
  4. Very specific:

    All skills live in .claude/skills/ and follow a consistent pattern:

    line 32
  5. Very specific:

    When CLAUDE_DELEGATED=1 environment variable is detected, this project is being invoked from another Claude Code instance (e.g., …

    line 95
  6. Distinctive:

    When the delegator prompt includes "update {task_path}":

    line 99
  7. Distinctive:

    Update the source task file with status, key findings, and output paths

    line 102
  8. Distinctive:

    Use absolute paths when referencing output files

    line 103
  9. Distinctive:

    Update the task file with:

    line 107
  10. Distinctive:

    If research partially fails:

    line 126
  11. Very specific:

    Add a ## Notes section explaining what succeeded/failed

    line 128

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Overview

This is a Claude Code skills repository for social media content research and marketing automation. It contains skills that research high-performing content across X/Twitter, Instagram, YouTube, and TikTok, then analyze videos with AI to extract replicable hooks and patterns.

Using Skills

CRITICAL: When asked to research content on social media:

  • NEVER use web search, WebFetch, or browse the internet
  • ALWAYS use the appropriate research skill. These skills use specialized APIs that provide better data than web scraping
  • NEVER modify files in .claude/context/ - these are user-managed configuration files

Environment Setup

Required environment variables (configure in .env):

Python packages needed: apify-client, google-genai, requests, python-dotenv, opencv-python-headless, mediapipe, Pillow, numpy

Load env vars in subagents:

export $(cat .env | grep -v '^#' | xargs)

Skills Architecture

All skills live in .claude/skills/ and follow a consistent pattern:

Research Skills (platform-specific)

Each creates timestamped run folders with raw.json → outliers.json → video-analysis.json → report.md:

  • x-research: Fetches tweets via Apify, identifies engagement outliers
  • instagram-research: Fetches reels via Apify, identifies outliers, analyzes top 5 videos
  • youtube-research: Uses TubeLab API for outlier detection, analyzes top 3 relevant videos
  • tiktok-research: Fetches TikToks via Apify, identifies outliers, analyzes top 5 videos

Support Skills

  • video-content-analyzer: Gemini AI analysis of video hooks, structure, and CTAs. Used by all research skills.
  • content-planner: Orchestrates all 4 research skills in parallel, aggregates into content ideas and platform playbooks

Context Files

Configure research targets in .claude/context/:

  • x-accounts.md - X/Twitter handles to monitor
  • instagram-accounts.md - Instagram accounts to track
  • tiktok-accounts.md - TikTok accounts to track
  • youtube-channel.md - Your channel info and niche for relevance filtering
  • reference_images/ - Face photos for thumbnail generation (pose-encoded filenames)

Output Structure

Research outputs go to platform-specific timestamped folders:

{platform}-research/{YYYY-MM-DD_HHMMSS}/
├── raw.json            # Raw API data
├── outliers.json       # Outliers with engagement metrics
├── video-analysis.json # AI-extracted hooks and patterns
└── report.md           # Human-readable report

content-plans/{YYYY-MM-DD_HHMMSS}/
├── content-ideas.md    # Cross-platform aggregated ideas
└── {platform}-playbook.md  # Platform-specific intelligence

Key Commands

Run individual research:

python3 .claude/skills/{platform}-research/scripts/fetch_{platform}.py --output {folder}/raw.json
python3 .claude/skills/{platform}-research/scripts/analyze_posts.py --input {folder}/raw.json --output {folder}/outliers.json
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py --input {folder}/outliers.json --output {folder}/video-analysis.json --platform {platform}

YouTube research (different pattern):

python3 .claude/skills/youtube-research/scripts/get_channel_videos.py CHANNEL_ID --format summary
python3 .claude/skills/youtube-research/scripts/find_outliers.py --keywords k1 k2 k3 k4 --adjacent-keywords a1 a2 a3 a4 --output-dir {folder}

Engagement Scoring

  • X: Bookmarks 4x, Replies 3x, Retweets 2x, Quotes 2x, Likes 1x
  • Instagram/TikTok: Likes + 3×Comments + engagement bonuses for shares/saves/views
  • YouTube: zScore × recency_boost (5%/day decay)

Outlier threshold: engagement rate > mean + (2.0 × std_dev)

Delegation Mode

When CLAUDE_DELEGATED=1 environment variable is detected, this project is being invoked from another Claude Code instance (e.g., second-brain).

Callback Protocol

When the delegator prompt includes "update {task_path}":

  1. Execute the requested research skill (per routing rules above)
  2. Update the source task file with status, key findings, and output paths
  3. Use absolute paths when referencing output files

Output Format for Callback

Update the task file with:

---
status: complete
completed: YYYY-MM-DD
---

## Research Results

### Key Findings
- [3-5 bullet points summarizing insights]

### Outputs
- Full report: ~/Documents/GitHub/head-of-content/{platform}-research/{folder}/report.md

Error Handling

If research partially fails:

  • Set status: in-progress instead of complete
  • Add a ## Notes section explaining what succeeded/failed
  • Include paths to any partial outputs generated

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.