Skip to content

feat(seo): merge claude-seo into Synapse SEO skills + fix skills FTS …#3

Merged
deve1993 merged 1 commit into
mainfrom
feat/seo-skills-merge-and-fts-fix
Jun 21, 2026
Merged

feat(seo): merge claude-seo into Synapse SEO skills + fix skills FTS …#3
deve1993 merged 1 commit into
mainfrom
feat/seo-skills-merge-and-fts-fix

Conversation

@deve1993

Copy link
Copy Markdown
Collaborator

…sync

Two changes from incorporating the claude-seo repo (MIT, (c) 2026 agricidaniel):

SEO skills (content lives in the per-machine .opencode mirror, which is NOT git-tracked, so the merged set is vendored here under scripts/seed-seo-skills/ as the shareable record + a seeder to push it to any graph.db):

  • 11 enriched: seo, seo-technical, seo-audit, seo-geo, seo-schema, seo-content, seo-hreflang, seo-images, seo-sitemap-advanced, seo-competitor-pages, seo-plan (added audit/E-E-A-T/GEO methodology, CWV thresholds, falsifiability, primary- source Google guidance; kept our Next.js implementation code)
  • 6 new: seo-backlinks, seo-local, seo-ecommerce, seo-sxo, seo-content-drift, seo-topical-clusters; +1 reference dataset skill: seo-google-guidelines
  • 2 optional, generic-named integration refs: seo-rank-data, seo-crawl-data
  • adapted to our style, no brand names in skill names, MIT attribution footer.
  • scripts/seed-seo-skills.mjs: backs up, upserts all 20 via SkillsStore (FTS-safe), rebuilds FTS. Run on the prod container to propagate (MCP being unavailable).

FTS fix (root cause found while importing the skills):

  • skills upsert switched from INSERT OR REPLACE to INSERT ... ON CONFLICT(name) DO UPDATE. INSERT OR REPLACE churned skills.rowid on every write, orphaning the FTS5 external-content index (skills_fts) and surfacing as fts5: missing row N from content table 'skills' in skill_route after re-import. Stable rowids also let the upsert preserve autolearning columns for free (no more COALESCE-from-subquery), and preserve status on null (importer) vs default active.
  • migration 035: AFTER INSERT/UPDATE(OF indexed cols)/DELETE triggers maintain the FTS via the external-content delete+insert protocol, plus a one-time rebuild that repairs existing orphans on any DB (incl. prod at deploy).
  • removed the now-redundant manual FTS write from the code (would double-index).
  • +5 regression tests (skills-store-fts): FTS stays queryable across re-upserts, stable rowid, autolearning/status preserved, delete de-indexes.

Tests: storage 19, codegraph 294 — all green.

…sync

Two changes from incorporating the claude-seo repo (MIT, (c) 2026 agricidaniel):

SEO skills (content lives in the per-machine .opencode mirror, which is NOT
git-tracked, so the merged set is vendored here under scripts/seed-seo-skills/
as the shareable record + a seeder to push it to any graph.db):
- 11 enriched: seo, seo-technical, seo-audit, seo-geo, seo-schema, seo-content,
  seo-hreflang, seo-images, seo-sitemap-advanced, seo-competitor-pages, seo-plan
  (added audit/E-E-A-T/GEO methodology, CWV thresholds, falsifiability, primary-
  source Google guidance; kept our Next.js implementation code)
- 6 new: seo-backlinks, seo-local, seo-ecommerce, seo-sxo, seo-content-drift,
  seo-topical-clusters; +1 reference dataset skill: seo-google-guidelines
- 2 optional, generic-named integration refs: seo-rank-data, seo-crawl-data
- adapted to our style, no brand names in skill names, MIT attribution footer.
- scripts/seed-seo-skills.mjs: backs up, upserts all 20 via SkillsStore (FTS-safe),
  rebuilds FTS. Run on the prod container to propagate (MCP being unavailable).

FTS fix (root cause found while importing the skills):
- skills upsert switched from INSERT OR REPLACE to INSERT ... ON CONFLICT(name)
  DO UPDATE. INSERT OR REPLACE churned skills.rowid on every write, orphaning the
  FTS5 external-content index (skills_fts) and surfacing as
  `fts5: missing row N from content table 'skills'` in skill_route after re-import.
  Stable rowids also let the upsert preserve autolearning columns for free (no more
  COALESCE-from-subquery), and preserve status on null (importer) vs default active.
- migration 035: AFTER INSERT/UPDATE(OF indexed cols)/DELETE triggers maintain the
  FTS via the external-content delete+insert protocol, plus a one-time rebuild that
  repairs existing orphans on any DB (incl. prod at deploy).
- removed the now-redundant manual FTS write from the code (would double-index).
- +5 regression tests (skills-store-fts): FTS stays queryable across re-upserts,
  stable rowid, autolearning/status preserved, delete de-indexes.

Tests: storage 19, codegraph 294 — all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@deve1993 deve1993 merged commit 5b137a0 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant