CrewAI
Overview
This skill preserves the upstream CrewAI workflow and provenance while turning it into an operator-facing guide for reviewing, designing, debugging, and hardening CrewAI systems.
Use it when the task involves:
- reviewing whether a Crew or a Flow is the right orchestration primitive
- designing or auditing agents, tasks, crews, or flow steps
- tightening task contracts, expected outputs, and handoff boundaries
- diagnosing delegation loops, weak outputs, tool failures, or state loss
- checking observability, memory, replay, testing, and production-readiness
- preserving copied upstream files and provenance during merge or handoff
When to Use
Activate this skill when the user asks for any of the following:
- "Review this CrewAI architecture"
- "Should this be a Crew or a Flow?"
- "Why are my agents looping or producing vague outputs?"
- "Help define tasks, expected outputs, and delegation rules"
- "How do I make this CrewAI workflow safer and more deterministic?"
- "Check if this CrewAI setup is ready for production"
Do not rely on this skill alone when:
- the request is about a different framework and CrewAI is only mentioned in passing
- the user needs undocumented product behavior or hidden internal APIs
- you cannot inspect the actual crew, flow, task, or runtime configuration and would only be guessing
Workflow
Preserve provenance and scope
- Keep the upstream workflow, copied support files, and origin notes intact.
- Do not remove provenance markers or rewrite repository history.
- Confirm whether the request is design help, review, debugging, migration, or handoff preparation.
Identify the orchestration model
- Determine whether the implementation uses a Crew, a Flow, or both.
- Prefer a Crew for role-based collaboration and delegated reasoning.
- Prefer a Flow for deterministic, stateful, event-driven, or branch-heavy orchestration.
- Flag architecture drift when a problem needing deterministic control has been forced into a free-form crew.
Inspect agents and task contracts
- Check whether each agent has a clear role, bounded responsibility, and relevant tools.
- Check whether each task defines a concrete objective, required inputs, and an explicit expected output.
- Look for missing output schemas, vague success criteria, or tasks that combine too many decisions.
- Verify that delegation is intentional rather than implied by vague task wording.
Review process and execution behavior
- Confirm whether the chosen process type matches the work: sequential, hierarchical, or another supported pattern in the implementation.
- Inspect handoff order, branch conditions, retries, human approval points, and failure paths.
- Check whether state transitions are observable and whether intermediate outputs are recoverable.
Evaluate production controls
- Check observability: tracing, logs, event listeners, runtime visibility, and replay support.
- Check memory use: whether memory is necessary, scoped, and unlikely to leak stale or irrelevant context.
- Check validation: structured outputs, guardrails, assertions, or post-task verification.
- Check testing readiness: sample inputs, expected outputs, and deterministic review paths.
Deliver a concrete review or remediation plan
- Summarize what is correct, risky, and missing.
- Recommend the smallest viable architecture or prompt/task changes first.
- Provide before/after guidance for task wording, flow choice, validation, or observability.
- If handing off, preserve provenance and note any copied support files that must remain attached.
Examples
Example 1: Crew vs Flow decision
Input
We have a support-ticket system. One agent classifies the issue, another drafts a reply, and a third decides whether to escalate. The workflow must branch on ticket severity and stop if required fields are missing.
Expected review outcome
Recommend a Flow as the top-level orchestrator because the process is stateful and branch-heavy.
Use Crew-based collaboration only inside steps that benefit from role-based reasoning, such as drafting or policy review.
Add explicit validation for required fields before any downstream step runs.
Example 2: Weak task contract
Before
Task: Analyze the market and give recommendations.
After
Task: Analyze the last 4 quarters of B2B CRM market activity for mid-market buyers.
Inputs:
- company_profile
- target_segment
- competitor_notes
Expected output:
- top_5_findings
- ranked_recommendations
- evidence_table
- confidence_notes
Rules:
- cite only provided inputs unless external research is explicitly enabled
- state unknowns instead of inventing data
Expected improvement
The revised task reduces ambiguity, limits hallucination risk, and creates an output contract that can be reviewed or validated.
Example 3: Delegation loop diagnosis
Symptoms
The manager agent repeatedly asks a specialist to refine the same answer, and the specialist keeps returning near-duplicate drafts.
Expected review outcome
Identify unclear stop conditions and missing acceptance criteria.
Recommend: cap retries, define a completion rubric, and require the manager to either approve, reject with specific corrections, or escalate.
Open examples/review-example.md for a fuller worked review with findings and remediation.
Best Practices
Do choose Flows for deterministic branching, approvals, and stateful automation.
Do choose Crews for collaborative reasoning where role separation adds value.
Do define expected outputs as reviewable artifacts, not vague prose goals.
Do separate orchestration concerns from agent expertise concerns.
Do make delegation boundaries explicit; hidden delegation causes loops and weak accountability.
Do add validation after high-risk steps, especially when outputs feed tools, workflows, or users.
Do keep memory scoped and justified; long-lived memory without retrieval discipline can degrade output quality.
Do ensure traces, logs, or event visibility exist before calling a system production-ready.
Do not use a Crew where a simple deterministic Flow or single agent would be clearer.
Do not give multiple agents overlapping authority without a tie-break or approval rule.
Do not accept tasks that lack inputs, expected outputs, or completion criteria.
Do not rely on memory to compensate for poor task structure.
Do not treat replay or debugging support as optional in multi-step production workflows.
Do not remove provenance files or collapse copied upstream context during cleanup.
Troubleshooting
Symptoms: Agents produce long but low-value answers.
Solution: Tighten task scope, add explicit expected outputs, reduce unnecessary agent overlap, and require evidence or structured fields instead of free-form prose.
Symptoms: A manager and specialist keep delegating the same work back and forth.
Solution: Add stop conditions, retry caps, role boundaries, and acceptance criteria. If the process is primarily branching control rather than collaborative reasoning, move orchestration into a Flow.
Symptoms: Outputs are hard to validate or compare across runs.
Solution: Define structured output contracts, add post-task checks, and make required fields explicit. Prefer deterministic schemas where downstream automation depends on the result.
Symptoms: The workflow fails after a tool call or external action, and the crew cannot recover cleanly.
Solution: Add explicit failure paths, retries only where safe, and state checkpoints so the run can be inspected or resumed. Use observability and replay features during diagnosis.
Symptoms: Memory seems to help early runs but later causes drift, stale facts, or irrelevant context.
Solution: Reduce memory scope, review what is persisted, and treat memory as a targeted aid rather than a substitute for clean task inputs.
Symptoms: The team cannot explain why a run produced a specific decision.
Solution: Improve tracing, event logging, intermediate artifact capture, and decision checkpoints. A production workflow should support post-run inspection without guesswork.
Additional Resources
references/review-criteria.md — Open this when you need a compact but deep audit checklist for architecture choice, task contracts, observability, memory, validation, and failure modes.
examples/review-example.md — Open this when you need a worked example showing how to review a CrewAI design and turn findings into concrete remediation steps.
Related Skills
No related local skills were provided in the source context.
1---2name: crewai-v2-23description: Use this skill when the user needs expert CrewAI help for review, design, debugging, or production-readiness checks across agents, tasks, crews, and flows while preserving upstream workflow, copied support files, and provenance before merge or handoff.4license: Unknown5---67# CrewAI89## Overview1011This skill preserves the upstream CrewAI workflow and provenance while turning it into an operator-facing guide for reviewing, designing, debugging, and hardening CrewAI systems.1213Use it when the task involves:14- reviewing whether a Crew or a Flow is the right orchestration primitive15- designing or auditing agents, tasks, crews, or flow steps16- tightening task contracts, expected outputs, and handoff boundaries17- diagnosing delegation loops, weak outputs, tool failures, or state loss18- checking observability, memory, replay, testing, and production-readiness19- preserving copied upstream files and provenance during merge or handoff2021## When to Use2223Activate this skill when the user asks for any of the following:24- "Review this CrewAI architecture"25- "Should this be a Crew or a Flow?"26- "Why are my agents looping or producing vague outputs?"27- "Help define tasks, expected outputs, and delegation rules"28- "How do I make this CrewAI workflow safer and more deterministic?"29- "Check if this CrewAI setup is ready for production"3031Do **not** rely on this skill alone when:32- the request is about a different framework and CrewAI is only mentioned in passing33- the user needs undocumented product behavior or hidden internal APIs34- you cannot inspect the actual crew, flow, task, or runtime configuration and would only be guessing3536## Workflow37381. **Preserve provenance and scope**39 - Keep the upstream workflow, copied support files, and origin notes intact.40 - Do not remove provenance markers or rewrite repository history.41 - Confirm whether the request is design help, review, debugging, migration, or handoff preparation.42432. **Identify the orchestration model**44 - Determine whether the implementation uses a **Crew**, a **Flow**, or both.45 - Prefer a **Crew** for role-based collaboration and delegated reasoning.46 - Prefer a **Flow** for deterministic, stateful, event-driven, or branch-heavy orchestration.47 - Flag architecture drift when a problem needing deterministic control has been forced into a free-form crew.48493. **Inspect agents and task contracts**50 - Check whether each agent has a clear role, bounded responsibility, and relevant tools.51 - Check whether each task defines a concrete objective, required inputs, and an explicit expected output.52 - Look for missing output schemas, vague success criteria, or tasks that combine too many decisions.53 - Verify that delegation is intentional rather than implied by vague task wording.54554. **Review process and execution behavior**56 - Confirm whether the chosen process type matches the work: sequential, hierarchical, or another supported pattern in the implementation.57 - Inspect handoff order, branch conditions, retries, human approval points, and failure paths.58 - Check whether state transitions are observable and whether intermediate outputs are recoverable.59605. **Evaluate production controls**61 - Check observability: tracing, logs, event listeners, runtime visibility, and replay support.62 - Check memory use: whether memory is necessary, scoped, and unlikely to leak stale or irrelevant context.63 - Check validation: structured outputs, guardrails, assertions, or post-task verification.64 - Check testing readiness: sample inputs, expected outputs, and deterministic review paths.65666. **Deliver a concrete review or remediation plan**67 - Summarize what is correct, risky, and missing.68 - Recommend the smallest viable architecture or prompt/task changes first.69 - Provide before/after guidance for task wording, flow choice, validation, or observability.70 - If handing off, preserve provenance and note any copied support files that must remain attached.7172## Examples7374### Example 1: Crew vs Flow decision7576**Input**77```text78We have a support-ticket system. One agent classifies the issue, another drafts a reply, and a third decides whether to escalate. The workflow must branch on ticket severity and stop if required fields are missing.79```8081**Expected review outcome**82```text83Recommend a Flow as the top-level orchestrator because the process is stateful and branch-heavy.84Use Crew-based collaboration only inside steps that benefit from role-based reasoning, such as drafting or policy review.85Add explicit validation for required fields before any downstream step runs.86```8788### Example 2: Weak task contract8990**Before**91```yaml92Task: Analyze the market and give recommendations.93```9495**After**96```yaml97Task: Analyze the last 4 quarters of B2B CRM market activity for mid-market buyers.98Inputs:99 - company_profile100 - target_segment101 - competitor_notes102Expected output:103 - top_5_findings104 - ranked_recommendations105 - evidence_table106 - confidence_notes107Rules:108 - cite only provided inputs unless external research is explicitly enabled109 - state unknowns instead of inventing data110```111112**Expected improvement**113```text114The revised task reduces ambiguity, limits hallucination risk, and creates an output contract that can be reviewed or validated.115```116117### Example 3: Delegation loop diagnosis118119**Symptoms**120```text121The manager agent repeatedly asks a specialist to refine the same answer, and the specialist keeps returning near-duplicate drafts.122```123124**Expected review outcome**125```text126Identify unclear stop conditions and missing acceptance criteria.127Recommend: cap retries, define a completion rubric, and require the manager to either approve, reject with specific corrections, or escalate.128```129130Open `examples/review-example.md` for a fuller worked review with findings and remediation.131132## Best Practices133134- **Do** choose Flows for deterministic branching, approvals, and stateful automation.135- **Do** choose Crews for collaborative reasoning where role separation adds value.136- **Do** define expected outputs as reviewable artifacts, not vague prose goals.137- **Do** separate orchestration concerns from agent expertise concerns.138- **Do** make delegation boundaries explicit; hidden delegation causes loops and weak accountability.139- **Do** add validation after high-risk steps, especially when outputs feed tools, workflows, or users.140- **Do** keep memory scoped and justified; long-lived memory without retrieval discipline can degrade output quality.141- **Do** ensure traces, logs, or event visibility exist before calling a system production-ready.142143- **Do not** use a Crew where a simple deterministic Flow or single agent would be clearer.144- **Do not** give multiple agents overlapping authority without a tie-break or approval rule.145- **Do not** accept tasks that lack inputs, expected outputs, or completion criteria.146- **Do not** rely on memory to compensate for poor task structure.147- **Do not** treat replay or debugging support as optional in multi-step production workflows.148- **Do not** remove provenance files or collapse copied upstream context during cleanup.149150## Troubleshooting151152**Symptoms:** Agents produce long but low-value answers.153154**Solution:** Tighten task scope, add explicit expected outputs, reduce unnecessary agent overlap, and require evidence or structured fields instead of free-form prose.155156**Symptoms:** A manager and specialist keep delegating the same work back and forth.157158**Solution:** Add stop conditions, retry caps, role boundaries, and acceptance criteria. If the process is primarily branching control rather than collaborative reasoning, move orchestration into a Flow.159160**Symptoms:** Outputs are hard to validate or compare across runs.161162**Solution:** Define structured output contracts, add post-task checks, and make required fields explicit. Prefer deterministic schemas where downstream automation depends on the result.163164**Symptoms:** The workflow fails after a tool call or external action, and the crew cannot recover cleanly.165166**Solution:** Add explicit failure paths, retries only where safe, and state checkpoints so the run can be inspected or resumed. Use observability and replay features during diagnosis.167168**Symptoms:** Memory seems to help early runs but later causes drift, stale facts, or irrelevant context.169170**Solution:** Reduce memory scope, review what is persisted, and treat memory as a targeted aid rather than a substitute for clean task inputs.171172**Symptoms:** The team cannot explain why a run produced a specific decision.173174**Solution:** Improve tracing, event logging, intermediate artifact capture, and decision checkpoints. A production workflow should support post-run inspection without guesswork.175176## Additional Resources177178- `references/review-criteria.md` — Open this when you need a compact but deep audit checklist for architecture choice, task contracts, observability, memory, validation, and failure modes.179- `examples/review-example.md` — Open this when you need a worked example showing how to review a CrewAI design and turn findings into concrete remediation steps.180181## Related Skills182183No related local skills were provided in the source context.