{"slug":"cf-analytics","title":"cf-analytics","summary":"Show content analytics: quality-score trends, slowest pipeline phase and alerts over 7-90 days. \"how is production going\"","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-12-02T16:48:27.30217Z","repo":{"url":"https://github.com/indranilbanerjee/contentforge","stars":35,"forks":7,"license":"MIT","updatedAt":"2026-12-02T01:11:04Z"},"bodyHtml":"<hr>\n<h2>name: cf-analytics\ndescription: \"Show content analytics: quality-score trends, slowest pipeline phase and alerts over 7-90 days. \"how is production going\"\"\neffort: low\nargument-hint: \"[--period 7|30|90] [--brand </h2>\n<h1>Content Analytics Dashboard</h1>\n<blockquote>\n<p><strong>Script location.</strong> If your host does not set <code>${CLAUDE_PLUGIN_ROOT}</code>, the scripts are in this plugin's <code>scripts/</code> folder, next to <code>skills/</code>. Run them with Python 3.10 or newer: <code>python</code>, or <code>python3</code> where <code>python</code> is not found (macOS, many Linux systems).</p>\n</blockquote>\n<p>Track ContentForge production quality, pipeline timing, brand-specific patterns, and compliance trends over configurable time periods with automated insights and alert flags.</p>\n<h2>When to Use</h2>\n<p>Use <code>/contentforge:cf-analytics</code> when you need:</p>\n<ul>\n<li><strong>Quality trend visibility</strong> — Are scores improving or declining over time?</li>\n<li><strong>Pipeline performance audit</strong> — Which phases are slowest? Where are bottlenecks?</li>\n<li><strong>Brand comparison</strong> — Which brands consistently score highest/lowest?</li>\n<li><strong>Content type analysis</strong> — Are articles scoring better than whitepapers?</li>\n<li><strong>Compliance monitoring</strong> — Citation rates, brand adherence, loop frequency</li>\n<li><strong>Capacity planning</strong> — Average throughput for estimating batch timelines</li>\n</ul>\n<p><strong>For real-time batch monitoring</strong>, use the Progress Tracker (built into <code>/contentforge:batch-process</code>).\n<strong>For individual content production</strong>, use <a href=\"../../commands/create-content.md\"><code>/contentforge:create-content</code></a>.</p>\n<h2>What This Command Does</h2>\n<p>Loads historical production data from the brand's configured tracking backend (Google Sheets, Airtable, or local — see <code>tracking.backend</code> in the brand profile), calculates aggregate metrics across configurable dimensions, identifies statistical outliers and concerning trends, generates an ASCII dashboard with actionable recommendations, and flags alerts when performance degrades.</p>\n<p><strong>Process Flow:</strong></p>\n<ol>\n<li><strong>Load Data</strong> — Read tracking records from the brand's tracking backend (Google Sheets / Airtable / local JSON)</li>\n<li><strong>Filter &amp; Parse</strong> — Apply time period, brand, content type, and metric focus filters</li>\n<li><strong>Calculate Aggregates</strong> — Average scores, trends, percentiles, phase timing breakdowns</li>\n<li><strong>Detect Outliers</strong> — Flag data points beyond 2.0 standard deviations from mean</li>\n<li><strong>Generate Insights</strong> — Identify patterns, correlations, and improvement opportunities</li>\n<li><strong>Present Dashboard</strong> — Render ASCII analytics display with charts and recommendations</li>\n<li><strong>Alert Check</strong> — Evaluate alert rules and surface any triggered flags</li>\n</ol>\n<h2>Required Inputs</h2>\n<p><strong>Optional (all have defaults):</strong></p>\n<ul>\n<li><strong>Time Period</strong> — <code>7</code> | <code>30</code> | <code>90</code> days (default: <code>30</code>)</li>\n<li><strong>Brand Filter</strong> — Filter to specific brand (default: all brands)</li>\n<li><strong>Content Type Filter</strong> — <code>article</code> | <code>blog</code> | <code>whitepaper</code> | <code>faq</code> | <code>research_paper</code> | <code>video_script</code> | <code>case_study</code> | <code>newsletter</code> (default: all types)</li>\n<li><strong>Metric Focus</strong> — <code>quality</code> | <code>timing</code> | <code>compliance</code> | <code>citations</code> (default: <code>quality</code>)</li>\n</ul>\n<h2>How to Use</h2>\n<h3>Default Dashboard (Last 30 Days, All Brands)</h3>\n<pre><code>/contentforge:cf-analytics\n</code></pre>\n<h3>Specific Time Period</h3>\n<pre><code>/contentforge:cf-analytics --period=90\n</code></pre>\n<h3>Brand-Specific Analysis</h3>\n<pre><code>/contentforge:cf-analytics --brand=AcmeMed --period=30\n</code></pre>\n<h3>Content Type Focus</h3>\n<pre><code>/contentforge:cf-analytics --type=whitepaper --period=90\n</code></pre>\n<h3>Metric-Specific Deep Dive</h3>\n<pre><code>/contentforge:cf-analytics --focus=timing --period=30\n</code></pre>\n<h3>Combined Filters</h3>\n<pre><code>/contentforge:cf-analytics --brand=AcmeMed --type=article --focus=quality --period=90\n</code></pre>\n<h2>Data Sources</h2>\n<h3>Data source: the brand's tracking backend</h3>\n<p>ContentForge's Output Manager (Phase 8) logs every completed piece to the backend configured in the brand profile (<code>tracking.backend</code>):</p>\n<ul>\n<li><strong><code>google_sheets</code></strong> — rows in the configured Google Sheet (read via <code>scripts/sheets-tracker.py</code>)</li>\n<li><strong><code>airtable</code></strong> — records in the configured Airtable base (read via <code>scripts/airtable-tracker.py</code>)</li>\n<li><strong><code>local</code></strong> — <code>tracking.json</code> under <code>~/.claude-marketing/{brand-slug}/tracking/</code> (read via <code>scripts/local-tracker.py</code>)</li>\n</ul>\n<p>All three backends share the same record schema:</p>\n<table>\n<thead>\n<tr>\n<th>Column</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>requirement_id</td>\n<td>string</td>\n<td>Unique content ID (REQ-001)</td>\n</tr>\n<tr>\n<td>title</td>\n<td>string</td>\n<td>Content title</td>\n</tr>\n<tr>\n<td>brand</td>\n<td>string</td>\n<td>Brand profile used</td>\n</tr>\n<tr>\n<td>content_type</td>\n<td>enum</td>\n<td>article, blog, whitepaper, faq, research_paper, video_script, case_study, newsletter</td>\n</tr>\n<tr>\n<td>word_count</td>\n<td>integer</td>\n<td>Final word count</td>\n</tr>\n<tr>\n<td>quality_score</td>\n<td>float</td>\n<td>Composite score (0-10)</td>\n</tr>\n<tr>\n<td>content_quality</td>\n<td>float</td>\n<td>Dimension score (0-10)</td>\n</tr>\n<tr>\n<td>citation_integrity</td>\n<td>float</td>\n<td>Dimension score (0-10)</td>\n</tr>\n<tr>\n<td>brand_compliance</td>\n<td>float</td>\n<td>Dimension score (0-10)</td>\n</tr>\n<tr>\n<td>seo_performance</td>\n<td>float</td>\n<td>Dimension score (0-10)</td>\n</tr>\n<tr>\n<td>readability</td>\n<td>float</td>\n<td>Dimension score (0-10)</td>\n</tr>\n<tr>\n<td>processing_time_min</td>\n<td>float</td>\n<td>Total pipeline time in minutes</td>\n</tr>\n<tr>\n<td>phase_1_time</td>\n<td>float</td>\n<td>Research phase duration</td>\n</tr>\n<tr>\n<td>phase_2_time</td>\n<td>float</td>\n<td>Fact-check phase duration</td>\n</tr>\n<tr>\n<td>phase_3_time</td>\n<td>float</td>\n<td>Drafting phase duration</td>\n</tr>\n<tr>\n<td>phase_4_time</td>\n<td>float</td>\n<td>Validation phase duration</td>\n</tr>\n<tr>\n<td>phase_5_time</td>\n<td>float</td>\n<td>Structuring phase duration</td>\n</tr>\n<tr>\n<td>phase_6_time</td>\n<td>float</td>\n<td>SEO phase duration</td>\n</tr>\n<tr>\n<td>phase_6_5_time</td>\n<td>float</td>\n<td>Humanizer phase duration</td>\n</tr>\n<tr>\n<td>phase_7_time</td>\n<td>float</td>\n<td>Reviewer phase duration</td>\n</tr>\n<tr>\n<td>phase_8_time</td>\n<td>float</td>\n<td>Output phase duration</td>\n</tr>\n<tr>\n<td>loops_used</td>\n<td>integer</td>\n<td>Total feedback loops triggered</td>\n</tr>\n<tr>\n<td>loop_details</td>\n<td>string</td>\n<td>Which loops fired (e.g., \"P4&gt;P3 x1, P7&gt;P5 x1\")</td>\n</tr>\n<tr>\n<td>citations_count</td>\n<td>integer</td>\n<td>Number of citations in final output</td>\n</tr>\n<tr>\n<td>broken_links</td>\n<td>integer</td>\n<td>Broken links detected (should be 0)</td>\n</tr>\n<tr>\n<td>completed_at</td>\n<td>datetime</td>\n<td>Completion timestamp</td>\n</tr>\n<tr>\n<td>output_url</td>\n<td>string</td>\n<td>Google Drive link to .docx</td>\n</tr>\n</tbody>\n</table>\n<h3>Default when no cloud backend is configured</h3>\n<p>The <code>local</code> backend is the default: tracking data lives at</p>\n<pre><code>~/.claude-marketing/{brand-slug}/tracking/tracking.json\n</code></pre>\n<p>Switch backends anytime with <code>/contentforge:cf-switch-backend</code> (migration is additive and idempotent).</p>\n<h2>What Happens</h2>\n<h3>Step 1: Data Loading (5-10 seconds)</h3>\n<pre><code>Loading analytics data...\nSource: &lt;brand's tracking backend, e.g. Airtable base appXXXX / Google Sheet / local tracking.json&gt;\nRecords found: 147 total\nAfter filters: 42 records (last 30 days, all brands)\nDate range: 2026-01-26 to 2026-02-25\n</code></pre>\n<p><strong>Pipeline telemetry (v4.0).</strong> When a brand filter is active, also load the\ncross-run telemetry so the dashboard can show where the pipeline itself works\nhard for this brand:</p>\n<pre><code>python \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.py\" loops --brand &lt;slug&gt;\npython \"${CLAUDE_PLUGIN_ROOT}/scripts/telemetry.py\" patterns --brand &lt;slug&gt;\n</code></pre>\n<p>Render two additional panels from the output: <strong>Loop edges fired</strong> (by edge and\ncontent type — an edge firing across many runs of one content type is a contract\nproblem worth a template fix, and the panel should say so) and <strong>Recurring\nhumanizer patterns</strong> (per-pattern totals and run-presence; runs the script\nreports as <code>not_instrumented</code> are shown as \"unknown (pre-4.0 run)\", never as\nzero). Skip both panels silently only when the brand has no runs at all.</p>\n<h3>Step 2: Aggregate Calculation</h3>\n<p><strong>Quality Metrics:</strong></p>\n<ul>\n<li>Mean, median, min, max for composite score and each dimension</li>\n<li>Standard deviation for outlier detection</li>\n<li>Trend direction (improving, stable, declining) via linear regression slope</li>\n<li>Percentile distribution (P25, P50, P75, P90)</li>\n</ul>\n<p><strong>Timing Metrics:</strong></p>\n<ul>\n<li>Average total processing time by content type</li>\n<li>Phase-by-phase timing breakdown (mean per phase)</li>\n<li>Slowest phase identification</li>\n<li>Comparison against benchmarks from <code>config/analytics-config.json</code></li>\n</ul>\n<p><strong>Compliance Metrics:</strong></p>\n<ul>\n<li>Average citations per piece</li>\n<li>Citation density (citations per 300 words)</li>\n<li>Average loops per piece</li>\n<li>Loop-free completion rate (% of pieces that passed on first review)</li>\n<li>Brand compliance dimension average</li>\n</ul>\n<p><strong>Trend Metrics:</strong></p>\n<ul>\n<li>Rolling 7-day average quality score</li>\n<li>Week-over-week quality change</li>\n<li>Content volume by week</li>\n</ul>\n<h3>Step 3: Outlier Detection</h3>\n<p>Flag any record where:</p>\n<ul>\n<li>Quality score is &gt;2.0 standard deviations below the mean</li>\n<li>Processing time is &gt;1.5x the benchmark for its content type</li>\n<li>Loops used &gt;3 (suggests requirement or pipeline issues)</li>\n<li>Any dimension score &lt;5.0 (below minimum pass threshold)</li>\n</ul>\n<h3>Step 4: Insight Generation</h3>\n<p>Analyze patterns across the dataset:</p>\n<ul>\n<li><strong>Correlation Analysis:</strong> Do longer processing times correlate with higher quality?</li>\n<li><strong>Brand Patterns:</strong> Which brands have the most consistent scores?</li>\n<li><strong>Type Patterns:</strong> Which content types have the highest loop frequency?</li>\n<li><strong>Phase Bottlenecks:</strong> Which phase consumes the most time relative to benchmark?</li>\n<li><strong>Improvement Trajectory:</strong> Is the system getting better over time?</li>\n</ul>\n<h3>Step 5: Dashboard Rendering</h3>\n<h2>Output: Analytics Dashboard</h2>\n<h3>Full Dashboard (Default View)</h3>\n<p><strong>Before rendering, read <code>references/dashboard-examples.md</code> (in this skill's directory), section \"Full Dashboard (Default View)\", for the full synthetic layout</strong> (quality score overview, weekly trend chart, phase timing breakdown, brand performance comparison, content type averages, feedback loop analysis, alerts, recommendations) — reproduce this shape with real computed values. All numbers in the reference are invented.</p>\n<h3>Timing-Focused Dashboard (--focus=timing)</h3>\n<p><strong>Read <code>references/dashboard-examples.md</code> (in this skill's directory), section \"Timing-Focused Dashboard (--focus=timing)\", for the full synthetic layout</strong> (processing-time distribution, time by content type, phase waterfall, bottleneck analysis, throughput metrics) — reproduce this shape with real computed values.</p>\n<h3>Compliance-Focused Dashboard (--focus=compliance)</h3>\n<p><strong>Read <code>references/dashboard-examples.md</code> (in this skill's directory), section \"Compliance-Focused Dashboard (--focus=compliance)\", for the full synthetic layout</strong> (citation compliance, brand compliance scores, feedback loop compliance, hallucination report) — reproduce this shape with real computed values.</p>\n<h2>Alert Rules</h2>\n<p>Alerts are configured in <code>config/analytics-config.json</code> and trigger when:</p>\n<table>\n<thead>\n<tr>\n<th>Alert</th>\n<th>Condition</th>\n<th>Severity</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Quality Decline</td>\n<td>3 consecutive pieces from same brand score &lt;7.0</td>\n<td>High</td>\n</tr>\n<tr>\n<td>Phase Slowdown</td>\n<td>Any phase averages &gt;1.5x its benchmark time</td>\n<td>Medium</td>\n</tr>\n<tr>\n<td>Citation Drop</td>\n<td>Citation density drops below content-type minimum</td>\n<td>Medium</td>\n</tr>\n<tr>\n<td>Loop Spike</td>\n<td>Average loops/piece exceeds 2.0 for any content type</td>\n<td>High</td>\n</tr>\n<tr>\n<td>Score Floor</td>\n<td>Any piece scores below 5.0 composite</td>\n<td>Critical</td>\n</tr>\n<tr>\n<td>Volume Gap</td>\n<td>Fewer than 10 data points in analysis window</td>\n<td>Info</td>\n</tr>\n</tbody>\n</table>\n<h2>Configuration</h2>\n<p>Analytics behavior is controlled by <code>config/analytics-config.json</code>:</p>\n<ul>\n<li>Quality thresholds (excellent, good, acceptable, needs_review)</li>\n<li>Timing benchmarks per content type</li>\n<li>Alert rule conditions</li>\n<li>Trend analysis parameters (window, min data points, outlier threshold)</li>\n<li>Dashboard defaults (time period, charts to display)</li>\n<li>Score component weights</li>\n</ul>\n<p>See <a href=\"../../config/analytics-config.json\"><code>config/analytics-config.json</code></a> for full configuration.</p>\n<h2>Data Privacy</h2>\n<ul>\n<li>Analytics operates on <strong>aggregate metrics only</strong> — no content text is stored or displayed</li>\n<li>Tracking data includes scores, timing, and metadata — never the content body</li>\n<li>All data stays within your configured tracking backend — no external transmission</li>\n</ul>\n<h2>Limitations</h2>\n<ul>\n<li>Requires at least 10 data points for meaningful trend analysis (30+ recommended)</li>\n<li>Trend direction (improving/declining) is based on linear regression and can be misleading with high variance</li>\n<li>Phase timing accuracy depends on ContentForge logging completeness</li>\n<li>Cannot retroactively analyze content produced before tracking was enabled</li>\n<li>Cross-session persistence follows the tracking backend: local JSON persists on the host filesystem; Google Sheets and Airtable persist in the cloud (and support team access)</li>\n</ul>\n<h2>Agents Used</h2>\n<p><strong>None.</strong> This skill operates entirely on tracked data — no content generation agents are invoked. It reads records written by the Output Manager (Phase 8) to the brand's tracking backend. The aggregation and trend logic is documented in <code>utilities/analytics-tracker.md</code> — a pseudocode reference doc (not a script); follow it for the calculations.</p>\n<h2>Integration with Other Skills</h2>\n<p><strong>Data Sources:</strong></p>\n<ul>\n<li><code>/contentforge:create-content</code> — Each completed piece adds a tracking record</li>\n<li><code>/contentforge:batch-process</code> — Batch completions add multiple records</li>\n<li><code>/contentforge:content-refresh</code> — Refresh completions add versioned records</li>\n</ul>\n<p><strong>Acts On Insights:</strong></p>\n<ul>\n<li>Quality decline detected: Review brand profile, run <code>/contentforge:brand-setup</code> refresh</li>\n<li>Timing bottleneck found: Adjust phase configuration in <code>config/scoring-thresholds.json</code></li>\n<li>Citation drop flagged: Update Phase 3 citation density targets</li>\n</ul>\n<h2>Related Skills</h2>\n<ul>\n<li><strong><a href=\"../../commands/create-content.md\">/contentforge:create-content</a></strong> — Full content production pipeline (generates tracking data)</li>\n<li><strong><a href=\"../batch-process/SKILL.md\">/contentforge:batch-process</a></strong> — Sequential, checkpointed batch processing (generates batch tracking data)</li>\n<li><strong><a href=\"../content-refresh/SKILL.md\">/contentforge:content-refresh</a></strong> — Content updates (generates refresh tracking data)</li>\n<li><strong><a href=\"../cf-variants/SKILL.md\">/contentforge:cf-variants</a></strong> — A/B test variation generation</li>\n<li><strong><a href=\"../cf-switch-backend/SKILL.md\">/contentforge:cf-switch-backend</a></strong> — Change where tracking data lives</li>\n</ul>\n<hr>\n<p><strong>Agents:</strong> None (data analysis only; pseudocode reference: <code>utilities/analytics-tracker.md</code>)\n<strong>Output:</strong> ASCII analytics dashboard with trends, comparisons, alerts, and recommendations</p>\n","files":[{"path":"references/dashboard-examples.md","sizeBytes":10724,"isText":true},{"path":"SKILL.md","sizeBytes":13610,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-12-02T16:48:41.661539Z","sha256":"DEC99F595EAE2AFF435B1BBD7E3E0EE48C3469BF8DA1A074816613B303C8C393","sizeBytes":9162},"review":null,"source":{"repositoryUrl":"https://github.com/indranilbanerjee/contentforge","path":"skills/cf-analytics","license":"MIT","commit":"f64432624751e32d49a535b7e225528f4add18f0","subtreeSha":"13E86623C2668112B1E1F485DB2D9B4738F36F391A95B9FB63AC7A61986B2E0B","lastSyncedAt":"2026-12-02T16:48:26.794268Z"},"reviewedAt":"2026-12-02T16:48:55.523112Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/indranilbanerjee/contentforge/tree/master/skills/cf-analytics"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install indranilbanerjee-contentforge@llmmart"},{"target":"git","command":"git clone https://github.com/indranilbanerjee/contentforge.git"}]}