Source profileQuality 93/100

kryptobaseddev/cleo/packages/skills/skills/ct-artifact-publisher/SKILL.md

ct-artifact-publisher

Builds and publishes artifacts to registries (npm, PyPI, cargo, docker, GitHub releases, generic tarballs) following the validate, then dry-run, then build, then publish, then record-provenance pipeline. Invoked by ct-release-orchestrator as a sub-skill when a release has artifact config. Never stores credentials in output or manifest (ARTP-008), always dry-runs first (ARTP-002), halts and attempts rollback on failure (ARTP-009). Triggers when a release config has at least one enabled artifact h

Source repository stars
160
Declared platforms
0
Static risk flags
0
Last source update
2026-08-20
Source checked
2026-08-25

Decision brief

What it does: where it fits

Builds and publishes artifacts to registries (npm, PyPI, cargo, docker, GitHub releases, generic tarballs) following the validate, then dry-run, then build, then publish, then record-provenance pipeline. Invoked by ct-release-orchestrator as a sub-skill when a release has artifact config.

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/kryptobaseddev/cleo --skill "packages/skills/skills/ct-artifact-publisher"
    Safe inspection promptEditorial

    Inspect the Agent Skill "ct-artifact-publisher" from https://github.com/kryptobaseddev/cleo/blob/77fb47e0495c2456dfd45bdbe480198e7445123b/packages/skills/skills/ct-artifact-publisher/SKILL.md at commit 77fb47e0495c2456dfd45bdbe480198e7445123b. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      Core Principle

      Every artifact gets a checksum, a dry-run, and a rollback plan.

      Every artifact gets a checksum, a dry-run, and a rollback plan.
    2. 02

      Immutable Constraints

      Review the “Immutable Constraints” section in the pinned source before continuing.

      Review and apply the “Immutable Constraints” source section.
    3. 03

      Supported Artifact Types

      Nine registered handler types cover the common publishing surface. Each has a default build and publish command that the handler can override via config.

      Nine registered handler types cover the common publishing surface. Each has a default build and publish command that the handler can override via config.Per-type edge cases and exact invocation patterns live in references/artifact-types.md.
    4. 04

      Handler Interface

      Every handler is three Bash functions with a uniform contract:

      Every handler is three Bash functions with a uniform contract:
    5. 05

      Validate config, check tool availability, verify version consistency.

      {prefix}validate(artifactconfigjson) - exit 0 | 1

      {prefix}validate(artifactconfigjson) - exit 0 | 1

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars160SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    kryptobaseddev/cleo
    Skill path
    packages/skills/skills/ct-artifact-publisher/SKILL.md
    Commit
    77fb47e0495c2456dfd45bdbe480198e7445123b
    License
    MIT
    Collected
    2026-08-25
    Default branch
    main
    View the original SKILL.md

    Artifact Publisher

    Overview

    Sub-protocol of ct-release-orchestrator. Runs the build-then-publish pipeline for every enabled artifact in release.artifacts[]: pre-validates the config, dry-runs each build, produces SHA-256 checksums, publishes sequentially, and delegates signing plus attestation to ct-provenance-keeper. Handles nine artifact types via a uniform handler interface.

    Core Principle

    Every artifact gets a checksum, a dry-run, and a rollback plan.

    Immutable Constraints

    IDRuleEnforcement
    ARTP-001Artifact config MUST be validated before build.validate_artifact() must return 0 before build_artifact() runs; exit 86.
    ARTP-002Dry-run MUST execute before any real publish.Pipeline halts if dry-run fails; exit 86.
    ARTP-003Every handler MUST implement {prefix}_validate, {prefix}_build, {prefix}_publish.Missing handler function exits 85.
    ARTP-004SHA-256 checksums MUST be generated for every built artifact.Missing checksum blocks publish.
    ARTP-005Provenance metadata MUST be recorded via record_release() after publish.Composition handoff to ct-provenance-keeper.
    ARTP-006Multi-artifact publish MUST execute sequentially.No parallel publishes; prevents race conditions.
    ARTP-007Manifest entry MUST set agent_type: "artifact-publish".Validator rejects any other value.
    ARTP-008Credentials MUST NOT appear in config, output, or manifest.Agents declare env vars by name only; actual values stay in the environment.
    ARTP-009Pipeline MUST halt and attempt rollback on the first publish failure.Exit 88 on rollback success, exit 89 on rollback failure.

    Supported Artifact Types

    Nine registered handler types cover the common publishing surface. Each has a default build and publish command that the handler can override via config.

    TypeBuild command (default)Publish command (default)Registry
    npm-package(none, npm publish reads files)npm publishnpmjs.org
    python-wheelpython -m buildtwine upload dist/*pypi.org
    python-sdistpython -m build --sdisttwine upload dist/*pypi.org
    go-modulego mod tidy(tag push triggers proxy)proxy.golang.org
    cargo-cratecargo build --releasecargo publishcrates.io
    ruby-gemgem build *.gemspecgem push *.gemrubygems.org
    docker-imagedocker build -t <ref> .docker push <ref>configurable (OCI)
    github-release(none)gh release creategithub.com
    generic-tarballtar czf ...(custom)configurable

    Per-type edge cases and exact invocation patterns live in references/artifact-types.md.

    Handler Interface

    Every handler is three Bash functions with a uniform contract:

    # Validate config, check tool availability, verify version consistency.
    {prefix}_validate(artifact_config_json) -> exit 0 | 1
    
    # Produce build output in a known location. Respects dry_run.
    {prefix}_build(artifact_config_json, dry_run) -> exit 0 | 1
    
    # Push build output to the registry. Respects dry_run.
    {prefix}_publish(artifact_config_json, dry_run) -> exit 0 | 1
    

    A full pseudocode example for a custom handler is in references/handler-interface.md. To register a new handler:

    source lib/release-artifacts.sh
    register_artifact_handler "my-custom-type" "my_custom"
    

    Pipeline Phases

    The sub-protocol runs in three ordered phases:

    PhaseScopeHalt condition
    1. Pre-validateAll artifactsHalt before any build
    2. BuildSequential per artifactHalt pipeline
    3. PublishSequential per artifactRollback published artifacts, then halt

    Sequential order matters: if artifact 1 (npm) publishes successfully but artifact 2 (docker) fails, the pipeline rolls back artifact 1 using npm unpublish (within 72 hours) before exiting. Rollback feasibility varies by registry — see composition.md in ct-release-orchestrator for the full table.

    Credentials Handling

    Credentials are referenced, never stored. The skill reads environment variables by name from the config and verifies they are set before publishing:

    {
      "credentials": {
        "envVar": "NPM_TOKEN",
        "ciSecret": "NPM_TOKEN",
        "required": true
      }
    }
    

    The skill MUST NOT:

    • Echo or log credential values.
    • Write credential values to config.json or the manifest entry.
    • Pass credentials as CLI arguments (visible in ps).
    • Include credential values in output files.

    In CI, trusted publishing is preferred: the workflow exchanges an OIDC token for a short-lived registry credential, and the skill never sees the token. The CI path is already configured in .github/workflows/release.yml for npm.

    Missing credentials exit 90 (E_PROVENANCE_CONFIG_INVALID bubbled from provenance) or fail the credential check with a clear error pointing at the missing env var.

    Integration

    Validate the sub-protocol entry through cleo check protocol:

    cleo check protocol \
      --protocolType artifact-publish \
      --taskId T4901 \
      --artifactType npm-package \
      --buildPassed true
    

    Exit code 0 = artifact published successfully. Exit code 85 = unknown artifact type. Exit code 86 = validation failed. Exit code 87 = build failed. Exit code 88 = publish failed, rollback attempted. Exit code 89 = rollback failed, dirty state.

    This skill always hands off to ct-provenance-keeper after publish, before writing the manifest entry, so the provenance chain is recorded in the same pipeline.

    Anti-Patterns

    PatternProblemSolution
    Publishing without a dry-run firstIrreversible registry state on failureARTP-002 requires dry-run; the skill refuses to skip it
    Storing credentials in config.jsonCommitted to VCS, visible to every agentReference by env var name; actual values stay in the environment
    Parallel multi-artifact publishRace conditions; partial state on failureSequential execution in config order (ARTP-006)
    Skipping checksum generationCannot verify artifact integrity downstreamGenerate SHA-256 for every build output
    Logging credential valuesExposure in audit trail and agent contextNever echo credentials; test only the env var is set, not its value
    Hardcoding registry URLsBreaks across environmentsUse the registry field in the config
    Manual rollback without recordingLost provenance chainRecord rollback in the manifest and the releases.json chain
    Building before validatingWastes time on invalid configPre-validate every artifact before the first build
    Ignoring rollback failuresLeaves the pipeline in dirty stateExit 89 and require manual intervention — do not retry blindly

    Critical Rules Summary

    1. Every artifact MUST be pre-validated before any build starts.
    2. Every publish MUST be preceded by a successful dry-run.
    3. Credentials MUST NEVER leave the environment — no logging, no config, no manifest.
    4. Publishes run sequentially in config order; no parallel publishes.
    5. SHA-256 checksums are mandatory for every build output.
    6. Provenance MUST be recorded via record_release() after publish, via ct-provenance-keeper.
    7. On first publish failure, halt and attempt rollback; exit 88 on clean rollback, 89 on dirty.
    8. Validate every run via cleo check protocol --protocolType artifact-publish.

    Frequently asked questions

    What to verify before installation and use

    What does the ct-artifact-publisher source document cover?

    Builds and publishes artifacts to registries (npm, PyPI, cargo, docker, GitHub releases, generic tarballs) following the validate, then dry-run, then build, then publish, then record-provenance pipeline. Invoked by ct-release-orchestrator as a sub-skill when a release has artifact config.

    How do I install ct-artifact-publisher?

    The source record exposes this install command: npx skills add https://github.com/kryptobaseddev/cleo --skill "packages/skills/skills/ct-artifact-publisher". Inspect the command and pinned source before running it.

    Alternatives

    Compare before choosing