Skip to content
Skills Library
Marketing & content · Review & audit

phase-optimize

/phase-optimize

Run Phase Optimize — humanize, meta build, schema, internal link, GEO optimize, visual design, CTA module + deterministic lint gates (render / density / keyword / PAA alignment / locale spelling / local uniqueness) + 4 quality gates + repair escalation. Use when draft.md exists and needs polish + quality assurance. Triggered by /seo-blog optimize, /audit, "run quality checks", "make this ready to publish".

Licence
Apache-2.0
Last repository change
17.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 17.08.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Run Phase Optimize — humanize, meta build, schema, internal link, GEO optimize, visual design, CTA module + deterministic lint gates (render / density / keyword / PAA alignment / locale spelling / local uniqueness) + 4 quality gates + repair escalation. Use when draft.md exists and needs polish + quality assurance. Triggered by /seo-blog optimize, /audit, "run quality checks", "make this ready to publish".

Triggers from the description

run quality checksmake this ready to publish
Original author description

Run Phase Optimize — humanize, meta build, schema, internal link, GEO optimize, visual design, CTA module + deterministic lint gates (render / density / keyword / PAA alignment / locale spelling / local uniqueness) + 4 quality gates + repair escalation. Use when draft.md exists and needs polish + quality assurance. Triggered by /seo-blog optimize, /audit, "run quality checks", "make this ready to publish".

How it works

  1. Inputs
  2. Stage 1: Polish (matches the orchestrator STAGES table — v3.35 reality sync)
  3. Stage 2: Quality Gates (parallel, all 4 must pass)
  4. Stage 2b: Lint Gates (mandatory, run BEFORE independent reviewer)
  5. Stage 3: Independent Reviewer (separate subagent, NO pipeline history)
  6. Stage 4: Repair Escalation (only if any gate fails)
  7. Output
  8. Handoff
  9. See also
Original SKILL.md headings · 171 lines, 922 words
SKILL.md preview
---
name: phase-optimize
description: Run Phase Optimize — humanize, meta build, schema, internal link, GEO optimize, visual design, CTA module + deterministic lint gates (render / density / keyword / PAA alignment / locale spelling / local uniqueness) + 4 quality gates + repair escalation. Use when draft.md exists and needs polish + quality assurance. Triggered by /seo-blog optimize, /audit, "run quality checks", "make this ready to publish".
allowed-tools: [Read, Write, Edit, Bash, Task]
disable-model-invocation: false
---

# Phase Optimize Orchestrator

Polish + multi-gate quality verification + repair loop.

## Inputs

Required in `workspace/{task_id}/`:
- `draft.md` (from build phase or external)
- `state.json`, `research.json`, `outline.json`, `citations.json`

## Stage 1: Polish (matches the orchestrator STAGES table — v3.35 reality sync)

```
1.  humanizer                     → 43 patterns lint + 5×5 voice/purpose + 3-mode + iterate N≤3
2.  meta-builder                  → title/slug/excerpt/tags/categories/image_search_keywords
3.  category-selector             → BASH: signal-based multi-category from categories-config.json
4.  schema-generator              → JSON-LD blocks (FAQPage/HowTo/ItemList/Dataset for body)
5.  internal-linker               → resolve [INTERNAL-LINK] placeholders + brand link map
6.  geo-content-optimizer         → 6 GEO techniques + engine-specific weights + entity injection
7.  visual-designer               → native-markdown components (tables/stat grids/quotes/TL;DR)
8.  cta-injection                 → BASH: python -m scripts.optimize.cta_injector --task-id {task_id} --project-slug {project_slug} --json
                                     (deterministic .xr-cta-box module from business-context.cta; no-op if project has no config)
```

**Retired / relocated (v3.35 — do NOT dispatch as polish steps):**
- `featured-snippet-optimizer` → RETIRED, merged into the build-phase
  `citation-capsule-builder` stage (FS 83% replaced by AIO; same 40-60w shape).
- `paa-answer-writer` → contract enforced by the `paa-alignment-check` lint gate
  (Stage 2b below); writers follow the SKILL's wording rules at draft time.
- `voice-search-optimizer` → RETIRED (no voice-only tactic exists; zombie-stat
  discipline). Manual diagnostic CLI only.
- `localization-pass` Mode 1 → the `locale-spelling-check` lint gate (Stage 2b);
  Mode 2 `/locale-audit` stays a user-invocable portfolio tool.
- `ai-overview-recovery` → a MONITOR-phase playbook (churn-guarded NOT_IN_AI
  routing via refresh_decision_router), never a per-article polish step.
Evidence for all five: references/seo/serp-feature-value-2026.md.

## Stage 2: Quality Gates (parallel, all 4 must pass)

```
Gate 1: CORE-EEAT (80-item, 8 dimensions × 10 each)
        Vetoes: T04 (fabricated stat) / C01 (fabricated citation) / R10 (prompt injection)
        Cap: 1 veto → final = min(raw, 60); 2+ → BLOCKED
        Pass: verdict ∈ {SHIP, FIX}

Gate 2: CITE (40-item, 4 dimensions × 10 each)
        Vetoes: T03 (missing affiliate disclosure) / T05 (missing E-E-A-T) / T09 (schema missing)
        Pass: verdict ∈ {SHIP, FIX}

Gate 3: AI-Slop (reproducible formula)
        score = 4×patterns_hit + 25×(1-burstiness) + 15×vocab_ratio
        Pass: score < 20

Gate 4: Pillar 100-pt (Content 30 + SEO 25 + EEAT 15 + Tech 15 + AI-Citation 15)
        Pass: total ≥ 80 (Good tier)

+ Format-fit dimension (v3.2)
+ Reading-level dimension (v3.2, per-persona)
```

## Stage 2b: Lint Gates (mandatory, run BEFORE independent reviewer)

All lint gates are mandatory Bash invocations. Each writes a JSON report; any
defect = hard veto → route to repair-orchestrator Stage 4. Do NOT skip these
even if the 4 quality gates above all passed — lint catches mechanical text
defects the LLM-judge gates cannot detect.

```bash
# 1. Render lint — catches L1-L8 leak classes (HTML escapes, Pandoc anchors,
#    unbalanced bold, srcset, claim markers, scaffold markers, BOM, JSON envelope)
python -m scripts.lint.render_lint --workspace {task_id} --json
# Output: workspace/{task_id}/render-lint.json
# Gate:   gates.render_lint.passed must be true

# 2. Image placeholder check — catches D1-D5 drift modes (local-path images,
#    count mismatch, unknown slot_id, zero placeholders, name mismatch)
python -m scripts.lint.image_placeholder_check --workspace {task_id} --json
# Output: workspace/{task_id}/image-placeholder-lint.json
# Gate:   gates.image_placeholder.passed must be true

# 3. Section completeness — catches writer subagent silent dropout
python -m scripts.lint.section_completeness_check --workspace {task_id} --json
# Output: workspace/{task_id}/section-completeness.json (auto file-bus)
# Gate:   gates.section_completeness.passed must be true

# 4. Local uniqueness (CONDITIONAL — only when state.brief.local_mode=true)
#    Skipped when local_mode=false.
# if state.brief.local_mode:
python -m scripts.lint.brand_fact_check --workspace {task_id} --json --out workspace/{task_id}/brand-fact-lint.json
# First-person company-fact consistency vs business-context.company (v3.36.0;
# no-op PASS for projects without a company block). Runs as the mandatory
# brand-fact-check stage right after locale-spelling-check.
python -m scripts.lint.local_uniqueness_check --workspace {task_id} --out workspace/{task_id}/local-uniqueness-lint.json
# Gate:   gates.local_uniqueness.passed must be true (when local_mode=true)

# 5. CTA module (v3.34) — mandatory stage; no-ops for projects without a cta config
python -m scripts.optimize.cta_injector --task-id {task_id} --project-slug {project_slug} --json
# Output: workspace/{task_id}/cta-injection-result.json
# Gate:   passed must be true (bad config / stripped module = hard veto)

# 6. PAA alignment (v3.35) — FAQ <-> research.paa >=60% contract, measured on the draft
python -m scripts.lint.paa_alignment_check --workspace {task_id} --json
# Output: workspace/{task_id}/paa-alignment-lint.json
# Gate:   passed must be true (no-ops PASS on thin PAA harvest / missing FAQ)

# 7. Locale spelling (v3.35) — dialect-drift AI-tell gate (en-GB leaking into en-US etc.)
python -m scripts.lint.spelling_dialect_check --workspace {task_id} --json
# Output: workspace/{task_id}/locale-spelling-lint.json
# Gate:   passed must be true (FAIL only at >=3 opposite-dialect hits; References/quotes/proper nouns exempt)
```

## Stage 3: Independent Reviewer (separate subagent, NO pipeline history)

```python
review = task({
    "subagent_type": "reviewer",
    "context": {"role": "Google E-E-A-T editor + Perplexity citation judge"},
    "input_files": ["draft.md", "state.json"],
    "references": ["seo/seo-checklist-2026.md", "geo/core-eeat-80.md"]
})
# Returns review.json: score, verdict, strengths, weaknesses, would_change
```

Required: `review.score >= state.brief.quality_target_score`

## Stage 4: Repair Escalation (only if any gate fails)

```
Round 1: SURGICAL
  - Edit only repairs[].instruction specified lines/segments
  - Cheapest, fastest
  - If score improves <3 or worse → escalate

Round 2: SECTION-REWRITE
  - Rewrite full section if any section's issues persist
  - New drafter agent with original section + repair instructions

Round 3: STAGE-REWRITE
  - Rerun a stage (e.g. outline-architect or fact-checker)
  - Previous quality.json as negative example

Round 4: FULL-REGEN
  - Rerun all of Phase Build (preserve research/angle/outline)

Round 5: FROM-SCRATCH
  - Rerun from Plan (new angle from alternative_titles_considered)
  
Hard cap: 4 rounds total. Round 5 → halt + return best-of-N + repair-report.
```

## Output

- `workspace/{task}/draft.md` (final, frontmatter `Stage: optimized`)
- `workspace/{task}/meta.json`
- `workspace/{task}/quality.json` (all gates' results)
- `workspace/{task}/review.json` (independent reviewer)

## Handoff

`recommended_next_skill: "phase-publish"` (only if all gates passed)

## See also

- Sub-skills under `subskills/optimize/` (see the Stage-1 table above for which are
  live stages vs retired pointers)
- `subskills/cross-cutting/repair-orchestrator/SKILL.md`
- `agents/reviewer.md`
- `agents/seo-auditor.md` (tombstoned 2026-08-12 — scoring lives in the deterministic quality-gates scripts)
- `agents/geo-auditor.md`

Versions

The database has no other skills named phase-optimize.

Database snapshot: 13.11.2026 · package version 070e4a561ec4 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100on-page-optimize
    Optimise one page or draft for its target keyword: title, meta, headings, entities, internal links and schema. Use when "optimise this for X", "on-page for <url>", "add schema".
  • 90seo-onpage
    Run a comprehensive on-page SEO audit or optimization pass covering title tags, meta descriptions, header structure, content quality, internal links, image optimization, URL hygiene, and on-page schema. Use this skill whenever the user asks to optimize a page, audit on-page SEO,…
  • 100seo-research-content-system
    Research-first SEO content system for service pages and blog articles. Runs SERP, PAA, autocomplete and AI-query research, top-3 competitor analysis and content-gap analysis, then writes publish-ready content with metadata, internal links, schema, AEO/GEO notes and a scored…
  • 100phase-publish
    Run Phase Publish — image generation sub-pipeline (provider-pluggable: relay primary + official OpenAI fallback, realtime-forced) + WordPress publish with RankMath meta + IndexNow ping. Use when draft has passed all quality gates and is ready for live publication. Triggered by…
  • 84optimize-page
    Comprehensive single-page optimization across all three layers — traditional SEO (title / meta / H1 / internal links), AEO (chunk quality, direct-answer leads, FAQ extraction), and GEO rewrites using the tactics published by the Princeton/IIT Delhi GEO study (citation…
  • 98seo-audit
    整站技术 SEO 审计:对指定域名/URL 做 meta tags、heading 结构、图片 alt、内链、页面速度、移动端适配等全站体检,产出非技术人也能照做的一页式报告,并聚焦"本周可做的一件事"。当用户要求"审计/体检/诊断网站 SEO""为什么我的站没流量"时触发。不适用于:只改结构化数据标记(转 schema-markup)、只优化 AI 搜索引擎可见性(转 geo-search-optimize)、从零写博客文章(转 blog-writing-contract)。

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.