Claude-seo-skills seo-report
git clone https://github.com/lionkiii/claude-seo-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/lionkiii/claude-seo-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/seo-report" ~/.claude/skills/lionkiii-claude-seo-skills-seo-report && rm -rf "$T"
skills/seo-report/SKILL.mdSEO Report Generator — File-Persisted Reports
Generates complete, AI-analyzed SEO reports and saves them to disk as markdown files. Supports four report types: monthly, weekly, audit, and competitor. This is the first sub-skill in the project that uses the Write tool for file persistence.
References
@skills/seo/references/mcp-degradation.md @skills/seo/references/ahrefs-api-reference.md @skills/seo/references/gsc-api-reference.md
Inputs
: Report type — one of:type
,monthly
,weekly
,audit
(required)competitor
: The domain to report on, bare domain e.g.domain
(required). Stripexample.com
,https://
, and trailing slashes.http://
(optional): GSC property URL for including Google Search Console data. Format:site
orhttps://example.com/sc-domain:example.com
(optional, required forcompetitor
type): Competitor domain to compare against, e.g.competitorcompetitor.com
(optional): Directory path to save the report file. Default: current working directory (pwd).output_dir
MCP Check
Before proceeding, check MCP availability:
-
Ahrefs (required for all report types): Use ToolSearch with query
+ahrefs- If tools returned → Ahrefs available, proceed
- If no tools returned → display Ahrefs error template from mcp-degradation.md and stop
-
GSC (optional — only if
parameter is provided): Use ToolSearch with querysite+google-search-console- If tools returned → GSC available, include GSC data in report
- If no tools returned → continue with Ahrefs-only, note missing GSC data in report
Execution
Step 0 — Generate Filename and Resolve Output Path
Use Bash to generate the absolute file path:
echo "$(pwd)/seo-report-$(date +%Y-%m-%d)-{domain}-{type}.md"
If
output_dir is provided, replace $(pwd) with the provided directory path.
Store this absolute path — it is used in Step 4 (Write) and Step 5 (confirmation).
Filename convention:
seo-report-YYYY-MM-DD-domain-type.md
Example: seo-report-2026-03-02-example.com-monthly.md
Step 1 — Gather Data (varies by report type)
For each tool call: if a rate-limit error or tool-not-found error occurs, log
Data unavailable: {tool} — {error} and continue. The report notes all skipped
data sources clearly.
Monthly Report Data
a) Ahrefs Overview:
- Call
withmcp__claude_ai_ahrefs__site-explorer-metrics
Returns: organic_traffic, traffic_cost (CENTS — divide by 100), organic_keywords, backlinks, referring_domainstarget: {domain} - Call
withmcp__claude_ai_ahrefs__site-explorer-domain-rating
Returns: domain_rating (0-100), ahrefs_ranktarget: {domain}
b) Ahrefs Top Keywords:
- Call
withmcp__claude_ai_ahrefs__site-explorer-organic-keywords
Request top 20 results. Returns: keyword, position, traffic, volume, difficulty.target: {domain}
c) Ahrefs DR History:
- Call
withmcp__claude_ai_ahrefs__site-explorer-domain-rating-history
Request last 12 months. Returns: date series with domain_rating values.target: {domain}
d) GSC Month-over-Month (only if
provided and GSC available):site
- Query
(or equivalent GSC tool discovered via ToolSearch) for current month vs previous month. Compare: clicks, impressions, CTR, average position. CTR from GSC is a decimal — multiply by 100 for display (0.0523 → 5.23%).query_search_analytics
Weekly Report Data
a) GSC Traffic Drops (only if
provided and GSC available):site
- Query GSC search analytics for last 7 days vs prior 7 days. Identify pages/queries with significant traffic decline (>20% drop). CTR is decimal — multiply by 100 for display.
b) GSC Opportunities (only if
provided and GSC available):site
- Query GSC for queries with high impressions (>100/week) and low CTR (<5%). These are quick-win opportunities. CTR is decimal — multiply by 100 for display.
c) Ahrefs New Referring Domains:
- Call
withmcp__claude_ai_ahrefs__site-explorer-referring-domains
Filter or sort by date to surface domains added in the last 7 days. Note: If the tool lacks a native date filter, sort by first_seen descending and take entries from the last 7 days based on the first_seen field.target: {domain}
Audit Report Data
a) Ahrefs Overview:
- Same as Monthly step (a) above — site-explorer-metrics + domain-rating.
b) Ahrefs Backlinks:
- Call
withmcp__claude_ai_ahrefs__site-explorer-all-backlinks
Request top 20. Returns: source URL, anchor text, DR of source, dofollow status.target: {domain}
c) Ahrefs Broken Backlinks:
- Call
withmcp__claude_ai_ahrefs__site-explorer-broken-backlinks
Returns: source URLs linking to 404/gone pages — reclamation opportunities.target: {domain}
d) Ahrefs Anchor Analysis:
- Call
withmcp__claude_ai_ahrefs__site-explorer-anchors
Returns: anchor text distribution — identify over-optimized exact-match patterns.target: {domain}
e) Ahrefs Top Pages:
- Call
withmcp__claude_ai_ahrefs__site-explorer-top-pages
Request top 10. Returns: URL, organic traffic, keywords count, top keyword.target: {domain}
Competitor Report Data
a) Ahrefs Overview — Both Domains:
- Call site-explorer-metrics + domain-rating for BOTH
and{domain}
. Display side-by-side for comparison.{competitor}
b) Ahrefs Organic Competitors:
- Call
withmcp__claude_ai_ahrefs__site-explorer-organic-competitors
Returns: list of organic competitors with overlap metrics.target: {domain}
c) Ahrefs Content Gap:
- Call
with filters to find keywords where competitor ranks but domain does not. Note: Use ToolSearch to discover this tool's exact parameter schema first if content-gap filtering is not straightforward.mcp__claude_ai_ahrefs__keywords-explorer-matching-terms
d) Ahrefs Anchor Analysis — Both Domains:
- Call site-explorer-anchors for BOTH
and{domain}
. Compare anchor text strategies.{competitor}
Step 2 — Generate AI Executive Summary
Before assembling the report, analyze ALL gathered data and write an executive summary paragraph of 3-5 sentences that:
- Identifies the single most important finding from the data
- Interprets what the data patterns mean for the domain's SEO health
- Suggests one concrete priority action
This is NOT a raw data dump. It is Claude's analytical interpretation.
Example for monthly: "Domain authority has grown from DR 45 to DR 52 over the past 6 months, driven primarily by 340 new referring domains. However, organic traffic declined 12% month-over-month, suggesting a potential Google algorithm impact on the /blog section which lost 8 high-ranking positions. Priority: Investigate the traffic drop using
/seo gsc drops for affected pages before making any content
changes."
Step 3 — Assemble Report Document
Build the full markdown report with sections appropriate to the report type:
# SEO {Type} Report: {domain} **Generated:** {date} **Report Type:** {type} **Data Sources:** {list of MCPs actually used, e.g. "Ahrefs, Google Search Console"} **Covers:** {date range, e.g. "Last 30 days" or "Month-over-month comparison"} --- ## Executive Summary {AI-generated narrative from Step 2} --- ## {Section per data source gathered — use appropriate headings per report type} {Tables with actual data} {For monetary values: ALL Ahrefs cost/value fields are in CENTS — divide by 100 and display as $X,XXX before including in report} --- ## Data Gaps {List any tools that were skipped due to errors or unavailable MCPs} {If no gaps: "All requested data sources returned successfully."} --- *Generated by /seo report — Claude SEO Skill* *Data sources: {Ahrefs | Google Search Console | both}* *Timestamp: {ISO 8601 timestamp}*
Step 4 — Save Report to Disk
Use the Write tool:
: the absolute path generated in Step 0file_path
: the complete markdown report from Step 3content
Step 5 — Confirm to User
After Write completes, output to terminal:
Report saved to: {absolute_file_path} Summary: {N} sections covering {data sources used} Report type: {type} | Domain: {domain}
CRITICAL: Always print the FULL ABSOLUTE PATH so the user can locate the file. The report content is NOT printed to the terminal — it is in the saved file only.
Output Format
Terminal output is the save confirmation only (Step 5). The full report is in the saved markdown file. Do NOT print the report contents to the terminal.
Example terminal output:
Report saved to: /Users/username/projects/seo-report-2026-03-02-example.com-monthly.md Summary: 5 sections covering Ahrefs (DR history, keywords, overview) and GSC (MoM comparison) Report type: monthly | Domain: example.com
Error — Ahrefs MCP Not Available
## Ahrefs MCP Not Available The `/seo report` command requires the Ahrefs MCP, which is not currently connected. All report types depend on Ahrefs data as their primary data source. **What you can do:** - Use `/seo audit <url>` for a full static SEO analysis without live Ahrefs data - Use `/seo technical <url>` for technical SEO issues analysis **To connect Ahrefs MCP:** - Ensure the Ahrefs MCP is registered at user scope in ~/.claude/mcp.json - Verify with: cat ~/.claude/mcp.json | grep -i ahrefs - Ahrefs MCP must be registered at user scope (not project scope) to work in subagents
Error — GSC Not Available (Non-Fatal)
When
site parameter is provided but GSC MCP is not available, do NOT stop.
Continue with Ahrefs-only data and include this note in the report:
## Google Search Console Data **Status:** GSC MCP not connected — GSC data excluded from this report. To include GSC data, connect the GSC MCP and re-run with the `site` parameter.