add-backend-tool
Add Backend Tools for AI Agents
Extending AI agent capabilities requires understanding backend tool patterns. This skill provides step-by-step instructions for adding new tools to the OpenAI function calling system, including helper functions, tool definitions, and security guardrails.
Download the skill ZIP
Upload in Claude
Go to Settings → Capabilities → Skills → Upload skill
Toggle on and start using
Test it
Using "add-backend-tool". Add a tool to list directory contents
Expected outcome:
- Step 1: Read backend/main.py to understand existing tool patterns
- Step 2: Create helper function list_directory with path parameter
- Step 3: Add tool definition to tools list with proper parameters schema
- Step 4: Add handler in WebSocket message loop for list_directory
- Step 5: Configure mode restrictions - full access in Agent mode, read-only safe in Chat mode
Using "add-backend-tool". Create a tool for git operations
Expected outcome:
- Step 1: Review existing helper functions in backend/main.py
- Step 2: Create git_run_command helper with command and args parameters
- Step 3: Add tool definition for git_run_command with command string parameter
- Step 4: Add WebSocket handler for git_run_command invocation
- Step 5: Set Agent mode full access - git not safe for Chat mode
Using "add-backend-tool". Add a tool that connects to my PostgreSQL database
Expected outcome:
- Step 1: Analyze existing database tool patterns in backend/main.py
- Step 2: Create db_query helper function with connection params and query
- Step 3: Add tool definition with host, database, query parameters
- Step 4: Implement WebSocket handler for db_query function calls
- Step 5: Configure Chat mode restrictions - read-only queries only
Security Audit
SafePure documentation skill containing only instructions and guidance. No executable code, no file operations, no network calls, no command execution. All 23 static findings are false positives from pattern-matching on documentation code examples. The scanner misidentified YAML front matter, JSON metadata fields, markdown code blocks, and security documentation as security vulnerabilities.
Risk Factors
🌐 Network access (1)
📁 Filesystem access (1)
⚙️ External commands (8)
Quality Score
What You Can Build
Extend agent capabilities
Add new backend tools to enable AI agents to perform custom operations like file processing or API calls.
Integrate external services
Create tools that connect AI agents to external services, databases, or APIs for agent interactions.
Design tool frameworks
Establish patterns and security guardrails for tool development across teams or organizations.
Try These Prompts
Add a tool to list directory contents
Create a tool for git operations
Add web scraping capability
Add a tool that connects to my PostgreSQL database and runs read-only queries
Best Practices
- Always include try-except error handling in helper functions
- Add timeouts for long-running operations to prevent agent hanging
- Document the tool purpose clearly in the function docstring
Avoid
- Hardcoding API keys or secrets in tool implementations
- Adding tools without reviewing security implications for Chat mode
- Skipping error handling for external service calls