Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+23 more

    AI Content Publish Gate & Provenance

    by Tive Fi

    1

    An AI writer with database credentials is a publishing pipeline that can go live on its own.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    AI Content Publish Gate & Provenance

    AI Content Publish Gate & Provenance

    Example session with this skill installed

    I've drafted "Sizing PgBouncer for Postgres connection pools" and I want to publish it to our Postgres CMS today. Run the publish gate against our corpus (examples/published-posts.json) and tell me whether it can go live. If it can't, tell me exactly which gate stopped it and what to change.

    • Read your context and instructions
    • Compiled the ai content publish
    {
      "verdict": "HELD_AS_DRAFT",
      "publish_requested": true,
      "effective_status": "draft",
      "reason": "title is 67% similar to an already published post: 'Sizing PgBouncer for Postgres connection pooling' (pgbouncer-sizing)",
      "title": "Sizing PgBouncer for Postgres connection pools",
      "slug": "pgbouncer-pool-sizing",
      "similarity_threshold": 0.5,
      "published_titles_checked": 14,
      "gates": [
        {
          "id": "approval",
          "gate": 1,
          "name": "Human approval",
          "result": "pass",
          "detail": "approved by Hana Lee",
          "approval_confirmed": true,
          "reviewed_by": "Hana Lee"
        },
        {
          "id": "near_duplicate",
          "gate": 2,
          "name": "Near-duplicate guard",
          "result": "hold",
          "detail": "title is 67% similar to an already published post: 'Sizing PgBouncer for Postgres connection pooling' (pgbouncer-sizing)",
          "threshold": 0.5,
          "checked": 14,
          "closest": [
            {
              "title": "Sizing PgBouncer for Postgres connection pooling",
              "slug": "pgbouncer-sizing",
              "similarity": 0.667
            },
            {
              "title": "Reading a Postgres query plan without guessing",
              "slug": "postgres-query-plan",
              "similarity": 0.111
            },
            {
              "title": "Rotating TLS certificates on a reverse proxy without downtime",
              "slug": "tls-rotation-reverse-proxy",
              "similarity": 0.0
            }
          ],
          "duplicate_of": {
            "title": "Sizing PgBouncer for Postgres connection pooling",
            "slug": "pgbouncer-sizing",
            "similarity": 0.667
          }
        },
        {
          "id": "unverifiable_experience",
          "gate": 3,
          "name": "Unverifiable experience guard",
          "result": "pass",
          "detail": "no unverifiable first-person or private-environment claim found",
          "matches": [],
          "allowed_claims": []
        },
        {
          "id": "immutable_fields",
          "gate": 4,
          "name": "Immutable field guard",
          "result": "skip",
          "detail": "no --original row supplied, so this is a first publish and nothing is compared",
          "changed": []
        }
      ],
      "blocking": ["near_duplicate"],
      "warnings": [],
      "held_as_draft": true,
      "retry_hint": "Fix the blocking gates and run the check again. Do not edit the report, and do not let the writer set reviewed_by on its own behalf.",
      "duplicate_of": {
        "title": "Sizing PgBouncer for Postgres connection pooling",
        "slug": "pgbouncer-sizing",
        "similarity": 0.667
      }
    }
    

    Next steps. The topic is already published as pgbouncer-sizing; either pick a different subject, or refresh that page. The content is kept as a draft, the daily publish slot is not spent, and the decision is on the record. Exit code was 1.

    Running the same command on the approved sample returns "verdict": "PASS", "effective_status": "published" with all four gates passing and the closest published title at 9% similarity. On the Korean fake-experience sample the report is held with four matched patterns (ko_personal_test, ko_our_org, ko_incident_pct, ko_direct_result).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    An AI writer with database credentials is a publishing pipeline that can go live on its own. This skill puts four gates in front of that path, installs the same rule in the database, and records who checked what — so "AI draft, human review" is a constraint instead of a promise in a policy document.

    THE PROBLEM IT SOLVES

    Every team that publishes with an agent has the same conversation: the model writes, a person is supposed to review, nobody can prove that the review happened or that it happened before the date in the sitemap. Then a cron job publishes one unreviewed post, or a translation batch bumps updated_at and every article suddenly claims to be freshly updated, or two posts are written about the same question three weeks apart.

    The gate exists because the failure is not a bad sentence. It is a missing step in the path between the draft and the reader.

    THE FOUR GATES

    1. HUMAN APPROVAL. A publish request passes only when approval_confirmed is the boolean true and reviewed_by is a name. A string "true", a 1, an empty value and a placeholder like "AI" or "test" all fail. The writer never supplies either field on its own behalf.

    2. NEAR DUPLICATE. The title's token Jaccard similarity is compared with every published title. At 0.50 or above the draft is held and the report names the post it collided with (duplicate_of: title, slug, similarity), so the agent picks a different topic instead of rewording the headline.

    3. UNVERIFIABLE EXPERIENCE. First-person and private-environment claims that an article cannot evidence are held with the matched text and its context: "I personally tested", "in our production cluster", "our team benchmarked", "제가 직접 테스트한 결과", "우리 회사에서는", "장애의 43%". Three honest fixes are offered for each: rewrite as procedure, source it, or release it explicitly with --allow-claim, which is recorded in the report.

    4. IMMUTABLE FIELDS. An update may not change slug, published_at or reviewed_at. The URL holds the page's history, a rewritten publish date is a false date, and the review record is history; a re-review belongs in an audit log.

    Each run prints one JSON report — PASS or HELD_AS_DRAFT — with the gate that blocked, the evidence for it, and the next step. Exit codes 0/1/2 make it usable in CI.

    BEYOND THE CHECK

    • DATABASE TRIGGER. references/publish-gate.sql installs enforce_review_before_publish(): a move into published without reviewed_at and reviewed_by raises an exception. Edits and upserts of already-published rows pass. The function never assigns status or published_at — a gate that "fixes" a row can silently unpublish someone's article. A second trigger freezes the three identity fields. trigger-test.sql runs twelve cases and ends in ROLLBACK.

    • WRITE-PATH GUARD. The request contract, the column whitelist, the held_as_draft response, and sketches for Node/Next, Django and Rails.

    • PROVENANCE RECORD. verifiedAt, reviewScope (what was checked AND what was not), environment, officialSources with https links, reviewer human|ai. The validator fails when a page's dateModified equals the row's updated_at, when dateModified has no contentUpdatedAt behind it, or when datePublished disagrees with published_at. The jsonld command refuses to emit a date the record cannot support.

    • PIPELINE AUDIT. Scans code and SQL for the ways around the gate: status assigned the literal 'published', a published_at copied from another row, a hard-coded reviewer, approval flipped in code, updated_at rendered as dateModified, a DEFAULT 'published', a COMMIT inside the gate migration, a trigger function that assigns state, or a skip-approval switch. Test and fixture paths are reported as suppressed rather than hidden.

    WHAT MAKES IT DIFFERENT

    • It works at the layer the failure happens in. A checklist tells a person to review; a trigger makes the database refuse the row.

    • The gate audits itself: the package passes its own scanner, and the tests include an unguarded sample that must fail and a guarded one that must not.

    • Date integrity is treated as part of the gate, not a formatting concern. Row updated_at is never allowed to become dateModified, lastmod or a badge.

    • It refuses to backfill review records for old posts. A fabricated record destroys the only evidence you had.

    • Standard-library Python 3.8+, no network, no keys, no model calls. There is nothing to authenticate and nothing that can call out.

    WHAT'S INSIDE

    • SKILL.md — the workflow, four gates, five invariants, the limits.

    • 4 scripts: gate_check.py (gates → JSON), evidence_builder.py (build/validate/jsonld), audit_pipeline.py (bypass scan), gate_common.py.

    • 6 references: publish-gate.sql, trigger-test.sql, gate-policy.md, write-path-guard.md, provenance-schema.md, checklist.md.

    • 25 example files: a 15-row corpus (14 published) as JSON and CSV, one passing draft with its provenance record and page, two blocked drafts (duplicate, fake experience in English and Korean), one blocked update, an unguarded and a guarded write path, a bad gate migration, and eight reference reports.

    • 61 tests you can run in under a second.

    WHO IT'S FOR

    • Teams whose agent or script writes into a Postgres/Supabase CMS.

    • Anyone who has to answer "who reviewed this, and when" about an AI-assisted post.

    • Sites that publish in more than one language and have seen updated_at drift.

    • Agents with shell or repo access: the package is files and commands, not a hosted service.

    REQUIREMENTS

    • Python 3.8 or newer, standard library only.

    • Postgres 12+ for the database trigger (Postgres 17 tested). MySQL works with the API guard alone.

    • A list of published titles for gate 2, from an export or one SELECT.

    KNOWN LIMITATIONS

    • Gate 2 compares title tokens, not meaning. Two posts can serve one search intent with no shared words; search data or a human decides that case.

    • Gate 3 is a pattern match. It misses paraphrases and occasionally holds a legitimate sentence; a held draft is a question for the reviewer.

    • The gate cannot prove a human read the draft. It makes skipping review hard, visible and attributable, and records who is accountable.

    • No ranking, traffic or ad-approval outcome is promised. This protects integrity, not performance.

    • The bundled SQL targets a posts table with id, slug, status, reviewed_at, reviewed_by. Adapting it is a column rename and a comment in the file.

    VERSION 1.0.0

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Marketing & SEO.

    PostgreSQL-specific triggers. Title similarity checks are token-based, not semantic. Requires existing published titles in JSON/CSV for duplicate detection.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Software
    Python

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed3 days ago
    Updated2 days ago

    What's inside

    Frequently Asked Questions

    This skill functions as a hard technical barrier at the database and API level, preventing AI agents from publishing content—even if they ignore their system prompts or instructions—unless specific human-approval metadata is present.

    The skill is built for PostgreSQL and Python environments, but it includes implementation patterns for popular web frameworks like Django, Next.js, and Ruby on Rails to ensure your API remains secure regardless of your frontend choice.

    You will receive the PostgreSQL trigger scripts, the Python CLI tool for similarity and claim checking, an audit script to identify insecure write paths, and standard implementation patterns for major web frameworks.

    The skill uses Jaccard similarity to compare new titles against your existing database, flagging potential duplicates to prevent keyword cannibalization before the content ever reaches your live site.

    Setup involves running the provided audit script to find existing publish paths, applying the PostgreSQL triggers to your database schema, and integrating the CLI check into your agent's pre-publish workflow.

    New in Marketing & SEO