tools-expert
npx machina-cli add skill victorgrein/spec-crew/tools-expert --openclawCrewAI Tools Expert
Purpose
Enable expert-level tool decisions in CrewAI projects by prioritizing built-in tools first and creating custom tools only when a capability gap is explicit.
When To Use
- Select tools for a new or existing agent
- Convert requirements into a minimal and reliable tool stack
- Decide between built-in tools,
@tool,BaseTool, orRagToolpatterns - Implement custom tools with robust validation, error handling, and async support
- Integrate external APIs, MCP servers, and enterprise systems
Operating Principles
- Prefer built-in tools before writing custom code
- Minimize tool count per agent to reduce tool-selection ambiguity
- Match tool outputs to task contracts and downstream consumers
- Validate credentials, dependencies, and failure modes early
- Keep tool outputs concise, deterministic, and directly usable by agents
Execution Workflow
1) Profile the Request
- Extract inputs, expected outputs, latency constraints, security constraints, and external systems
- Classify the dominant tool domain using
references/tools-landscape.md - Record hard constraints such as offline execution, strict schemas, or approved vendors
2) Attempt Built-In Coverage
- Identify candidate tools by category from
references/tools-landscape.md - Confirm setup requirements (API keys, package extras, authentication)
- Compose the smallest viable built-in stack to satisfy requirements
- Cap noisy tools with
max_usage_countwhen repeated calls add little value
3) Choose Build Path
- Use
references/selection-and-architecture.mdto choose among:- Built-in only
- Hybrid (built-in + one custom tool)
- Fully custom (rare; use only when required)
- Choose custom style:
- Use
@toolfor lightweight, stateless transforms - Use
BaseToolfor configurable/stateful tools with env vars or dependencies - Use
RagToolor adapter patterns for retrieval-oriented sources
- Use
4) Scaffold and Implement Custom Tool
- Generate starter files with
scripts/scaffold_custom_tool.py - Use templates in
assets/templates/for manual edits or fast bootstrap - Apply standards in
references/custom-tool-playbook.md - Enforce:
- Explicit
args_schemawith PydanticFielddescriptions - Clear
nameand action-orienteddescription - Deterministic
_runoutput - Optional
_arunfor true async I/O - Actionable errors without stack-trace leakage
- Explicit
5) Validate Quality
- Run the implementation checklist in
references/custom-tool-playbook.md - Verify tests cover:
- Missing/invalid environment variables
- Input validation boundaries
- Happy path output shape
- External failures (timeouts, HTTP errors, empty payloads)
- Confirm docs include usage, env vars, install extras, and examples
6) Integrate Into Agent Design
- Attach tools by role specialization, not by convenience
- Keep each agent toolset domain-coherent
- Document why each tool exists and when to call it
- Prefer orchestration with specialized worker tools for complex crews
YAML Agent Example
# agents.yaml
research_tools_agent:
role: Tooling Research Analyst
goal: Select the smallest reliable built-in CrewAI tool stack for each request.
backstory: Expert in built-in tools, API setup constraints, and capability-gap detection.
verbose: true
tools:
- SerperDevTool
- WebsiteSearchTool
- FileReadTool
tool_engineer_agent:
role: CrewAI Tool Engineer
goal: Define production-ready custom tool specs only when built-ins do not satisfy requirements.
backstory: Specialist in BaseTool patterns, input schema design, and failure-safe integration rules.
verbose: true
tools:
- DirectoryReadTool
- FileReadTool
YAML Task Example
# tasks.yaml
tool_gap_analysis_task:
description: >
Evaluate whether built-in CrewAI tools can satisfy the request.
Produce a capability matrix and justify every selected built-in tool.
expected_output: >
Markdown table listing selected tools, required credentials,
setup notes, and explicit capability gaps.
agent: research_tools_agent
custom_tool_spec_task:
description: >
If a capability gap exists, define a custom tool specification
with args_schema fields, env vars, package dependencies,
caching policy, async policy, and error-handling strategy.
expected_output: >
Structured spec and acceptance checklist for implementation and tests.
agent: tool_engineer_agent
context:
- tool_gap_analysis_task
Custom Tool Scaffolding
- Use
scripts/scaffold_custom_tool.pywhen implementation boilerplate is needed.
Resource Map
references/tools-landscape.md: Built-in tool categories, quick picks, and coverage mapreferences/selection-and-architecture.md: Built-in vs custom decision frameworkreferences/custom-tool-playbook.md: Production implementation standardsreferences/repo-notes.md: zread findings from CrewAI tools repository and maintenance notesscripts/scaffold_custom_tool.py: Deterministic custom-tool starter generatorassets/templates/agents-tools-expert.yaml: Agent template for built-in tool strategyassets/templates/tasks-tools-selection.yaml: Task template for built-in selection and gap analysisassets/templates/agents-custom-tooling.yaml: Agent template for custom-tool specification workassets/templates/tasks-custom-tooling.yaml: Task template for custom-tool implementation planning
Source-of-Truth Notes
- Treat CrewAI docs as primary guidance, especially
https://docs.crewai.com/en/tools/overview - Use
references/repo-notes.mdfor repository conventions validated via zread MCP - Recheck upstream changes regularly because the historical
crewAI-toolsrepository is marked deprecated and points to a maintained monorepo location
Source
git clone https://github.com/victorgrein/spec-crew/blob/main/templates/shared/skills/tools-expert/SKILL.mdView on GitHub Overview
This skill guides expert-level decisions for selecting CrewAI built-in tools, composing toolchains, and building production-ready custom tools with BaseTool or @tool. It emphasizes schema validation, dependency management, caching, async support, and thorough testing to minimize risk and maximize reliability.
How This Skill Works
Start by profiling the request and identifying dominant tool domains. Prefer built-in tools first, then compose the smallest viable stack, and only then choose a customization path (Built-in, Hybrid, or Fully Custom). Scaffold and implement custom tools with explicit input schemas, deterministic outputs, optional async runs, and robust testing before integrating into the agent design.
When to Use It
- Select tools for a new or existing agent
- Convert requirements into a minimal and reliable tool stack
- Decide between built-in tools, @tool, BaseTool, or RagTool patterns
- Implement custom tools with robust validation, error handling, and async support
- Integrate external APIs, MCP servers, and enterprise systems
Quick Start
- Step 1: Profile the request and classify the domain using references/tools-landscape.md
- Step 2: Attempt built-in coverage and assemble the smallest viable tool stack
- Step 3: Scaffold, implement, validate (schema, errors, tests), and integrate the custom tool
Best Practices
- Prioritize built-in tools before writing custom code
- Minimize tool count per agent to reduce tool-selection ambiguity
- Validate credentials, dependencies, and failure modes early
- Ensure tool outputs are concise, deterministic, and directly usable by agents
- Enforce explicit args_schema with Pydantic Field descriptions and provide deterministic _run outputs, with optional _arun for true async I/O
Example Use Cases
- Agent stacks using SerperDevTool, WebsiteSearchTool, and FileReadTool to perform research tasks
- A production-ready custom tool built with BaseTool that reads env vars, manages dependencies, and caches results
- Lightweight stateless transforms implemented as @tool within a toolchain
- External API integration with credential validation, retry logic, and clear failure modes
- Scaffolding a new custom tool via scripts/scaffold_custom_tool.py and templates in assets/templates/
Frequently Asked Questions
Related Skills
convex-agents
waynesutton/convexskills
Building AI agents with the Convex Agent component including thread management, tool integration, streaming responses, RAG patterns, and workflow orchestration
free-tool-strategy
coreyhaines31/marketingskills
When the user wants to plan, evaluate, or build a free tool for marketing purposes — lead generation, SEO value, or brand awareness. Also use when the user mentions "engineering as marketing," "free tool," "marketing tool," "calculator," "generator," "interactive tool," "lead gen tool," "build a tool for leads," "free resource," "ROI calculator," "grader tool," "audit tool," "should I build a free tool," or "tools for lead gen." Use this whenever someone wants to build something useful and give it away to attract leads or earn links. For content-based lead generation, see content-strategy.
-21risk-automation
ranbot-ai/awesome-skills
Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
-2chat-automation
ranbot-ai/awesome-skills
Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.
flows
victorgrein/spec-crew
This skill should be used when designing CrewAI Flows with typed state management, deterministic routing, and event-driven orchestration. Use it for flow architecture, state transitions, control primitives, and production deployment.
ably-automation
ranbot-ai/awesome-skills
Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.