Code Mode Tutorial
Description
Comprehensive tutorial and demos for teaching UTCP Code Mode - Transform AI agents from tool callers into code executors
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Code Mode Demos and Teaching Guide
This directory contains comprehensive demos for teaching UTCP Code Mode.
Setup
- Ensure you're in the demos directory:
cd demos - The
.utcp_config.jsonconfigures available tools (OpenLibrary API)
Running Demos with Claude CLI
All demos should be run using Claude CLI in **print mode** with specific configurations:
# Basic template for running demos
claude --print \
--dangerously-skip-permissions \
--mcp-config '{"mcpServers":{"code-mode":{"command":"npx","args":["@utcp/code-mode-mcp"],"env":{"UTCP_CONFIG_FILE":"'"$(pwd)/.utcp_config.json"'"}}}}' \
"Your prompt here"
Demo Files
Basic Demos (Remote APIs)
- demo-1-basic.sh - Basic code execution without tools
- demo-2-discovery.sh - Discovering available tools
- demo-3-simple-call.sh - Single tool call execution
- demo-4-error-handling.sh - Error handling patterns
- demo-5-multi-chain.sh - Chaining multiple tool calls
- demo-6-comparison.sh - Traditional vs Code Mode comparison
Advanced Demos (Local Tools)
- demo-7-local-tools.sh - Using local Bun/TypeScript tools
- demo-8-data-pipeline.sh - Building data pipelines
- demo-9-file-processing.sh - File analysis and reporting
- demo-10-hybrid-tools.sh - Mixing local and remote tools
- demo-11-local-tool-orchestration.sh - Orchestration patterns
Run All Demos
./run-all-demos.sh
Key Concepts to Teach
1. Print Mode vs Interactive Mode
--printflag: Non-interactive, outputs response and exits (perfect for testing)- Without
--print: Interactive session (for conversations)
2. Permissions
--dangerously-skip-permissions: Required for automated testing in trusted environments- Without this flag: Claude will ask permission for each tool use
3. MCP Configuration
- MCP servers are configured via JSON
UTCP_CONFIG_FILEenvironment variable points to tool configurations- Multiple MCP servers ca
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI