serpkin 0.2.26 → 0.2.27

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/README.md CHANGED
@@ -39,7 +39,7 @@ Requires Node 22 or newer. No dependencies. Builder and Pro start with a 7-day f
39
39
  - **Cursor**: merges into `.cursor/mcp.json` and writes the project rule `.cursor/rules/serpkin.mdc` with the SEO loop.
40
40
  - **Codex**: appends `[mcp_servers.serpkin]` to `~/.codex/config.toml` once and adds a short "Serpkin SEO" section to the project's `AGENTS.md` (it asks first, and creates the file if it's missing).
41
41
 
42
- All three configs run a small local MCP bridge, `npx -y serpkin@0.2.26 mcp`, which reads the key saved at sign-in and forwards requests to `https://serpkin.com/api/mcp` (a self-hosted server adds `--server <origin>` to the args). The configs hold no key and no environment variable, so there is nothing to export.
42
+ All three configs run a small local MCP bridge, `npx -y serpkin@0.2.27 mcp`, which reads the key saved at sign-in and forwards requests to `https://serpkin.com/api/mcp` (a self-hosted server adds `--server <origin>` to the args). The configs hold no key and no environment variable, so there is nothing to export.
43
43
 
44
44
  The rule and the `AGENTS.md` section sit between `<!-- serpkin:start -->` and `<!-- serpkin:end -->`. Re-running init refreshes only that block and keeps everything else.
45
45
  4. **Registers the site**, which queues its initial audit on the server, and uploads a route map (URL path → source file), so missions can name the files to change.
@@ -77,7 +77,7 @@ Inside a session you can run `/plugin marketplace add apwn/serpkin`, then `/plug
77
77
 
78
78
  - the **`serpkin-seo` skill**, which runs the loop: next mission → implement → run checks → check the preview → submit → verify the preview → verify production after you deploy. It treats page text and search data as untrusted and never deploys.
79
79
  - **commands**: `/serpkin:next` gets the next mission and implements it. `/serpkin:ship <preview-url>` submits it, checks the preview and verifies. `/serpkin:check <preview-url>` runs `serpkin check` (the pinned CLI version from the public npm registry). `/serpkin:status` shows the site status. `/serpkin:manager` sets up a weekly SEO manager for one site, or `/serpkin:manager all` for one check-in across every site, and runs the first check-in.
80
- - the **Serpkin MCP server**, run as the same stdio bridge (`npx -y serpkin@0.2.26 mcp`). It uses the key saved at sign-in, so there is nothing to export. `SERPKIN_API_KEY` is an optional override, and `SERPKIN_SERVER` picks a self-hosted or local server (default `https://serpkin.com`).
80
+ - the **Serpkin MCP server**, run as the same stdio bridge (`npx -y serpkin@0.2.27 mcp`). It uses the key saved at sign-in, so there is nothing to export. `SERPKIN_API_KEY` is an optional override, and `SERPKIN_SERVER` picks a self-hosted or local server (default `https://serpkin.com`).
81
81
 
82
82
  - **hooks** (quiet by design, only in repositories with `.serpkin.json`):
83
83
  - **Session start**: one line with the next mission and "run /serpkin:next". It is fetched with a 2.5-second timeout and cached for an hour per site (failures for 30 minutes); submitting, verifying, starting, dismissing or creating a mission through the Serpkin tools clears the cache, so the line never names a mission you just shipped. It says nothing when you are offline, signed out or the project isn't linked.
@@ -93,7 +93,7 @@ Clients without plugins get the same loop as MCP prompts: `next_mission`, `ship_
93
93
 
94
94
  ### Where the key goes
95
95
 
96
- The key is **never written into your repository.** It is stored in `~/.config/serpkin/credentials.json` (mode 600, keyed by server). Agent configs run `npx -y serpkin@0.2.26 mcp`, which reads it from there, so they hold no key and no environment variable, and you don't need to export anything.
96
+ The key is **never written into your repository.** It is stored in `~/.config/serpkin/credentials.json` (mode 600, keyed by server). Agent configs run `npx -y serpkin@0.2.27 mcp`, which reads it from there, so they hold no key and no environment variable, and you don't need to export anything.
97
97
 
98
98
  `SERPKIN_API_KEY` still works and takes precedence over the saved key: use it in CI and GitHub Actions, or if you prefer it. Configs written by older versions (`${SERPKIN_API_KEY}` / `${env:SERPKIN_API_KEY}` / `bearer_token_env_var`) keep working while the variable is set. Re-running `npx serpkin` switches `.mcp.json` and `.cursor/mcp.json` to the bridge; an existing Codex table that reads the variable is left alone and the CLI prints the new block to replace it. A Codex bridge entry pinned to an older CLI version gets just that version updated.
99
99
 
package/lib/commands.mjs CHANGED
@@ -1072,11 +1072,25 @@ export function printCheck(r) {
1072
1072
  for (const x of r.regressions)
1073
1073
  out.line(`${c.red("✗")} ${x.path} ${x.message}`);
1074
1074
  }
1075
- if (r.warnings.length) {
1075
+ // A dev build that marks every page noindex on purpose: one note, not a regression per page.
1076
+ if (r.dev_build?.note) out.line(c.dim(r.dev_build.note));
1077
+ // What production already has (a login page that is noindex on purpose) isn't news on every run: one line.
1078
+ const same = (w) => w.unchanged ?? /\(already the case in production\)$/.test(w.message);
1079
+ const fresh = r.warnings.filter((w) => !same(w));
1080
+ const known = r.warnings.filter(same);
1081
+ if (fresh.length) {
1076
1082
  if (r.regressions.length) out.line();
1077
- for (const w of r.warnings)
1083
+ for (const w of fresh)
1078
1084
  out.line(`${c.yellow("!")} ${w.path} ${c.dim(w.message)}`);
1079
1085
  }
1086
+ if (known.length) {
1087
+ const list = known.slice(0, 6).map((w) => `${w.path} ${w.check}`).join(", ");
1088
+ out.line(
1089
+ c.dim(
1090
+ `${known.length} unchanged from production, not caused by this change: ${list}${known.length > 6 ? `, and ${known.length - 6} more` : ""}.`,
1091
+ ),
1092
+ );
1093
+ }
1080
1094
  out.line();
1081
1095
  const n = r.checked_paths.length;
1082
1096
  const pages = `${n} page${n === 1 ? "" : "s"}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "serpkin",
3
- "version": "0.2.26",
4
- "description": "Connect your coding agent to Serpkin: sign in, register your site, upload its route map, and check pull-request previews for SEO regressions.",
3
+ "version": "0.2.27",
4
+ "description": "SEO for coding agents: connects Claude Code, Cursor or Codex to Serpkin's ranked SEO missions, checks previews and local builds for SEO regressions, and uploads your route map.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "serpkin": "bin/serpkin.mjs"
@@ -31,7 +31,15 @@
31
31
  "codex",
32
32
  "coding-agent",
33
33
  "search-console",
34
- "preview-deploy"
34
+ "preview-deploy",
35
+ "claude-code-skill",
36
+ "agent-skills",
37
+ "technical-seo",
38
+ "seo-audit",
39
+ "google-search-console",
40
+ "core-web-vitals",
41
+ "ai-seo",
42
+ "seo-tools"
35
43
  ],
36
44
  "homepage": "https://serpkin.com",
37
45
  "bugs": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "serpkin",
3
3
  "displayName": "Serpkin",
4
- "version": "0.2.26",
5
- "description": "The SEO brain for your coding agent: ranked SEO missions with patch-ready plans, preview checks and verification.",
4
+ "version": "0.2.27",
5
+ "description": "SEO for coding agents: the next fix for your site from its scan and Search Console data, with files and steps, checked on your preview and live site, then measured.",
6
6
  "author": {
7
7
  "name": "Serpkin",
8
8
  "url": "https://serpkin.com"
@@ -10,5 +10,17 @@
10
10
  "homepage": "https://serpkin.com",
11
11
  "repository": "https://github.com/apwn/serpkin",
12
12
  "license": "MIT",
13
- "keywords": ["seo", "nextjs", "mcp", "search-console"]
13
+ "keywords": [
14
+ "seo",
15
+ "technical-seo",
16
+ "search-console",
17
+ "core-web-vitals",
18
+ "structured-data",
19
+ "sitemap",
20
+ "mcp",
21
+ "nextjs",
22
+ "astro",
23
+ "sveltekit",
24
+ "ai-search"
25
+ ]
14
26
  }
@@ -3,7 +3,7 @@
3
3
  "serpkin": {
4
4
  "type": "stdio",
5
5
  "command": "npx",
6
- "args": ["-y", "--registry=https://registry.npmjs.org", "serpkin@0.2.26", "mcp"]
6
+ "args": ["-y", "--registry=https://registry.npmjs.org", "serpkin@0.2.27", "mcp"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  description: Check a preview deployment for SEO regressions against production
3
3
  argument-hint: "<preview-url>"
4
- allowed-tools: Bash(npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 check:*)
4
+ allowed-tools: Bash(npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 check:*)
5
5
  ---
6
6
 
7
- Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 check $ARGUMENTS` from the repository root. If no URL was given, ask for the preview URL. A site without previews can pass its local production build (for example `http://localhost:3000`): the CLI reads it on this machine and compares it with production. Report that as a pre-deploy check, not production verification.
7
+ Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 check $ARGUMENTS` from the repository root. If no URL was given, ask for the preview URL. A site without previews can pass its local production build (for example `http://localhost:3000`): the CLI reads it on this machine and compares it with production. Report that as a pre-deploy check, not production verification.
8
8
 
9
9
  Summarize the result: regressions (path, check, production vs preview) and warnings. For each regression, find the code that causes it and propose a fix. Header-level noindex on preview hosts is expected and only a warning.
@@ -5,6 +5,10 @@ argument-hint: "[site-id] [--lane code|content|outreach|research]"
5
5
 
6
6
  Use the serpkin-seo skill. Call `serpkin_next_mission` with the site id from "$ARGUMENTS" if given, otherwise the one in `.serpkin.json`. If the arguments include `--lane <lane>` (or I asked for one kind of work, like "a content mission"), pass `lanes: ["<lane>"]`; otherwise leave `lanes` out to get the top mission across every lane my key allows. A `LANE_NOT_ALLOWED` error names the lanes my key has: tell me, and don't retry with another lane unasked.
7
7
 
8
+ If the reply has `blocker` (Google hasn't indexed the site yet), tell me that first, in one line, with its step: it is the one thing that matters most and only I can do it. Then carry on with the mission.
9
+
10
+ If the reply or the mission has `setup_first` (the route map isn't uploaded, so step files are `null`), run its command yourself first, at the repository root: `npx serpkin routes --upload` (it sends route paths and file names only, never code; in a monorepo, `npx serpkin routes` lists the apps, then add `--app <dir>`). Then fetch the mission again for exact files. Don't ask me first; tell me in one line that you did it.
11
+
8
12
  If there's no mission but `lane_counts` shows open missions in other lanes, say how many and in which lanes, and that those are for the agent or key that has them. Missions in `waiting_on_you` (the owner lane) are for me: list them, never start them.
9
13
 
10
14
  If there's no mission and the reply has `caught_up`, tell me I'm caught up (its message), list what's waiting in `to_verify`, and offer the first suggestion with its cost. Ask before anything that costs credits, and stop there.
@@ -5,7 +5,7 @@ argument-hint: "<preview-url> [mission-id]"
5
5
 
6
6
  Use the serpkin-seo skill to ship the mission you just implemented (mission id from the arguments, otherwise the one in progress from `serpkin_next_mission`). Arguments: $ARGUMENTS
7
7
 
8
- 1. Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 check <preview-url>`. If it exits 1, fix the regressions, push and run it again. A site without previews passes its local production build instead (for example `http://localhost:3000`): that is a pre-deploy check, not verification, so skip step 3 and verify in production after I deploy.
8
+ 1. Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 check <preview-url>`. If it exits 1, fix the regressions, push and run it again. A site without previews passes its local production build instead (for example `http://localhost:3000`): that is a pre-deploy check, not verification, so skip step 3 and verify in production after I deploy.
9
9
  2. Call `serpkin_submit_result` with the PR URL, the preview URL (no previews: `deployment_url` once deployed), a short summary of the tests you ran and `files_changed` when you know it. The answer is short; pass `view: "full"` only if you need the whole mission.
10
10
  3. Call `serpkin_verify_mission`: `environment: "preview"` with the preview_url for technical missions, `environment: "evidence"` for content, link and research missions once the change is live (evidence reads the live site; before the deploy it comes back incomplete, "waiting for the deploy", which is not a failure).
11
11
  4. Report the verification status and tier. For a speed mission, `serpkin_lab_check` (free) shows the page's lab numbers; say they are lab data. After I deploy, verify with `environment: "production"` (Serpkin does this by itself if deploy checks are on in Settings → Automation). Don't merge or deploy.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Show the Serpkin site status, next mission and credits
3
- allowed-tools: Bash(npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 status:*)
3
+ allowed-tools: Bash(npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 status:*)
4
4
  ---
5
5
 
6
- Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 status` from the repository root and show the output. If it fails because the repository isn't set up, tell me to run `npx serpkin`. Without a plan the output shows the preview's first mission and a Checkout row: show them as they are, once, and don't add a sales pitch or ask again.
6
+ Run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 status` from the repository root and show the output. If it fails because the repository isn't set up, tell me to run `npx serpkin`. Without a plan the output shows the preview's first mission and a Checkout row: show them as they are, once, and don't add a sales pitch or ask again.
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  name: serpkin-seo
3
- description: Use for any SEO task in this repository (what to do for SEO, search traffic, rankings, titles, meta descriptions, canonicals, sitemaps, robots.txt, structured data, redirects, Core Web Vitals, Search Console). Runs the Serpkin loop with the serpkin MCP tools: next mission, implement, check the preview, submit, verify.
3
+ description: "Use for any SEO task in this repository (what to do for SEO, search traffic, rankings, titles, meta descriptions, canonicals, sitemaps, robots.txt, structured data, redirects, Core Web Vitals, Search Console). Runs the Serpkin loop with the serpkin MCP tools: next mission, implement, check the preview, submit, verify."
4
4
  ---
5
5
 
6
6
  # Serpkin SEO loop
7
7
 
8
8
  Serpkin ranks this site's SEO work into missions and verifies the result. Use its MCP tools instead of guessing what to fix.
9
9
 
10
+ No `serpkin_*` tools in this session (the skill was installed on its own, without the plugin)? Ask the user to run `npx serpkin` in the repository: it signs in, registers the site, connects the Serpkin MCP server to Claude Code, Cursor or Codex and prints the first mission. Then restart the session. Don't do SEO work from memory in the meantime when the user asked for Serpkin.
11
+
10
12
  ## Ids
11
13
 
12
14
  - The MCP connection already knows the workspace: no `project_id` needed.
@@ -43,8 +45,8 @@ An unverified site gets a 6-page preview. To verify it:
43
45
  - Otherwise do the `suggested_action` (usually `serpkin_scan_site`) and stop.
44
46
  2. **Implement.** First call `serpkin_update_mission` with `action: "start"` so the user and other agents see it is in progress (several at once: `mission_ids: [...]`, one call; each id gets its own result). Start and submit answer with the mission's summary and `next_step`; pass `view: "full"` only if you need the whole mission again. Research missions are a tool call (`serpkin_research_keywords`), not a code change. Then follow `mission.implementation.steps` in order. Each step names a `file` (from the route map), an `action` (edit, create or run) and an `intent`. Adapt each `snippet` to the existing code; don't paste blindly. Use `recipe` and `acceptance_criteria` for anything the steps don't cover. Keep the change focused on this one mission.
45
47
  3. **Run checks.** Run the project's tests, type check and build.
46
- 4. **Check the preview.** Once the branch has a preview deployment, run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 check <preview-url>`. Exit code 1 means regressions; fix them and re-run.
47
- **No previews** (the site deploys straight to production, for example `wrangler deploy` to Cloudflare Workers): before the human deploys, serve a production build locally (`next build && next start`, or the project's preview script) and run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.26 check http://localhost:3000` (your port). The CLI reads the local pages and Serpkin compares them with production; Serpkin never fetches localhost. Say plainly that this is a pre-deploy check, not production verification. Preview hosts on Vercel, Netlify, Cloudflare Pages and Workers (`*.workers.dev`), Render, Fly, Railway, Firebase and Amplify work directly; for the project's own staging domain, ask the user before running `check <url> --allow-host` once.
48
+ 4. **Check the preview.** Once the branch has a preview deployment, run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 check <preview-url>`. Exit code 1 means regressions; fix them and re-run.
49
+ **No previews** (the site deploys straight to production, for example `wrangler deploy` to Cloudflare Workers): before the human deploys, serve a production build locally (`next build && next start`, or the project's preview script) and run `npx -y --registry=https://registry.npmjs.org serpkin@0.2.27 check http://localhost:3000` (your port). The CLI reads the local pages and Serpkin compares them with production; Serpkin never fetches localhost. Say plainly that this is a pre-deploy check, not production verification. Preview hosts on Vercel, Netlify, Cloudflare Pages and Workers (`*.workers.dev`), Render, Fly, Railway, Firebase and Amplify work directly; for the project's own staging domain, ask the user before running `check <url> --allow-host` once.
48
50
  5. **Submit.** Call `serpkin_submit_result` with the PR URL, preview URL, a short test summary and `files_changed` when you know it (no preview: `deployment_url` after the deploy, and mention the local pre-deploy check in `test_summary`). One PR that covers several missions: one call with `mission_ids: [...]` (up to 25) and one `artifacts`; each id gets its own result.
49
51
  6. **Verify the preview.** Technical missions: `serpkin_verify_mission` with `environment: "preview"` and `preview_url`. Content, link and research missions: `environment: "evidence"`, which reads the live site, so run it once the change is deployed (or straight away when you shipped it to production yourself). Checked earlier, it comes back incomplete with "The change is live" still to come and the mission stays shipped: tell the user it's waiting for the deploy, don't change anything. If the submit reply warns that Serpkin can't see the site's deploys, pass on its deploy-hook tip once.
50
52
  7. **Verify production.** Only after the human has merged and deployed, call `serpkin_verify_mission` with `environment: "production"`. If deploy checks are on (Settings → Automation), Serpkin does this by itself after the deploy.
@@ -81,6 +83,7 @@ If the user says a mission shouldn't be done, call `serpkin_update_mission` with
81
83
  - `wrong`: the finding is false (the page already has it, the check misread the page). It feeds Serpkin's accuracy tracking, and the finding stays off those pages until they change. Use it only for false findings.
82
84
  - `not_relevant`: true, but it doesn't fit the business. It also stops near-duplicate topics coming back.
83
85
  - `already_done`: the work exists; the finding stays off those pages until they change.
86
+ - `duplicate`: another mission already covers it; pass its id as `duplicate_of`. Never counted as wrong.
84
87
  - `not_now`: snoozed; it comes back in 30 days.
85
88
  - `too_much_work`, `disagree`, `other` still work.
86
89
 
@@ -90,7 +93,7 @@ Two `not_relevant` or `wrong` dismissals of one kind make Serpkin rank that kind
90
93
 
91
94
  ## Outreach and waiting on others
92
95
 
93
- For missions that end with someone else deciding (`brand_mentions`, `directory_listing`, `link_outreach`, `tool_links`): draft the pitches or the listing kit; the user sends or submits them. Log each contact with `serpkin_update_mission` `action: "log_outreach"` and `outreach: [{target, contact, channel, sent_at?, kind: "first"|"follow_up"}]`, then `action: "wait"` (optional `follow_up_days`, 7–30, default 10). The mission leaves the queue and comes back with `follow_up_due: true` and a follow-up step: draft one short, polite follow-up per contact without a reply, nothing more. `outreach_status` lists targets still not contacted. When a listing, roundup or mention goes live, record its page address in `serpkin_submit_result` `artifacts.listing_urls` (works from waiting), then verify with `environment: "evidence"`. Serpkin opens each page and checks it links to the site, and whether the link is dofollow. A live link verifies the mission; if none is found yet, the mission waits and Serpkin rechecks at 3, 10 and 30 days, then hands back a follow-up draft. Never send or post anything for the user. A mission that passed without a live check shows as "reported by you", not verified: say so plainly.
96
+ For missions that end with someone else deciding (`brand_mentions`, `directory_listing`, `link_outreach`, `tool_outreach`): draft the pitches or the listing kit; the user sends or submits them. Log each contact with `serpkin_update_mission` `action: "log_outreach"` and `outreach: [{target, contact, channel, sent_at?, kind: "first"|"follow_up"}]`, then `action: "wait"` (optional `follow_up_days`, 7–30, default 10). The mission leaves the queue and comes back with `follow_up_due: true` and a follow-up step: draft one short, polite follow-up per contact without a reply, nothing more. `outreach_status` lists targets still not contacted. When a listing, roundup or mention goes live, record its page address in `serpkin_submit_result` `artifacts.listing_urls` (works from waiting), then verify with `environment: "evidence"`. Serpkin opens each page and checks it links to the site, and whether the link is dofollow. A live link verifies the mission; if none is found yet, the mission waits and Serpkin rechecks at 3, 10 and 30 days, then hands back a follow-up draft. Never send or post anything for the user. A mission that passed without a live check shows as "reported by you", not verified: say so plainly.
94
97
 
95
98
  ## Free tools, comparison pages and directories
96
99
 
@@ -37,4 +37,4 @@ jobs:
37
37
  # Passed through env, not interpolated into the script, so the URL can't inject shell.
38
38
  PREVIEW_URL: ${{ github.event.deployment_status.target_url }}
39
39
  # Pinned version and registry; update the version deliberately.
40
- run: npx --yes --registry=https://registry.npmjs.org serpkin@0.2.26 check "$PREVIEW_URL" --site "$SERPKIN_SITE_ID"
40
+ run: npx --yes --registry=https://registry.npmjs.org serpkin@0.2.27 check "$PREVIEW_URL" --site "$SERPKIN_SITE_ID"