seo-supervisor 1.2.0 → 2.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.
Files changed (207) hide show
  1. package/.claude-plugin/icon.png +0 -0
  2. package/.claude-plugin/marketplace.json +2 -2
  3. package/.claude-plugin/plugin.json +16 -3
  4. package/CHANGELOG.md +430 -0
  5. package/NOTICE +7 -0
  6. package/README.md +230 -25
  7. package/agents/seo-auditor.md +16 -0
  8. package/agents/seo-reviewer.md +16 -0
  9. package/bin/agents.mjs +194 -29
  10. package/bin/extras.mjs +422 -0
  11. package/bin/prompt.mjs +34 -14
  12. package/bin/seo-supervisor.mjs +386 -53
  13. package/commands/seo-audit.md +29 -3
  14. package/commands/seo-brief.md +28 -0
  15. package/commands/seo-connect.md +27 -0
  16. package/commands/seo-fix.md +24 -3
  17. package/commands/seo-grow.md +26 -0
  18. package/commands/seo-launch.md +17 -3
  19. package/commands/seo-review.md +13 -1
  20. package/commands/seo-rewrite.md +25 -0
  21. package/commands/seo-setup.md +17 -1
  22. package/commands/seo-watch.md +28 -0
  23. package/hooks/hooks.json +117 -0
  24. package/package.json +20 -7
  25. package/skills/seo-supervisor/NOTICE +7 -0
  26. package/skills/seo-supervisor/SKILL.md +302 -21
  27. package/skills/seo-supervisor/audience.md +61 -0
  28. package/skills/seo-supervisor/examples/drafts/security.md +41 -0
  29. package/skills/seo-supervisor/examples/hooks/README.md +28 -0
  30. package/skills/seo-supervisor/examples/hooks/claude-code-settings.json +15 -0
  31. package/skills/seo-supervisor/examples/hooks/codex-hooks.json +17 -0
  32. package/skills/seo-supervisor/examples/hooks/copilot-hooks.json +15 -0
  33. package/skills/seo-supervisor/examples/hooks/cursor-hooks.json +11 -0
  34. package/skills/seo-supervisor/examples/hooks/github-actions.yml +21 -0
  35. package/skills/seo-supervisor/examples/hooks/pre-commit +17 -0
  36. package/skills/seo-supervisor/examples/hooks/reading-ease.yml +24 -0
  37. package/skills/seo-supervisor/examples/sample-audit.json +94 -2
  38. package/skills/seo-supervisor/examples/sample-report.html +111 -61
  39. package/skills/seo-supervisor/examples/sample-report.md +147 -44
  40. package/skills/seo-supervisor/examples/scheduled-runs.md +89 -0
  41. package/skills/seo-supervisor/examples/snippets.md +648 -1
  42. package/skills/seo-supervisor/grow.md +342 -0
  43. package/skills/seo-supervisor/og-images.md +85 -0
  44. package/skills/seo-supervisor/page-types.md +124 -0
  45. package/skills/seo-supervisor/planning.md +19 -7
  46. package/skills/seo-supervisor/profile-template.md +41 -0
  47. package/skills/seo-supervisor/report-format.md +177 -10
  48. package/skills/seo-supervisor/rewrite.md +59 -0
  49. package/skills/seo-supervisor/rules/ai-search.md +65 -12
  50. package/skills/seo-supervisor/rules/content.md +33 -9
  51. package/skills/seo-supervisor/rules/crawl-index.md +33 -6
  52. package/skills/seo-supervisor/rules/internal-linking.md +49 -6
  53. package/skills/seo-supervisor/rules/launch-monitoring.md +17 -8
  54. package/skills/seo-supervisor/rules/media.md +13 -1
  55. package/skills/seo-supervisor/rules/metadata.md +41 -9
  56. package/skills/seo-supervisor/rules/performance.md +50 -5
  57. package/skills/seo-supervisor/rules/rendering.md +39 -2
  58. package/skills/seo-supervisor/rules/search-intent.md +32 -0
  59. package/skills/seo-supervisor/rules/sitemaps-robots.md +24 -12
  60. package/skills/seo-supervisor/rules/structured-data.md +37 -14
  61. package/skills/seo-supervisor/rules/trust-security.md +25 -2
  62. package/skills/seo-supervisor/rules/urls.md +10 -2
  63. package/skills/seo-supervisor/scripts/ai-answers.mjs +314 -0
  64. package/skills/seo-supervisor/scripts/backlinks.mjs +412 -0
  65. package/skills/seo-supervisor/scripts/change-check.mjs +281 -0
  66. package/skills/seo-supervisor/scripts/checks/agents.mjs +488 -0
  67. package/skills/seo-supervisor/scripts/checks/assets.mjs +404 -0
  68. package/skills/seo-supervisor/scripts/checks/bots.mjs +146 -0
  69. package/skills/seo-supervisor/scripts/checks/business-type.mjs +193 -0
  70. package/skills/seo-supervisor/scripts/checks/content.mjs +391 -0
  71. package/skills/seo-supervisor/scripts/checks/coverage.mjs +184 -0
  72. package/skills/seo-supervisor/scripts/checks/crawl.mjs +95 -0
  73. package/skills/seo-supervisor/scripts/checks/hreflang.mjs +396 -0
  74. package/skills/seo-supervisor/scripts/checks/hygiene.mjs +227 -0
  75. package/skills/seo-supervisor/scripts/checks/lighthouse.mjs +271 -0
  76. package/skills/seo-supervisor/scripts/checks/link-strength.mjs +59 -0
  77. package/skills/seo-supervisor/scripts/checks/links.mjs +360 -0
  78. package/skills/seo-supervisor/scripts/checks/local.mjs +101 -0
  79. package/skills/seo-supervisor/scripts/checks/media.mjs +194 -0
  80. package/skills/seo-supervisor/scripts/checks/outbound.mjs +53 -0
  81. package/skills/seo-supervisor/scripts/checks/page.mjs +223 -0
  82. package/skills/seo-supervisor/scripts/checks/probes.mjs +130 -0
  83. package/skills/seo-supervisor/scripts/checks/render.mjs +552 -0
  84. package/skills/seo-supervisor/scripts/checks/robots.mjs +144 -0
  85. package/skills/seo-supervisor/scripts/checks/schema.mjs +206 -0
  86. package/skills/seo-supervisor/scripts/checks/site-agents.mjs +79 -0
  87. package/skills/seo-supervisor/scripts/checks/site-content.mjs +135 -0
  88. package/skills/seo-supervisor/scripts/checks/site-hygiene.mjs +202 -0
  89. package/skills/seo-supervisor/scripts/checks/site-pages.mjs +474 -0
  90. package/skills/seo-supervisor/scripts/checks/site-security.mjs +102 -0
  91. package/skills/seo-supervisor/scripts/checks/sitemap.mjs +473 -0
  92. package/skills/seo-supervisor/scripts/checks/speed.mjs +267 -0
  93. package/skills/seo-supervisor/scripts/checks/technical.mjs +368 -0
  94. package/skills/seo-supervisor/scripts/checks/tls.mjs +297 -0
  95. package/skills/seo-supervisor/scripts/checks/trust.mjs +421 -0
  96. package/skills/seo-supervisor/scripts/checks/visual.mjs +1132 -0
  97. package/skills/seo-supervisor/scripts/checks/writing.mjs +192 -0
  98. package/skills/seo-supervisor/scripts/commoncrawl.mjs +452 -0
  99. package/skills/seo-supervisor/scripts/connect-keys.mjs +422 -0
  100. package/skills/seo-supervisor/scripts/content-scan.mjs +515 -158
  101. package/skills/seo-supervisor/scripts/crawl/catalog.mjs +1248 -0
  102. package/skills/seo-supervisor/scripts/crawl/fetch.mjs +362 -0
  103. package/skills/seo-supervisor/scripts/crawl/page.mjs +741 -0
  104. package/skills/seo-supervisor/scripts/crawl/queue.mjs +190 -0
  105. package/skills/seo-supervisor/scripts/dashboard.mjs +140 -0
  106. package/skills/seo-supervisor/scripts/data/ai-bots.json +38 -0
  107. package/skills/seo-supervisor/scripts/data/build-schema-vocab.mjs +57 -0
  108. package/skills/seo-supervisor/scripts/data/business-types.json +338 -0
  109. package/skills/seo-supervisor/scripts/data/google-rich-results.json +79 -0
  110. package/skills/seo-supervisor/scripts/data/schema-vocab.json +1 -0
  111. package/skills/seo-supervisor/scripts/deploy-check.mjs +462 -0
  112. package/skills/seo-supervisor/scripts/disavow.mjs +176 -0
  113. package/skills/seo-supervisor/scripts/doctor.mjs +174 -0
  114. package/skills/seo-supervisor/scripts/geo-grid.mjs +371 -0
  115. package/skills/seo-supervisor/scripts/google/search-console.mjs +151 -0
  116. package/skills/seo-supervisor/scripts/google/session.mjs +167 -0
  117. package/skills/seo-supervisor/scripts/google-updates.mjs +189 -0
  118. package/skills/seo-supervisor/scripts/google.mjs +1341 -0
  119. package/skills/seo-supervisor/scripts/gsc-import.mjs +298 -0
  120. package/skills/seo-supervisor/scripts/guard/adapters/claude-code.mjs +149 -0
  121. package/skills/seo-supervisor/scripts/guard/adapters/cline.mjs +28 -0
  122. package/skills/seo-supervisor/scripts/guard/adapters/codex.mjs +26 -0
  123. package/skills/seo-supervisor/scripts/guard/adapters/copilot.mjs +36 -0
  124. package/skills/seo-supervisor/scripts/guard/adapters/cursor.mjs +33 -0
  125. package/skills/seo-supervisor/scripts/guard/adapters/devin.mjs +25 -0
  126. package/skills/seo-supervisor/scripts/guard/adapters/edits.mjs +124 -0
  127. package/skills/seo-supervisor/scripts/guard/mode.mjs +37 -0
  128. package/skills/seo-supervisor/scripts/guard/rules.mjs +931 -0
  129. package/skills/seo-supervisor/scripts/guard.mjs +74 -0
  130. package/skills/seo-supervisor/scripts/images.mjs +408 -0
  131. package/skills/seo-supervisor/scripts/indexnow.mjs +300 -0
  132. package/skills/seo-supervisor/scripts/issues.mjs +217 -0
  133. package/skills/seo-supervisor/scripts/keys/authority.mjs +135 -0
  134. package/skills/seo-supervisor/scripts/keys/bing.mjs +239 -0
  135. package/skills/seo-supervisor/scripts/keys/clarity.mjs +137 -0
  136. package/skills/seo-supervisor/scripts/keys/dataforseo.mjs +57 -0
  137. package/skills/seo-supervisor/scripts/keys/googleplaces.mjs +26 -0
  138. package/skills/seo-supervisor/scripts/keys/http.mjs +212 -0
  139. package/skills/seo-supervisor/scripts/keys/matomo.mjs +138 -0
  140. package/skills/seo-supervisor/scripts/keys/openai.mjs +26 -0
  141. package/skills/seo-supervisor/scripts/keys/perplexity.mjs +26 -0
  142. package/skills/seo-supervisor/scripts/keys/posthog.mjs +165 -0
  143. package/skills/seo-supervisor/scripts/keys/semrush.mjs +25 -0
  144. package/skills/seo-supervisor/scripts/keys/services.mjs +41 -0
  145. package/skills/seo-supervisor/scripts/keys/store.mjs +140 -0
  146. package/skills/seo-supervisor/scripts/keys/visits.mjs +58 -0
  147. package/skills/seo-supervisor/scripts/keys/youtube.mjs +84 -0
  148. package/skills/seo-supervisor/scripts/keyword-data.mjs +316 -0
  149. package/skills/seo-supervisor/scripts/keyword-ideas.mjs +503 -0
  150. package/skills/seo-supervisor/scripts/lib/args.mjs +56 -0
  151. package/skills/seo-supervisor/scripts/lib/business.mjs +27 -0
  152. package/skills/seo-supervisor/scripts/lib/cdp.mjs +242 -0
  153. package/skills/seo-supervisor/scripts/lib/cli.mjs +56 -0
  154. package/skills/seo-supervisor/scripts/lib/csv.mjs +38 -0
  155. package/skills/seo-supervisor/scripts/lib/findings.mjs +100 -0
  156. package/skills/seo-supervisor/scripts/lib/google-client.mjs +9 -0
  157. package/skills/seo-supervisor/scripts/lib/html.mjs +146 -0
  158. package/skills/seo-supervisor/scripts/lib/http.mjs +28 -0
  159. package/skills/seo-supervisor/scripts/lib/image-size.mjs +78 -0
  160. package/skills/seo-supervisor/scripts/lib/is-main.mjs +13 -0
  161. package/skills/seo-supervisor/scripts/lib/net.mjs +116 -0
  162. package/skills/seo-supervisor/scripts/lib/proxy.mjs +47 -0
  163. package/skills/seo-supervisor/scripts/lib/recheck.mjs +106 -0
  164. package/skills/seo-supervisor/scripts/lib/redact.mjs +78 -0
  165. package/skills/seo-supervisor/scripts/lib/robots.mjs +73 -0
  166. package/skills/seo-supervisor/scripts/lib/score.mjs +266 -0
  167. package/skills/seo-supervisor/scripts/lib/settings-dir.mjs +81 -0
  168. package/skills/seo-supervisor/scripts/links-import.mjs +603 -0
  169. package/skills/seo-supervisor/scripts/log-scan.mjs +597 -0
  170. package/skills/seo-supervisor/scripts/og-card.mjs +273 -0
  171. package/skills/seo-supervisor/scripts/osm.mjs +359 -0
  172. package/skills/seo-supervisor/scripts/rdap.mjs +164 -0
  173. package/skills/seo-supervisor/scripts/render-report.mjs +324 -690
  174. package/skills/seo-supervisor/scripts/report/client.js +37 -0
  175. package/skills/seo-supervisor/scripts/report/diff.mjs +264 -0
  176. package/skills/seo-supervisor/scripts/report/findings.mjs +165 -0
  177. package/skills/seo-supervisor/scripts/report/format.mjs +111 -0
  178. package/skills/seo-supervisor/scripts/report/markdown.mjs +250 -0
  179. package/skills/seo-supervisor/scripts/report/model.mjs +171 -0
  180. package/skills/seo-supervisor/scripts/report/overview-lines.mjs +158 -0
  181. package/skills/seo-supervisor/scripts/report/overview.mjs +224 -0
  182. package/skills/seo-supervisor/scripts/report/page.mjs +127 -0
  183. package/skills/seo-supervisor/scripts/report/panel.mjs +172 -0
  184. package/skills/seo-supervisor/scripts/report/panels/ai.mjs +211 -0
  185. package/skills/seo-supervisor/scripts/report/panels/connections.mjs +139 -0
  186. package/skills/seo-supervisor/scripts/report/panels/content.mjs +204 -0
  187. package/skills/seo-supervisor/scripts/report/panels/data-search.mjs +379 -0
  188. package/skills/seo-supervisor/scripts/report/panels/data-site.mjs +44 -0
  189. package/skills/seo-supervisor/scripts/report/panels/links.mjs +380 -0
  190. package/skills/seo-supervisor/scripts/report/panels/local.mjs +221 -0
  191. package/skills/seo-supervisor/scripts/report/panels/site.mjs +359 -0
  192. package/skills/seo-supervisor/scripts/report/panels/speed-media.mjs +267 -0
  193. package/skills/seo-supervisor/scripts/report/sources.mjs +163 -0
  194. package/skills/seo-supervisor/scripts/report/styles.css +223 -0
  195. package/skills/seo-supervisor/scripts/report/traffic.mjs +264 -0
  196. package/skills/seo-supervisor/scripts/report-plan.mjs +112 -33
  197. package/skills/seo-supervisor/scripts/schema-check.mjs +717 -0
  198. package/skills/seo-supervisor/scripts/seo-crawl.mjs +1086 -638
  199. package/skills/seo-supervisor/scripts/seo-diff.mjs +584 -0
  200. package/skills/seo-supervisor/scripts/update-check.mjs +82 -0
  201. package/skills/seo-supervisor/site-types/content.md +34 -1
  202. package/skills/seo-supervisor/site-types/ecommerce.md +38 -1
  203. package/skills/seo-supervisor/site-types/local-business.md +96 -6
  204. package/skills/seo-supervisor/site-types/services.md +46 -0
  205. package/skills/seo-supervisor/site-types/tools.md +3 -3
  206. package/skills/seo-supervisor/strategy.md +232 -0
  207. package/skills/seo-supervisor/troubleshooting.md +56 -0
@@ -1,21 +1,45 @@
1
1
  #!/usr/bin/env node
2
- // Installs the SEO Supervisor skill into the coding agents you use, plus its /seo-* commands for Claude Code. Zero dependencies.
3
- // npx seo-supervisor asks where to install and for which agents (the ones it finds are pre-selected)
4
- // npx seo-supervisor --agent cursor,codex those agents, no questions (see --help for every key)
5
- // npx seo-supervisor --scope project into this project instead of your user folders (--project works too)
6
- // npx seo-supervisor --yes no questions: the agents it finds, for you in every project
7
- // npx seo-supervisor --uninstall remove it again
8
- import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync } from "node:fs";
2
+ // @ts-check
3
+ // Installs the skill into the chosen coding agents, with each agent's commands, subagents and guard hook
4
+ // (bin/agents.mjs, bin/extras.mjs). No dependencies.
5
+ import { spawnSync } from "node:child_process";
6
+ import {
7
+ copyFileSync,
8
+ existsSync,
9
+ mkdirSync,
10
+ readFileSync,
11
+ readdirSync,
12
+ rmSync,
13
+ statSync,
14
+ writeFileSync,
15
+ } from "node:fs";
9
16
  import { homedir } from "node:os";
10
- import { dirname, join, resolve } from "node:path";
17
+ import { dirname, join, resolve, sep } from "node:path";
11
18
  import { fileURLToPath } from "node:url";
19
+ import { deflateRawSync } from "node:zlib";
12
20
  import { AGENTS, agentByKey, allTargets, detectAgents, targetsFor } from "./agents.mjs";
21
+ import { installExtras, mkdirs, prune, readRecord, removeExtras, writeRecord } from "./extras.mjs";
13
22
  import { multiSelect, select } from "./prompt.mjs";
23
+ import { browserFile, toolsDir } from "../skills/seo-supervisor/scripts/lib/settings-dir.mjs";
14
24
 
15
25
  const NAME = "seo-supervisor";
16
26
  const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
17
27
  const { version } = JSON.parse(readFileSync(join(ROOT, "package.json"), "utf8"));
18
28
 
29
+ // Subcommands that run a skill script directly, with no agent.
30
+ const SCRIPT = {
31
+ doctor: "doctor.mjs",
32
+ dashboard: "dashboard.mjs",
33
+ "deploy-check": "deploy-check.mjs",
34
+ issues: "issues.mjs",
35
+ }[process.argv[2]];
36
+ if (SCRIPT)
37
+ process.exit(
38
+ spawnSync(process.execPath, [join(ROOT, "skills", NAME, "scripts", SCRIPT), ...process.argv.slice(3)], {
39
+ stdio: "inherit",
40
+ }).status ?? 1,
41
+ );
42
+
19
43
  const HELP = `SEO Supervisor ${version}
20
44
 
21
45
  Usage: npx seo-supervisor [options]
@@ -25,11 +49,31 @@ With no options it asks where to install and for which agents.
25
49
  --agent <keys> Comma-separated agents, or "all". No questions about agents.
26
50
  --scope <scope> "user" (you, in every project) or "project" (this folder, to commit for your team)
27
51
  --project Same as --scope project
28
- --yes, -y No questions: the agents it finds (Claude Code if none), user scope
29
- --uninstall Remove what this installer added, in the chosen scope (user by default)
30
- --force Replace a skill folder or command file that isn't SEO Supervisor's
52
+ --agents Also install into the shared .agents folder (read by Codex, Cline, Zed, Warp and others), in the chosen scope
53
+ --yes, -y No questions: the agents it finds (Claude Code if none), user scope
54
+ --uninstall Remove what this installer added, in the chosen scope (user by default): the skill, commands,
55
+ subagents and guard hooks, and the folders it made for them. Your own hooks and files stay.
56
+ --no-guard Don't add the guard hook (it stops, or asks you first, before risky steps such as submitting
57
+ sitemaps, editing robots.txt or redirects, or a key pasted in chat). On by default for Codex,
58
+ Cursor, GitHub Copilot, Devin and Cline; added to their hook files next to any hooks you have.
59
+ Cline runs it in its CLI, SDK and Kanban only, not yet in the VS Code or JetBrains extension.
60
+ --force Replace a skill folder, command or subagent file that isn't SEO Supervisor's
61
+ --with-lighthouse Also install the optional Lighthouse add-on (about 170 MB, in the settings folder's tools: ~/.seo-supervisor/tools, or SEO_SUPERVISOR_HOME; not your project)
62
+ --no-lighthouse Don't ask about Lighthouse
63
+ --with-image-tools Also install the optional image add-on, sharp (about 20 MB, in the settings folder's tools), which scripts/images.mjs uses to convert images to WebP and AVIF
64
+ --with-browser Also install Chrome for Testing (in the settings folder's tools), for containers and CI with no Chrome or Edge
65
+ --zip [file] Only write the skill as a zip (seo-supervisor.zip), to upload to claude.ai or the Claude desktop app
31
66
  --version Print the version
32
67
 
68
+ Commands that run here, with no agent:
69
+ npx seo-supervisor doctor Check Node, Chrome or Edge, the add-ons and the connections (changes nothing)
70
+ npx seo-supervisor dashboard [folders...] Every audit's score, lowest first; --out dashboard.html writes a page
71
+ npx seo-supervisor deploy-check --site <url> A ten-second check after a deploy; exits 1 on a blocker (for CI)
72
+ npx seo-supervisor issues --audit <file> The audit's findings as GitHub issues: a dry run until --yes
73
+
74
+ The settings folder (~/.seo-supervisor) moves with SEO_SUPERVISOR_HOME. SEO_SUPERVISOR_CLIENT=<name> keeps a
75
+ client's logins and keys apart, in clients/<name> inside it.
76
+
33
77
  Agent keys: ${AGENTS.map(a => a.key).join(", ")}
34
78
  `;
35
79
 
@@ -38,46 +82,221 @@ const opts = {};
38
82
  const argv = process.argv.slice(2);
39
83
  for (let n = 0; n < argv.length; n++) {
40
84
  const a = argv[n];
41
- if (a === "--agent" || a === "--scope") { opts[a.slice(2)] = argv[++n]; continue; }
42
- const flag = { "--project": "project", "--agents": "agents", "--uninstall": "uninstall", "--force": "force", "--yes": "yes", "-y": "yes", "--help": "help", "-h": "help", "--version": "version", "-v": "version" }[a];
43
- if (!flag) { console.error(`Unknown option: ${a}\n\n${HELP}`); process.exit(2); }
85
+ if (a === "--agent" || a === "--scope") {
86
+ opts[a.slice(2)] = argv[++n];
87
+ continue;
88
+ }
89
+ if (a === "--with-lighthouse" || a === "--no-lighthouse") {
90
+ opts.lighthouse = a === "--with-lighthouse";
91
+ continue;
92
+ }
93
+ if (a === "--zip") {
94
+ opts.zip = argv[n + 1] && !argv[n + 1].startsWith("-") ? argv[++n] : `${NAME}.zip`;
95
+ continue;
96
+ }
97
+ const flag = {
98
+ "--project": "project",
99
+ "--agents": "agents",
100
+ "--uninstall": "uninstall",
101
+ "--no-guard": "noGuard",
102
+ "--force": "force",
103
+ "--with-image-tools": "imageTools",
104
+ "--with-browser": "browser",
105
+ "--yes": "yes",
106
+ "-y": "yes",
107
+ "--help": "help",
108
+ "-h": "help",
109
+ "--version": "version",
110
+ "-v": "version",
111
+ }[a];
112
+ if (!flag) {
113
+ console.error(`Unknown option: ${a}\n\n${HELP}`);
114
+ process.exit(2);
115
+ }
44
116
  opts[flag] = true;
45
117
  }
46
- if (opts.help) { console.log(HELP); process.exit(0); }
47
- if (opts.version) { console.log(version); process.exit(0); }
118
+ if (opts.help) {
119
+ console.log(HELP);
120
+ process.exit(0);
121
+ }
122
+ if (opts.version) {
123
+ console.log(version);
124
+ process.exit(0);
125
+ }
48
126
 
49
127
  const c = { home: homedir(), cwd: process.cwd(), env: process.env };
50
128
  const show = p => (p.startsWith(c.home) ? "~" + p.slice(c.home.length) : p).replace(/\\/g, "/");
129
+ let TOOLS; // optional add-ons, outside the package and the project
130
+ try {
131
+ TOOLS = toolsDir(c.env, c.home);
132
+ } catch (e) {
133
+ if (e.code !== "SEO_SETTINGS") throw e;
134
+ console.error(e.message);
135
+ process.exit(2);
136
+ }
51
137
  let scope = opts.scope || (opts.project ? "project" : null);
52
- if (scope && !["user", "project"].includes(scope)) { console.error(`Unknown scope: ${scope}. Use "user" or "project".`); process.exit(2); }
138
+ if (scope && !["user", "project"].includes(scope)) {
139
+ console.error(`Unknown scope: ${scope}. Use "user" or "project".`);
140
+ process.exit(2);
141
+ }
53
142
 
54
143
  let keys = null;
55
144
  if (opts.agent) {
56
- keys = opts.agent === "all" ? AGENTS.map(a => a.key) : opts.agent.split(",").map(s => s.trim()).filter(Boolean);
145
+ keys =
146
+ opts.agent === "all"
147
+ ? AGENTS.map(a => a.key)
148
+ : opts.agent
149
+ .split(",")
150
+ .map(s => s.trim())
151
+ .filter(Boolean);
57
152
  const bad = keys.find(k => !agentByKey(k));
58
- if (bad) { console.error(`Unknown agent: ${bad}\nAgent keys: ${AGENTS.map(a => a.key).join(", ")}`); process.exit(2); }
153
+ if (bad) {
154
+ console.error(`Unknown agent: ${bad}\nAgent keys: ${AGENTS.map(a => a.key).join(", ")}`);
155
+ process.exit(2);
156
+ }
59
157
  }
60
158
 
61
159
  // ---- what this package owns ----
62
160
  const SRC_SKILL = join(ROOT, "skills", NAME);
63
- const SRC_COMMANDS = join(ROOT, "commands");
64
- const commandFiles = readdirSync(SRC_COMMANDS).filter(f => f.endsWith(".md"));
65
- const ownsSkill = dir => { try { return /^name:\s*seo-supervisor\s*$/m.test(readFileSync(join(dir, "SKILL.md"), "utf8")); } catch { return false; } };
66
- const ownsCommand = file => { try { return readFileSync(file, "utf8").includes(NAME); } catch { return false; } };
161
+ // Every .md in commands/ and agents/, converted per agent by extras.mjs.
162
+ const mdIn = dir =>
163
+ existsSync(dir)
164
+ ? readdirSync(dir)
165
+ .filter(f => f.endsWith(".md"))
166
+ .sort()
167
+ : [];
168
+ const SRC = {
169
+ commands: mdIn(join(ROOT, "commands")).map(f => [f, readFileSync(join(ROOT, "commands", f), "utf8")]),
170
+ subagents: mdIn(join(ROOT, "agents")).map(f => readFileSync(join(ROOT, "agents", f), "utf8")),
171
+ };
172
+ const ownsSkill = dir => {
173
+ try {
174
+ return /^name:\s*seo-supervisor\s*$/m.test(readFileSync(join(dir, "SKILL.md"), "utf8"));
175
+ } catch {
176
+ return false;
177
+ }
178
+ };
179
+ // Copied file by file: on Windows, Node 24.12's cpSync garbles a non-ASCII path ("José" becomes "José").
180
+ const copyDir = (src, dst) => {
181
+ mkdirSync(dst, { recursive: true });
182
+ for (const e of readdirSync(src, { withFileTypes: true }))
183
+ (e.isDirectory() ? copyDir : copyFileSync)(join(src, e.name), join(dst, e.name));
184
+ };
185
+
186
+ // ---- --zip: the skill for claude.ai and the Claude desktop app, which take an uploaded zip ----
187
+ // The skill folder sits at the zip's root, named like the skill.
188
+ // https://support.claude.com/en/articles/12512198
189
+ // https://support.claude.com/en/articles/12512180
190
+ // Deflated entries with UTF-8 names, per PKWARE APPNOTE 4.3.
191
+ const CRC = Array.from({ length: 256 }, (_, n) => {
192
+ for (let k = 0; k < 8; k++) n = n & 1 ? 0xedb88320 ^ (n >>> 1) : n >>> 1;
193
+ return n >>> 0;
194
+ });
195
+ const crc32 = b => {
196
+ let x = ~0;
197
+ for (const v of b) x = CRC[(x ^ v) & 255] ^ (x >>> 8);
198
+ return ~x >>> 0;
199
+ };
200
+ function zipFolder(src, root, out) {
201
+ const files = /** @type {string[]} */ (readdirSync(src, { recursive: true }))
202
+ .filter(f => statSync(join(src, f)).isFile())
203
+ .map(f => f.split(sep).join("/"))
204
+ .sort();
205
+ const d = new Date(),
206
+ time = (d.getHours() << 11) | (d.getMinutes() << 5) | (d.getSeconds() >> 1),
207
+ date = ((d.getFullYear() - 1980) << 9) | ((d.getMonth() + 1) << 5) | d.getDate();
208
+ const parts = [],
209
+ dir = [];
210
+ let at = 0;
211
+ for (const f of files) {
212
+ const data = readFileSync(join(src, f)),
213
+ packed = deflateRawSync(data),
214
+ name = Buffer.from(`${root}/${f}`),
215
+ crc = crc32(data);
216
+ // version needed 2.0, flags: UTF-8 names, method 8 (deflate), time, date, CRC-32, sizes, name length
217
+ const common = [
218
+ [20, 2],
219
+ [0x0800, 2],
220
+ [8, 2],
221
+ [time, 2],
222
+ [date, 2],
223
+ [crc, 4],
224
+ [packed.length, 4],
225
+ [data.length, 4],
226
+ [name.length, 2],
227
+ ];
228
+ const head = (sig, extra) => {
229
+ const b = Buffer.alloc(sig === 0x04034b50 ? 30 : 46);
230
+ let o = 0;
231
+ const put = ([v, n]) => {
232
+ n === 2 ? b.writeUInt16LE(v, o) : b.writeUInt32LE(v, o);
233
+ o += n;
234
+ };
235
+ put([sig, 4]);
236
+ extra.forEach(put);
237
+ return b;
238
+ };
239
+ parts.push(head(0x04034b50, [...common, [0, 2]]), name, packed);
240
+ dir.push(head(0x02014b50, [[20, 2], ...common, [0, 2], [0, 2], [0, 2], [0, 2], [0, 4], [at, 4]]), name);
241
+ at += 30 + name.length + packed.length;
242
+ }
243
+ const cd = Buffer.concat(dir),
244
+ end = Buffer.alloc(22);
245
+ end.writeUInt32LE(0x06054b50, 0);
246
+ end.writeUInt16LE(files.length, 8);
247
+ end.writeUInt16LE(files.length, 10);
248
+ end.writeUInt32LE(cd.length, 12);
249
+ end.writeUInt32LE(at, 16);
250
+ mkdirSync(dirname(out), { recursive: true });
251
+ writeFileSync(out, Buffer.concat([...parts, cd, end]));
252
+ return files.length;
253
+ }
254
+ if (opts.zip) {
255
+ const out = resolve(opts.zip),
256
+ n = zipFolder(SRC_SKILL, NAME, out);
257
+ console.log(`Wrote ${show(out)}: the ${NAME} skill folder, ${n} files.
258
+
259
+ To use it in Claude on the web (claude.ai) or in the Claude desktop app:
260
+ 1. Turn on code execution: Settings → Capabilities → "Code execution and file creation" (or "Create and edit files").
261
+ On a Team or Enterprise plan, an owner may have to allow skills first.
262
+ 2. Open Customize → Skills, click +, then Create skill → Upload a skill, and choose ${show(out)}.
263
+ 3. Ask: "audit the SEO of https://www.example.com".
264
+
265
+ Skills uploaded there don't sync with Claude Code or other agents (install those with npx seo-supervisor), and they
266
+ don't update themselves: upload a new zip after an update. There, the crawler reaches your site only if your code
267
+ execution settings allow network access, it can't reach a site running on your own computer, and the checks that
268
+ need Chrome or Edge may not run.`);
269
+ process.exit(0);
270
+ }
67
271
 
68
272
  // ---- uninstall ----
69
273
  if (opts.uninstall) {
70
274
  scope ||= "user";
275
+ const root = scope === "project" ? c.cwd : c.home,
276
+ created = [];
71
277
  let removed = 0;
72
278
  for (const t of allTargets(scope, c)) {
73
- const dir = join(t.skills, NAME);
74
- if (ownsSkill(dir)) { rmSync(dir, { recursive: true, force: true }); console.log(`removed ${show(dir)}`); removed++; }
75
- for (const f of t.commands ? commandFiles : []) {
76
- const file = join(t.commands, f);
77
- if (ownsCommand(file)) { rmSync(file); console.log(`removed ${show(file)}`); removed++; }
279
+ const dir = join(t.skills, NAME),
280
+ record = readRecord(dir);
281
+ created.push(...record);
282
+ for (const [what, file] of removeExtras(t, { src: SRC, created: record, root })) {
283
+ console.log(
284
+ what === "kept" ? `kept ${show(file)} (the guard is out; your own hooks stay)` : `removed ${show(file)}`,
285
+ );
286
+ removed++;
287
+ }
288
+ if (ownsSkill(dir)) {
289
+ rmSync(dir, { recursive: true, force: true });
290
+ console.log(`removed ${show(dir)}`);
291
+ removed++;
78
292
  }
79
293
  }
294
+ prune(created, root); // folders the install made, once empty
80
295
  console.log(removed ? "\nSEO Supervisor uninstalled." : `\nNothing to remove in the ${scope} scope.`);
296
+ if (existsSync(TOOLS))
297
+ console.log(
298
+ `The optional add-ons (Lighthouse, about 170 MB; sharp for images, about 20 MB; Chrome for Testing) stay in ${show(TOOLS)}, shared by every install. To remove them too, delete that folder: ${TOOLS}`,
299
+ );
81
300
  process.exit(0);
82
301
  }
83
302
 
@@ -89,20 +308,44 @@ try {
89
308
  if (interactive) console.log(`\nSEO Supervisor ${version}\n`);
90
309
  if (!scope) {
91
310
  scope = interactive
92
- ? await select({ message: "Install for", items: [
93
- { value: "user", label: "Me, in every project", hint: "each agent's folder in your home directory" },
94
- { value: "project", label: "This project only", hint: `${show(c.cwd)}, to commit for your team` }] })
311
+ ? await select({
312
+ message: "Install for",
313
+ items: [
314
+ { value: "user", label: "Me, in every project", hint: "each agent's folder in your home directory" },
315
+ { value: "project", label: "This project only", hint: `${show(c.cwd)}, to commit for your team` },
316
+ ],
317
+ })
95
318
  : "user";
96
319
  }
97
320
  if (!keys) {
98
321
  if (interactive) {
99
322
  const order = [...AGENTS].sort((a, b) => Number(detected.includes(b.key)) - Number(detected.includes(a.key)));
100
323
  const where = a => show(targetsFor([a.key], scope, c)[0].skills);
101
- keys = await multiSelect({ message: "Which agents?", items: order.map(a => ({ value: a.key, label: a.name.padEnd(36), hint: `${detected.includes(a.key) ? "found · " : ""}${where(a)}` })), selected: opts.agents ? [...fallback, "other"] : fallback });
324
+ keys = await multiSelect({
325
+ message: "Which agents?",
326
+ items: order.map(a => ({
327
+ value: a.key,
328
+ label: a.name.padEnd(36),
329
+ hint: `${detected.includes(a.key) ? "found · " : ""}${where(a)}`,
330
+ })),
331
+ selected: opts.agents ? [...fallback, "other"] : fallback,
332
+ });
102
333
  } else keys = opts.agents ? [...fallback, "other"] : fallback;
103
334
  } else if (opts.agents && !keys.includes("other")) keys.push("other");
335
+ if (opts.lighthouse === undefined && interactive && !existsSync(join(TOOLS, "node_modules", "lighthouse"))) {
336
+ opts.lighthouse = await select({
337
+ message: `Add Lighthouse for speed and quality scores? It's optional, about 170 MB, installed in ${show(TOOLS)} (not your project).`,
338
+ items: [
339
+ { value: false, label: "No" },
340
+ { value: true, label: "Yes, install it" },
341
+ ],
342
+ });
343
+ }
104
344
  } catch (e) {
105
- if (e.code === "CANCELLED") { console.log("\nCancelled. Nothing was installed."); process.exit(130); }
345
+ if (e.code === "CANCELLED") {
346
+ console.log("\nCancelled. Nothing was installed.");
347
+ process.exit(130);
348
+ }
106
349
  throw e;
107
350
  }
108
351
 
@@ -110,35 +353,125 @@ try {
110
353
  let problems = 0;
111
354
  const names = [];
112
355
  if (interactive) console.log("");
356
+ const root = scope === "project" ? c.cwd : c.home;
113
357
  for (const t of targetsFor(keys, scope, c)) {
114
358
  const dir = join(t.skills, NAME);
115
359
  if (existsSync(dir) && !ownsSkill(dir) && !opts.force) {
116
360
  console.error(`skipped ${show(dir)}: it exists and isn't SEO Supervisor (use --force to replace it)`);
117
361
  problems++;
118
- } else {
119
- rmSync(dir, { recursive: true, force: true });
120
- mkdirSync(t.skills, { recursive: true });
121
- cpSync(SRC_SKILL, dir, { recursive: true });
122
- console.log(`skill ${show(dir)} (${t.agents.join(", ")})`);
123
- names.push(...t.agents);
362
+ continue; // its commands and hooks would point at a skill that isn't SEO Supervisor's
124
363
  }
125
- if (!t.commands) continue;
126
- mkdirSync(t.commands, { recursive: true });
127
- const added = [];
128
- for (const f of commandFiles) {
129
- const file = join(t.commands, f);
130
- if (existsSync(file) && !ownsCommand(file) && !opts.force) {
131
- console.error(`skipped ${show(file)}: a different /${f.slice(0, -3)} command exists (use --force to replace it)`);
132
- problems++;
133
- continue;
134
- }
135
- cpSync(join(SRC_COMMANDS, f), file);
136
- added.push("/" + f.slice(0, -3));
364
+ const created = readRecord(dir); // keeps what an earlier install made on the uninstall list
365
+ rmSync(dir, { recursive: true, force: true });
366
+ mkdirs(t.skills, created, root);
367
+ copyDir(SRC_SKILL, dir);
368
+ console.log(`skill ${show(dir)} (${t.agents.join(", ")})`);
369
+ names.push(...t.agents);
370
+ const r = installExtras(t, { src: SRC, guard: !opts.noGuard, force: opts.force, scope, root, created, show });
371
+ for (const line of r.lines) console.log(line);
372
+ for (const p of r.problems) {
373
+ console.error(`skipped ${p}`);
374
+ problems++;
375
+ }
376
+ prune(created, root); // a folder emptied by --no-guard
377
+ writeRecord(dir, created);
378
+ }
379
+
380
+ // ---- optional add-ons in TOOLS: a failure never fails the install, since the skill works without them ----
381
+ // error is null on success, else the reason. capture also returns npm's stdout, still printing it.
382
+ function npm(args, capture = false) {
383
+ const bin = c.env.SEO_SUPERVISOR_NPM || "npm",
384
+ o = /** @type {import("node:child_process").SpawnSyncOptionsWithStringEncoding} */ ({
385
+ stdio: capture ? ["inherit", "pipe", "inherit"] : "inherit",
386
+ encoding: "utf8",
387
+ });
388
+ // A .js bin runs with this Node. On Windows npm is npm.cmd, which only starts through a shell. Only parts with spaces
389
+ // are quoted: cmd gives a quoted batch name found on PATH the wrong %~dp0, and npm.cmd then can't find npm.
390
+ const r = /\.[cm]?js$/i.test(bin)
391
+ ? spawnSync(process.execPath, [bin, ...args], o)
392
+ : process.platform === "win32"
393
+ ? spawnSync([bin, ...args].map(a => (/\s/.test(a) ? `"${a}"` : a)).join(" "), { ...o, shell: true })
394
+ : spawnSync(bin, args, o);
395
+ if (capture && r.stdout) process.stdout.write(r.stdout);
396
+ return {
397
+ error: r.status === 0 ? null : r.error ? r.error.message : `npm exited with code ${r.status}`,
398
+ stdout: r.stdout || "",
399
+ };
400
+ }
401
+ // Returns null on success, else the reason.
402
+ const npmInstall = spec => npm(["install", "--prefix", TOOLS, spec, "--no-audit", "--no-fund"]).error;
403
+ if (opts.lighthouse) {
404
+ const [major, minor] = process.versions.node.split(".").map(Number);
405
+ if (major < 22 || (major === 22 && minor < 19))
406
+ console.error(
407
+ `\nLighthouse wasn't installed: Lighthouse 13 needs Node 22.19 or later, this is ${process.versions.node}. The skill works without it.`,
408
+ );
409
+ else {
410
+ console.log(`\nInstalling Lighthouse into ${show(TOOLS)} (about 170 MB, usually a minute or two)...`);
411
+ const err = npmInstall("lighthouse@13");
412
+ if (!err) console.log(`lighthouse ${show(TOOLS)} (the crawler runs it with --outside --lighthouse)`);
413
+ else
414
+ console.error(
415
+ `Lighthouse wasn't installed (${err}). The skill works without it; try again later with npx seo-supervisor --with-lighthouse, or npm i -g lighthouse.`,
416
+ );
137
417
  }
138
- if (added.length) console.log(`commands ${added.join(" ")} (${show(t.commands)})`);
418
+ }
419
+ // sharp is never prompted for: fix mode offers it when an audit finds heavy images. Each 0.x minor of sharp is a
420
+ // breaking release, so 0.35 is pinned. It's about 1 MB plus an 18–20 MB prebuilt libvips.
421
+ if (opts.imageTools) {
422
+ console.log(`\nInstalling sharp, the image add-on, into ${show(TOOLS)} (about 20 MB)...`);
423
+ const err = npmInstall("sharp@0.35");
424
+ if (!err) console.log(`sharp ${show(TOOLS)} (scripts/images.mjs converts images with it, only after your yes)`);
425
+ else
426
+ console.error(
427
+ `sharp wasn't installed (${err}). The skill works without it; try again later with npx seo-supervisor --with-image-tools.`,
428
+ );
429
+ }
430
+ // Chrome for Testing for containers and CI without Chrome or Edge, from the Chrome team's @puppeteer/browsers run with
431
+ // npm exec, never as a dependency. It prints "chrome@<build> <executable>"; settings-dir.mjs reads the saved path.
432
+ // --install-deps adds Chrome's system libraries; it needs root and works on Debian and Ubuntu.
433
+ // https://pptr.dev/browsers-api
434
+ if (opts.browser) {
435
+ console.log(`\nInstalling Chrome for Testing into ${show(join(TOOLS, "browsers"))}...`);
436
+ const deps = process.platform === "linux" && process.getuid?.() === 0 ? ["--install-deps"] : [];
437
+ const r = npm(
438
+ [
439
+ "exec",
440
+ "--yes",
441
+ "--",
442
+ "@puppeteer/browsers@3",
443
+ "install",
444
+ "chrome@stable",
445
+ "--path",
446
+ join(TOOLS, "browsers"),
447
+ ...deps,
448
+ ],
449
+ true,
450
+ );
451
+ const exe = r.stdout.match(/^chrome@\S+ (.+?)\s*$/m)?.[1];
452
+ if (!r.error && exe) {
453
+ mkdirSync(TOOLS, { recursive: true });
454
+ writeFileSync(browserFile(c.env, c.home), exe + "\n");
455
+ console.log(`chrome ${exe} (Chrome for Testing; the scripts also use it when CHROME_PATH points to it)`);
456
+ } else
457
+ console.error(
458
+ `The browser wasn't installed (${r.error || "npm didn't say where it went"}). The skill works without it: the checks that need Chrome or Edge are listed under Limits. ${deps.length || process.platform !== "linux" ? "" : "On Linux, Chrome also needs system libraries: run this as root on Debian or Ubuntu, or install them with your package manager. "}Try again later with npx seo-supervisor --with-browser.`,
459
+ );
139
460
  }
140
461
 
141
462
  const usesClaude = keys.includes("claude-code");
142
463
  console.log(`\nSEO Supervisor ${version} installed for ${names.join(", ") || "nothing"}.`);
143
- console.log(usesClaude ? `In Claude Code run /seo-audit (or /seo-setup for a site with no SEO yet).${names.length > 1 ? " In the other agents, ask: \"audit the SEO of this site\"." : ""}` : `Open your agent and ask: "audit the SEO of this site".`);
464
+ console.log(
465
+ usesClaude
466
+ ? `In Claude Code run /seo-audit (or /seo-setup for a site with no SEO yet).${names.length > 1 ? ' In the other agents, ask: "audit the SEO of this site".' : ""}`
467
+ : `Open your agent and ask: "audit the SEO of this site".`,
468
+ );
469
+ // Codex runs a new or changed hook only once it's trusted in /hooks. https://learn.chatgpt.com/docs/hooks
470
+ if (!opts.noGuard && keys.some(k => agentByKey(k).key === "codex"))
471
+ console.log("Codex runs the guard hook once you trust it: type /hooks in Codex.");
472
+ // Cline plugins run only in its SDK, CLI and Kanban. https://docs.cline.bot/customization/plugins
473
+ if (!opts.noGuard && keys.some(k => agentByKey(k).key === "cline"))
474
+ console.log(
475
+ "Cline runs the guard in its CLI, SDK and Kanban only, not yet in the VS Code or JetBrains extension (they don't run plugins), so there the guard is off.",
476
+ );
144
477
  process.exit(problems ? 1 : 0);
@@ -1,7 +1,33 @@
1
1
  ---
2
- description: Audit this site's SEO (read-only) and write the HTML report
3
- argument-hint: "[local or staging URL, or notes]"
2
+ description: "Audit this site's SEO (read-only) and write the HTML report. Answers: what's wrong with my SEO?, why aren't my pages indexed or ranking?, what should I fix first? Given a page URL: what's wrong with this page? For a change or PR, use /seo-review; for fixing, use /seo-fix."
3
+ argument-hint: "[site or page URL, or notes]"
4
+ allowed-tools:
5
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs)
6
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/doctor.mjs *)
7
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/seo-crawl.mjs *)
8
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/seo-diff.mjs *)
9
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/content-scan.mjs *)
10
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/gsc-import.mjs *)
11
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/google.mjs fetch *)
12
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/keyword-ideas.mjs *)
13
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/links-import.mjs *)
14
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/log-scan.mjs *)
15
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/render-report.mjs *)
4
16
  ---
5
- Use the **seo-supervisor** skill in **audit** mode for this project. Follow its SKILL.md exactly: change no source, content or config; crawl the site, inspect the code and content data, then write `seo-audit/seo-audit.json` and render it, which produces `seo-audit/seo-audit.html` and `seo-audit/seo-audit.md`. Finish with the health score and band, the verdict, counts by severity, the top three problems, both report paths, and an offer to fix.
17
+ **Script paths:** here `<skill-dir>` is `${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor`. Run each script by that path exactly as written, with no `cd` first, for example `node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs`: that's the form this command's pre-approved scripts match, so they run without a prompt. Any other form, or a path with a space in it (quote it), still works and asks first. If that path starts with `$` (installed with npx, not as the plugin), `<skill-dir>` is the folder that holds the skill's SKILL.md, and each script asks first.
18
+
19
+ Use the **seo-supervisor** skill in **audit** mode for this project. Follow its SKILL.md exactly: change no source, content or config; crawl the site, inspect the code and content data, then write `seo-audit/seo-audit.json` and render it, which produces `seo-audit/seo-audit.html` and `seo-audit/seo-audit.md`.
20
+
21
+ - **One page:** when the user gives a URL with a path (`https://www.example.com/pricing/`), check that one page only. Crawl it with `seo-crawl.mjs --url <that URL> --max 1 --out seo-audit/page/seo-crawl.json` and skip the history step, so the full audit's files stay as they are. Report only the findings whose evidence is that URL, and say "one page only" in the answer. A URL without a path (or none) audits the whole site.
22
+ - **AI search and local results** are part of the audit: the AI crawler table and AI referrals, and for a local business, the local checks.
23
+
24
+ Finish with the score and band (and, while blockers are open, the score fixing them unlocks and who has to do it), the verdict, counts by severity, the top three problems, both report paths, and an offer to fix (`/seo-fix`). Then offer, once each and only where it fits:
25
+ - the data connections not set up yet (`/seo-connect`; record the answers in `seo-audit/settings.json`)
26
+ - GitHub issues for the open findings (`issues.mjs`: a dry run first, `--yes` only after the owner's yes)
27
+ - the AI answer check, for any site: whether ChatGPT or Perplexity cite it (the owner's own key, at their cost)
28
+ - the geo-grid, for a local business: where it shows up around town (the owner's own Google key)
29
+ - setup (`/seo-setup`) if the site has almost no SEO in place
30
+
31
+ For a change or PR, use `/seo-review`. For fixing findings, use `/seo-fix`. For what changed since this audit, use `/seo-watch`.
6
32
 
7
33
  Extra details from the user (may be empty): $ARGUMENTS
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: "Write an SEO content brief for a topic or page. Answers: what should this page say?, which phrases and questions should it cover?, how do I plan a cluster of posts? Read-only. For changing the words of a page that exists, use /seo-rewrite."
3
+ argument-hint: "[topic or URL]"
4
+ allowed-tools:
5
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs)
6
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/keyword-ideas.mjs *)
7
+ ---
8
+ **Script paths:** here `<skill-dir>` is `${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor`. Run each script by that path exactly as written, with no `cd` first, for example `node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs`: that's the form this command's pre-approved scripts match, so they run without a prompt. Any other form, or a path with a space in it (quote it), still works and asks first. If that path starts with `$` (installed with npx, not as the plugin), `<skill-dir>` is the folder that holds the skill's SKILL.md, and each script asks first.
9
+
10
+ Use the **seo-supervisor** skill in **brief** mode for: $ARGUMENTS
11
+
12
+ Follow the brief format in `strategy.md` exactly, with its headings: Intent · Target and related phrases · Title and description · What's new here · Outline · Questions to answer · Facts needed from the owner · Internal links in and out.
13
+
14
+ - **Read-only.** Write only in `seo-audit/briefs/`. Never edit the project's code, content or config.
15
+ - **Facts:** use only what the site or the owner says. Anything else is a visible `[owner: …]` placeholder.
16
+ - **Intent first:** state the page's search intent, and get the owner's OK on it before reading any search results.
17
+ - **What ranks:** look at the search results only with outside checks on and `intent` in `outsideChecks.approved` (`seo-audit/settings.json` or the SEO profile; if neither says, ask once). Name the search engine and the date. Never invent volumes or rankings.
18
+ - **Keyword ideas:** when `seo-audit/` has `google.json` or `gsc.json`, run `keyword-ideas.mjs` as SKILL.md's Keyword ideas says, and show the ideas with their sources. Only phrases the owner picks become targets.
19
+ - **Keyword data (optional, the owner pays):** if `connect-keys.mjs status` shows DataForSEO or Semrush, offer `keyword-data.mjs` for the candidate phrases as SKILL.md says: show its dry run, and add `--yes` only after the owner agrees.
20
+ - **Links:** read the site's routes or the last crawl (`seo-audit/seo-crawl.json`) so every internal link in the brief points at a page that exists.
21
+ - **Sources:** use the project's files, its content dump and the last crawl. Don't query a CMS or other API; what you can't find there is a question for the owner.
22
+ - **The URL of an existing page:** start with the One page review in `strategy.md`, and put its wireframe at the top of the brief.
23
+ - **A comparison page** ("X vs Y", "alternatives to X", "best X"): add the parts under "Comparison briefs" in `strategy.md`.
24
+ - **A whole cluster:** write one brief per post, as "Briefs for a whole cluster" in `strategy.md` says. Confirm the list of posts with the owner first.
25
+
26
+ Finish with the brief's path (or the cluster's index) and the facts it still needs from the owner.
27
+
28
+ For changing the words of a page that exists, use `/seo-rewrite`. For which pages to work on next, use `/seo-grow`.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: "Check the setup and connect data sources. Answers: is my setup OK?, why did a script fail?, is Search Console connected?, how do I add my Bing, Clarity or other key? Changes nothing in the project. For using the data in a report, use /seo-audit."
3
+ argument-hint: "[service, e.g. google, bing, clarity]"
4
+ allowed-tools:
5
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs)
6
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/doctor.mjs *)
7
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/google.mjs status)
8
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/google.mjs guide)
9
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/connect-keys.mjs status)
10
+ - Bash(node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/connect-keys.mjs guide *)
11
+ ---
12
+ **Script paths:** here `<skill-dir>` is `${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor`. Run each script by that path exactly as written, with no `cd` first, for example `node ${CLAUDE_PLUGIN_ROOT}/skills/seo-supervisor/scripts/update-check.mjs`: that's the form this command's pre-approved scripts match, so they run without a prompt. Any other form, or a path with a space in it (quote it), still works and asks first. If that path starts with `$` (installed with npx, not as the plugin), `<skill-dir>` is the folder that holds the skill's SKILL.md, and each script asks first.
13
+
14
+ Use the **seo-supervisor** skill in **connect** mode for this project. Follow SKILL.md's Connect mode and its Connections list (step 2).
15
+
16
+ 1. **Run `doctor.mjs` first.** It checks Node, Chrome or Edge, the add-ons and the connections, and changes nothing. Pass on anything marked `!!` with its fix.
17
+ 2. **Show each connection's status** from `google.mjs status`, `connect-keys.mjs status` and `seo-audit/settings.json` `"connections"`: Google Search Console and Analytics, Bing Webmaster Tools, Open PageRank, Ahrefs, Moz, YouTube, Microsoft Clarity, Matomo or PostHog (only if the site uses one), and the owner-paid ones: AI answers (Perplexity, OpenAI), the geo-grid (Google Places, local businesses) and keyword data (DataForSEO, Semrush).
18
+ 3. **Offer to connect** the ones not set up (or only the service named), one at a time, saying what each adds and what it sends where. A no is fine: record it in `settings.json` and don't ask again.
19
+ - **Google:** sign-in with `google.mjs connect --print-url`, as SKILL.md step 2 says.
20
+ - **Keys:** `connect-keys.mjs guide <service>` says where to get one. The owner types it at the hidden prompt in their own terminal: `node <skill-dir>/scripts/connect-keys.mjs set <service>` (in Claude Code, type `!` first). **Never ask for a key in chat**, and never put one on the command line, in a file in the project, or in a commit. If the owner pastes a key in chat, tell them to revoke it with the service and make a new one.
21
+ 4. Confirm each new connection with its status line.
22
+
23
+ Finish with a table: each connection, connected or not, and what it adds. Then offer `/seo-audit` to use the new data.
24
+
25
+ For an audit that uses the connections, use `/seo-audit`. For whether a change helped, use `/seo-watch`.
26
+
27
+ Service from the user (may be empty): $ARGUMENTS