[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M728TQD4WY8ZABFR4VVASJ2V":3,"skill-same:01M728TQD4WY8ZABFR4VVASJ2V":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M728TQD4WY8ZABFR4VVASJ2V","blog-post-counter",null,"Counts and compares blog posts across a target and competitors, audits content freshness via sitemap lastmod dates, and maps competitor organic keywords (US, non-branded, informational) against the target to surface ranking gaps. Use when asked to compare blog counts, content volume, publishing cadence, content freshness, keyword mapping, keyword gap analysis, or competitor keyword reports — e.g. \"how many blog posts does X have vs Y\", \"how fresh is content on X\", \"where does [target] rank for [competitor] keywords\", \"keyword gap between X and Y\". Works from company names alone. Always use for blog comparison, freshness audits, and keyword mapping tasks.","Infrasity-Labs\u002Fdev-gtm-claude-skills","Infrasity-Labs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F185816631?v=4","01M725RT5H30FV46N17K3ABAZY","01M725RT66YJPM15PDYXPWS4BS",168,"MIT","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fskills\u002Fblog-post-counter\u002FSKILL.md",[],[],"2026-11-10 18:39:20",false,"---\nname: blog-post-counter\ndescription: Counts and compares blog posts across a target and competitors, audits content freshness via sitemap lastmod dates, and maps competitor organic keywords (US, non-branded, informational) against the target to surface ranking gaps. Use when asked to compare blog counts, content volume, publishing cadence, content freshness, keyword mapping, keyword gap analysis, or competitor keyword reports — e.g. \"how many blog posts does X have vs Y\", \"how fresh is content on X\", \"where does [target] rank for [competitor] keywords\", \"keyword gap between X and Y\". Works from company names alone. Always use for blog comparison, freshness audits, and keyword mapping tasks.\n---\n\n# Blog Post Counter + Keyword Mapping Skill\n\nTwo workflows in one skill:\n\n1. **Blog Post Counter** — counts and compares blog post output across a target and competitors, with optional content freshness audit\n2. **Keyword Mapping** — pulls competitor's organic keywords (US, non-branded, informational) and cross-references against target's keyword footprint to surface gaps and opportunities\n\n---\n\n---\n\n# WORKFLOW A — Blog Post Counter\n\n---\n\n## Step 1 — Resolve each company to a URL\n\nFor each company name provided:\n1. If a URL was given directly, use it.\n2. If only a name was given, run `curl -sL \"https:\u002F\u002F\u003Clikely-domain>\u002Frobots.txt\"` to confirm the site exists and find the sitemap. If that 404s, do a quick web search for `\"\u003Ccompany name>\" official website` to get the correct domain.\n\n---\n\n## Step 2 — Find the sitemap\n\nFrom the robots.txt, extract the `Sitemap:` line(s). Common patterns:\n- Single sitemap: `Sitemap: https:\u002F\u002Fexample.com\u002Fsitemap.xml`\n- Sitemap index: multiple `Sitemap:` lines, or a sitemap-index.xml that references sub-sitemaps\n\nIf no sitemap is in robots.txt, try these fallbacks in order:\n```\n\u002Fsitemap.xml\n\u002Fsitemap_index.xml\n\u002Fsitemap-index.xml\n\u002Fblog\u002Fsitemap.xml\n```\n\n---\n\n## Step 3 — Count blog posts\n\nFetch the sitemap and count URLs that are blog posts. Use this bash pattern:\n\n```bash\ncurl -sL -A \"Mozilla\u002F5.0\" \"https:\u002F\u002Fexample.com\u002Fsitemap.xml\" \\\n  | grep -o '\u003Cloc>[^\u003C]*\u003C\u002Floc>' \\\n  | grep -iE '\u002Fblog\u002F|\u002Fposts?\u002F|\u002Farticles?\u002F|\u002Fnews\u002F' \\\n  | grep -v -E '^\u003Cloc>https:\u002F\u002F[^\u002F]+\u002Fblog\u002F?\u003C\u002Floc>$' \\\n  | wc -l\n```\n\n**Important:** Exclude the blog index page itself (e.g. `\u002Fblog` or `\u002Fblog\u002F`) — count only individual post URLs.\n\n**Sitemap index handling:** If the sitemap is an index (contains `\u003Csitemap>` tags rather than `\u003Curl>` tags), extract the sub-sitemap URLs and fetch the blog-specific one:\n```bash\ncurl -sL -A \"Mozilla\u002F5.0\" \"https:\u002F\u002Fexample.com\u002Fsitemap-index.xml\" \\\n  | grep -o '\u003Cloc>[^\u003C]*\u003C\u002Floc>' \\\n  | grep -i 'blog'\n# Then fetch that sub-sitemap and count\n```\n\n**JS-rendered sites:** Some blog pages render via JavaScript and may not expose counts through sitemaps. In that case, fall back to `site:example.com\u002Fblog` search operator to estimate.\n\n**Edge cases:**\n- Some sites use `\u002Fresources\u002F`, `\u002Finsights\u002F`, `\u002Flearn\u002F`, or `\u002Fhub\u002F` instead of `\u002Fblog\u002F` — check the sitemap structure if a `\u002Fblog\u002F` grep returns 0.\n- If the sitemap is very large (>1MB), grep for multiple blog path patterns.\n\n---\n\n## Step 4 — Build the output\n\nOnce all counts are collected, produce a ranked table with the target company highlighted:\n\n```\nBlog Post Count — [Target] vs Competitors\n==========================================\n\nRank  Company          Posts   URL\n────  ───────────────  ──────  ──────────────────────\n 1    Hackmamba        137     hackmamba.io           ← COMPETITOR\n 2    Infrasity        137     infrasity.com          ← COMPETITOR  \n 3  ▶ Kubiya           95      kubiya.ai              ← TARGET\n 4    Orgn             7       orgn.com               ← COMPETITOR\n\n▶ = your company   Total companies analysed: 4\n```\n\nThen add a brief summary:\n- Where the target ranks (e.g. \"3rd out of 4\")\n- Gap to the leader (e.g. \"42 posts behind the top competitor\")\n- Gap to the one above (if not already #1)\n- Any notable observations (e.g. very new site, or tied for first)\n\n---\n\n## Content Freshness Audit (blog posts only)\n\nRun this audit whenever the user asks about content freshness, recency, publishing cadence, or when it adds useful context to the blog count comparison.\n\n### Step 5 — Extract blog post lastmod dates\n\nFor each domain, extract only blog post URLs and their `lastmod` dates from the sitemap:\n\n```bash\ncurl -sL \"https:\u002F\u002Fexample.com\u002Fsitemap.xml\" \\\n  | python3 -c \"\nimport sys, re\ncontent = sys.stdin.read()\nurls = re.findall(r'\u003Curl>(.*?)\u003C\u002Furl>', content, re.DOTALL)\nfor u in urls:\n    loc = re.search(r'\u003Cloc>(.*?)\u003C\u002Floc>', u)\n    lastmod = re.search(r'\u003Clastmod>(.*?)\u003C\u002Flastmod>', u)\n    if loc and lastmod:\n        l = loc.group(1)\n        if re.search(r'\u002Fblog\u002F|\u002Fposts?\u002F|\u002Farticles?\u002F|\u002Fnews\u002F', l) and not re.match(r'https?:\u002F\u002F[^\u002F]+\u002F(blog|posts?|articles?|news)\u002F?$', l):\n            print(lastmod.group(1), l)\n\"\n```\n\n### Step 6 — Detect build-time stamp inflation\n\nBefore treating lastmod dates as real signals, check whether they are genuine per-post edit dates or build-time bulk stamps:\n\n```python\nfrom datetime import datetime, timezone\n\ndates = [...]  # all lastmod values for blog posts\n\nunique_dates = set(d[:10] for d in dates)  # compare date part only\nif not dates:\n    stamp_type = \"UNKNOWN\"\nelif len(unique_dates) \u003C= 3:\n    # Likely build-time stamps — flag as unreliable\n    stamp_type = \"BUILD-TIME\"\nelse:\n    stamp_type = \"REAL\"\n```\n\n**Build-time stamps** = all (or nearly all) blog posts share the same date, usually within a narrow time window (seconds to minutes). This is common with Next.js\u002FVercel and similar SSG frameworks that regenerate the sitemap on every deploy. These dates do NOT reflect when content was actually written or updated.\n\n**Real dates** = each post has a distinct lastmod that varies across weeks or months. These are trustworthy freshness signals.\n\nAlways flag build-time stamps clearly in the output so the user understands the dates are not meaningful for SEO or content analysis.\n\n### Step 7 — Compute freshness buckets\n\nUsing today's date, bucket each blog post's lastmod into:\n\n| Bucket | Age |\n|--------|-----|\n| Last 30 days | \u003C 30 days old |\n| 30–90 days | 30–89 days old |\n| 91–180 days | 90–179 days old |\n| 181–365 days | 180–364 days old |\n| Over 365 days | 365+ days old |\n\n```python\nfrom datetime import datetime, timezone\n\ntoday = datetime.now(timezone.utc)\nbuckets = {\"\u003C30d\": 0, \"30-90d\": 0, \"91-180d\": 0, \"181-365d\": 0, \">365d\": 0}\n\nfor date_str in lastmod_dates:\n    dt = datetime.fromisoformat(date_str.replace('Z', '+00:00'))\n    if dt.tzinfo is None:\n        dt = dt.replace(tzinfo=timezone.utc)\n    days = (today - dt).days\n    if days \u003C 30: buckets[\"\u003C30d\"] += 1\n    elif days \u003C 90: buckets[\"30-90d\"] += 1\n    elif days \u003C 180: buckets[\"91-180d\"] += 1\n    elif days \u003C 365: buckets[\"181-365d\"] += 1\n    else: buckets[\">365d\"] += 1\n```\n\nAlso compute:\n- **Newest post date** and days since\n- **Oldest post date**\n- **Monthly publishing cadence** — group posts by `YYYY-MM` to show volume over time\n- **Days since last publish** — the key staleness metric\n\n### Step 8 — Freshness output\n\nProduce a per-domain freshness summary alongside (or below) the blog count table. Use the visualiser to render a side-by-side comparison widget when comparing multiple domains. The widget must show:\n\n1. **Stamp type badge** — \"Build-time stamps ⚠️\" or \"Real dates ✓\"\n2. **Key stats** — total posts, newest post date, days since newest, unique date count\n3. **Freshness bar chart** — one bar per bucket showing count and percentage\n4. **Monthly publishing activity** — small bar chart by month (blog posts only, last 12 months)\n5. **Alert banners**:\n   - Build-time stamps → warning banner explaining the dates are not real edit dates\n   - No posts in 90+ days → warning banner flagging the content gap\n   - Real dates with recent posts → info banner confirming trustworthy signal\n\n**SEO freshness interpretation to include in the summary:**\n- Build-time stamps: note that Google ignores inflated lastmod dates and they provide no freshness signal\n- Real dates, posts \u003C 30 days: strong freshness signal, good for SEO\n- Real dates, no posts 90+ days: content gap, likely losing freshness ranking signals to competitors who publish regularly\n- Real dates, bulk publish spike followed by drop: flag the pattern (migration or sprint, not sustained cadence)\n\n---\n\n## Notes (Workflow A)\n\n- Always count from the sitemap — it's the most accurate and complete source.\n- Robots.txt is always the first place to look for the sitemap URL.\n- The `\u002Fblog` index page should never be counted as a post.\n- If a company has no blog section at all, report 0 and note it.\n- Sitemap data can lag real-time by days; note this if relevant.\n- Run all company lookups in sequence (one bash block per company) to avoid hitting rate limits.\n- For freshness: always filter to blog post URLs only — exclude static pages, service pages, glossary, etc.\n- Never treat build-time stamps as real freshness data. Always detect and flag them.\n\n---\n\n---\n\n# WORKFLOW B — Keyword Mapping\n\nMaps a competitor's organic keyword footprint against a target domain to surface content gaps and ranking opportunities.\n\n---\n\n## Step 1 — Pull domain metrics\n\nPull `org_keywords` and `org_traffic` for both competitor and target via Ahrefs `site-explorer-metrics`:\n\n```\ntool: site-explorer-metrics\nparams:\n  target: \u003Cdomain>\n  mode: subdomains\n  date: \u003Clatest>\n  select: org_keywords, org_traffic\n```\n\nDo this for both domains. The `org_keywords` count tells you how many batches you'll need to capture the full keyword set.\n\n---\n\n## Step 2 — Pull competitor keywords\n\nPull the competitor's full keyword set using Ahrefs `site-explorer-organic-keywords` with these fixed filters:\n\n```\ntool: site-explorer-organic-keywords\nparams:\n  target: \u003Ccompetitor domain>\n  country: us\n  mode: subdomains\n  is_branded: false\n  is_informational: true\n  limit: 500\n  select: keyword, volume, best_position, sum_traffic, best_position_url, is_branded\n```\n\n**Pull multiple batches** using different `order_by` values to maximize coverage:\n- Batch 1: `order_by: sum_traffic:desc`\n- Batch 2: `order_by: volume:desc`\n- Batch 3: `order_by: best_position:asc`\n\nAfter each batch, deduplicate by keyword across all batches collected so far. Keep the entry with the lowest (best) `best_position` per keyword.\n\nContinue batching until no new keywords appear across two consecutive batches, or until batch count exceeds the expected keyword universe from Step 1.\n\n---\n\n## Step 3 — Pull target keywords\n\nExact same pull for the target domain — same filters, same multiple sort orderings, same deduplication logic.\n\n```\ntool: site-explorer-organic-keywords\nparams:\n  target: \u003Ctarget domain>\n  country: us\n  mode: subdomains\n  is_branded: false\n  is_informational: true\n  limit: 500\n  select: keyword, volume, best_position, sum_traffic, best_position_url, is_branded\n```\n\nStore the result as a lookup map: `{ keyword → { best_position, sum_traffic, best_position_url } }`\n\n---\n\n## Step 4 — Cross-reference\n\nFor each competitor keyword from Step 2, look it up in the target map from Step 3. Assign a status:\n\n**Both rank:**\n- `WINNING` — target position \u003C competitor position (target is ahead)\n- `IMPROVE` — competitor position \u003C target position (competitor is ahead)\n\n**Target does not rank:**\n- `CRITICAL` — volume ≥ 1,000\n- `HIGH` — volume 500–999\n- `MEDIUM` — volume 200–499\n- `LOW` — volume 100–199\n- `NEW` — volume \u003C 100\n\nEach row in the output represents one competitor keyword. Fields per row:\n- `keyword`\n- `volume`\n- `competitor_rank` (best_position)\n- `competitor_traffic` (sum_traffic)\n- `target_rank` (best_position, or null)\n- `target_traffic` (sum_traffic, or null)\n- `target_url` (best_position_url, or null)\n- `status`\n\n---\n\n## Notes (Workflow B)\n\n- Rows = competitor keywords only. The report answers: *\"where is the competitor getting organic traction that the target has no presence?\"*\n- The `is_branded=false` and `is_informational=true` filters are applied at pull time — not as post-processing. This keeps the dataset clean from the start.\n- Both competitor and target keyword pulls use identical filter parameters so the comparison is symmetric.\n- If a target keyword exists in the map but the competitor keyword lookup returns null, that competitor keyword was not captured — it may be outside the top 100 positions Ahrefs tracks.\n- Stat card counts must reflect the filtered (non-branded, informational) dataset only.\n\n---\n\n---\n\n# COMBINED HTML REPORT\n\nBoth workflows feed into a single HTML report file. Run Workflow A and Workflow B fully first, collect all data, then generate the report in one pass.\n\n---\n\n## Report structure (top to bottom)\n\n### 1. Header\n- Dark background (#0f1117)\n- Report title: `[Target] vs [Competitor] — Content & Keyword Report`\n- Subtitle: target domain · competitor domain · date · filters applied\n- Two domain pills: target (green dot) and competitor (red dot) showing `org_keywords` and `org_traffic` for each\n\n### 2. Blog Post Count Section\n- Section heading: \"Blog Post Volume\"\n- Ranked table: Rank · Company · Posts · URL · Target\u002FCompetitor label\n- Target row highlighted\n- Summary line: where target ranks, gap to leader, gap to one above\n\n### 3. Content Freshness Section\n- Section heading: \"Content Freshness\"\n- One card per domain showing:\n  - Stamp type badge (Build-time ⚠️ or Real dates ✓)\n  - Total posts\n  - Newest post date + days since\n  - Freshness bucket breakdown (bar per bucket)\n  - Monthly publishing activity (last 12 months, bar chart)\n  - Alert banner if no posts in 90+ days or build-time stamps detected\n\n### 4. Keyword Mapping Section\n- Section heading: \"Keyword Gap — [Competitor] vs [Target]\"\n- Stat cards: All · Winning · Improve · Critical · High · Medium · Low · New (counts, clickable filters)\n- Single table, one row per competitor keyword:\n  - Keyword · Volume bar · Competitor Rank · Competitor Traffic · Target Rank · Target Traffic · Target URL · Status badge\n- Default sort: competitor traffic descending\n- Sortable on all columns by clicking headers\n\n### 5. Footer\n- Data sources: Ahrefs API (keyword data) · Sitemap (blog counts)\n- Date of data pull\n- Filters: US · non-branded · informational intent\n\n---\n\n## Styling\n\n- **Fonts:** DM Sans (body) + DM Mono (numbers, badges, monospace values)\n- **Header:** #0f1117 background, #edeae3 text, #7a8190 subtitles\n- **Body background:** #f7f6f2\n- **Cards\u002Ftables:** #ffffff background, #e4e2db borders, #faf9f6 table header rows\n- **Status badge colours:**\n  - WINNING — green (#14724e bg: #e5f5ee)\n  - IMPROVE — orange (#994d00 bg: #fff0e0)\n  - CRITICAL — red (#c0392b bg: #fce8e6)\n  - HIGH — amber (#b85c00 bg: #fdf0e0)\n  - MEDIUM — yellow (#7c5c00 bg: #fdf7e0)\n  - LOW — teal (#1a6e7a bg: #e0f4f7)\n  - NEW — grey (#555 bg: #efefef)\n- **Rank colours:** pos 1–3 green · pos 4–6 mid-green · pos 7–10 orange · pos 11+ red\n- **Volume bar:** 3px height, scaled to max volume in dataset, muted fill (#ccc8be)\n- All sections separated by visible dividers with section labels in DM Mono uppercase\n\n---\n\n## Generation rules\n\n- Collect all data from Workflow A and Workflow B before writing any HTML\n- Inject all data as inline JavaScript arrays — no external data fetches at render time\n- Single self-contained `.html` file — no external dependencies except Google Fonts CDN\n- Save to `\u002Fmnt\u002Fuser-data\u002Foutputs\u002Freport-[target]-vs-[competitor].html`\n- Present with `present_files` after saving","# Blog Post Counter + Keyword Mapping Skill\n\nTwo workflows in one skill:\n\n1. **Blog Post Counter** — counts and compares blog post output across a target and competitors, with optional content freshness audit\n2. **Keyword Mapping** — pulls competitor's organic keywords (US, non-branded, informational) and cross-references against target's keyword footprint to surface gaps and opportunities\n\n---\n\n---\n\n# WORKFLOW A — Blog Post Counter\n\n---\n\n## Step 1 — Resolve each company to a URL\n\nFor each company name provided:\n1. If a URL was given directly, use it.\n2. If only a name was given, run `curl -sL \"https:\u002F\u002F\u003Clikely-domain>\u002Frobots.txt\"` to confirm the site exists and find the sitemap. If that 404s, do a quick web search for `\"\u003Ccompany name>\" official website` to get the correct domain.\n\n---\n\n## Step 2 — Find the sitemap\n\nFrom the robots.txt, extract the `Sitemap:` line(s). Common patterns:\n- Single sitemap: `Sitemap: https:\u002F\u002Fexample.com\u002Fsitemap.xml`\n- Sitemap index: multiple `Sitemap:` lines, or a sitemap-index.xml that references sub-sitemaps\n\nIf no sitemap is in robots.txt, try these fallbacks in order:\n```\n\u002Fsitemap.xml\n\u002Fsitemap_index.xml\n\u002Fsitemap-index.xml\n\u002Fblog\u002Fsitemap.xml\n```\n\n---\n\n## Step 3 — Count blog posts\n\nFetch the sitemap and count URLs that are blog posts. Use this bash pattern:\n\n```bash\ncurl -sL -A \"Mozilla\u002F5.0\" \"https:\u002F\u002Fexample.com\u002Fsitemap.xml\" \\\n  | grep -o '\u003Cloc>[^\u003C]*\u003C\u002Floc>' \\\n  | grep -iE '\u002Fblog\u002F|\u002Fposts?\u002F|\u002Farticles?\u002F|\u002Fnews\u002F' \\\n  | grep -v -E '^\u003Cloc>https:\u002F\u002F[^\u002F]+\u002Fblog\u002F?\u003C\u002Floc>$' \\\n  | wc -l\n```\n\n**Important:** Exclude the blog index page itself (e.g. `\u002Fblog` or `\u002Fblog\u002F`) — count only individual post URLs.\n\n**Sitemap index handling:** If the sitemap is an index (contains `\u003Csitemap>` tags rather than `\u003Curl>` tags), extract the sub-sitemap URLs and fetch the blog-specific one:\n```bash\ncurl -sL -A \"Mozilla\u002F5.0\" \"https:\u002F\u002Fexample.com\u002Fsitemap-index.xml\" \\\n  | grep -o '\u003Cloc>[^\u003C]*\u003C\u002Floc>' \\\n  | grep -i 'blog'\n# Then fetch that sub-sitemap and count\n```\n\n**JS-rendered sites:** Some blog pages render via JavaScript and may not expose counts through sitemaps. In that case, fall back to `site:example.com\u002Fblog` search operator to estimate.\n\n**Edge cases:**\n- Some sites use `\u002Fresources\u002F`, `\u002Finsights\u002F`, `\u002Flearn\u002F`, or `\u002Fhub\u002F` instead of `\u002Fblog\u002F` — check the sitemap structure if a `\u002Fblog\u002F` grep returns 0.\n- If the sitemap is very large (>1MB), grep for multiple blog path patterns.\n\n---\n\n## Step 4 — Build the output\n\nOnce all counts are collected, produce a ranked table with the target company highlighted:\n\n```\nBlog Post Count — [Target] vs Competitors\n==========================================\n\nRank  Company          Posts   URL\n────  ───────────────  ──────  ──────────────────────\n 1    Hackmamba        137     hackmamba.io           ← COMPETITOR\n 2    Infrasity        137     infrasity.com          ← COMPETITOR  \n 3  ▶ Kubiya           95      kubiya.ai              ← TARGET\n 4    Orgn             7       orgn.com               ← COMPETITOR\n\n▶ = your company   Total companies analysed: 4\n```\n\nThen add a brief summary:\n- Where the target ranks (e.g. \"3rd out of 4\")\n- Gap to the leader (e.g. \"42 posts behind the top competitor\")\n- Gap to the one above (if not already #1)\n- Any notable observations (e.g. very new site, or tied for first)\n\n---\n\n## Content Freshness Audit (blog posts only)\n\nRun this audit whenever the user asks about content freshness, recency, publishing cadence, or when it adds useful context to the blog count comparison.\n\n### Step 5 — Extract blog post lastmod dates\n\nFor each domain, extract only blog post URLs and their `lastmod` dates from the sitemap:\n\n```bash\ncurl -sL \"https:\u002F\u002Fexample.com\u002Fsitemap.xml\" \\\n  | python3 -c \"\nimport sys, re\ncontent = sys.stdin.read()\nurls = re.findall(r'\u003Curl>(.*?)\u003C\u002Furl>', content, re.DOTALL)\nfor u in urls:\n    loc = re.search(r'\u003Cloc>(.*?)\u003C\u002Floc>', u)\n    lastmod = re.search(r'\u003Clastmod>(.*?)\u003C\u002Flastmod>', u)\n    if loc and lastmod:\n        l = loc.group(1)\n        if re.search(r'\u002Fblog\u002F|\u002Fposts?\u002F|\u002Farticles?\u002F|\u002Fnews\u002F', l) and not re.match(r'https?:\u002F\u002F[^\u002F]+\u002F(blog|posts?|articles?|news)\u002F?$', l):\n            print(lastmod.group(1), l)\n\"\n```\n\n### Step 6 — Detect build-time stamp inflation\n\nBefore treating lastmod dates as real signals, check whether they are genuine per-post edit dates or build-time bulk stamps:\n\n```python\nfrom datetime import datetime, timezone\n\ndates = [...]  # all lastmod values for blog posts\n\nunique_dates = set(d[:10] for d in dates)  # compare date part only\nif not dates:\n    stamp_type = \"UNKNOWN\"\nelif len(unique_dates) \u003C= 3:\n    # Likely build-time stamps — flag as unreliable\n    stamp_type = \"BUILD-TIME\"\nelse:\n    stamp_type = \"REAL\"\n```\n\n**Build-time stamps** = all (or nearly all) blog posts share the same date, usually within a narrow time window (seconds to minutes). This is common with Next.js\u002FVercel and similar SSG frameworks that regenerate the sitemap on every deploy. These dates do NOT reflect when content was actually written or updated.\n\n**Real dates** = each post has a distinct lastmod that varies across weeks or months. These are trustworthy freshness signals.\n\nAlways flag build-time stamps clearly in the output so the user understands the dates are not meaningful for SEO or content analysis.\n\n### Step 7 — Compute freshness buckets\n\nUsing today's date, bucket each blog post's lastmod into:\n\n| Bucket | Age |\n|--------|-----|\n| Last 30 days | \u003C 30 days old |\n| 30–90 days | 30–89 days old |\n| 91–180 days | 90–179 days old |\n| 181–365 days | 180–364 days old |\n| Over 365 days | 365+ days old |\n\n```python\nfrom datetime import datetime, timezone\n\ntoday = datetime.now(timezone.utc)\nbuckets = {\"\u003C30d\": 0, \"30-90d\": 0, \"91-180d\": 0, \"181-365d\": 0, \">365d\": 0}\n\nfor date_str in lastmod_dates:\n    dt = datetime.fromisoformat(date_str.replace('Z', '+00:00'))\n    if dt.tzinfo is None:\n        dt = dt.replace(tzinfo=timezone.utc)\n    days = (today - dt).days\n    if days \u003C 30: buckets[\"\u003C30d\"] += 1\n    elif days \u003C 90: buckets[\"30-90d\"] += 1\n    elif days \u003C 180: buckets[\"91-180d\"] += 1\n    elif days \u003C 365: buckets[\"181-365d\"] += 1\n    else: buckets[\">365d\"] += 1\n```\n\nAlso compute:\n- **Newest post date** and days since\n- **Oldest post date**\n- **Monthly publishing cadence** — group posts by `YYYY-MM` to show volume over time\n- **Days since last publish** — the key staleness metric\n\n### Step 8 — Freshness output\n\nProduce a per-domain freshness summary alongside (or below) the blog count table. Use the visualiser to render a side-by-side comparison widget when comparing multiple domains. The widget must show:\n\n1. **Stamp type badge** — \"Build-time stamps ⚠️\" or \"Real dates ✓\"\n2. **Key stats** — total posts, newest post date, days since newest, unique date count\n3. **Freshness bar chart** — one bar per bucket showing count and percentage\n4. **Monthly publishing activity** — small bar chart by month (blog posts only, last 12 months)\n5. **Alert banners**:\n   - Build-time stamps → warning banner explaining the dates are not real edit dates\n   - No posts in 90+ days → warning banner flagging the content gap\n   - Real dates with recent posts → info banner confirming trustworthy signal\n\n**SEO freshness interpretation to include in the summary:**\n- Build-time stamps: note that Google ignores inflated lastmod dates and they provide no freshness signal\n- Real dates, posts \u003C 30 days: strong freshness signal, good for SEO\n- Real dates, no posts 90+ days: content gap, likely losing freshness ranking signals to competitors who publish regularly\n- Real dates, bulk publish spike followed by drop: flag the pattern (migration or sprint, not sustained cadence)\n\n---\n\n## Notes (Workflow A)\n\n- Always count from the sitemap — it's the most accurate and complete source.\n- Robots.txt is always the first place to look for the sitemap URL.\n- The `\u002Fblog` index page should never be counted as a post.\n- If a company has no blog section at all, report 0 and note it.\n- Sitemap data can lag real-time by days; note this if relevant.\n- Run all company lookups in sequence (one bash block per company) to avoid hitting rate limits.\n- For freshness: always filter to blog post URLs only — exclude static pages, service pages, glossary, etc.\n- Never treat build-time stamps as real freshness data. Always detect and flag them.\n\n---\n\n---\n\n# WORKFLOW B — Keyword Mapping\n\nMaps a competitor's organic keyword footprint against a target domain to surface content gaps and ranking opportunities.\n\n---\n\n## Step 1 — Pull domain metrics\n\nPull `org_keywords` and `org_traffic` for both competitor and target via Ahrefs `site-explorer-metrics`:\n\n```\ntool: site-explorer-metrics\nparams:\n  target: \u003Cdomain>\n  mode: subdomains\n  date: \u003Clatest>\n  select: org_keywords, org_traffic\n```\n\nDo this for both domains. The `org_keywords` count tells you how many batches you'll need to capture the full keyword set.\n\n---\n\n## Step 2 — Pull competitor keywords\n\nPull the competitor's full keyword set using Ahrefs `site-explorer-organic-keywords` with these fixed filters:\n\n```\ntool: site-explorer-organic-keywords\nparams:\n  target: \u003Ccompetitor domain>\n  country: us\n  mode: subdomains\n  is_branded: false\n  is_informational: true\n  limit: 500\n  select: keyword, volume, best_position, sum_traffic, best_position_url, is_branded\n```\n\n**Pull multiple batches** using different `order_by` values to maximize coverage:\n- Batch 1: `order_by: sum_traffic:desc`\n- Batch 2: `order_by: volume:desc`\n- Batch 3: `order_by: best_position:asc`\n\nAfter each batch, deduplicate by keyword across all batches collected so far. Keep the entry with the lowest (best) `best_position` per keyword.\n\nContinue batching until no new keywords appear across two consecutive batches, or until batch count exceeds the expected keyword universe from Step 1.\n\n---\n\n## Step 3 — Pull target keywords\n\nExact same pull for the target domain — same filters, same multiple sort orderings, same deduplication logic.\n\n```\ntool: site-explorer-organic-keywords\nparams:\n  target: \u003Ctarget domain>\n  country: us\n  mode: subdomains\n  is_branded: false\n  is_informational: true\n  limit: 500\n  select: keyword, volume, best_position, sum_traffic, best_position_url, is_branded\n```\n\nStore the result as a lookup map: `{ keyword → { best_position, sum_traffic, best_position_url } }`\n\n---\n\n## Step 4 — Cross-reference\n\nFor each competitor keyword from Step 2, look it up in the target map from Step 3. Assign a status:\n\n**Both rank:**\n- `WINNING` — target position \u003C competitor position (target is ahead)\n- `IMPROVE` — competitor position \u003C target position (competitor is ahead)\n\n**Target does not rank:**\n- `CRITICAL` — volume ≥ 1,000\n- `HIGH` — volume 500–999\n- `MEDIUM` — volume 200–499\n- `LOW` — volume 100–199\n- `NEW` — volume \u003C 100\n\nEach row in the output represents one competitor keyword. Fields per row:\n- `keyword`\n- `volume`\n- `competitor_rank` (best_position)\n- `competitor_traffic` (sum_traffic)\n- `target_rank` (best_position, or null)\n- `target_traffic` (sum_traffic, or null)\n- `target_url` (best_position_url, or null)\n- `status`\n\n---\n\n## Notes (Workflow B)\n\n- Rows = competitor keywords only. The report answers: *\"where is the competitor getting organic traction that the target has no presence?\"*\n- The `is_branded=false` and `is_informational=true` filters are applied at pull time — not as post-processing. This keeps the dataset clean from the start.\n- Both competitor and target keyword pulls use identical filter parameters so the comparison is symmetric.\n- If a target keyword exists in the map but the competitor keyword lookup returns null, that competitor keyword was not captured — it may be outside the top 100 positions Ahrefs tracks.\n- Stat card counts must reflect the filtered (non-branded, informational) dataset only.\n\n---\n\n---\n\n# COMBINED HTML REPORT\n\nBoth workflows feed into a single HTML report file. Run Workflow A and Workflow B fully first, collect all data, then generate the report in one pass.\n\n---\n\n## Report structure (top to bottom)\n\n### 1. Header\n- Dark background (#0f1117)\n- Report title: `[Target] vs [Competitor] — Content & Keyword Report`\n- Subtitle: target domain · competitor domain · date · filters applied\n- Two domain pills: target (green dot) and competitor (red dot) showing `org_keywords` and `org_traffic` for each\n\n### 2. Blog Post Count Section\n- Section heading: \"Blog Post Volume\"\n- Ranked table: Rank · Company · Posts · URL · Target\u002FCompetitor label\n- Target row highlighted\n- Summary line: where target ranks, gap to leader, gap to one above\n\n### 3. Content Freshness Section\n- Section heading: \"Content Freshness\"\n- One card per domain showing:\n  - Stamp type badge (Build-time ⚠️ or Real dates ✓)\n  - Total posts\n  - Newest post date + days since\n  - Freshness bucket breakdown (bar per bucket)\n  - Monthly publishing activity (last 12 months, bar chart)\n  - Alert banner if no posts in 90+ days or build-time stamps detected\n\n### 4. Keyword Mapping Section\n- Section heading: \"Keyword Gap — [Competitor] vs [Target]\"\n- Stat cards: All · Winning · Improve · Critical · High · Medium · Low · New (counts, clickable filters)\n- Single table, one row per competitor keyword:\n  - Keyword · Volume bar · Competitor Rank · Competitor Traffic · Target Rank · Target Traffic · Target URL · Status badge\n- Default sort: competitor traffic descending\n- Sortable on all columns by clicking headers\n\n### 5. Footer\n- Data sources: Ahrefs API (keyword data) · Sitemap (blog counts)\n- Date of data pull\n- Filters: US · non-branded · informational intent\n\n---\n\n## Styling\n\n- **Fonts:** DM Sans (body) + DM Mono (numbers, badges, monospace values)\n- **Header:** #0f1117 background, #edeae3 text, #7a8190 subtitles\n- **Body background:** #f7f6f2\n- **Cards\u002Ftables:** #ffffff background, #e4e2db borders, #faf9f6 table header rows\n- **Status badge colours:**\n  - WINNING — green (#14724e bg: #e5f5ee)\n  - IMPROVE — orange (#994d00 bg: #fff0e0)\n  - CRITICAL — red (#c0392b bg: #fce8e6)\n  - HIGH — amber (#b85c00 bg: #fdf0e0)\n  - MEDIUM — yellow (#7c5c00 bg: #fdf7e0)\n  - LOW — teal (#1a6e7a bg: #e0f4f7)\n  - NEW — grey (#555 bg: #efefef)\n- **Rank colours:** pos 1–3 green · pos 4–6 mid-green · pos 7–10 orange · pos 11+ red\n- **Volume bar:** 3px height, scaled to max volume in dataset, muted fill (#ccc8be)\n- All sections separated by visible dividers with section labels in DM Mono uppercase\n\n---\n\n## Generation rules\n\n- Collect all data from Workflow A and Workflow B before writing any HTML\n- Inject all data as inline JavaScript arrays — no external data fetches at render time\n- Single self-contained `.html` file — no external dependencies except Google Fonts CDN\n- Save to `\u002Fmnt\u002Fuser-data\u002Foutputs\u002Freport-[target]-vs-[competitor].html`\n- Present with `present_files` after saving",{"name":5,"description":7},"main","02cfefb3a213041de8b80bc659ebc5f17b5e746a","skills\u002Fblog-post-counter",19,"https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills","https:\u002F\u002Fwww.infrasity.com\u002Fclaude-skills","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs","2026-06-29 03:34:19",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add Infrasity-Labs\u002Fdev-gtm-claude-skills --skill blog-post-counter",{"tool":37,"command":38},"bunx","bunx skills add Infrasity-Labs\u002Fdev-gtm-claude-skills --skill blog-post-counter",{"tool":40,"command":41},"pnpm","pnpm dlx skills add Infrasity-Labs\u002Fdev-gtm-claude-skills --skill blog-post-counter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fskills\u002Fblog-post-counter\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"README.md","REFERENCE","参考文档",4450,"https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fskills\u002Fblog-post-counter\u002FREADME.md",[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M72919B9PDCQZP40S1WWB17C","stop-slop","Remove AI writing patterns from prose. Use when drafting, editing, or reviewing text to eliminate predictable AI tells and produce more human-like writing.","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fstop-slop\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M72914WVB5R8YPZTNQ1K1VVH","social-media-posts","Create platform-specific social media posts for LinkedIn, Facebook, Instagram, and Reddit. Handles character limits, hashtag strategies, hook placement, and image specs per platform. Works from scratch, from existing content (blog, newsletter, announcement), or as a multi-platform campaign. Produces copy-paste-ready posts. Triggers: 'social media post', 'linkedin post', 'facebook post', 'instagram caption', 'reddit post', 'social posts', 'post to social', 'repurpose for social', 'social media campaign'.","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fsocial-media-posts\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M72911F6QH7M7QZPFQ4RXFJA","ogilvy-copywriting","Apply David Ogilvy's advertising principles when writing or reviewing copy, headlines, product descriptions, landing pages, ads, emails, or any persuasive text. Use when the goal is copy that sells, not copy that wins awards. Covers positioning, headlines, promises, brand voice, long-form copy, and visual logic. Source: How to Create Advertising That Sells (1972) + Ogilvy on Advertising.","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fogilvy-copywriting\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7290T399PQNVSCNY2H1CK4E","blog","Full-lifecycle blog engine with 30 sub-skills, 12 content templates, 5-category 100-point scoring, and 5 specialized agents. Routes user requests to the right sub-skill: writing, rewriting, analysis, outlines, audits, schema, charts, images, repurposing, AI-citation optimization, FLOW framework prompts, topic-cluster execution, and multilingual publishing. Optimized for Google rankings (December 2025 Core Update, E-E-A-T) and AI citations (GEO\u002FAEO). Supports any platform (WordPress, Next.js MDX, Hugo, Ghost, Astro, Jekyll, 11ty, Gatsby, HTML). Use when user says \"blog\", \"write a blog\", \"blog post\", \"blog strategy\", \"content brief\", \"editorial calendar\", \"blog audit\", \"blog optimization\", \"topic cluster\", \"multilingual blog\", \"FLOW framework\", or any \u002Fblog subcommand. Sub-skill descriptions cover narrower triggers.","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fblog\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7290N0F9K4RCK8ZTEZ905ZS","blog-write","Write new blog articles from scratch optimized for Google rankings and AI citations. Generates full articles with template selection, answer-first formatting, Key Takeaways summary box, information gain markers, citation capsules, sourced statistics, Pixabay\u002FUnsplash images, built-in SVG chart generation, FAQ schema, internal linking zones, and proper heading hierarchy. Supports MDX, markdown, and HTML output. Use when user says \"write blog\", \"new blog post\", \"create article\", \"write about\", \"draft blog\", \"generate blog post\".","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fblog-write\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7290FEQ7AXXRBJ316JED515","blog-translate","Translate existing blog posts into one or more target languages with SEO-optimized localization. Produces native-quality translations that preserve markdown structure, frontmatter, schema JSON-LD, image and chart embeds, and citation capsules. Localizes keywords, meta tags, numbers, dates, currencies, and quote styles per locale. Flags machine-translation artifacts for review. Run BEFORE blog-localize: this handles language conversion; localize handles cultural adaptation after translation completes. Use when user says \"translate blog\", \"blog translate\", \"uebersetzen\", \"traduire\", \"traducir\", \"translate post\", \"blog auf Deutsch\", \"blog en espanol\".","https:\u002F\u002Fgithub.com\u002FInfrasity-Labs\u002Fdev-gtm-claude-skills\u002Fblob\u002Fmain\u002Fwriting-skills\u002Fblog-translate\u002FSKILL.md",[],[]]