Skills vs Knowledge
Knowledge teaches an agent facts; skills teach procedures. A "Refund Policy" PDF is knowledge; "How to escalate a P0 incident" with steps and tools is a skill.
SKILL.md Format
A skill lives in a folder with a SKILL.md at the root. The file's frontmatter declares the skill's name and triggers; the body is the instruction text injected at activation.
Discovery & Activation
At startup, call discover_skills() to enumerate available skills. When an agent needs a specific skill, call activate_skill(name) — the body is injected into the prompt and associated tools/knowledge are wired up.
from crewai.skills import discover_skills, activate_skill
@before_kickoff
def setup(self, inputs):
skills = {s.name: s for s in discover_skills()}
if inputs.get("priority") == "P0":
activate_skill("escalation_p0")
return inputs
Crew-Level Skills
Wire skills that every agent in the crew shares — useful for company-wide policies (tone of voice, brand voice, compliance rules) — by activating them in the @before_kickoff hook.
Skills + Tools Together
A skill can declare tools it depends on. When activated, those tools become available to the agent automatically. This pattern keeps prompts focused: only enable what's needed for the task at hand.
RAG indexes behind knowledge-heavy skills
Skills that bundle document retrieval still rely on the global vector client configured at process start. Call set_rag_config() before crews load knowledge sources, and use clear_rag_config() in test teardown so parallel suites do not fight over the same on-disk index.
Best Practices
- ✓Keep SKILL.md bodies short (1 page or less) — long bodies inflate every prompt that activates them.
- ✓Use progressive disclosure: activate skills only when their triggers fire.
- ✗Don't dump everything into one mega-skill — split by procedure.
CrewAI skills FAQ
What is the difference between CrewAI skills and knowledge?
Knowledge feeds facts into retrieval or context. Skills package procedures as SKILL.md bodies that load on activation so agents follow repeatable playbooks without keeping every step in the base prompt.
How does discover_skills() work in CrewAI?
discover_skills() scans configured skill paths and returns lightweight manifests so you can inventory what exists before paying the token cost of loading any body.
When should I call activate_skill()?
Call activate_skill() when a branch of work truly needs a procedure: after reading inputs in @before_kickoff, when a trigger matches, or right before a task that depends on the skill body and bundled tools.
Can a CrewAI skill attach tools automatically?
Yes. Skills can declare tool dependencies so activation wires them in, which keeps prompts smaller than attaching every tool up front.
What mistakes break CrewAI skill loading?
Oversized SKILL.md bodies, activating every skill by default, and rescanning the filesystem on every task are common pitfalls. Cache discovery once and activate selectively.
Where should I read next after CrewAI skills?
Continue with hooks and events for wiring activation, then open the CrewAI API reference for discover_skills() and activate_skill() signatures, parameters, and runnable snippets.