Not loaded · from platinum-seo-engine
Ingests Screaming Frog CSV exports into Master.xlsx sheets (crawl_sitemap, redirect_404, schema, on_page_audit, tech_seo, robots_txt) and persists raw data as envelope JSON. Triggers on user requests like 'screaming frog import' or new CSV files in sf-exports/{date}/raw/.
Claude Code won't load this skill
It ships in platinum-seo-engine at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Deterministic CLI (scripts/ingestion/sf_import.py), not a
workflow_runner run shell. The stages below run in a single main(argv)
pass: each DURUR is a print("ERROR: … (DURUR #N)", file=sys.stderr) plus
a distinct non-zero exit code (no {run_id}.json state file, no
workflow_runner.create_run/complete, no string-typed outputs). Raw
CSV envelope discipline is mandatory: every SF batch is described in a
single envelope-JSON dropped into inbox/sf/ before any per-sheet
projection runs, so a projection bug never costs us the upstream
filename → tier mapping.
The 6 SF-derived sheets are written via transaction.replace (an
idempotent refresh — clears each sheet's data block, then re-lands the
rows), so re-running a batch refreshes rather than duplicates. The
tier-validation + envelope-inbox + per-sheet-write shape is shared with
the other ingestion skills, but the write mechanism differs per skill
(gsc-pull appends; dfs-pull is staging-only). Deviate only with an ADR.
| Name | Type | Default | Notes |
|---|---|---|---|
project_slug | string | — | Required. Resolves projects/{slug}/master.xlsx. |
sf_export_path | string | — | Required. Path to a SF export dir; raw/ subfolder enforced. |
workspace_root is resolved via PSEO_WORKSPACE_ROOT env or explicit
test override (mirrors workflow_runner / events_writer).
projects/{slug}/master.xlsx#crawl_sitemap — sitemap-vs-crawl summary rows.projects/{slug}/master.xlsx#redirect_404 — 404 + redirect chain rows.projects/{slug}/master.xlsx#schema — structured-data audit rows.projects/{slug}/master.xlsx#on_page_audit — title/meta/h1 coverage rows.projects/{slug}/master.xlsx#tech_seo — tech issue summary rows.projects/{slug}/master.xlsx#robots_txt — robots/directive issue rows.projects/{slug}/_state/events.jsonl — provenance entries (source.kind=sf_csv).projects/{slug}/inbox/sf/{date}-{slug}.json — envelope JSON listing every
CSV (filename, tier, row_count, file_hash) for drift recovery.main() pass)Invocation (manager, or
sf-crawl-orchestratorsubprocess):python3 -m scripts.ingestion.sf_import \ --project <slug> \ --sf-export-path projects/<slug>/sf-exports/<date>/ \ [--workspace-root <root>] [--dry-run]
--workspace-rootdefaults to$PSEO_WORKSPACE_ROOT. There are no other flags — in particular--source-run-iddoes NOT exist (thesource_run_idfrontmatter input carries provenance correlation, not a CLI flag).
main(argv) resolves --workspace-root (or $PSEO_WORKSPACE_ROOT). Unset →
print("ERROR: … required (DURUR #5)", file=sys.stderr) and return 5. A
relative --sf-export-path is joined onto workspace_root.
validate_export_path (DURUR #1)raw_dir = sf_root / "raw" if (sf_root / "raw").is_dir() else sf_root
if not raw_dir.is_dir():
print(f"ERROR: raw_dir not found at {sf_root} or {sf_root}/raw (DURUR #1)",
file=sys.stderr)
return 1
validate_tier1 (sf-required-reports.schema Tier 1 14/14, DURUR #2)match_tiers lives in scripts.ingestion.sf_import itself (there is no
separate sf_validate module). It walks raw/, normalizes filenames (lower,
strip de_ / v_ / p_ / bi_ prefixes, strip (N) / -copy / _old
suffixes, fold Turkish ı→i), and matches each canonical_name against
schemas/sf-required-reports.schema.json definitions.canonicalName. Tier 1
missing → RED FAIL (exit 2). Tier 2 missing → AMBER warn, NOT a fail
(search_console_all is the canonical Tier 2 exemption surfaced in pilot
validation).
matched, missing_t1, missing_t2 = match_tiers(raw_dir) # defined in this module
if missing_t1:
print(f"ERROR: Tier 1 missing: {sorted(missing_t1)} (DURUR #2)", file=sys.stderr)
return 2
amber: list[str] = []
if missing_t2:
amber.append(f"Tier 2 missing (AMBER): {sorted(missing_t2)}")
envelope_inbox (raw → drift-recoverable JSON, DURUR #6)First confirm the write target exists; a missing master.xlsx → DURUR #6
(exit 6 — init-project must have run). Then the build_envelope helper
writes a single envelope JSON to inbox/sf/{date}-{slug}.json BEFORE any
projection runs — for every matched CSV it captures sha256, row_count,
filename_original + filename_normalized + tier. The envelope is the durable
witness that a given SF batch was observed even if the Excel write fails
downstream.
master_xlsx = workspace_root / "projects" / args.project / "master.xlsx"
if not master_xlsx.exists():
print(f"ERROR: master.xlsx missing at {master_xlsx} (DURUR #6)", file=sys.stderr)
return 6
inbox_path = build_envelope(args.project, sf_root, raw_dir, matched, amber, workspace_root)
Envelope shape (written by build_envelope):
{
"_meta": { "captured_at": "…Z", "tool": "screaming_frog",
"project_slug": "<slug>", "sf_export_path": "…",
"raw_dir": "…", "amber_warnings": ["Tier 2 missing (AMBER): …"] },
"files": [
{ "canonical_name": "internal_all", "tier": "required",
"filename_original": "internal_all.csv", "filename_normalized": "internal_all.csv",
"file_hash": "sha256:…", "row_count": 192 }
]
}
sitemap_xcheck — Phase-X DEFERRED (not wired)Status: deferred capability, not part of the shipped contract. The intended cross-check — compare the SF-discovered URL list against the GSC submitted sitemaps and log discrepancies into
crawl_sitemapas a diagnostic — is NOT implemented.main()goes straight from the envelope (Stage D) to the projection write (Stage F); it never callsmcp__gsc__list_sitemaps, and there is nosf_sitemap_xcheckmodule. The GSC sitemap tools are thereforeoptionalin the frontmatter, and DURUR #4 is a deferred-condition placeholder (see DURUR conditions below). When this lands (a future Wave) it belongs at the manager/caller layer — sf-import's core stays GSC-free, disk-CSV only.
write_excel (per-sheet, idempotent replace)One write per sheet over the projections returned by
sf_projection.project_all(raw_dir). Four sheets use transaction.replace
(NOT append): it clears the sheet's data block then re-lands the rows, so
re-importing the same batch refreshes rather than duplicates (idempotent).
robots_txt and redirect_404 are shared with hreflang/facet-nav/robots-policy
audits and migration-map, so sf-import refreshes only ITS rows there via
scripts/util/sheet_merge.py (R- id prefix; SF-shaped 3xx/4xx redirect
rows), keeping HF-/FN-/RP- findings and 301/410 migration plans under
one lock. Every write goes through the approved path with backup, lock, schema
validation, and post-write tool_computed provenance emission. The 6 sheets and their
CSV → row projections (inline mapping; the formal staging-to-excel-map.json
arrives in Phase 6):
| Logical sheet | Source CSV(s) | Row shape (master-excel.schema) |
|---|---|---|
crawl_sitemap | internal_all, sitemaps_all, crawl_depth | category / metric / value / status / action |
redirect_404 | response_codes_all, redirect_chains | url / inlinks / action / target_url / status |
schema | structured_data_all | schema_type / status / location / scope / remaining_work |
on_page_audit | page_titles_all, meta_description_all, h1_all | url / target_query / impressions_30d / clicks_30d / in_title /... |
tech_seo | issues_overview_report, directives_all | issue_category / detail / affected_urls / impact / resolution / ... |
robots_txt | directives_all, indexability | id / level / issue / detail / resolution |
In sf_import.py this is the project_and_write helper:
from scripts.excel import transaction
from scripts.ingestion import sf_projection
projections = sf_projection.project_all(raw_dir)
counts: dict[str, int] = {}
for sheet, rows in projections.items():
result = transaction.replace(
master_xlsx, sheet, rows, project_slug, writer="sf-import",
)
counts[sheet] = result.rows_affected
transaction.replace itself emits a tool_computed provenance event per
write. Stage F then supplements that with a single sf_csv source provenance
record (below) so the data lineage is sf_csv → tool_computed. Idempotency:
a re-run with the same CSVs replaces the prior rows in place — no duplicate
rows accumulate across re-imports.
sf_csv source provenanceA single sf_csv source-provenance event records the lineage. source_folder
is the raw dir relative to the workspace root (via _rel_to_workspace, which
falls back to an absolute string for an out-of-tree path rather than crashing);
row_count and rows_written are the total rows projected across the 6 sheets.
The run_id is auto-allocated race-free under the append flock (P1-11).
from scripts.state import events_writer
total_rows = sum(counts.values())
events_writer.append_provenance(
project_id=project_slug,
source={
"kind": "sf_csv",
"source_folder": _rel_to_workspace(Path(raw_dir), workspace_root),
"row_count": total_rows,
},
operation="ingest",
rows_written=total_rows,
workspace_root=workspace_root,
)
There is no workflow_runner.complete and no string-typed outputs
dict — main() prints a human-readable summary to stdout and returns 0 on
success. --dry-run stops after the envelope (Stage D), before any Excel write.
print(f"OK: matched {len(matched)} files (Tier1 {t1}/14, Tier2 {t2}/10)")
print(f"Envelope: {inbox_path}")
for w in amber:
print(f"WARN: {w}")
if args.dry_run:
print("DRY-RUN: skipping Excel projection.")
return 0
counts = project_and_write(raw_dir, master_xlsx, args.project,
workspace_root=workspace_root)
for sheet, n in counts.items():
print(f"OK: {sheet} ← {n} rows")
return 0
Exit codes — the DURUR signalling channel (there is no run-state file):
| Outcome | Exit |
|---|---|
Success / --dry-run | 0 |
DURUR #1 — no raw/ subfolder | 1 |
| DURUR #2 — Tier 1 < 14/14 | 2 |
DURUR #3 — RowSchemaError during projection | non-zero (uncaught traceback) |
DURUR #5 — no --workspace-root / $PSEO_WORKSPACE_ROOT | 5 |
DURUR #6 — no master.xlsx | 6 |
The pilot project export ships every Tier 1 file twice: once with the
canonical name (internal_all.csv) and once with a de_ prefix (German
locale shadow de_internal_all.csv). Plus a third Turkish-i variant
(de_ınternal_all.csv). Normalization rules, applied in order:
.csv).de_ (defensive — pilot artifact).v_ / p_ / bi_ (SF visualization /
page / bulk-import mode).ı → ASCII i (Turkish-locale filename collision).(N) and -copy / _old version suffixes.The first matching canonical_name (per sf-required-reports.schema)
wins. Ambiguous matches (two canonical names matching the same file)
abort the import — no silent picks.
| Tier | Missing → | Pilot exemption |
|---|---|---|
| Required | RED FAIL | none (all 14 enforced) |
| Recommended | AMBER | search_console_all (pilot ships 9/10, OK) |
| Optional | SILENT | full set silent |
Stop and flag the manager — do not patch, do not fall back. Each is a
print(… DURUR #N) + a distinct exit code (DURUR #3 surfaces as an uncaught
RowSchemaError traceback).
sf_export_path missing or no readable raw/ subfolder. → exit 1transaction.replace raises RowSchemaError for any sheet — the exception
is NOT swallowed, so the batch aborts with a non-zero (traceback) exit;
replace schema-validates BEFORE clearing, so a rejected sheet is left
untouched.mcp__gsc__list_sitemaps sitemap
cross-check is not implemented in sf_import.py; the GSC tools are
optional. When the cross-check lands, a list_sitemaps failure becomes
the DURUR #4 hard stop. Today this condition never fires.PSEO_WORKSPACE_ROOT env unset and no --workspace-root arg. → exit 5master.xlsx missing under projects/{slug}/ — init-project
must have run first. → exit 6schemas/sf-required-reports.schema.json (Tier 1 14, Tier 2
10, canonicalName enum), schemas/sf-export-mapping.schema.json
(filename_alias normalization), schemas/master-excel.schema.json
(6 sheet column structures + statusEnum + severityEnum),
schemas/events.schema.json (source.kind=sf_csv),
schemas/gsc-tool-mapping.schema.json (gsc__list_sitemaps enum — used by
the deferred Stage E cross-check, not the shipped core),
schemas/skill-frontmatter.schema.json (this frontmatter).scripts/excel/transaction.py (replace),
scripts/ingestion/sf_projection.py (project_all),
scripts/state/events_writer.py (append_provenance). NOT
workflow_runner — sf-import is a plain CLI, not a run shell.tests/skills/test_sf_import.py (10 cases: 6-criterion acceptance
gate incl. live SF batch + source_run_id handoff pair + frontmatter
validation + required-tools parity).projects/{slug}/sf-exports/{export_date}/raw/
(Tier 1 14/14 + Tier 2 9/10 with search_console_all AMBER).schemas/skill-frontmatter.schema.json Draft 7.project_slug flows through.Use when/Also use when/Do not use when are STRING
content inside description, not separate fields.transaction / sf_projection /
events_writer are imported, never modified from this skill.master.xlsx (lowercase, schema-shaped). The
legacy demo-dental_MASTER.xlsx (Turkish-emoji) is DOKUNULMAZ.transaction.replace refreshes each sheet's data
block (re-import does not duplicate); DURUR signalling is exit-code
based (no workflow_runner run shell, no string-typed outputs).What SKILL.md sets; muted values are Claude Code's defaults
50 skills in this plugin
/aio-competitor-mapUse when: kullanıcı "AIO analiz", "competitor SERP analizi", "top10
AIO map", "AI overview rakip", "rakip içerik AIO citation", "SERP
pattern map" der ya da /pseo-aio-competitor-map çağırır; SERP top-N
fetch (DataForSEO heavy) + Scrapling tier-1 fetch (per URL) +
R-109/R-110/R-111 competitor content-quality signal detect (schema markup
+ entity reference + author authority) + serp_aio AIO presence
(references[]) + competitor_pages.jsonl staging.
Also use when: yeni keyword için pre-content-plan AIO landscape
haritalanacak; mevcut pillar için competitor refresh yapılacak;
brand'ın AIO-friendly olup olmadığını competitor content-quality + AIO
presence (serp_aio references[]) ile test edilecek; cluster-map sonrası
seçilen ana keyword için competitor R-109..R-111 sinyalleri ölçülecek.
Do not use when: SERP rank tracking için (gsc skill); manuel tek URL
analiz için (on-page-audit kullan); content gap için (content-gaps
kullan); kendi sitemizin AIO-friendliness denetimi için (schema-audit
+ on-page-audit kombinasyonu); target_keyword empty ya da whitespace
(DURUR #5); budget_credits_per_day aşılmış (DURUR #1 — skip skill,
AMBER); SERP empty top_n=0 (DURUR #2 REJECT).
/brand-onboardingUse when: kullanıcı "yeni proje", "brand onboarding", "proje bootstrap",
"wizard çalıştır", "yeni site ekle", "project-config oluştur" der ya da
/pseo-brand-onboarding çağırır; brand_identity 20 + content_settings 14
+ profile enum 5-value Süleyman input'u alarak project-config.schema 1.5
conformant staging output üretir.
Also use when: workspace henüz yok (Phase 14 öncesi staging-only mode);
domain DNS doğrulanması gerekiyor; profile heuristic suggest fallback
istendi; init-project çalıştırılmadan önce config wizardı isteniyor.
Do not use when: mevcut proje config update için (separate edit-config
skill — gelecek phase); workspace var ve direkt project.config.json
yazılacak (Phase 14+ behavior; init-project devreye giriyor); başka
projenin config'i kopyalanacak (template-clone — gelecek phase).
/cannibalizationUse when: kullanıcı "cannibalization", "kannibalizasyon", "keyword
conflict", "aynı keyword'e iki sayfa", "URL çakışması", "anahtar kelime
çakışması", "iki sayfam aynı sorguya çıkıyor", "intent split" der ya
da /pseo-cannibalization çağırır.
Also use when: aktif projenin GSC verisi mevcut; aynı sorguda ≥2 URL
ranking ediyor; quick-win / content-decay ile birlikte triage; F-08
invariant kontrolünden sonra cannibalization sheet doldurulacak.
Do not use when: tek sayfanın decay analizi (content-decay), pozisyon
11-20 fırsat taraması (quick-wins), tech audit (tech-audit), yeni
içerik planı (new-content-plan) — ayrı discovery skill'leri. Master.xlsx
yokken çağırma; init-project önce çalışmalı (DURUR #6).
/cluster-mapUse when: kullanıcı "cluster map", "keyword cluster", "cluster keywords",
"cluster-keyword haritası", "anahtar kelime kümeleme", "intent cluster",
"cluster planı", "keyword'leri cluster'lara dağıt" der ya da
/pseo-cluster-map çağırır. DataForSEO keyword_suggestions +
related_keywords + GSC enhanced_search_analytics raw JSON'larını
inbox/dfs|gsc/ altına persist eder ve master.xlsx#cluster_keywords
sheet'ini doldurur (workflow_runner approve gate üzerinden, transaction
atomic write).
Also use when: aktif projenin topical_map sheet'i mevcut (D-02
invariant — cluster ⊆ topical_map.cluster); content-gaps Phase 7
staging mevcut (seed keyword sinyali); budget pre-flight PASS;
cluster→keyword projection gerekiyor; new-content-plan / topical-map
aşağı akıma keyword inventory besleniyor.
Do not use when: keyword discovery henüz yapılmadı (content-gaps önce
çalışmalı); sadece pillar/cluster taksonomisi tanımlanacak (topical-map
ile dene); tek sayfa decay analizi (content-decay), pozisyon 11-20
fırsat taraması (quick-wins), URL çakışması (cannibalization)
gerekiyor — ayrı discovery skill'leri. Master.xlsx yokken çağırma;
init-project önce çalışmalı (DURUR #4). Topical_map sheet boşken
çağırma; D-02 invariant violation çıkar (DURUR #7). Budget aşılmışsa
fallback YASAK (DURUR #1).
/competitive-analysisUse when: kullanıcı "rakip analizi", "competitive analysis", "competitor
monitoring", "rakip site snapshot", "rakip içerik takibi", "competitor
diff", "rakip keyword'leri", "weekly competitor" der ya da
/pseo-competitive-analysis çağırır.
Also use when: hedef alan adı için DFS competitors_domain ile rakip
listesi çekilecek; rakip URL'leri Scrapling tier-escalation §14.5 ile
fetch edilecek; ADR-025 Phase 7+ S1_competitor_snapshot sub-schema
enforcement gerekiyor; weekly cadence (S1 senaryosu) cron tetikliyor;
sf-import / gsc-pull veri çekiminden bağımsız rakip izleme talep edildi.
Do not use when: kendi sitemizin on-page kontrolü (on-page-audit), kendi
GSC verisi (gsc-pull), keyword volume/ideas (dfs-pull / cluster-map),
cannibalization (cannibalization), tech audit (tech-audit) — ayrı
skill'ler. Master.xlsx yokken çağırma; init-project önce çalışmalı.
Budget pre-flight FAIL ise fallback YASAK (DURUR #2). >50% URL all-tiers
fail ise batch unhealthy → DURUR #4. Tier_escalation override §14.5
canonical sequence dışındaysa STOP (DURUR #7).
/content-decayUse when: kullanıcı "içerik decay", "content decay", "tıklama düşen sayfalar",
"ctr düştü", "90 gün öncesine göre azalma", "trafik kaybeden sayfalar",
"decay analizi", "content_decay sheet yenile" der ya da /pseo-content-decay
çağırır.
Also use when: aktif projenin GSC verisi master.xlsx'te mevcut (gsc-pull
önce çalışmış); 90-günlük recent + previous pencere karşılaştırması
yapılacak; pillar bazlı içerik decay haritası lazım; downstream
content-improve / new-content-plan skill'leri bu listeyi tüketecek.
Do not use when: quick-win opportunity scoring (quick-wins skill), GSC
delta ingestion (gsc-pull skill), tek-URL audit (tech-audit skill),
cannibalization analizi — ayrı discovery skill'leri. Master.xlsx
yokken çağırma; init-project + gsc-pull önce çalışmalı (DURUR #6).
npx claudepluginhub popiliadam/platinum-seo-engine --plugin platinum-seo-engineOther plugins' skills for the same job