Agent skill · software engineering · replicate

publish-models

Push and publish custom AI models to Replicate, and set up CI/CD for releasing new model versions safely. Use when running cog push, deploying a model to Replicate, releasing a new version, validating a model with cog-safe-push before publishing, configuring a Replicate deployment, setting up GitHub Actions for model releases, or porting a community model to an official one. Trigger on phrases like "push a model to Replicate", "publish a model", "deploy a model", "release a new version", "cog push", "cog-safe-push", "model CI", "r8.im", or "schema compatibility", and when referencing github.com/replicate/cog-safe-push or github.com/replicate/model-ci-template. Covers cog push, the full cog-safe-push config (test cases, fuzz, deployment, official_model), GitHub Actions patterns, multi-model matrix pushes, and post-publish monitoring. Assumes you already have a working Cog project; see build-models if you need to package one first.

Why this skill is useful

Adds executable scripts for CI/CD model deployment and validation that are specific to the Replicate platform.

What it needs

Requires cog installed locally. Requires replicate account access. About 5k tokens when loaded. Last updated 2026-06-04. 53 stars on the source repository.

What this skill does

Docs Cog reference: <https://cog.run/llms.txt> cog push reference: <https://cog.run/cli#cog-push> cog-safe-push: <https://github.com/replicate/cog-safe-push> Model CI template: <https://github.com/replicate/model-ci-template> Continuous deployment guide: <https://replicate.com/docs/guides/continuous-model-deployment> When to use this skill You have a working Cog project (see build-models if you don't yet). You want to publish a private or public model on Replicate. You're releasing a new version of an existing model and want to avoid breaking changes. You're setting up CI/CD for model releases. Prerequisites Cog installed and cog login against r8.im (or echo $TOKEN cog login --token-stdin). A model created at replicate.com/{owner}/{name} via the API, web UI, or r8-model CLI. REPLICATEAPITOKEN set in your environment. Plain cog push The simplest path. Build and upload a new version: Or set image: r8.im/owner/my-model in cog.yaml and run a bare: Useful flags: --separate-weights — store weights in a separate layer; faster cold boots and pushes for models with > 1GB of weights. --x-fast — faster pushes during iteration (skips some validation). --secret id=hf,src=$HOME/.hftoken — pass build-time secrets without baking them into image history. cog-safe-push (recommended for any model with users) cog-safe-push pushes to a private -test model first, checks schema compatibility against the live version, runs prediction comparisons, and fuzzes inputs. Catches breaking changes before they reach users. Install: Required env vars: REPLICATEAPITOKEN ANTHROPICAPIKEY (Claude judges output similarity for stochastic models) Basic usage: This will: 1. Lint predict.py with ruff. 2. Create a private test model owner/my-model-test if missing. 3. Push the local Cog model to the test model. 4. Lint the schema (descriptions, defaults, etc.). 5. Check schema compatibility against the live owner/my-model version. 6. Run prediction comparisons between live and test versions. 7. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills replicate/publish-models

View the source on GitHub

Browse the @skills marketplace