Claw Agent Protocol (CAP) Skill
This skill enables any AI agent to interact with a user's personal data through the Claw Agent Protocol (CAP), a lightweight MCP server that provides a canonical, real-time view of personal data from various sources.
Core Concepts
CAP solves the data chaos problem: Instead of dealing with dozens of different APIs and data formats, CAP provides a single, consistent interface to all of a user's personal data.
- Real-Time Translation Layer: CAP fetches data on-demand from connected accounts (Gmail, Google Calendar, Notion, Slack, etc.) without storing it locally. Data stays at the source, queries are on-demand, security is delegated to OAuth providers.
- MCP-Native: CAP is a Model Context Protocol (MCP) server, making it compatible with any MCP-enabled client (OpenClaw, Claude Desktop, etc.).
- Canonical Schema: CAP exposes data through a consistent, canonical schema regardless of the original source. This eliminates integration complexity and improves agent reliability.
Key Constructs
CAP organizes data into two primary constructs:
- Resources (Shelves): Raw, normalized data accessible via canonical URIs. These represent the fundamental categories of a user's digital life.
- Tools (Views): High-level, task-oriented functions that combine data from multiple shelves to provide refined, actionable perspectives.
Available Shelves
| Shelf |
Resource URI |
Description |
| Identity |
cap://identity |
People, orgs, contacts |
| Comms |
cap://comms |
Messages, emails, threads |
| Calendar |
cap://calendar |
Events, availability |
| Docs |
cap://docs |
Notes, files, snippets |
| Tasks |
cap://tasks |
Tasks, projects, milestones |
Available Views
| View |
Tool Name |
Description |
| Today Briefing |
today_briefing |
Calendar, tasks, comms for today |
| Client Pipeline |
client_pipeline |
Contacts, comms, tasks by client |
| Knowledge Search |
knowledge_search |
Search all docs and notes |
Usage Patterns
Querying Shelves
Query shelves using read operations on resource URIs with optional filters:
read cap://calendar?start_date=today
read cap://tasks?status=pending&priority=high
read cap://comms?from=client@example.com&unread=true
Executing Views
Call tools to execute pre-compiled views:
tools.today_briefing()
tools.client_pipeline(client_name="Acme Corp")
tools.knowledge_search(query="project requirements")
Reference Documentation
For detailed information, consult these reference files:
- Schema Reference:
file.read('/home/ubuntu/skills/claw-agent-protocol/references/schema.md') - Complete schema definitions for all shelves
- Query Examples:
file.read('/home/ubuntu/skills/claw-agent-protocol/references/query_examples.md') - Common query patterns and filters
- Security Guide:
file.read('/home/ubuntu/skills/claw-agent-protocol/references/security.md') - Permissions, sensitivity tiers, and safe data handling
- Use Cases:
file.read('/home/ubuntu/skills/claw-agent-protocol/references/use_cases.md') - 30 common scenarios for CAP usage
Utility Scripts
Use these scripts for common CAP operations:
generate_briefing.py: Format CAP data into readable daily briefings
python /home/ubuntu/skills/claw-agent-protocol/scripts/generate_briefing.py '<json_data>'
validate_cap_data.py: Validate CAP data against schema requirements
python /home/ubuntu/skills/claw-agent-protocol/scripts/validate_cap_data.py '<json_data>'
export_cap_data.py: Export CAP data to various formats (CSV, JSON, Markdown)
python /home/ubuntu/skills/claw-agent-protocol/scripts/export_cap_data.py --format csv --shelf calendar --output events.csv
build_query.py: Generate CAP query strings from natural language
python /home/ubuntu/skills/claw-agent-protocol/scripts/build_query.py "show me high priority tasks due this week"
Best Practices
- Always check provenance: Use the
source field to understand where data originated and link back to the original source.
- Respect sensitivity tiers: Handle S1 (public), S2 (internal), and S3 (sensitive) data appropriately.
- Use confidence scores: When
confidence is below 0.8, verify data with the user before taking action.
- Prefer views over raw queries: Use pre-compiled views (tools) when available—they're optimized and tested.
- Cache judiciously: CAP data is real-time, but you can cache results briefly for performance. Never cache beyond the current session.
1---2name: claw-agent-protocol3description: Interact with the Claw Agent Protocol (CAP), a lightweight MCP server providing canonical, real-time access to personal data for AI agents. Use when working with user personal data across Gmail, Calendar, Notion, Slack, tasks, contacts, or any CAP-connected data source. Enables structured querying, data organization, and task-oriented views of user information.4---56# Claw Agent Protocol (CAP) Skill78This skill enables any AI agent to interact with a user's personal data through the Claw Agent Protocol (CAP), a lightweight MCP server that provides a canonical, real-time view of personal data from various sources.910## Core Concepts1112**CAP solves the data chaos problem**: Instead of dealing with dozens of different APIs and data formats, CAP provides a single, consistent interface to all of a user's personal data.1314- **Real-Time Translation Layer**: CAP fetches data on-demand from connected accounts (Gmail, Google Calendar, Notion, Slack, etc.) without storing it locally. Data stays at the source, queries are on-demand, security is delegated to OAuth providers.15- **MCP-Native**: CAP is a Model Context Protocol (MCP) server, making it compatible with any MCP-enabled client (OpenClaw, Claude Desktop, etc.).16- **Canonical Schema**: CAP exposes data through a consistent, canonical schema regardless of the original source. This eliminates integration complexity and improves agent reliability.1718## Key Constructs1920CAP organizes data into two primary constructs:21221. **Resources (Shelves)**: Raw, normalized data accessible via canonical URIs. These represent the fundamental categories of a user's digital life.232. **Tools (Views)**: High-level, task-oriented functions that combine data from multiple shelves to provide refined, actionable perspectives.2425## Available Shelves2627| Shelf | Resource URI | Description |28|-------|--------------|-------------|29| Identity | `cap://identity` | People, orgs, contacts |30| Comms | `cap://comms` | Messages, emails, threads |31| Calendar | `cap://calendar` | Events, availability |32| Docs | `cap://docs` | Notes, files, snippets |33| Tasks | `cap://tasks` | Tasks, projects, milestones |3435## Available Views3637| View | Tool Name | Description |38|------|-----------|-------------|39| Today Briefing | `today_briefing` | Calendar, tasks, comms for today |40| Client Pipeline | `client_pipeline` | Contacts, comms, tasks by client |41| Knowledge Search | `knowledge_search` | Search all docs and notes |4243## Usage Patterns4445### Querying Shelves4647Query shelves using `read` operations on resource URIs with optional filters:4849```50read cap://calendar?start_date=today51read cap://tasks?status=pending&priority=high52read cap://comms?from=client@example.com&unread=true53```5455### Executing Views5657Call tools to execute pre-compiled views:5859```60tools.today_briefing()61tools.client_pipeline(client_name="Acme Corp")62tools.knowledge_search(query="project requirements")63```6465## Reference Documentation6667For detailed information, consult these reference files:6869- **Schema Reference**: `file.read('/home/ubuntu/skills/claw-agent-protocol/references/schema.md')` - Complete schema definitions for all shelves70- **Query Examples**: `file.read('/home/ubuntu/skills/claw-agent-protocol/references/query_examples.md')` - Common query patterns and filters71- **Security Guide**: `file.read('/home/ubuntu/skills/claw-agent-protocol/references/security.md')` - Permissions, sensitivity tiers, and safe data handling72- **Use Cases**: `file.read('/home/ubuntu/skills/claw-agent-protocol/references/use_cases.md')` - 30 common scenarios for CAP usage7374## Utility Scripts7576Use these scripts for common CAP operations:7778- **generate_briefing.py**: Format CAP data into readable daily briefings79 ```bash80 python /home/ubuntu/skills/claw-agent-protocol/scripts/generate_briefing.py '<json_data>'81 ```8283- **validate_cap_data.py**: Validate CAP data against schema requirements84 ```bash85 python /home/ubuntu/skills/claw-agent-protocol/scripts/validate_cap_data.py '<json_data>'86 ```8788- **export_cap_data.py**: Export CAP data to various formats (CSV, JSON, Markdown)89 ```bash90 python /home/ubuntu/skills/claw-agent-protocol/scripts/export_cap_data.py --format csv --shelf calendar --output events.csv91 ```9293- **build_query.py**: Generate CAP query strings from natural language94 ```bash95 python /home/ubuntu/skills/claw-agent-protocol/scripts/build_query.py "show me high priority tasks due this week"96 ```9798## Best Practices991001. **Always check provenance**: Use the `source` field to understand where data originated and link back to the original source.1012. **Respect sensitivity tiers**: Handle S1 (public), S2 (internal), and S3 (sensitive) data appropriately.1023. **Use confidence scores**: When `confidence` is below 0.8, verify data with the user before taking action.1034. **Prefer views over raw queries**: Use pre-compiled views (tools) when available—they're optimized and tested.1045. **Cache judiciously**: CAP data is real-time, but you can cache results briefly for performance. Never cache beyond the current session.