Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.
test: add sync_flow.py test suite (TDD — dry-run tests fail until script written)
Danield51d29a6e6f3
diff --git a/tests/test_sync_flow.py b/tests/test_sync_flow.pynew file mode 100644index 0000000..808a40b--- /dev/null+++ b/tests/test_sync_flow.py@@ -0,0 +1,77 @@+"""Tests for scripts/sync_flow.py"""++import json+import subprocess+import sys+from pathlib import Path++REPO_ROOT = Path(__file__).parents[1]+SCRIPT = REPO_ROOT / "scripts" / "sync_flow.py"+REF_DIR = REPO_ROOT / "skills" / "seo-flow" / "references"+++def test_dry_run_exits_zero():+ result = subprocess.run(+ [sys.executable, str(SCRIPT), "--dry-run"],+ capture_output=True, text=True, cwd=REPO_ROOT+ )+ assert result.returncode == 0, f"Dry run failed:\n{result.stderr}"+++def test_dry_run_produces_valid_json():+ result = subprocess.run(+ [sys.executable, str(SCRIPT), "--dry-run"],+ capture_output=True, text=True, cwd=REPO_ROOT+ )+ assert result.returncode == 0, f"Dry run failed:\n{result.stderr}"+ data = json.loads(result.stdout)+ assert "added" in data, "JSON missing 'added' key"+ assert "updated" in data, "JSON missing 'updated' key"+ assert "unchanged" in data, "JSON missing 'unchanged' key"+++def test_dry_run_does_not_write_files():+ files_before = set(REF_DIR.rglob("*.md"))+ subprocess.run(+ [sys.executable, str(SCRIPT), "--dry-run"],+ capture_output=True, cwd=REPO_ROOT+ )+ files_after = set(REF_DIR.rglob("*.md"))+ assert files_before == files_after, (+ f"Dry run created unexpected files: {files_after - files_before}"+ )+++def test_real_sync_produces_42_prompts():+ """After a real sync, all 42 prompt files must be present."""+ prompts_dir = REF_DIR / "prompts"+ if not prompts_dir.exists():+ return # sync not yet run — skip silently++ prompt_files = [+ f for f in prompts_dir.rglob("*.md") if f.name != "README.md"+ ]+ assert len(prompt_files) == 42, (+ f"Expected 42 prompt files, found {len(prompt_files)}:\n"+ + "\n".join(str(f.relative_to(REPO_ROOT)) for f in sorted(prompt_files))+ )+++def test_synced_files_have_attribution_headers():+ """Every synced prompt file must start with the CC BY 4.0 attribution comment."""+ prompts_dir = REF_DIR / "prompts"+ if not prompts_dir.exists():+ return # sync not yet run — skip silently++ attribution_prefix = "<!-- Source: github.com/AgriciDaniel/flow"+ failures = []+ for md_file in prompts_dir.rglob("*.md"):+ if md_file.name == "README.md":+ continue+ content = md_file.read_text(encoding="utf-8")+ if not content.startswith(attribution_prefix):+ failures.append(str(md_file.relative_to(REPO_ROOT)))++ assert not failures, (+ "Files missing attribution headers:\n" + "\n".join(failures)+ )