agentleFS
nicojunknicojunk/claude-ig/skills/ig/SKILL.md

ig

Skill17 starsChanged 8 months agoMITView on GitHub

Full-lifecycle Instagram content engine with 13 sub-skills, 6 specialized agents, and 5-category 100-point scoring. Optimized for the 2026 Instagram algorithm (watch time, DM-sends, saves). Creates Reels, Stories, Carousels, hooks, captions, affiliate posts, and editorial calendars. Analyzes post performance via Instagram Graph API, audits content quality, researches competitors, and repurposes content cross-platform. Niche detection for fitness, beauty, food, business, education, lifestyle, and creator accounts. Use when user says "Reel", "Hook", "Caption", "Story", "Carousel", "Instagram", "IG", "Post planen", "Content-Plan", "Affiliate Post", "Performance", "Competitor", "Reels analysieren", "posting schedule", "ig audit", "content score", "hook schreiben", "reel skript", "instagram strategy", "content calendar", "engagement analysis".

  • Reads credentials

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no sub-command given, ask which action they need

    line 68
  2. Distinctive:

    Every piece of content is optimized in this priority order:

    line 104
  3. Very specific:

    Path resolution: All references at ~/.claude/skills/ig/references/.

    line 166
  4. Distinctive:

    Caption: Write 500+ char caption with save CTA and niche hashtags

    line 252
  5. Very specific:

    Do NOT use graph.instagram.com (that endpoint rejects Page Tokens).

    line 265
  6. Very specific:

    If META_PAGE_TOKEN is stale or missing, derive a fresh one:

    line 271
  7. Very specific:

    IMPORTANT: Do NOT request impressions or plays (deprecated for Reels in v22+).

    line 301
  8. Very specific:

    If --page-token is omitted, the script derives one from --token + --page-id.

    line 311
  9. Distinctive:

    If API access is not configured or token is expired:

    line 315
  10. Distinctive:

    After installation, configure for your account:

    line 323
  11. Very specific:

    Run /ig analyze to pull live data via API

    line 326

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

IG: Instagram Content Engine

Full-lifecycle Instagram management: hooks, Reels, Stories, Carousels, captions, affiliate content, performance analysis, competitor research, editorial planning, and content repurposing. Optimized for the 2026 Instagram algorithm with watch time, DM-sends, and saves as primary distribution signals.

Works for any Instagram account and niche. Detects account context from API data and adapts content strategy, hook patterns, and scoring calibration accordingly.

Quick Reference

CommandWhat it does
/ig reel <topic>Write a complete Reel (hook, script, caption, thumbnail)
/ig hook <topic>Generate and score hooks for any format
/ig caption <topic>Write an optimized caption (500+ chars, save CTA)
/ig story <topic>Plan a Story sequence (slides, stickers, polls)
/ig carousel <topic>Plan a Carousel (cover hook, slides, CTA)
/ig analyze [post-url]Analyze post performance via Instagram API
/ig auditFull content audit with parallel subagent delegation
/ig competitor <accounts>Research competitor content
/ig calendar [weekly|monthly]Generate an editorial content calendar
/ig strategyContent strategy and positioning analysis
/ig affiliate <partner>Create compliant affiliate content
/ig commentComment response strategy and automation
/ig repurpose <post>Repurpose IG content for other platforms

Orchestration Logic

Command Routing

  1. Parse the user's command to determine the sub-skill
  2. If no sub-command given, ask which action they need
  3. Route to the appropriate sub-skill:
    • reel / skript / video -> ig-reel (full Reel production)
    • hook / opening -> ig-hook (hook generation and scoring)
    • caption / beschreibung / text -> ig-caption (caption writing)
    • story / stories -> ig-story (Story sequence planning)
    • carousel / karussell / slides -> ig-carousel (Carousel planning)
    • analyze / analyse / performance / insights -> ig-analyze (API-driven analysis)
    • audit / check / health -> ig-audit (full content audit with subagents)
    • competitor / konkurrenz / research / spy -> ig-competitor (competitor research)
    • calendar / plan / kalender / schedule -> ig-calendar (editorial calendar)
    • strategy / strategie / positioning -> ig-strategy (positioning and content mix)
    • affiliate / werbung / kooperation / sponsored -> ig-affiliate (compliant partner content)
    • comment / kommentar / replies -> ig-comment (comment response)
    • repurpose / redistribute / cross-post -> ig-repurpose (cross-platform repurposing)

Niche Detection

Detect account niche from bio, content patterns, and hashtag analysis:

SignalNicheAdaptation
Workout demos, exercise names, body part focusFitnessCorrection hooks, body-part targeting, safe exercise form
Recipe posts, nutrition tips, meal prepFood / NutritionRecipe format templates, ingredient lists, macro data
Product reviews, tutorials, before/afterBeauty / SkincareTransformation hooks, product comparison carousels
Tips, frameworks, income proofBusiness / CoachingAuthority hooks, case study carousels, lead magnet CTAs
Lessons, how-to, step-by-stepEducationCuriosity gap hooks, carousel-heavy strategy
Day-in-life, travel, personal storiesLifestyleIdentity trigger hooks, story-heavy strategy
Mixed / unclearCreatorAnalyze top 10 posts to determine primary content type

Adapt hook library selection, caption voice, CTA strategy, and content mix recommendations based on detected niche. If the user has configured references/account-baseline.md, use that data instead of detecting.

Algorithm Priority (2026)

Every piece of content is optimized in this priority order:

PrioritySignalWeightWhy
1Watch TimeHighestFirst 3 seconds determine distribution. Completion rate is king.
2DM-Sends per Reach3-5x likesPrimary signal for reaching new audiences via Explore
3Saves~3x likesSignal for lasting value, drives Explore and Suggested placement
4Likes/CommentsLowestWeakest signals; comments without saves = algorithm ignores
5Originality ScoreGateRecycled formats tank reach; always adapt through creator's unique lens

Quality Gates

Hard rules. Content that violates any gate is blocked from delivery:

#GateThreshold
G1Score before deliveryNEVER deliver content without a Content Quality Score
G2Em dashesNEVER use em dashes (U+2014) in any output
G3Affiliate disclosureNEVER create affiliate content without proper disclosure at caption TOP
G4Controversial opinionsNEVER recommend controversial opinion posts (high comments, zero saves)
G5Affiliate spacingNEVER place 2 affiliate posts on consecutive days
G6Metrics guessingNEVER guess account metrics; use API data or state data is unavailable
G7Safe zonesNEVER place text in format-specific unsafe zones (check format-specs.md)

Scoring Methodology

Content Quality Score (0-100)

5-category weighted scoring from references/scoring-system.md:

CategoryWeightWhat it measures
Hook Strength25 ptsCuriosity gap, pattern interrupt, identity trigger, first 3s clarity
Content Quality25 ptsValue density, structure, problem-solution flow, voice authenticity
Caption & CTA20 ptsLength (500+ chars), save/DM CTA, hook variation opener, hashtag quality
Format Compliance15 ptsCorrect specs, safe zones, thumbnail, duration targets
Algorithm Signals15 ptsSave/DM optimization, originality, non-controversial, watch time design

Scoring Bands

ScoreGradeRatingAction
90-100APublishReady to post, flagship content
80-89BStrongMinor polish, ready for publication
60-79COKTargeted improvements needed (must include fix instructions)
40-59DBelow StandardSignificant rework required
< 40FRejectFundamental issues, start over

Content scoring below 80 MUST include specific revision instructions per deficient category. Do not just deliver the score.

Priority Levels (for audit findings)

  • Critical: Content violates a Quality Gate (fix immediately)
  • High: Score < 60, significant performance drag (fix before posting)
  • Medium: Score 60-79, optimization opportunity (improve within week)
  • Low: Minor polish, best practice (backlog)

Reference Files

Load on-demand as needed. NEVER load all references at startup.

Path resolution: All references at ~/.claude/skills/ig/references/. Sub-skills referencing references/*.md resolve to this path.

ReferenceContentUsed by
references/algorithm-2026.mdAlgorithm signals, ranking factors, distribution mechanicsAll sub-skills
references/format-specs.mdTechnical specs per format (Reel, Story, Carousel, Feed) with safe zonesig-reel, ig-story, ig-carousel
references/scoring-system.mdFull 5-category scoring rubric with sub-criteria and severity multipliersAll content sub-skills, ig-audit
references/hook-library.md50+ hook templates in 5 categories with scoring and adaptation rulesig-hook, ig-reel, ig-carousel
references/content-rules.mdCaption structure, CTA hierarchy, hashtag strategy, voice guidelinesig-caption, ig-reel, ig-story
references/account-baseline.mdAccount metrics template, API integration, KPI tracking methodologyig-analyze, ig-strategy, ig-calendar
references/affiliate-compliance.mdDisclosure requirements, partner management, scheduling rulesig-affiliate
references/conversion-pipeline.mdDM automation, link tracking, funnel architectureig-caption, ig-strategy
references/competitor-framework.mdCompetitor monitoring methodology, benchmarks, trend detectionig-competitor
references/story-strategy.mdStory types, slide sequences, interactive elements, retention rulesig-story
references/comment-responder.mdComment strategy, response categories, automation patternsig-comment
references/repurpose-playbook.mdCross-platform adaptation rules per channelig-repurpose

Sub-Skills

This skill orchestrates 13 specialized sub-skills:

#Sub-SkillPurpose
1ig-reelFull Reel production (hook, script, caption, thumbnail)
2ig-hookHook generation, scoring, and A/B variants
3ig-captionCaption writing with save CTA, hashtags, 500+ chars
4ig-storyStory sequence planning (slides, stickers, polls)
5ig-carouselCarousel planning (cover, slides, CTA structure)
6ig-analyzePost/account performance analysis via Instagram API
7ig-auditFull content audit with parallel subagent delegation
8ig-competitorCompetitor research and benchmarking
9ig-calendarEditorial calendar with content mix validation
10ig-strategyContent positioning, niche analysis, growth strategy
11ig-affiliateCompliant affiliate/sponsored content
12ig-commentComment response strategy and automation
13ig-repurposeCross-platform content repurposing

Agents

For parallel analysis during /ig audit:

AgentRoleTools
ig-contentContent quality assessment across recent postsRead, Grep, Glob
ig-engagementEngagement pattern analysis (saves, shares, DMs)Read, Bash
ig-creativeVisual and format compliance checkRead, Grep
ig-growthFollower growth, reach trends, posting frequencyRead, Bash
ig-competitorCompetitor benchmarking and gap analysisRead, WebSearch, WebFetch
ig-complianceAffiliate disclosure, safe zones, Quality Gate checksRead, Grep, Glob

Agent Details

ig-content: Spawned as subagent during /ig audit. Reads recent posts, scores each against the 5-category rubric, identifies patterns in top/bottom performers. Outputs: per-post scores, category averages, content mix analysis.

ig-engagement: Analyzes engagement metrics from API data. Calculates save rates, DM-send rates, completion rates. Identifies which hook categories and content types drive the highest engagement. Outputs: engagement heatmap, best/worst performers by signal type.

ig-creative: Checks format compliance across recent posts. Validates safe zones, duration targets, thumbnail quality. Flags posts violating format-specs.md. Outputs: compliance checklist, violation list, format distribution.

ig-growth: Tracks follower growth rate, reach trends, posting frequency impact. Correlates posting schedule with performance. Outputs: growth metrics, optimal posting frequency and timing.

ig-competitor: Compares account metrics against niche benchmarks. Identifies content gaps (topics competitors cover that account doesn't). Spots trending formats and hook patterns. Outputs: competitive positioning, actionable gaps.

ig-compliance: Checks affiliate posts for proper disclosure, validates Quality Gate adherence across all recent content. Outputs: compliance report, violation flags with post references.

Execution Flow

Standard execution order for /ig reel:

  1. Parse: Identify topic, detect content type and niche context
  2. Load References: format-specs.md + hook-library.md + content-rules.md
  3. Hook: Generate 3 hook variants from different categories, score each, select best
  4. Script: Structure body (problem -> solution -> insight) with segment timing
  5. Caption: Write 500+ char caption with save CTA and niche hashtags
  6. Thumbnail: Describe thumbnail concept with text overlay
  7. Score: Apply full 5-category Content Quality Score
  8. Deliver: Output complete package with score and revision notes

For /ig analyze, steps 1-2 run, then API calls replace steps 3-7 with data analysis. For /ig audit, all 6 agents spawn in parallel, results aggregate into unified report.

Instagram API Integration

Graph API Authentication

Instagram data is accessed via the Facebook Graph API at https://graph.facebook.com/v21.0. Do NOT use graph.instagram.com (that endpoint rejects Page Tokens).

Two-Token System:

  • User Token (INSTAGRAM_ACCESS_TOKEN): For ads, user-level queries
  • Page Token (META_PAGE_TOKEN): Required for all Instagram content endpoints (media, insights, stories)

If META_PAGE_TOKEN is stale or missing, derive a fresh one:

source ~/Desktop/.env
PT=$(curl -s "https://graph.facebook.com/v21.0/$META_PAGE_ID?fields=access_token&access_token=$INSTAGRAM_ACCESS_TOKEN" \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")

Environment variables (load with source ~/Desktop/.env):

  • INSTAGRAM_ACCESS_TOKEN: Long-Lived User Token
  • META_PAGE_TOKEN: Page Token (required for content endpoints)
  • INSTAGRAM_BUSINESS_ACCOUNT_ID: IG Business Account ID
  • META_PAGE_ID: Facebook Page ID (for token derivation)
  • META_AD_ACCOUNT_ID: Ad Account ID (for ads endpoints)

Endpoints

Base URL: https://graph.facebook.com/v21.0
Auth: Page Token for content, User Token for ads
Rate Limit: 200 calls/hour per token

Content endpoints (Page Token):
  GET /{ig-id}?fields=id,username,media_count,followers_count,follows_count,biography,website,profile_picture_url
  GET /{ig-id}/media?fields=id,caption,media_type,thumbnail_url,timestamp,like_count,comments_count,permalink&limit=50
  GET /{media-id}/insights?metric=reach,saved,shares,likes,comments,total_interactions
  GET /{ig-id}/insights?metric=reach,follower_count,profile_views&period=day&since={unix}&until={unix}
  GET /{ig-id}/insights?metric=accounts_engaged,total_interactions&metric_type=total_value&period=day&since={unix}&until={unix}
  GET /{ig-id}/stories?fields=id,media_type,timestamp

IMPORTANT: Do NOT request impressions or plays (deprecated for Reels in v22+). accounts_engaged requires metric_type=total_value and cannot be mixed with time-series metrics.

Script Usage

The scripts/analyze_post.py script handles token management automatically:

source ~/Desktop/.env
python3 scripts/analyze_post.py --user-id $INSTAGRAM_BUSINESS_ACCOUNT_ID --token $INSTAGRAM_ACCESS_TOKEN --page-token $META_PAGE_TOKEN --page-id $META_PAGE_ID

If --page-token is omitted, the script derives one from --token + --page-id.

Graceful Degradation

If API access is not configured or token is expired:

  1. Inform the user that live data is unavailable
  2. Fall back to data in references/account-baseline.md (if populated)
  3. Clearly mark any analysis as "based on cached data, not live"
  4. Never fabricate metrics

Setup: Account Configuration

After installation, configure for your account:

  1. Populate account-baseline.md with your account metrics:
    • Run /ig analyze to pull live data via API
    • Or manually enter: followers, avg engagement, top posts, posting schedule
  2. Set API credentials in your .env file
  3. Customize hook-library.md with hooks that work in your niche
  4. Run /ig audit to establish your baseline scores

The skill works without configuration (using general best practices), but performs significantly better with account-specific data.

Anti-Patterns (Never Do These)

Anti-PatternWhy
Deliver without scoreIncomplete deliverable; score is mandatory
Use em dashes#1 signal of AI-generated text
Generic hashtags (#fitness, #motivation)Zero distribution value, signals low effort
Controversial opinion postsHigh comments, zero saves = algorithm ignores
Copy competitor hooks verbatimOriginality Score (2026) penalizes recycled formats
Guess metricsStale data leads to wrong decisions; use API or state uncertainty
Skip format-specs.mdWrong specs = reduced reach (safe zones, duration, ratio)
Affiliate without disclosureLegal violation in most jurisdictions
Optimize for likes over savesLikes are the weakest algorithm signal
Wall-of-text captionsLine breaks mandatory for readability and retention
Post at the same time every dayAlgorithm rewards variation within optimal windows

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.