@houseofmvps/claude-rank 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +16 -0
- package/CLAUDE.md +65 -0
- package/LICENSE +21 -0
- package/README.md +151 -0
- package/agents/aeo-auditor.md +26 -0
- package/agents/geo-auditor.md +27 -0
- package/agents/schema-auditor.md +17 -0
- package/agents/seo-auditor.md +28 -0
- package/bin/claude-rank.mjs +66 -0
- package/commands/rank-aeo.md +3 -0
- package/commands/rank-audit.md +3 -0
- package/commands/rank-fix.md +3 -0
- package/commands/rank-geo.md +3 -0
- package/commands/rank-schema.md +3 -0
- package/commands/rank.md +5 -0
- package/hooks/hooks.json +10 -0
- package/llms.txt +21 -0
- package/package.json +58 -0
- package/research/geo-research.md +106 -0
- package/research/schema-catalog.md +170 -0
- package/research/seo-benchmarks.md +75 -0
- package/skills/rank/SKILL.md +48 -0
- package/skills/rank-aeo/SKILL.md +37 -0
- package/skills/rank-audit/SKILL.md +78 -0
- package/skills/rank-fix/SKILL.md +48 -0
- package/skills/rank-geo/SKILL.md +42 -0
- package/skills/rank-schema/SKILL.md +42 -0
- package/tools/aeo-scanner.mjs +394 -0
- package/tools/audit-history.mjs +117 -0
- package/tools/geo-scanner.mjs +531 -0
- package/tools/lib/html-parser.mjs +490 -0
- package/tools/lib/security.mjs +204 -0
- package/tools/llms-txt-generator.mjs +92 -0
- package/tools/robots-analyzer.mjs +190 -0
- package/tools/schema-engine.mjs +294 -0
- package/tools/seo-scanner.mjs +514 -0
- package/tools/sitemap-analyzer.mjs +224 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-rank",
|
|
3
|
+
"description": "The most comprehensive SEO/GEO/AEO plugin for Claude Code. Audit, fix, and dominate search.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Houseofmvps",
|
|
7
|
+
"email": "houseofmvps2024@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/Houseofmvps/claude-rank",
|
|
10
|
+
"repository": "https://github.com/Houseofmvps/claude-rank",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"seo", "geo", "aeo", "ai-search", "marketing", "agency",
|
|
14
|
+
"structured-data", "schema", "search-optimization"
|
|
15
|
+
]
|
|
16
|
+
}
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# claude-rank
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
- **Name**: claude-rank
|
|
5
|
+
- **npm**: `claude-rank` (published under Houseofmvps)
|
|
6
|
+
- **GitHub**: https://github.com/Houseofmvps/claude-rank
|
|
7
|
+
- **Description**: The most comprehensive SEO/GEO/AEO plugin for Claude Code. Audit, fix, and dominate search — traditional and AI.
|
|
8
|
+
- **License**: MIT
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
claude-rank/
|
|
14
|
+
├── bin/ # CLI entry point (claude-rank.mjs)
|
|
15
|
+
├── tools/ # Core scanning tools (seo-scanner, geo-scanner, aeo-scanner)
|
|
16
|
+
│ └── lib/ # Shared utilities (security.mjs, file-utils.mjs, etc.)
|
|
17
|
+
├── skills/ # Claude Code skill definitions (.md files, max 500 lines each)
|
|
18
|
+
├── agents/ # Autonomous agent definitions
|
|
19
|
+
├── commands/ # Slash command implementations
|
|
20
|
+
├── hooks/ # Claude Code lifecycle hooks
|
|
21
|
+
├── research/ # Research prompts and templates
|
|
22
|
+
├── tests/ # Node --test based tests
|
|
23
|
+
│ └── fixtures/ # Test HTML/JSON fixtures
|
|
24
|
+
└── .claude-plugin/ # Plugin manifest (plugin.json)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Tech Stack
|
|
28
|
+
- **Runtime**: Node.js >= 18, ESM only (`"type": "module"`)
|
|
29
|
+
- **Dependencies**: `htmlparser2` for HTML parsing (no build step required)
|
|
30
|
+
- **No TypeScript**: Plain ESM `.mjs` files throughout
|
|
31
|
+
- **No bundler**: Direct node execution
|
|
32
|
+
|
|
33
|
+
## Conventions
|
|
34
|
+
|
|
35
|
+
### Code
|
|
36
|
+
- All files use `.mjs` extension (ESM modules)
|
|
37
|
+
- File naming: kebab-case always (e.g., `seo-scanner.mjs`, `geo-checker.mjs`)
|
|
38
|
+
- Tools output JSON to stdout, exit code 0 on success
|
|
39
|
+
- Use `execFileSync` only (never `execSync` with shell strings) to prevent injection
|
|
40
|
+
- SSRF protection: always validate URLs via `tools/lib/security.mjs` before fetching
|
|
41
|
+
- Always call `checkFileSize(path)` from `tools/lib/file-utils.mjs` before `readFileSync`
|
|
42
|
+
- Skill files: max 500 lines per SKILL.md
|
|
43
|
+
|
|
44
|
+
### Scoring System
|
|
45
|
+
- All scores: 0-100 (higher is better)
|
|
46
|
+
- Deductions:
|
|
47
|
+
- `critical`: -20 points
|
|
48
|
+
- `high`: -10 points
|
|
49
|
+
- `medium`: -5 points
|
|
50
|
+
- `low`: -2 points
|
|
51
|
+
- Separate scores for SEO, GEO, and AEO — plus an overall composite
|
|
52
|
+
|
|
53
|
+
### Terminology (CRITICAL — do not mix up)
|
|
54
|
+
- **GEO** = Generative Engine Optimization (optimization for AI search engines like Perplexity, ChatGPT, Gemini) — NOT geographic
|
|
55
|
+
- **AEO** = Answer Engine Optimization (optimization for featured snippets, People Also Ask, voice search)
|
|
56
|
+
- **SEO** = Traditional Search Engine Optimization (Google, Bing crawlability, indexability, on-page)
|
|
57
|
+
|
|
58
|
+
## Git
|
|
59
|
+
- Commits: `user.email = houseofmvps2024@gmail.com`, `user.name = Houseofmvps`
|
|
60
|
+
- Commit style: conventional commits (`feat:`, `fix:`, `docs:`, `chore:`)
|
|
61
|
+
|
|
62
|
+
## Publishing
|
|
63
|
+
- npm publish with granular token via `.npmrc`
|
|
64
|
+
- `houseofmvps` account has 2FA enabled — use granular access token, not legacy token
|
|
65
|
+
- Do not `npm publish` without setting token in `.npmrc` first
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Houseofmvps
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# claude-rank
|
|
2
|
+
|
|
3
|
+
**The most comprehensive SEO/GEO/AEO plugin for Claude Code.**
|
|
4
|
+
|
|
5
|
+
Audit, fix, and dominate search — traditional and AI.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/claude-rank)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
- **74+ audit rules** across SEO (37), GEO (25), and AEO (12) — the widest coverage of any Claude Code SEO plugin
|
|
16
|
+
- **Auto-fix generators** for robots.txt, sitemap.xml, llms.txt, and JSON-LD structured data — findings become fixes in one command
|
|
17
|
+
- **Score tracking with trend history** — see whether your site is improving or declining over time
|
|
18
|
+
|
|
19
|
+
## Why it exists
|
|
20
|
+
|
|
21
|
+
Most SEO tools stop at traditional search. claude-rank covers the full picture:
|
|
22
|
+
|
|
23
|
+
- **GEO (Generative Engine Optimization)** — 25 rules targeting AI search engines: Perplexity, ChatGPT, Gemini. As AI-powered search displaces ten blue links, your content needs to be citable, structured, and authoritative for language models — not just crawlers.
|
|
24
|
+
- **AEO (Answer Engine Optimization)** — 12 rules for featured snippets, People Also Ask boxes, and voice search. Zero of these are in claude-seo.
|
|
25
|
+
- **Auto-fix** — claude-seo tells you what's wrong. claude-rank fixes it.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick start
|
|
30
|
+
|
|
31
|
+
No install required:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx claude-rank scan ./my-project
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or install globally:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install -g claude-rank
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
As a Claude Code plugin, add it to your project:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx claude-rank install
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then use slash commands directly inside Claude Code:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/rank audit
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## CLI commands
|
|
58
|
+
|
|
59
|
+
| Command | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| `npx claude-rank scan ./project` | Full SEO scan |
|
|
62
|
+
| `npx claude-rank geo ./project` | GEO (AI search) scan |
|
|
63
|
+
| `npx claude-rank aeo ./project` | AEO (answer engine) scan |
|
|
64
|
+
| `npx claude-rank schema ./project` | Structured data detection |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Slash commands (Claude Code)
|
|
69
|
+
|
|
70
|
+
| Command | Description |
|
|
71
|
+
|---------|-------------|
|
|
72
|
+
| `/rank` | Main orchestrator — routes to the right audit based on context |
|
|
73
|
+
| `/rank audit` | Full 8-phase SEO/GEO/AEO audit with auto-fix suggestions |
|
|
74
|
+
| `/rank geo` | Deep GEO audit targeting AI search engine visibility |
|
|
75
|
+
| `/rank aeo` | Answer engine optimization audit |
|
|
76
|
+
| `/rank fix` | Auto-fix all findings in one command |
|
|
77
|
+
| `/rank schema` | Detect, validate, generate, and inject JSON-LD structured data |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Scoring system
|
|
82
|
+
|
|
83
|
+
All scores run from 0 to 100. Higher is better.
|
|
84
|
+
|
|
85
|
+
Findings are weighted by severity:
|
|
86
|
+
|
|
87
|
+
| Severity | Score deduction |
|
|
88
|
+
|----------|----------------|
|
|
89
|
+
| Critical | -20 points |
|
|
90
|
+
| High | -10 points |
|
|
91
|
+
| Medium | -5 points |
|
|
92
|
+
| Low | -2 points |
|
|
93
|
+
|
|
94
|
+
Each audit produces separate SEO, GEO, and AEO scores, plus a composite score. Score history is tracked per project so you can see trends over time.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Comparison: claude-rank vs claude-seo
|
|
99
|
+
|
|
100
|
+
| Feature | claude-rank | claude-seo |
|
|
101
|
+
|---------|:-----------:|:----------:|
|
|
102
|
+
| SEO rules | 37 | ~20 |
|
|
103
|
+
| GEO — AI search (Perplexity, ChatGPT, Gemini) | 25 rules | Basic |
|
|
104
|
+
| AEO — featured snippets, voice search | 12 rules | None |
|
|
105
|
+
| Auto-fix generators | Yes | No |
|
|
106
|
+
| Schema management (detect / validate / generate / inject) | Full | Detect only |
|
|
107
|
+
| Score tracking with history and trends | Yes | None |
|
|
108
|
+
| Cross-page analysis | Yes | No |
|
|
109
|
+
| AI bot detection | 9 bots | Basic |
|
|
110
|
+
| llms.txt generation | Yes | No |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Terminology
|
|
115
|
+
|
|
116
|
+
Two terms that matter and are often confused:
|
|
117
|
+
|
|
118
|
+
- **GEO (Generative Engine Optimization)** — optimization for AI-powered search engines that generate answers (Perplexity, ChatGPT Search, Gemini). This is NOT geographic targeting.
|
|
119
|
+
- **AEO (Answer Engine Optimization)** — optimization for direct answer features: featured snippets, People Also Ask, voice assistants.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Requirements
|
|
124
|
+
|
|
125
|
+
- Node.js >= 18
|
|
126
|
+
- ESM environment (no CommonJS)
|
|
127
|
+
- No build step required
|
|
128
|
+
|
|
129
|
+
Single runtime dependency: `htmlparser2`
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Contributing
|
|
134
|
+
|
|
135
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
136
|
+
|
|
137
|
+
## Security
|
|
138
|
+
|
|
139
|
+
See [SECURITY.md](./SECURITY.md) for our vulnerability disclosure policy.
|
|
140
|
+
|
|
141
|
+
## Support
|
|
142
|
+
|
|
143
|
+
See [SUPPORT.md](./SUPPORT.md) for how to get help.
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
MIT — see [LICENSE](./LICENSE).
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
Built by [Houseofmvps](https://houseofmvps.com).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aeo-auditor
|
|
3
|
+
description: Runs AEO audit using aeo-scanner tool. Dispatched by /rank audit.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the AEO Auditor agent for claude-rank. Run an answer engine optimization audit.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Run the AEO scanner: `node ${CLAUDE_PLUGIN_ROOT}/tools/aeo-scanner.mjs <project-directory>`
|
|
12
|
+
2. Parse the JSON output for findings and scores
|
|
13
|
+
3. Check for FAQ patterns and structured data
|
|
14
|
+
|
|
15
|
+
## Output Format
|
|
16
|
+
|
|
17
|
+
Return results as a JSON code block:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"category": "aeo",
|
|
22
|
+
"scores": { "aeo": 60 },
|
|
23
|
+
"findings": [...],
|
|
24
|
+
"fixes_available": 2
|
|
25
|
+
}
|
|
26
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: geo-auditor
|
|
3
|
+
description: Runs GEO audit using geo-scanner tool. Dispatched by /rank audit.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the GEO Auditor agent for claude-rank. Run an AI search optimization audit.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Run the GEO scanner: `node ${CLAUDE_PLUGIN_ROOT}/tools/geo-scanner.mjs <project-directory>`
|
|
12
|
+
2. Parse the JSON output for findings and scores
|
|
13
|
+
3. Check robots.txt for AI bot access
|
|
14
|
+
4. Check for llms.txt existence
|
|
15
|
+
|
|
16
|
+
## Output Format
|
|
17
|
+
|
|
18
|
+
Return results as a JSON code block:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"category": "geo",
|
|
23
|
+
"scores": { "geo": 85 },
|
|
24
|
+
"findings": [...],
|
|
25
|
+
"fixes_available": 3
|
|
26
|
+
}
|
|
27
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: schema-auditor
|
|
3
|
+
description: Detects, validates, and reports on structured data. Dispatched by /rank audit.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run: `node ${CLAUDE_PLUGIN_ROOT}/tools/schema-engine.mjs detect <project-directory>`
|
|
8
|
+
|
|
9
|
+
Return JSON:
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"category": "schema",
|
|
13
|
+
"schemas_found": ["Organization", "FAQPage"],
|
|
14
|
+
"validation_issues": [],
|
|
15
|
+
"missing_recommended": ["BreadcrumbList"]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seo-auditor
|
|
3
|
+
description: Runs core SEO audit using seo-scanner tool. Dispatched by /rank audit.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are the SEO Auditor agent for claude-rank. Run a comprehensive SEO audit.
|
|
8
|
+
|
|
9
|
+
## Steps
|
|
10
|
+
|
|
11
|
+
1. Run the SEO scanner: `node ${CLAUDE_PLUGIN_ROOT}/tools/seo-scanner.mjs <project-directory>`
|
|
12
|
+
2. Parse the JSON output for findings and scores
|
|
13
|
+
3. Check for sitemap.xml, robots.txt, favicon.ico
|
|
14
|
+
|
|
15
|
+
## Output Format
|
|
16
|
+
|
|
17
|
+
Return results as a JSON code block:
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"category": "seo",
|
|
22
|
+
"scores": { "seo": 72 },
|
|
23
|
+
"findings": [
|
|
24
|
+
{ "severity": "high", "category": "seo", "rule": "missing-meta-description", "file": "index.html", "message": "No meta description found" }
|
|
25
|
+
],
|
|
26
|
+
"fixes_available": 5
|
|
27
|
+
}
|
|
28
|
+
```
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Standalone CLI: npx claude-rank <command> <directory>
|
|
3
|
+
// Commands: scan, geo, aeo, schema, fix
|
|
4
|
+
|
|
5
|
+
const [,, command = 'scan', dir = '.'] = process.argv;
|
|
6
|
+
|
|
7
|
+
const commands = {
|
|
8
|
+
scan: '../tools/seo-scanner.mjs',
|
|
9
|
+
geo: '../tools/geo-scanner.mjs',
|
|
10
|
+
aeo: '../tools/aeo-scanner.mjs',
|
|
11
|
+
schema: '../tools/schema-engine.mjs',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
if (command === 'help' || command === '--help') {
|
|
15
|
+
console.log(`claude-rank — SEO/GEO/AEO toolkit
|
|
16
|
+
|
|
17
|
+
Usage: claude-rank <command> [directory]
|
|
18
|
+
|
|
19
|
+
Commands:
|
|
20
|
+
scan Run core SEO scanner (default)
|
|
21
|
+
geo Run GEO (AI search) scanner
|
|
22
|
+
aeo Run AEO (answer engine) scanner
|
|
23
|
+
schema Detect and validate structured data
|
|
24
|
+
help Show this help message
|
|
25
|
+
|
|
26
|
+
Examples:
|
|
27
|
+
claude-rank scan ./my-project
|
|
28
|
+
npx claude-rank geo .
|
|
29
|
+
`);
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const toolPath = commands[command];
|
|
34
|
+
if (!toolPath) {
|
|
35
|
+
console.error(`Unknown command: ${command}. Run "claude-rank help" for usage.`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Dynamic import and run the scanner on the target directory
|
|
40
|
+
import { resolve } from 'path';
|
|
41
|
+
|
|
42
|
+
// Clear argv before importing tool modules so their inline CLI guards don't fire.
|
|
43
|
+
// The tool files check `process.argv.slice(2).length > 0` to auto-run on import.
|
|
44
|
+
process.argv = process.argv.slice(0, 2);
|
|
45
|
+
const mod = await import(new URL(toolPath, import.meta.url));
|
|
46
|
+
const targetDir = resolve(dir);
|
|
47
|
+
|
|
48
|
+
if (command === 'schema') {
|
|
49
|
+
// schema-engine exports detectSchema (per-file) and findHtmlFiles via html-parser.
|
|
50
|
+
// Build a directory-level result by importing the html-parser helper and scanning each file.
|
|
51
|
+
const { findHtmlFiles } = await import(new URL('../tools/lib/html-parser.mjs', import.meta.url));
|
|
52
|
+
const { readFileSync } = await import('node:fs');
|
|
53
|
+
const files = findHtmlFiles(targetDir);
|
|
54
|
+
const results = [];
|
|
55
|
+
for (const file of files) {
|
|
56
|
+
const html = readFileSync(file, 'utf-8');
|
|
57
|
+
const schemas = mod.detectSchema(html);
|
|
58
|
+
if (schemas.length > 0) {
|
|
59
|
+
results.push({ file, schemas });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
console.log(JSON.stringify(results, null, 2));
|
|
63
|
+
} else {
|
|
64
|
+
const result = mod.scanDirectory(targetDir);
|
|
65
|
+
console.log(JSON.stringify(result, null, 2));
|
|
66
|
+
}
|
package/commands/rank.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "SEO/GEO/AEO audit, analysis, and optimization. The most comprehensive search toolkit for Claude Code."
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Routes to rank sub-commands. Run `/rank` alone for a quick health check showing all scores. Use `/rank audit` for full audit with auto-fix.
|
package/hooks/hooks.json
ADDED
package/llms.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# claude-rank
|
|
2
|
+
|
|
3
|
+
claude-rank is a free, open-source Claude Code plugin for comprehensive search optimization — covering traditional SEO, Generative Engine Optimization (GEO), and Answer Engine Optimization (AEO).
|
|
4
|
+
|
|
5
|
+
## Capabilities
|
|
6
|
+
|
|
7
|
+
- **SEO Audit**: Meta tags, title/description length, heading hierarchy, canonical URLs, robots.txt, sitemap.xml, structured data (JSON-LD), Open Graph, Twitter Cards, hreflang, page speed signals
|
|
8
|
+
- **GEO Audit**: AI-crawler accessibility (GPTBot, ClaudeBot, PerplexityBot), llms.txt presence, structured content density, citation-friendly formatting, entity clarity, factual density scoring
|
|
9
|
+
- **AEO Audit**: Featured snippet eligibility, FAQ schema, HowTo schema, speakable schema, People Also Ask optimization, concise answer blocks, question-keyword targeting
|
|
10
|
+
- **Auto-fix**: Generates corrected HTML/JSON-LD patches for detected issues
|
|
11
|
+
- **Scoring**: 0-100 scores for SEO, GEO, AEO, and composite — with severity-weighted deductions
|
|
12
|
+
|
|
13
|
+
## Terminology
|
|
14
|
+
- GEO = Generative Engine Optimization (NOT geographic) — optimizing for AI search engines like Perplexity, ChatGPT, Gemini
|
|
15
|
+
- AEO = Answer Engine Optimization — optimizing for featured snippets, voice search, and direct answer surfaces
|
|
16
|
+
- SEO = Traditional Search Engine Optimization — Google/Bing crawlability, indexability, on-page signals
|
|
17
|
+
|
|
18
|
+
## Links
|
|
19
|
+
- GitHub: https://github.com/Houseofmvps/claude-rank
|
|
20
|
+
- npm: https://www.npmjs.com/package/claude-rank
|
|
21
|
+
- Author: https://houseofmvps.com
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@houseofmvps/claude-rank",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "The most comprehensive SEO/GEO/AEO plugin for Claude Code. Audit, fix, and dominate search — traditional and AI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"claude-rank": "./bin/claude-rank.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"tools/",
|
|
12
|
+
"skills/",
|
|
13
|
+
"agents/",
|
|
14
|
+
"commands/",
|
|
15
|
+
"hooks/",
|
|
16
|
+
"research/",
|
|
17
|
+
".claude-plugin/",
|
|
18
|
+
"CLAUDE.md",
|
|
19
|
+
"llms.txt"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "node --test tests/*.test.mjs",
|
|
23
|
+
"scan": "node tools/seo-scanner.mjs",
|
|
24
|
+
"geo": "node tools/geo-scanner.mjs",
|
|
25
|
+
"aeo": "node tools/aeo-scanner.mjs"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"seo",
|
|
29
|
+
"geo",
|
|
30
|
+
"aeo",
|
|
31
|
+
"ai-search",
|
|
32
|
+
"claude-code",
|
|
33
|
+
"marketing",
|
|
34
|
+
"agency",
|
|
35
|
+
"structured-data",
|
|
36
|
+
"schema",
|
|
37
|
+
"search-optimization",
|
|
38
|
+
"generative-engine-optimization",
|
|
39
|
+
"answer-engine-optimization"
|
|
40
|
+
],
|
|
41
|
+
"author": {
|
|
42
|
+
"name": "Houseofmvps",
|
|
43
|
+
"email": "houseofmvps2024@gmail.com",
|
|
44
|
+
"url": "https://houseofmvps.com"
|
|
45
|
+
},
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/Houseofmvps/claude-rank"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/Houseofmvps/claude-rank",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18.0.0"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"htmlparser2": "^9.1.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# GEO Research — Generative Engine Optimization (2026)
|
|
2
|
+
|
|
3
|
+
*GEO = Optimization for AI search platforms (ChatGPT, Perplexity, Google AI Overviews, etc.)*
|
|
4
|
+
|
|
5
|
+
## Citation & Visibility
|
|
6
|
+
|
|
7
|
+
### Content Passage Optimization
|
|
8
|
+
- **Citability sweet spot**: 134-167 words per passage (AI selection rate 68%)
|
|
9
|
+
- **Direct answer placement**: First 40-60 words (3.2x higher selection)
|
|
10
|
+
- **Passage structure**: Question → Answer → Context (preferred by LLMs)
|
|
11
|
+
- **Citation frequency**: Avg 2-3 citations per 1000 words (visibility signal)
|
|
12
|
+
|
|
13
|
+
### Multi-Modal Impact
|
|
14
|
+
- **Multimedia increases selection**: +156% (images, video, tables, charts)
|
|
15
|
+
- **Optimal image count**: 3-5 per 1000 words
|
|
16
|
+
- **Alt text optimization**: Include target keyword + context
|
|
17
|
+
- **Captions**: Significantly boost AI selection (tables, charts, diagrams)
|
|
18
|
+
- **Video transcripts**: Near-equivalent to text for AI crawlers
|
|
19
|
+
|
|
20
|
+
## Ranking Factors for AI Search
|
|
21
|
+
|
|
22
|
+
### Brand Mentions vs Backlinks
|
|
23
|
+
- **Brand mention correlation**: 3x stronger than backlink count for AI visibility
|
|
24
|
+
- **Unlinked mentions**: Now tracked by AI engines (0.8x linked mention weight)
|
|
25
|
+
- **Mention context**: Sentiment & topical relevance matter more than frequency
|
|
26
|
+
- **Brand sentiment**: Positive mentions increase selection by 2.1x
|
|
27
|
+
|
|
28
|
+
### Domain Authority & AI Selection
|
|
29
|
+
- **Domain authority vs AI citations**: 0.54 correlation (stronger than Google search)
|
|
30
|
+
- **EEAT signals**: Authoritativeness now ranked above domain authority
|
|
31
|
+
- **Author expertise**: Individual author credentials boost citation weight
|
|
32
|
+
- **Freshness signals**: Recent updates (7-30 days) preferred for breaking topics
|
|
33
|
+
|
|
34
|
+
## Technical & Crawlability
|
|
35
|
+
|
|
36
|
+
### JavaScript Execution
|
|
37
|
+
- **Critical**: AI crawlers don't execute JavaScript for content extraction
|
|
38
|
+
- **Server-render strategy**: All meaningful content must be in HTML (not client-rendered)
|
|
39
|
+
- **API-driven content**: Requires JSON-LD structured data for AI discovery
|
|
40
|
+
- **Lazy-loaded sections**: Move above-fold content to initial HTML
|
|
41
|
+
- **Single-page apps**: Add static pre-rendering or SSR for AI visibility
|
|
42
|
+
|
|
43
|
+
### Structured Data (Schema Markup)
|
|
44
|
+
- **JSON-LD format**: Required for AI content extraction
|
|
45
|
+
- **Schema coverage**: Sites with 5+ schema types cited 2.4x more often
|
|
46
|
+
- **Critical schemas**: Article, Person, Organization, BreadcrumbList
|
|
47
|
+
- **Validation**: Test via Google's Rich Results Test (AI crawlers follow similar rules)
|
|
48
|
+
|
|
49
|
+
## Content Strategy for GEO
|
|
50
|
+
|
|
51
|
+
### Question-Format Optimization
|
|
52
|
+
- **H2s as questions**: Get 3x more AI citations than statement headers
|
|
53
|
+
- **FAQ sections**: Cited in 68% of AI-generated answers
|
|
54
|
+
- **Question intent**: Match common question formats (What, How, Why, When, Where)
|
|
55
|
+
- **Long-form Q&A**: 8-12 questions per 2000-word article (optimal)
|
|
56
|
+
|
|
57
|
+
### Answer Format Preferences
|
|
58
|
+
- **Direct answer first**: 40-60 word summary before explanation
|
|
59
|
+
- **Evidence-based content**: Citations to studies/data increase credibility 2.1x
|
|
60
|
+
- **Nuanced answers**: Gray-area discussions preferred over one-sided takes
|
|
61
|
+
- **Confidence levels**: Stating uncertainty actually increases trustworthiness
|
|
62
|
+
|
|
63
|
+
## AI Platform Overlap & Visibility
|
|
64
|
+
|
|
65
|
+
### Cross-Platform Citation Data
|
|
66
|
+
- **ChatGPT & Google AI Overlap**: 11% domain overlap (different sources preferred)
|
|
67
|
+
- **Perplexity vs ChatGPT**: 34% domain overlap (Perplexity favors long-form)
|
|
68
|
+
- **Top citation sources**: News sites (28%), Wikipedia (15%), E-commerce (12%)
|
|
69
|
+
- **Content type overlap**: How-to guides (89% overlap), News (42% overlap)
|
|
70
|
+
|
|
71
|
+
### Platform-Specific Preferences
|
|
72
|
+
- **ChatGPT**: Prefers high-authority, comprehensive sources
|
|
73
|
+
- **Google AI Overviews**: Favors first-page Google ranking, schema markup
|
|
74
|
+
- **Perplexity**: Rewards sourced content, citations explicit in UI
|
|
75
|
+
- **Claude AI**: Values nuance, acknowledges limitations, multi-perspective analysis
|
|
76
|
+
|
|
77
|
+
## Content Quality Signals
|
|
78
|
+
|
|
79
|
+
### Expertise & Authority
|
|
80
|
+
- **E-E-A-T strengthened**: Experience now weighted equally with credentials
|
|
81
|
+
- **Demonstrated expertise**: Walk-through/tutorial format increases selection 1.9x
|
|
82
|
+
- **Author bio optimization**: Include relevant credentials, past work, certifications
|
|
83
|
+
- **Topical depth**: Comprehensive coverage beats multiple shallow articles
|
|
84
|
+
|
|
85
|
+
### Trustworthiness Factors
|
|
86
|
+
- **Transparency**: Disclosures, disclaimers, conflicts of interest boost trust
|
|
87
|
+
- **Source attribution**: Every claim linked to credible source (2.1x more citable)
|
|
88
|
+
- **Data freshness**: Outdated statistics reduce selection by 45%
|
|
89
|
+
- **Correction history**: Visible errata/updates signal reliability to AI
|
|
90
|
+
|
|
91
|
+
## Optimization Checklist
|
|
92
|
+
|
|
93
|
+
- [ ] Server-render all critical content (no JavaScript-dependent text)
|
|
94
|
+
- [ ] Add 3-5 relevant images/media per 1000 words with alt text
|
|
95
|
+
- [ ] Include JSON-LD schema (Article, Person, Organization minimum)
|
|
96
|
+
- [ ] Write 134-167 word passages with direct answer in first 60 words
|
|
97
|
+
- [ ] Use question-format H2s (3+ per article)
|
|
98
|
+
- [ ] Include FAQ section (8-12 questions)
|
|
99
|
+
- [ ] Cite credible sources for all factual claims
|
|
100
|
+
- [ ] Optimize author bio with relevant expertise signals
|
|
101
|
+
- [ ] Update content monthly for trending topics
|
|
102
|
+
- [ ] Monitor unlinked brand mentions + respond appropriately
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
*Data sources: Perplexity Labs, Semrush AI search study, Search Engine Journal 2026, OpenAI API research*
|