Purpose
Run a complete SEO ranking diagnosis and optimization pipeline:
- inspect live SERP competition,
- compare competitor content structure with user content,
- enrich with difficulty/backlink data when API access exists,
- produce concrete rewrite guidance and an optimized Markdown draft.
This is an orchestration skill. It does not replace upstream tools.
Required Installed Skills
brave-search (inspected latest: 1.0.1)
summarize (inspected latest: 1.0.0)
api-gateway (inspected latest: 1.0.29)
markdown-converter (inspected latest: 1.0.0)
Install/update:
npx -y clawhub@latest install brave-search
npx -y clawhub@latest install summarize
npx -y clawhub@latest install api-gateway
npx -y clawhub@latest install markdown-converter
npx -y clawhub@latest update --all
Verify:
npx -y clawhub@latest list
Required Credentials
BRAVE_API_KEY (for brave-search)
MATON_API_KEY (for api-gateway)
- One summarize model key:
OPENAI_API_KEY, or
ANTHROPIC_API_KEY, or
XAI_API_KEY, or
GEMINI_API_KEY
Optional:
FIRECRAWL_API_KEY (for difficult page extraction via summarize)
APIFY_API_TOKEN (for YouTube fallback in summarize)
Preflight:
echo "$BRAVE_API_KEY" | wc -c
echo "$MATON_API_KEY" | wc -c
echo "$OPENAI_API_KEY$ANTHROPIC_API_KEY$XAI_API_KEY$GEMINI_API_KEY" | wc -c
Mandatory behavior:
- Never fail silently on missing keys.
- Always return a
MissingAPIKeys section with missing variables and blocked stages.
- Continue with non-blocked stages and clearly mark output as
Partial when necessary.
Inputs the LM Must Collect First
target_url
target_keyword (example: AI tools)
region_locale (country/language for SERP interpretation)
content_source (URL fetch, pasted text, or file path)
content_type (blog, category page, product page, landing page)
business_goal (traffic, leads, sales)
rewrite_scope (light, moderate, full)
data_provider_preference (semrush, ahrefs, gsc-only, none)
Do not run rewrite before keyword intent and content goal are explicit.
Tool Responsibilities
brave-search
Use for live SERP reconnaissance:
- fetch top results for the target keyword,
- identify top competitors and search intent patterns,
- collect candidate URLs for deeper analysis.
Operational constraints from inspected skill:
- requires
BRAVE_API_KEY
- supports content extraction with
--content
summarize
Use for structured competitor content analysis:
- summarize each top URL,
- extract heading structure (H1-H4), topic coverage, entity frequency,
- estimate content depth and rhetorical style differences.
Operational constraints from inspected skill:
- requires one supported model API key
- can use
--extract-only, --json, and length controls
api-gateway
Use for external SEO data APIs only when active connections exist:
- keyword difficulty,
- backlink domains,
- competitor link intersections,
- search performance enrichments.
Operational constraints from inspected skill:
- requires
MATON_API_KEY
- also requires active OAuth/connection per app (
ctrl.maton.ai connection lifecycle)
- API key alone does not grant third-party data access
Important capability note:
- In the inspected
api-gateway service list, semrush and ahrefs are not listed as native app names.
- Use direct Semrush/Ahrefs integration only if user already has a working gateway connection path for those providers.
- Otherwise fall back to available SEO apps (for example
google-search-console) and manual competitor-link extraction.
markdown-converter
Use to normalize the user's own content into editable Markdown:
- convert input documents/files to Markdown (
uvx markitdown ...),
- preserve headings/lists/tables for deterministic rewriting.
Canonical Causal Signal Chain
Input Stage
- user provides URL + target keyword (+ content source if needed).
SERP Audit Stage (brave-search)
- pull live SERP and identify top 3 competitors.
- detect intent class (informational/commercial/transactional).
Competitor Content Stage (summarize)
- analyze top competitor URLs for:
- heading hierarchy,
- topical breadth and entities,
- use of statistics/evidence,
- sentence complexity and content length.
Data Gate Stage (api-gateway)
- check whether provider data can be retrieved.
- if keyword difficulty/backlink data is unavailable, ask user for credentials/connection and continue with fallback path.
Required user-facing gate message format:
DataGateStatus: available / blocked
Reason: missing key, missing connection, or provider unsupported
Action: exact next step and link(s)
As of February 14, 2026:
- Semrush advertises mainly 7-day toolkit trials on official pages.
- Semrush 14-day trial language is mainly associated with some add-ons or partner offers.
When user requests a 14-day Semrush trial:
- Ask for their preferred affiliate/referral URL first.
- If none is provided, share official Semrush trial entry page:
https://www.semrush.com/sem/.
- Optionally share Ahrefs free path for verified sites:
https://ahrefs.com/webmaster-tools.
Optimization Stage (LLM rewrite)
- rewrite user content for intent-match and topical completeness,
- add natural related terms (LSI-style concept coverage),
- improve title tag and meta description,
- tighten heading structure and internal linking opportunities.
Output Stage
- deliver optimized Markdown,
- deliver prioritized action list,
- deliver at least 5 backlink source opportunities (with confidence labels).
Rewrite Policy
- Preserve factual integrity (do not invent statistics or case studies).
- Prefer semantic coverage over keyword stuffing.
- Keep keyword usage natural and intent-aligned.
- Add scannable structure (clear H2/H3, concise paragraphs, actionable bullets).
Output Contract
Always return:
SERPFindings
- top competitors
- observed intent pattern
- structural/content gaps versus user page
DataGateStatus
- provider requested
- key/connection status
- fallback mode selected
OptimizedMarkdown
- full rewritten document
- revised title and meta description
BacklinkOpportunities
- 5 sources/domains used by competitors or high-fit alternatives
- rationale per source
- confidence (
high|medium|low)
NextActions
- concrete implementation checklist (ordered)
Quality Gates
Before final output, validate:
- top competitor set is from live SERP, not memory
- rewrite aligns with detected intent
- no fabricated citations or fabricated backlink claims
- keyword placement is natural (no spam repetition)
- missing data dependencies are explicitly disclosed
If any gate fails, return Needs Revision with exact missing evidence.
Failure Handling
- Missing
BRAVE_API_KEY: return MissingAPIKeys, skip SERP stage, and request user-provided competitor URLs.
- Missing summarize model key: return
MissingAPIKeys, skip summarize stage, and provide structure-only audit from available snippets.
- Missing
MATON_API_KEY: return MissingAPIKeys, skip API-gateway enrichment, continue with on-page-only optimization.
- Missing app connection in api-gateway (400): keep pipeline running in fallback mode and return exact connection setup steps.
- Unsupported provider path (for example no Semrush/Ahrefs app connection): disclose limitation and fall back to GSC/manual mode.
Guardrails
- Never claim guaranteed rankings.
- Never represent fallback estimates as provider-verified metrics.
- Never hide dependency failures.
- Keep recommendations specific, measurable, and tied to observed SERP gaps.
1---2name: seo-ranker3description: Meta-skill for end-to-end SEO auditing and on-page optimization by orchestrating brave-search, summarize, api-gateway, and markdown-converter. Use when users want to understand why a page is not ranking for a target keyword and need concrete rewrite actions plus backlink intelligence.4---5
6# Purpose
7
8Run a complete SEO ranking diagnosis and optimization pipeline:
91. inspect live SERP competition,
102. compare competitor content structure with user content,
113. enrich with difficulty/backlink data when API access exists,
124. produce concrete rewrite guidance and an optimized Markdown draft.
13
14This is an orchestration skill. It does not replace upstream tools.
15
16# Required Installed Skills
17
18- `brave-search` (inspected latest: `1.0.1`)
19- `summarize` (inspected latest: `1.0.0`)
20- `api-gateway` (inspected latest: `1.0.29`)
21- `markdown-converter` (inspected latest: `1.0.0`)
22
23Install/update:
24
25```bash
26npx -y clawhub@latest install brave-search
27npx -y clawhub@latest install summarize
28npx -y clawhub@latest install api-gateway
29npx -y clawhub@latest install markdown-converter
30npx -y clawhub@latest update --all
31```
32
33Verify:
34
35```bash
36npx -y clawhub@latest list
37```
38
39# Required Credentials
40
41- `BRAVE_API_KEY` (for `brave-search`)
42- `MATON_API_KEY` (for `api-gateway`)
43- One summarize model key:
44 - `OPENAI_API_KEY`, or
45 - `ANTHROPIC_API_KEY`, or
46 - `XAI_API_KEY`, or
47 - `GEMINI_API_KEY`
48
49Optional:
50- `FIRECRAWL_API_KEY` (for difficult page extraction via summarize)
51- `APIFY_API_TOKEN` (for YouTube fallback in summarize)
52
53Preflight:
54
55```bash
56echo "$BRAVE_API_KEY" | wc -c
57echo "$MATON_API_KEY" | wc -c
58echo "$OPENAI_API_KEY$ANTHROPIC_API_KEY$XAI_API_KEY$GEMINI_API_KEY" | wc -c
59```
60
61Mandatory behavior:
62- Never fail silently on missing keys.
63- Always return a `MissingAPIKeys` section with missing variables and blocked stages.
64- Continue with non-blocked stages and clearly mark output as `Partial` when necessary.
65
66# Inputs the LM Must Collect First
67
68- `target_url`
69- `target_keyword` (example: `AI tools`)
70- `region_locale` (country/language for SERP interpretation)
71- `content_source` (URL fetch, pasted text, or file path)
72- `content_type` (`blog`, `category page`, `product page`, `landing page`)
73- `business_goal` (`traffic`, `leads`, `sales`)
74- `rewrite_scope` (`light`, `moderate`, `full`)
75- `data_provider_preference` (`semrush`, `ahrefs`, `gsc-only`, `none`)
76
77Do not run rewrite before keyword intent and content goal are explicit.
78
79# Tool Responsibilities
80
81## brave-search
82
83Use for live SERP reconnaissance:
84- fetch top results for the target keyword,
85- identify top competitors and search intent patterns,
86- collect candidate URLs for deeper analysis.
87
88Operational constraints from inspected skill:
89- requires `BRAVE_API_KEY`
90- supports content extraction with `--content`
91
92## summarize
93
94Use for structured competitor content analysis:
95- summarize each top URL,
96- extract heading structure (H1-H4), topic coverage, entity frequency,
97- estimate content depth and rhetorical style differences.
98
99Operational constraints from inspected skill:
100- requires one supported model API key
101- can use `--extract-only`, `--json`, and length controls
102
103## api-gateway
104
105Use for external SEO data APIs only when active connections exist:
106- keyword difficulty,
107- backlink domains,
108- competitor link intersections,
109- search performance enrichments.
110
111Operational constraints from inspected skill:
112- requires `MATON_API_KEY`
113- also requires active OAuth/connection per app (`ctrl.maton.ai` connection lifecycle)
114- API key alone does not grant third-party data access
115
116Important capability note:
117- In the inspected `api-gateway` service list, `semrush` and `ahrefs` are not listed as native app names.
118- Use direct Semrush/Ahrefs integration only if user already has a working gateway connection path for those providers.
119- Otherwise fall back to available SEO apps (for example `google-search-console`) and manual competitor-link extraction.
120
121## markdown-converter
122
123Use to normalize the user's own content into editable Markdown:
124- convert input documents/files to Markdown (`uvx markitdown ...`),
125- preserve headings/lists/tables for deterministic rewriting.
126
127# Canonical Causal Signal Chain
128
1291. `Input Stage`
130- user provides URL + target keyword (+ content source if needed).
131
1322. `SERP Audit Stage (brave-search)`
133- pull live SERP and identify top 3 competitors.
134- detect intent class (informational/commercial/transactional).
135
1363. `Competitor Content Stage (summarize)`
137- analyze top competitor URLs for:
138 - heading hierarchy,
139 - topical breadth and entities,
140 - use of statistics/evidence,
141 - sentence complexity and content length.
142
1434. `Data Gate Stage (api-gateway)`
144- check whether provider data can be retrieved.
145- if keyword difficulty/backlink data is unavailable, ask user for credentials/connection and continue with fallback path.
146
147Required user-facing gate message format:
148- `DataGateStatus`: available / blocked
149- `Reason`: missing key, missing connection, or provider unsupported
150- `Action`: exact next step and link(s)
151
152As of February 14, 2026:
153- Semrush advertises mainly 7-day toolkit trials on official pages.
154- Semrush 14-day trial language is mainly associated with some add-ons or partner offers.
155
156When user requests a 14-day Semrush trial:
157- Ask for their preferred affiliate/referral URL first.
158- If none is provided, share official Semrush trial entry page: `https://www.semrush.com/sem/`.
159- Optionally share Ahrefs free path for verified sites: `https://ahrefs.com/webmaster-tools`.
160
1615. `Optimization Stage (LLM rewrite)`
162- rewrite user content for intent-match and topical completeness,
163- add natural related terms (LSI-style concept coverage),
164- improve title tag and meta description,
165- tighten heading structure and internal linking opportunities.
166
1676. `Output Stage`
168- deliver optimized Markdown,
169- deliver prioritized action list,
170- deliver at least 5 backlink source opportunities (with confidence labels).
171
172# Rewrite Policy
173
174- Preserve factual integrity (do not invent statistics or case studies).
175- Prefer semantic coverage over keyword stuffing.
176- Keep keyword usage natural and intent-aligned.
177- Add scannable structure (clear H2/H3, concise paragraphs, actionable bullets).
178
179# Output Contract
180
181Always return:
182
183- `SERPFindings`
184 - top competitors
185 - observed intent pattern
186 - structural/content gaps versus user page
187
188- `DataGateStatus`
189 - provider requested
190 - key/connection status
191 - fallback mode selected
192
193- `OptimizedMarkdown`
194 - full rewritten document
195 - revised title and meta description
196
197- `BacklinkOpportunities`
198 - 5 sources/domains used by competitors or high-fit alternatives
199 - rationale per source
200 - confidence (`high|medium|low`)
201
202- `NextActions`
203 - concrete implementation checklist (ordered)
204
205# Quality Gates
206
207Before final output, validate:
208- top competitor set is from live SERP, not memory
209- rewrite aligns with detected intent
210- no fabricated citations or fabricated backlink claims
211- keyword placement is natural (no spam repetition)
212- missing data dependencies are explicitly disclosed
213
214If any gate fails, return `Needs Revision` with exact missing evidence.
215
216# Failure Handling
217
218- Missing `BRAVE_API_KEY`: return `MissingAPIKeys`, skip SERP stage, and request user-provided competitor URLs.
219- Missing summarize model key: return `MissingAPIKeys`, skip summarize stage, and provide structure-only audit from available snippets.
220- Missing `MATON_API_KEY`: return `MissingAPIKeys`, skip API-gateway enrichment, continue with on-page-only optimization.
221- Missing app connection in api-gateway (400): keep pipeline running in fallback mode and return exact connection setup steps.
222- Unsupported provider path (for example no Semrush/Ahrefs app connection): disclose limitation and fall back to GSC/manual mode.
223
224# Guardrails
225
226- Never claim guaranteed rankings.
227- Never represent fallback estimates as provider-verified metrics.
228- Never hide dependency failures.
229- Keep recommendations specific, measurable, and tied to observed SERP gaps.