Build a Task Management Skill
Let’s build a complete skill that manages tasks (create, list, complete, delete).Step 1: Initialize Project
Step 2: Clean Up Template
Remove unnecessary example files:Step 3: Create Task Tool
Createsrc/tools/TaskTool.ts:
Step 4: Create Agent with Skill
Updatesrc/index.ts to use the LuaAgent pattern:
Use
LuaAgent to configure your agent with persona, welcome message, and skills in one place.Step 5: Test Your Tools
Test Individual Tools
- create_task: Create a task to buy milk
- list_tasks: View all pending tasks
- complete_task: Mark a task as done
- search_tasks: Find tasks about “meeting”
Test Conversationally
- “Create a task to buy milk”
- “Show me my pending tasks”
- “Mark the milk task as done”
- “Find all tasks about meetings”
Your task management skill is now working!
Step 6: Deploy
When you’re satisfied with your skill:Step 7: Test on Real Channels (Optional)
Want to test your agent on WhatsApp, Facebook, Instagram, or other platforms?Quick Testing Channels
Link your agent to existing Lua channels for instant testing without channel setup
YOUR_AGENT_ID with your agent ID from lua.skill.yaml
What You Built
4 Tools
Create, list, complete, and search tasks
Custom Data
Uses Lua’s Data API for storage
Vector Search
Semantic search for finding tasks
Type Safe
Full TypeScript with Zod validation
Next Steps
1
Add More Features
- Delete tasks
- Update task details
- Set reminders
- Add tags
2
Improve User Experience
- Better error messages
- Confirmation prompts
- Progress indicators
3
Explore Other Examples
Tool Examples
See 30+ working examples
Common Patterns Used
Pattern: Data Storage
Pattern: Semantic Search
Pattern: CRUD Operations
Pattern: Input Validation
Troubleshooting
Cannot find module 'lua-cli'
Cannot find module 'lua-cli'
Install dependencies:
Task not found error
Task not found error
Make sure you’re using the correct task ID from the list_tasks response.
Search returns no results
Search returns no results
- Lower the score threshold:
0.6instead of0.7 - Check that tasks have searchable text
- Try broader search terms

