Crewai init
Scaffold a new CrewAI project the right way — Flow-first architecture, JSONC configs, Claude LLM wiring, guardrails, and a verified runnable baseline. Use when the user asks to create, bootstrap, or start a new CrewAI project, crew, or flow.From its SKILL.md
npx -y skills add victorgrein/victorgrein-skills --skill crewai-initAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.5 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it
Scaffold a new CrewAI project
Create a production-shaped CrewAI project for $project_name (ask for a name if empty). Follow the steps in order; run the bundled scripts rather than hand-typing CLI commands.
Step 1 — Understand the use case, pick the architecture
From the conversation (ask one round of questions if unclear): what is the process, what are the inputs/outputs, which steps need judgment vs. which are mechanical?
Pick using the decision matrix:
| Complexity | Precision needed | Build |
|---|---|---|
| Low | High | Flow with direct LLM.call() steps — no agents |
| Low | Low | Single Agent |
| High | Low | Single Crew |
| High | High | Flow orchestrating Crews (default) |
Default to Flow-first (crewai create flow). Choose crew-only (crewai create crew) only when the user explicitly wants a standalone crew with no orchestration.
Tell the user which shape you picked and why, in two sentences, before scaffolding.
Step 2 — Scaffold
bash ${CLAUDE_SKILL_DIR}/scripts/scaffold.sh <project_name> <flow|crew>
The script verifies prerequisites (Python 3.10–3.13, uv; installs the crewai CLI via uv tool install crewai if missing), runs crewai create + crewai install, and is safe to re-run. If it fails, fix the reported problem and re-run it — do not improvise around it.
Step 3 — Environment
bash ${CLAUDE_SKILL_DIR}/scripts/setup-env.sh <project_dir>
Writes a .env template (MODEL=anthropic/claude-sonnet-4-6, ANTHROPIC_API_KEY= placeholder) without overwriting an existing .env, ensures .env is gitignored, creates a starter AGENTS.md if the scaffold didn't, and symlinks CLAUDE.md → AGENTS.md so the same project context serves both AGENTS.md-reading agents (Codex, Cursor, Gemini) and CLAUDE.md-reading agents. Remind the user to fill in the real key; never write a real key yourself.
After the flow and crews are authored (Step 4), fill AGENTS.md in with the real project overview, architecture map, run commands, and conventions — don't leave the placeholder text.
Step 4 — Author the configs and flow
Load the crewai-expert skill references before writing code:
- Flow wiring and state →
crewai-expertskill,references/flows.md - JSONC config and task/agent params →
crewai-expertskill,references/crews.md - Claude LLM details →
crewai-expertskill,references/llm-config.md
Apply, in this order:
- Typed state: define a Pydantic state model;
class MyFlow(Flow[MyState]). - Deterministic steps as plain methods — input normalization, validation, routing computable from state, output persistence. No LLM calls in these.
- Crews in JSONC:
crew.jsonc+agents/*.jsoncper crew, loaded viaload_crew(Path(__file__).with_name("crew.jsonc")). Every agent: specific role/goal/backstory and"llm": "anthropic/claude-sonnet-4-6". Every task: one outcome, specificexpected_output. - Structured handoffs:
output_pydanticon any task whose output later steps consume. - Guardrail on the terminal task at minimum — function guardrail returning
(bool, Any)for format rules, string guardrail for subjective criteria. @persiston the flow class if the process is long-running or restart-sensitive.
Step 5 — Verify
bash ${CLAUDE_SKILL_DIR}/scripts/verify.sh <project_dir>
The script smoke-checks the project (imports resolve, JSONC parses, entry points exist) and, when an API key is available, offers crewai run. Also generate the flow diagram (crewai flow plot) and tell the user where the HTML landed.
Report to the user: the architecture chosen, files created, verification results, and the exact next commands (crewai run, crewai flow plot).
Rules
- Never commit or print secrets;
.envstays gitignored. - Don't add memory, knowledge, MCP, or hierarchical process to a fresh scaffold unless the use case demands it — start minimal (see the
crewai-expertskill for when to add each). - If the user's use case is a simple linear script with no judgment steps, say so and recommend plain Python instead of CrewAI.
What ships with it: 3 files
6.3 KB alongside SKILL.md, 3 of them executable
scripts/
- scaffold.shruns2.3 KB
- setup-env.shruns1.9 KB
- verify.shruns2.1 KB