plugins/d-nd-core/skills/publish-safe/SKILL.md
Five mechanical gates for any content publish pipeline with CMS + rendering layers. Prevents false security: 'API returned 200' does not mean 'visitor sees clean content'. Use when writing content to a multi-layer serving system (CMS API, static files, prerendered HTML, cached copies).
npx skillsauth add grazianoguiducci/d-nd-seed publish-safeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A publish operation is not atomic. Content traverses layers, and each layer can silently fail to update. This skill enforces mechanical checks so the operator does not rely on a single measurement to declare success.
"HTTP 200 = clean" — but HTTP 200 only confirms the API accepted the write. It says nothing about:
Each of these is a separate layer. Each layer can fail independently. A gate-less publish has a combinatorial false-positive space.
Normalize known encoding artifacts before the write. Common sources:
“, arrows as â†')Maintain a MOJIBAKE_MAP table ordered long-first (longer patterns before
their prefixes — otherwise short-match eats part of long sequences).
Scope — which fields to scan: scan every field that ends up rendered to a consumer, not just the primary content body. Pages typically carry:
content / content_en (body — the obvious target)description / description_en (injected into <meta name="description">,
og:description, twitter:description — crawlers and AI ingest these)title / title_en, summary, alt-text fields on embedded mediavisual_spec, diagram_spec, or any structured JSON field that
produces rendered text (diagram titles, labels, tooltips, detail
sentences) — these ship as HTML inside the page and are visible to
both humans and LLMsGate-1 misses here are invisible: the body looks clean, the meta layer
ships with mojibake or bias, and crawler/AI indexing picks up the bad
version because the API echo only reported the body's cleanliness. If
the stack has a meta layer or an embedded structured-content layer
(like visual_spec), sanitize must include it by scope declaration —
not as a later patch.
Server-generated fields caveat. Some fields are regenerated server-side after the write (e.g., a CMS extractor re-derives the field from the body and overwrites what the client sent). If the gate scans these at write time but the server regenerates them downstream with a different process, the gate output is stale — the server version shipped, not the sanitized one. Two rules:
visual_spec is re-extracted from the body by a server process,
the server's extraction logic must contain the same sanitization
rules as Gate 1. Gate 1 alone at the API client is not enough.If input still contains known-bad sequences after sanitize, raise — do not pass poisoned content through the gate.
Scan content for internal references (links, includes, cross-refs). For each:
Scope — same discipline as Gate 1: apply link-integrity scans across
every field that can hold a reference, including description /
description_en and any metadata field that may contain a URL or slug.
Links inside meta-description shipped broken are the same class of silent
failure as body links — crawler previews and AI summaries surface them.
If a link points to a target that does not exist and is not whitelisted: raise (or at minimum: warn and require explicit override). Broken internal links silently shipped are a recurring failure class.
Write with explicit encoding and correct content-type:
POST with Content-Type: application/json; charset=utf-8--data-binary @file (not -d "...") to preserve bytes exactlyThe failure mode here: content-type not set, server infers latin-1, re-encodes. This is how mojibake gets introduced in the first place — Gate 1 cleans what previous Gate 3 failures created.
For every layer that can serve the content to a consumer:
For each layer: scan for the same MOJIBAKE_MAP patterns (byte-level where possible — unicode normalization in a JSON parser can hide byte-level double-encoded sequences) + integrity check.
Critical: Layer 1 clean does not imply Layer 3 clean. If they differ, investigate before declaring success.
Also critical: a verify gate is itself a measurement with a scope. Make the scope explicit ("scanned for these 17 patterns") — a passing verify does not mean "everything is clean at every layer", it means "the scanned patterns were absent". This is autologica applied to verification itself.
If Gate 4 reveals a serving layer that did not pick up the write (e.g., prerender HTML is stale despite API clean), trigger the rebuild/invalidation hook for that layer. Do not declare the publish complete until all layers converge.
Common patterns:
npm run build + deploy distIf no rebuild hook exists, the gate must emit a concrete warning: "content written at Layer 1+2, Layer N stale — requires manual rebuild". Do not paper over the gap.
This skill is content. Does it pass its own gates?
The skill is the pattern applied to itself — the gate is the measurement.
testing
Closure reflection protocol. After a significant work block concludes (feature shipped, session ending, major commit landed, cross-node coordination resolved), runs a 10-question interview that extracts meaning, impact, and next questions — then emits multiple audience-specific artifacts (changelog, external editorial, AI integration docs, memory crystal, backlog seed). Turns implicit maturation into explicit narrative. Use at the end of meaningful work, not after trivial edits.
testing
The neutral form of the D-ND method. Meta-skill that recognizes context and orients toward the right specialization (cec, autologica, cascade, assertion-verifier, etc.). Activate at the start of a non-trivial work block or when input matches trigger words ('where are we', 'what here', 'orchestrate', 'connect', 'sieve this').
testing
Multi-node consultation protocol for high-leverage decisions. Dispatches the same question to N independent LLM/agent nodes in isolation, then synthesizes their responses into a summa that exposes convergence (high-confidence claims), dissensus (real uncertainty zones), and emergent points (insights no single node produced). Reduces single-node training bias. Supports recursive escalation for stable-state convergence. Use for decisions that propagate via A14 cascade — seed updates, crystallizations, advisory→mechanical promotions, high-visibility copy, lab result interpretation.
tools
Pre-commit check for public-facing copy (knowledge base definitions, page content, docs). Detects apologetic hedging — phrases that declare 'degrees of truth' (possible/necessary, current/future, one-of-many/the) and open a dualistic framing the model transcends. Use when drafting or reviewing any copy that describes the model, its transductions, or its tools.