deploy-to-amp
БесплатноБез исполняемых скриптовНе проверенGetting a CrewAI crew or flow onto CrewAI AMP: the project shape the build expects (uv.lock, [tool.crewai] type, src/<pkg>/ entry points, a real Flow…
от crewAIInc★ 51 звезда на GitHubОб этом скилле
Deploy to CrewAI AMP
Ship a crew or flow to AMP without burning deploys on project-shape errors, stale code, stale env values, or the wrong org.
Verified against crewai 1.15.22 and 1.15.23 on 2026-10-01.
Live-tested on CrewAI AMP and real LLMs on 2026-10-01.
Run crewai version first; if the major/minor differs, re-verify the version-sensitive rows below with the ask-docs skill before trusting them.
1. Preflight - run these three every time
crewai org current # which org will receive this deploy (machine-wide, see section 5)
uv lock && git status # lockfile fresh, and you know what is uncommitted
crewai deploy validate # local checks, no platform contact, exit 1 on blocking errors
crewai deploy create and crewai deploy push run the same validation automatically (skip with --skip-validate only when you know why). Every crewai deploy subcommand, including status --uuid, must run from the project root - elsewhere it stops with Error: pyproject.toml not found.
Exit codes are not a reliable signal in scripts or CI. crewai deploy validate exits 1 on errors, but create and push exit 0 when their built-in validation fails (Pre-deploy validation failed. Fix the issues above or re-run with --skip-validate.), and status / logs exit 0 on deployment_not_found. Gate CI on crewai deploy validate and check the command output, not only $?.
Validate imports your project, which creates crewai's local storage directory (on macOS ~/Library/Application Support/<pkg>/). Set CREWAI_STORAGE_DIR to a scratch path when running it in CI or on a shared machine.
2. Project shape the build expects
| Requirement | Crew (classic, crewai create crew <name> --classic) |
Flow (crewai create flow <name>) |
|---|---|---|
| Deployment name | [project].name, verbatim (the scaffold writes underscores: research_crew) |
same |
[tool.crewai] type |
"crew" |
"flow" |
| Lockfile | uv.lock (or poetry.lock) at the root, committed |
same |
| Package dir | src/<pkg>/, where <pkg> is [project].name normalized (research-crew -> research_crew) |
same |
| Entry code | src/<pkg>/crew.py with an @CrewBase class, plus config/agents.yaml and config/tasks.yaml |
src/<pkg>/main.py with a Flow subclass that can be built with no arguments, plus kickoff() |
| Scripts (scaffold) | run_crew = "<pkg>.main:run" |
kickoff = "<pkg>.main:kickoff" |
| Imports | absolute: from research_crew.tools.x import Y |
absolute: from acme_flow.crews.content_crew.content_crew import ContentCrew |
JSON-first crews (plain crewai create crew <name>, no --classic) keep crew.jsonc and agents/ at the project root instead of src/; crewai deploy validate checks that layout too.
Minimal flow main.py that passes validation:
from crewai.flow import Flow, listen, start
from pydantic import BaseModel
class ReportState(BaseModel):
topic: str = "AI agents"
summary: str = ""
class ReportFlow(Flow[ReportState]):
@start()
def gather(self):
return f"notes on {self.state.topic}"
@listen(gather)
def summarize(self, notes):
self.state.summary = notes.upper()
return self.state.summary
def kickoff():
ReportFlow().kickoff()
if __name__ == "__main__":
kickoff()
Shape rules, each with the failure it prevents
| Bad | What happens | Good |
|---|---|---|
from .stub_tools import X in crew.py / main.py |
crewai run works, but crewai deploy validate fails with Crew class annotated with @CrewBase not found (the loader runs the file outside its package, and the real attempted relative import error is hidden). Pushed with --skip-validate, the AMP build fails the same way: ImportError: attempted relative import with no known parent package |
from research_crew.stub_tools import X |
Only a def kickoff(): in main.py, no Flow class |
No Flow subclass found in the module |
Define class MyFlow(Flow[...]) and call it from kickoff() |
Flow __init__(self, tenant: str) |
No Flow subclass found - the class must build with no arguments |
Pass per-run values through kickoff(inputs={...}) into state |
type = "flow" on a crew project |
No Flow subclass found |
type = "crew" |
type = "crew" on a flow project |
Cannot find src/<pkg>/crew.py, Cannot find src/<pkg>/config |
type = "flow" |
Renamed src/research_crew/ to src/researchcrew/ |
Cannot find src/research_crew/ and Hatchling cannot determine which files to ship |
Keep the dir equal to the normalized [project].name |
uv.lock missing |
missing_lockfile error |
uv lock, then git add uv.lock |
Edited pyproject.toml after locking |
stale_lockfile warning (does not block) - deployed deps may differ from local. The check compares file times, and the CLI itself writes [tool.crewai] project_id into pyproject.toml when it is missing, which also triggers it |
Re-run |
Установить deploy-to-amp в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл deploy-to-amp?
Getting a CrewAI crew or flow onto CrewAI AMP: the project shape the build expects (uv.lock, [tool.crewai] type, src/<pkg>/ entry points, a real Flow subclass, absolute imports, a self-contained root), `crewai deploy validate`, the three deploy paths (CLI create/push, GitHub, ZIP upload) and what each one actually uploads, env vars per deployment and what the CLI re-sends from .env, provider keys and extras, and machine-wide org selection. Use when running `crewai deploy create` / `crewai deploy push` / `crewai deploy validate`, when a deploy says Online but runs old code, old env values or lost a key, or when pasting errors like `missing_lockfile`, `Crew class annotated with @CrewBase not found`, `No Flow subclass found`, `Expected to find at least one of these files: uv.lock or poetry.lock`, `OPENAI_API_KEY is required`, `Anthropic native provider not available`, `deployment_not_found`, `git_clone_failure`, `Automation error, fix the code and deploy again`, or `pyproject.toml not found`.
Как установить скилл deploy-to-amp?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл deploy-to-amp запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic