Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

## Purpose

This repo publishes a single Agent Skills document for Replicate.
This repo publishes Agent Skills documents for Replicate.

Keep it short and focused: a human- and agent-readable guide to discovering models, inspecting schemas, running predictions, and handling outputs.
Keep it short and focused: human- and agent-readable guides for finding, comparing, running, building, and deploying models.

## Files that matter

- `skills/replicate/SKILL.md` is the canonical skill.
- `skills/find-models/SKILL.md` covers discovery workflows.
- `skills/compare-models/SKILL.md` covers model evaluation.
- `skills/run-models/SKILL.md` covers prediction workflows.
- `skills/build-models/SKILL.md` covers Cog builds.
- `skills/deploy-models/SKILL.md` covers deployments and scaling.
- `.mcp.json` points to the remote MCP server.
- `.claude-plugin/` contains marketplace metadata for Claude Code.

Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Replicate Skills


A collection of [Agent Skills](https://agentskills.io) for building AI-powered apps with [Replicate](https://replicate.com).
A collection of [Agent Skills](https://agentskills.io) for building AI-powered apps with [Replicate](https://replicate.com).

Discover, compare, and run AI models using Replicate's API.
Find, compare, run, build, and deploy models using Replicate and Cog.

Skills included:

- find-models
- compare-models
- run-models
- build-models
- deploy-models

## Installing

Expand Down
26 changes: 26 additions & 0 deletions skills/build-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: build-models
description: Build Replicate models using Cog
---

## Docs

- Cog docs: https://cog.run/llms.txt
- Replicate docs: https://replicate.com/docs/llms.txt
- HTTP API schema: https://api.replicate.com/openapi.json
- Set an `Accept: text/markdown` header when requesting docs pages to get a Markdown response.

## Workflow

- Define your model in `cog.yaml` using the Cog schema.
- Implement the Predictor interface in Python and wire inputs and outputs.
- Build and test the image locally with Cog before pushing.
- Use the Cog docs as the source of truth for `cog.yaml` and Predictor APIs.

## Guidelines

- Focus on the `cog.yaml` schema and the Predictor API in the Cog docs.
- Cog is open source at https://github.com/replicate/cog if you need internals.
- Review Replicate models that link GitHub repos to learn existing Cog patterns.
- Use model repos as references for inputs, outputs, and packaging decisions.
- Keep `cog.yaml` minimal and explicit about build and runtime dependencies.
24 changes: 24 additions & 0 deletions skills/compare-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: compare-models
description: Compare Replicate models for fit, cost, and reliability
---

## Docs

- Reference docs: https://replicate.com/docs/llms.txt
- HTTP API schema: https://api.replicate.com/openapi.json
- Set an `Accept: text/markdown` header when requesting docs pages to get a Markdown response.

## Workflow

- Fetch model schemas and compare required inputs and outputs.
- Compare pricing, speed, and reliability from model metadata.
- Prefer official models when you need stable interfaces.
- Use collections to narrow the shortlist before deep comparison.
- Run a small set of predictions to compare output quality.

## Guidelines

- Verify output types match downstream requirements.
- Official models have predictable output pricing and stable APIs.
- Consider cold-start behavior for community models.
25 changes: 25 additions & 0 deletions skills/deploy-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: deploy-models
description: Push models with Cog and configure Replicate deployments
---

## Docs

- Cog docs: https://cog.run/llms.txt
- Replicate docs: https://replicate.com/docs/llms.txt
- HTTP API schema: https://api.replicate.com/openapi.json
- Set an `Accept: text/markdown` header when requesting docs pages to get a Markdown response.

## Workflow

- Use Cog to build and push a model image.
- Configure deployments in Replicate for hardware and scaling behavior.
- Use the API schema as the source of truth for deployment fields.
- Align deployment settings with expected throughput and cost.

## Guidelines

- Review models with GitHub repos in their metadata for deployment examples.
- Keep deployment settings aligned with model performance and cost targets.
- Prefer official models for stable deployment behavior.
- Use deployments when you need consistent uptime and predictable latency.
26 changes: 26 additions & 0 deletions skills/find-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: find-models
description: Find Replicate models and curated collections
---

## Docs

- Reference docs: https://replicate.com/docs/llms.txt
- HTTP API schema: https://api.replicate.com/openapi.json
- Set an `Accept: text/markdown` header when requesting docs pages to get a Markdown response.

## Workflow

- Use search and collections endpoints from the API schema.
- Prefer curated collections for vetted models.
- Use the "official" collection when you need stable interfaces.
- Check model metadata for inputs, outputs, and pricing.

## Guidelines

- Avoid listing all models via API; use targeted queries.
- Collections are curated by Replicate staff.
- Official models are maintained by Replicate and are always running.
- Official models have stable interfaces and predictable output pricing.
- Community models can have cold-start time.
- Always-on deployments of community models pay for uptime.
53 changes: 0 additions & 53 deletions skills/replicate/SKILL.md

This file was deleted.

26 changes: 26 additions & 0 deletions skills/run-models/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: run-models
description: Run Replicate models via predictions and webhooks
---

## Docs

- Reference docs: https://replicate.com/docs/llms.txt
- HTTP API schema: https://api.replicate.com/openapi.json
- Set an `Accept: text/markdown` header when requesting docs pages to get a Markdown response.

## Workflow

- Create a prediction with POST /v1/predictions.
- Poll for completion, use a webhook, or set `Prefer: wait` for fast models.
- Add a webhook URL at creation time when you want async delivery.
- Read model schemas to validate inputs before sending requests.
- Return output when the prediction status is "succeeded".

## Guidelines

- Use HTTPS URLs for file inputs; avoid base64 when possible.
- POST /v1/predictions supports both official and community models.
- Run predictions concurrently rather than serially.
- Webhooks are a good way to receive and store outputs.
- Output file URLs expire after 1 hour; back them up if needed.
Loading