---
## The Problem
When you share a SKILL.md, you share everything — your methodology, prompts, scoring rules, and domain knowledge. Anyone who copies the file owns your work.
Anti-distillation tools try to solve this by poisoning the content. CoWorker takes a different approach: **your skill runs on your machine. Callers only see results.**
```bash
coworker serve ./my-skill/
# Your SKILL.md stays on your machine
# Callers interact via XMTP (E2E encrypted)
# They see: name, description, input/output schema
# They DON'T see: your code, prompts, methodology
```
---
## How It Works
### One command: SKILL.md → live API
```bash
export DEEPSEEK_API_KEY=sk-xxx # Your LLM key (runs on YOUR machine)
coworker serve ./my-skill/ # Parses SKILL.md, starts serving
```
```
Your machine Caller
┌─────────────────────┐ ┌──────────────────┐
│ SKILL.md (private) │ │ │
│ + LLM API key │ ←XMTP→ │ Sees only: │
│ + Your methodology │ E2E enc │ name, schema │
│ + Your knowledge │ │ and results │
└─────────────────────┘ └──────────────────┘
```
### Four layers of protection
| Layer | What | Effect |
|-------|------|--------|
| **Skill-as-API** | Code runs on your machine | Caller only sees results |
| **Trust Tiers** | UNTRUSTED → KNOWN → INTERNAL → PRIVILEGED | You control who can call |
| **Auto-downgrade** | Trust revoked after OKR completion | Collaboration doesn't become permanent access |
| **Skill Hiding** | Hidden skills return "Unknown skill" | Caller can't tell they exist |
### SKILL.md compatibility
CoWorker wraps any standard SKILL.md (Claude Code, AgentSkills format):
```bash
coworker wrap ./colleague-skill/ # Preview what peers would see
coworker serve ./colleague-skill/ # Serve it as a protected API
```
The SKILL.md body (your prompts, instructions, logic) is captured in a closure and used as the LLM system prompt. It is **never transmitted** over the network.
### MCP Bridge
Expose your skills as MCP tools for Claude Code / Cursor:
```bash
coworker mcp serve # Start MCP server
coworker mcp test # Self-test
```
### AgentCard Fast Reconnect
First connection: 30-60s (XMTP channel establishment). Repeat connections: **~2s** (cached AgentCard with schema hash validation).
### Auto-routing with `when_to_use`
```python
@agent.skill("analyze",
description="Industry analysis",
when_to_use="When the caller needs sector analysis with risk assessment",
category="compute")
def analyze(topic): ...
```
Caller's LLM sees `when_to_use` during discovery and auto-decides whether to delegate.
### Trust Decay
Failed calls automatically downgrade trust:
- 3 consecutive failures → downgrade 1 tier
- 10 cumulative failures → downgrade to UNTRUSTED
- Success resets consecutive count (not cumulative)
### Skill Versioning
```python
@agent.skill("translate", version="2.0.0")
def translate(text, lang): ...
```
Callers can pin to specific versions. Version mismatch returns a clear error with the available version.
### Async Delegation
Send tasks to offline peers. Results delivered when they come online.
```bash
coworker request