Performance Patterns
s-morgan-jeffries/apple-mail-fast-mcp
A skill your agent uses when optimizing Apple Mail MCP operations, diagnosing slow queries, adding new filtering logic, or modifying how data is fetched from Mail.app.
All-in-one Gmail agent for OpenClaw. An agent skill from LeoYeAI/openclaw-master-skills.
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agent --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/emailagy .claude/skills/smart-email-agent && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .claude/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agent --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/emailagy .agents/skills/smart-email-agent && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .agents/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agent --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/emailagy .cursor/skills/smart-email-agent && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .cursor/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/LeoYeAI/openclaw-master-skills.git --path skills/emailagy--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agent --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/emailagy .gemini/skills/smart-email-agent && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .gemini/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agentInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/emailagy .github/skills/smart-email-agent && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .github/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills smart-email-agent --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/emailagy .opencode/skills/smart-email-agent && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "smart-email-agent" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/emailagy into .opencode/skills/smart-email-agent/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-email-agent", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
smart-email-agentAll-in-one Gmail agent for OpenClaw. An agent skill from LeoYeAI/openclaw-master-skills.
Smart Email Agent is an agent skill from LeoYeAI/openclaw-master-skills. All-in-one Gmail agent for OpenClaw. Fuses email-reader, email-organizer, email-analyzer, email-responder, email-scheduler, and email-reporter into a single skill with token-optimizer integration and a self-improvement engine. Use this skill for ANYTHING email-related: checking inbox, searching messages, organizing labels, classifying/prioritizing, drafting replies, scheduling automation, generating reports, or reviewing costs. Triggers on: correo, email, inbox, bandeja, spam, draft, borrador, responder…
Its SKILL.md is about 4.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts, reference files and assets (for example `_meta.json`, `assets/HEARTBEAT.email.md` and `hooks/HOOK.md`).
It sits in Productivity & Automation, covering Email management. It works with Gmail and Python. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (JavaScript and Python), which the agent can run.
Shell commands in SKILL.md call:
python3npmbrewFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Smart Email Agent loads about 4.7k tokens when it runs, and up to ~5.5k if it reads all its reference files. Until then it costs about 187 tokens; SKILL.md has 619 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 619 words, ~4,675 tokens.
.claude/skills/smart-email-agent/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Un solo skill que reemplaza los 6 skills del pack original. Punto de entrada único para toda la gestión de correo.
Lazy loading activo: este skill se carga completo (~500 tokens). NO cargues los 6 skills individuales — sería 4.800 tokens desperdiciados.
gog CLI# Verificar prerequisitos
which gog || echo "Instalar: npm i -g gogcli OR brew install gogcli"
echo $GOG_ACCOUNT # debe estar configurado
# Autenticar si es la primera vez
gog auth add $GOG_ACCOUNT# No leídos en inbox (acción por defecto cuando el usuario dice "revisa mi correo")
gog gmail search 'in:inbox is:unread' --max 5 --format minimal --json
# Buscar por criterio — usar sintaxis Gmail
gog gmail search 'from:juan@empresa.com newer_than:3d' --max 10 --format minimal --json
gog gmail search 'subject:factura has:attachment' --max 10 --format minimal --json
gog gmail search 'in:spam is:unread' --max 20 --format minimal --json
# Leer correo completo
gog gmail get <message_id> --format full --json
# Leer hilo completo
gog gmail thread <thread_id> --format minimal --jsonfrom: to: subject: label: is:unread is:starred
has:attachment newer_than:Nd older_than:Nd
in:inbox in:sent in:spam in:trash filename:ext
gog en PATH y GOG_ACCOUNT configurado--format minimal --json --max N📬 5 correos no leídos:
1. De: Juan García <juan@empresa.com> | Asunto: Propuesta Q2 | Hace 2h
Vista previa: Hola, te mando el resumen de... | ID: msg_abc123--format minimal --json --max N (N=5 por defecto)| Error | Causa | Solución |
|---|---|---|
gog: command not found | gog no instalado | npm i -g gogcli o brew install gogcli |
GOG_ACCOUNT not set | Variable no configurada | Pedir al usuario su email Gmail |
| Token expirado | OAuth vencido | gog auth add <email> |
| API error 429 | Rate limit | Esperar 60s, reintentar con backoff |
Corp/
├── Interno/
│ ├── Management ← Gerencia, Directores
│ ├── Tech & Ops ← Desarrollo, Soporte, Operaciones
│ ├── Commercial ← Ventas, Marketing
│ ├── Admin & HR ← Jurídica, RRHH, Contabilidad
│ └── Team ← Resto del equipo @empresa.com
├── Partners & Clientes/
│ └── [empresa] ← Wolkvox, Masiv, Unisanitas, Nuva, etc.
├── Proveedores/
│ └── [proveedor] ← Google, Microsoft, AWS, etc.
└── Sistema/
├── DMARC
├── Notificaciones
├── Alertas
└── No-Reply# Crear etiqueta
gog gmail label create "Corp/Interno/Tech & Ops"
# Aplicar etiqueta a mensaje
gog gmail label apply <message_id> "Corp/Interno/Management"
# Mover correo (quitar INBOX + aplicar etiqueta)
gog gmail modify <message_id> --add-label "Corp/Partners & Clientes/Wolkvox" --remove-label INBOX
# Archivar (quitar INBOX sin borrar)
gog gmail modify <message_id> --remove-label INBOX
# Mover a spam
gog gmail modify <message_id> --add-label SPAM --remove-label INBOX
# Mover a papelera
gog gmail trash <message_id>
# Operación batch (múltiples IDs)
gog gmail batch-modify --ids id1,id2,id3 --add-label "Corp/Sistema/No-Reply" --remove-label INBOXAntes de llamar a la IA, aplicar estas reglas sin costo:
from_domain @empresa.com + from_name contiene [Linda, Rafael, Director] → Corp/Interno/Management
from_domain @empresa.com + from_name contiene [Tech, Dev, Soporte] → Corp/Interno/Tech & Ops
from_domain @empresa.com → Corp/Interno/Team
from contiene noreply / no-reply / donotreply → Corp/Sistema/No-Reply
subject contiene DMARC / SPF / DKIM → Corp/Sistema/DMARC
subject contiene alerta / alert / warning → Corp/Sistema/AlertasGuardar y mantener estas reglas en corp_routing_rules.json.
NUNCA ejecutar acciones destructivas sin confirmación explícita:
⚠️ Pendiente de confirmación:
→ Mover 22 correos a Corp/Sistema/No-Reply
→ Eliminar etiqueta "noreply" (ya vacía)
Esto NO borra correos, solo reorganiza etiquetas.
¿Confirmas? (sí/no)¿Tarea es clasificar / detectar spam / routing?
→ claude-haiku-4-5-20251001 (batch de 10-20 correos, ~$0.00009/correo)
¿Tarea es extraer tareas y fechas de correos importantes?
→ claude-haiku-4-5-20251001 (body[:800], ~$0.00015/correo)
¿El presupuesto está > 80% gastado?
→ forzar haiku para TODO, sin borradores automáticos
¿El presupuesto está > 95% gastado?
→ cero llamadas IA, solo reglas localesOpus: PROHIBIDO para tareas de email. Sonnet: solo para borradores (ver Parte 4).
# 1. Pre-filtro sin IA (resolver antes de gastar tokens)
# - Dominio en corp_routing_rules.json → etiquetar directo
# - from en known_spam_domains.txt → spam directo
# - message_id ya en analysis_cache → reutilizar resultado
# Objetivo: resolver 60-70% a costo $0.00
# 2. Recortar campos al mínimo necesario
CAMPOS = {
'clasificacion': ['from', 'subject', 'snippet[:100]'], # ~30 tokens
'prioridad': ['from', 'subject', 'body[:400]'], # ~150 tokens
'tareas_fechas': ['from', 'subject', 'body[:800]'], # ~250 tokens
}
# 3. Limpiar texto
def limpiar(texto, limite):
texto = re.sub(r'<[^>]+>', '', texto) # quitar HTML
texto = re.sub(r'https?://\S+', '[URL]', texto) # comprimir URLs
texto = re.sub(r'\s+', ' ', texto).strip()
return texto[:limite]
# 4. Batch: NUNCA menos de 10 correos por llamada
# Esperar hasta tener 10-20 correos pendientes
BATCH_MIN = 10
BATCH_MAX = 20SYSTEM (idéntico siempre — para prompt caching):
Eres un clasificador de correos corporativos.
Analiza cada correo y devuelve SOLO JSON array. Sin texto extra.
Para cada ítem: {"idx":N,"corp_label":"...","categoria":"spam|importante|informativo|sistema|otro",
"prioridad":0-10,"es_spam":bool,"necesita_respuesta":bool,
"tiene_phishing":bool,"tareas":[],"fecha_limite":"ISO o null","razon":"máx 10 palabras"}
USER: Analiza: [JSON array de hasta 20 correos con from+subject+snippet[:100]]🤖 Análisis — 47 correos procesados
⚡ Sin IA (pre-filtro): 31 (66%) → $0.000
🧠 Con Haiku (2 batches): 16 → $0.006
📊 Resultado:
🔵 Corp/Interno/Management: 2 (prioridad alta)
🔵 Corp/Partners & Clientes: 8
🔵 Corp/Sistema/No-Reply: 14
🗑️ Spam: 12
⚠️ Phishing detectado: 1 → ALERTA
📋 Con tareas pendientes: 4
Críticos:
[10/10] linda@empresa.com — "Aprobación contrato urgente"
Tarea: confirmar antes del viernesPrioridad >= 8 → claude-sonnet-4-6 (calidad importa)
Prioridad 5-7 → claude-haiku-4-5-20251001 (suficiente, más barato)
Prioridad < 5 → NO generar borrador automáticoMáximo 3 borradores por sesión cuando presupuesto < 60%. Máximo 1 borrador por sesión cuando presupuesto 60-80%. Cero borradores automáticos cuando presupuesto > 80%.
# 1. Leer el hilo completo
gog gmail thread <thread_id> --format minimal --json
# 2. Preparar contexto recortado para la IA
# Solo: from + subject + body[:600] del último mensaje + resumen del hilo anteriorRedacta una respuesta profesional y concisa (máx 150 palabras).
Solo el cuerpo del mensaje, sin asunto ni encabezados.
Tono: profesional pero cercano.
Firma: [NOMBRE_USUARIO]
Hilo: [RESUMEN + ÚLTIMO MENSAJE RECORTADO]✍️ Borrador para: juan@empresa.com
Re: Propuesta Q2 2026
────────────────────────
Hola Juan,
Gracias por el resumen. Me parece viable la dirección propuesta.
¿Podemos agendar una llamada esta semana?
Saludos,
[Tu nombre]
────────────────────────
[1] Guardar borrador [2] Editar [3] Enviar ahora [4] Descartar# Guardar como borrador
gog gmail draft create --to "juan@empresa.com" \
--subject "Re: Propuesta Q2 2026" \
--body "Hola Juan,..." \
--reply-to <message_id>
# Enviar borrador guardado
gog gmail draft send <draft_id>
# Enviar directamente (SIEMPRE pedir confirmación antes)
gog gmail send --to "juan@empresa.com" --subject "..." --body "..."acuse_recibo: "Recibido, te respondo a la brevedad."
confirmar_reunion: "Confirmado para [fecha/hora]. Hasta entonces."
solicitar_info: "Necesito más información sobre X para proceder."
ausencia: "Estoy fuera hasta [fecha]. Respondo a mi regreso."# Buscar correos enviados sin respuesta en últimos 5 días
gog gmail search 'in:sent newer_than:5d' --max 20 --format minimal --json
# Cruzar con INBOX para detectar cuáles no tienen respuestaPor qué 55 min: el caché de Anthropic expira a los 60 minutos. Con heartbeat de 55 min, el agente mantiene el caché caliente → cada mensaje paga cache-read en lugar de cache-write (3.75x más barato).
// ~/.openclaw/openclaw.json
{
"agents": {
"email-assistant": {
"heartbeat": { "every": "55m" },
"model": "anthropic/claude-haiku-4-5-20251001"
}
}
}{
"cron": {
"jobs": [
{
"id": "email-priority-check",
"schedule": "*/55 * * * *",
"description": "Revisar correos importantes — modelo Haiku",
"message": "Revisa inbox no leídos. Si hay prioridad >= 8, notifícame.",
"model": "anthropic/claude-haiku-4-5-20251001",
"enabled": true
},
{
"id": "email-spam-cleanup",
"schedule": "0 8 * * *",
"description": "Limpieza diaria de spam — solo reglas locales, costo $0",
"message": "Aplica reglas locales de spam. Sin llamadas IA.",
"model": "anthropic/claude-haiku-4-5-20251001",
"enabled": true
},
{
"id": "email-weekly-report",
"schedule": "0 9 * * MON",
"description": "Informe semanal",
"message": "Genera informe semanal de correos con email-reporter.",
"model": "anthropic/claude-haiku-4-5-20251001",
"enabled": true
}
]
}
}Regla de oro para crons: SIEMPRE especificar claude-haiku-4-5-20251001.
Usar Opus para un cron de 10 tareas/día = $17.70/mes extra innecesario.
## Email Heartbeat — Modelo: claude-haiku-4-5-20251001
### Check de correos (cada 55 min)
1. gog gmail search 'in:inbox is:unread' --max 10 --format minimal --json
2. Aplicar reglas locales de corp_routing_rules.json
3. Si hay correo con keywords urgente/crítico/emergencia → notificar
4. Si no hay urgentes → HEARTBEAT_OK (silencio)
### Check de spam (cada 2h, sin IA)
1. gog gmail search 'in:spam is:unread' --max 50 --format minimal --json
2. Aplicar known_spam_domains.txt → mover a trash directo
3. Sin llamadas a IA
Quiet hours: 23:00–07:00 → HEARTBEAT_OK automático# Configurar webhook Pub/Sub
python3 scripts/setup_pubsub.py --topic "email-agent-notifications"
# El webhook dispara cuando llega un correo nuevo:
openclaw message "Nuevo correo. Revisa con gog y notifícame si es importante."Usuario: "Activa el agente de correo en modo automático"
Agente:
1. Verificar: gog auth status
2. Crear cron jobs recomendados (ver arriba)
3. Copiar HEARTBEAT.md al workspace
4. Preguntar: ¿activar Gmail Push para tiempo real?
5. Confirmar canal de notificaciones (NOTIFY_CHANNEL)
6. "✅ Agente activado. Reviso cada 55 min. Te aviso si hay algo importante."# Resumen del día (al final de sesión — SIEMPRE mostrar)
# Ver sección "Resumen de costos" más abajo
# Estadísticas de spam
gog gmail search 'in:trash newer_than:30d' --max 100 --format minimal --json
# Parsear y agrupar por dominio remitente
# Tareas pendientes en correos
# Consultar analysis_cache donde tareas[] no está vacío y sin respuesta
# Log de prompts IA detectados
cat .learnings/PROMPTS_DETECTADOS.md
# Historial de acciones del agente
cat email_audit.log | tail -50
# Deshacer última acción
gog gmail modify <ids_from_audit_log> --remove-label TRASH --add-label INBOX💰 Sesión de hoy
Correos procesados: 47
├─ Sin IA (reglas): 31 (66%) → $0.000
├─ Haiku (2 batches): 14 → $0.005
└─ Sonnet (borradores): 2 → $0.005
Tokens consumidos: 5.090
Costo sesión: $0.010
Ahorro estimado: $0.040 (80% vs. sin optimizar)
Presupuesto mes: $X.XX gastado / $Y.YY total (N%)
Proyección mes: $Z.ZZ| Evento | Archivo | ID |
|---|---|---|
| Usuario corrige clasificación | .learnings/LEARNINGS.md | LRN-YYYYMMDD-NNN |
| Costo sesión > 2x el promedio | .learnings/LEARNINGS.md | LRN-YYYYMMDD-NNN |
| Error de API (rate limit, auth) | .learnings/ERRORS.md | ERR-YYYYMMDD-XXX |
| Optimización reduce costos >10% | .learnings/LEARNINGS.md | LRN-YYYYMMDD-NNN |
| Remitente recurrente sin regla | .learnings/LEARNINGS.md | LRN-YYYYMMDD-NNN |
## [LRN-YYYYMMDD-NNN] <tipo>
**Logged**: ISO timestamp
**Priority**: low | medium | high
**Status**: pending | applied | promoted
**Area**: cost | classification | routing | api | spam | drafts
### Summary
Una línea con el aprendizaje y su impacto.
### Details
Qué pasó. Qué se asumía vs. qué era verdad.
### Action
Cambio concreto: qué archivo editar, qué valor cambiar.
### Impact
Ahorro estimado: $X/mes | Tokens -N%
---1. Revisar .learnings/ con Status=pending
2. ¿Learnings con Impact > $0.01/mes?
→ Proponer: "Aprendí que X. ¿Lo aplico a las reglas?"
→ Si acepta → editar corp_routing_rules.json → Status=applied
3. ¿3+ learnings del mismo dominio/patrón?
→ Promover a regla permanente sin preguntar
→ Status=promoted
4. Reportar: "Apliqué N mejoras. Ahorro estimado: $X/mes"Mes 1: ~$0.50/mes (0 reglas)
Mes 2: ~$0.30/mes (10 reglas aprendidas)
Mes 3: ~$0.18/mes (25 reglas)
Mes 6: ~$0.10/mes (60+ reglas)| % gastado | Modo | Restricciones |
|---|---|---|
| 0–59% | Normal ✅ | Todo habilitado |
| 60–79% | Ahorro leve 🟡 | Avisar. Máx 2 borradores/sesión |
| 80–94% | Ahorro fuerte 🟠 | Solo Haiku. Sin borradores auto. Batch obligatorio ≥20 |
| 95–100% | Emergencia 🔴 | Cero IA. Solo gog + reglas locales |
/context list # qué archivos consumen tokens ahora
/usage full # tokens + costo por respuesta
/usage cost # resumen acumulado de sesión
/status # modelo activo, % contexto
python3 scripts/token_tracker.py check # estado del budget diario
python3 scripts/model_router.py "analizar correos nuevos" # qué modelo usarreferences/cost-optimization.md — Técnicas avanzadas: prompt caching, deduplicación semántica, modo emergenciareferences/learning-patterns.md — Patrones de auto-mejora y ciclo de vida de learningshooks/openclaw-handler.js — Inyecta estado de presupuesto + modo activo al inicio de sesiónscripts/init_orchestrator.py — Setup inicial: verifica gog, crea budget_tracker, SKILLS_INDEXassets/HEARTBEAT.email.md — Plantilla lista para copiar al workspace© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files (scripts, references, assets) in skills/emailagy of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Smart Email Agent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Smart Email Agent this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.7k | Automated safety check: Pass | MIT | |
| Performance Patternss-morgan-jeffries/apple-mail-fast-mcp | 104 | — | ~1.5k | Automated safety check: Pass | MIT | |
| Prismer Google WorkspacePrismer-AI/PrismerCloud | 1.6k | 3 repos | ~4.2k | Automated safety check: Pass | MIT | |
| Google WorkspaceRedWoodOG/Hermes-Desktop | 177 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Community Google WorkspaceArgentAIOS/argentos-core | 126 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Google WorkspaceTommy-yw/RunbookHermes | 546 | 1 repos | ~2.7k | Automated safety check: Pass | MIT |
s-morgan-jeffries/apple-mail-fast-mcp
A skill your agent uses when optimizing Apple Mail MCP operations, diagnosing slow queries, adding new filtering logic, or modifying how data is fetched from Mail.app.
Prismer-AI/PrismerCloud
Gives an agent account-scoped access to Gmail, Calendar, Drive, Contacts, Docs and Sheets through the gws CLI or a bundled Python client.
RedWoodOG/Hermes-Desktop
Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration via Python.
ArgentAIOS/argentos-core
Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration for community skills.
Tommy-yw/RunbookHermes
Gmail, Calendar, Drive, Contacts, Sheets, and Docs integration for Hermes.
ericrisco/rsc-harness
A skill your agent uses when server-side code reads or writes Gmail, Drive, Calendar, or Sheets with a GCP service account and no human in the OAuth loop: picking the auth mode (app-owned vs…
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Categories
All-in-one Gmail agent for OpenClaw. An agent skill from LeoYeAI/openclaw-master-skills. Smart Email Agent is an agent skill from LeoYeAI/openclaw-master-skills. All-in-one Gmail agent for OpenClaw.
Smart Email Agent fits situations like: ANYTHING email-related: checking inbox; searching messages; organizing labels; classifying/prioritizing.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a claude-code`. Or copy the skill folder (skills/emailagy in LeoYeAI/openclaw-master-skills) into .claude/skills/smart-email-agent in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a codex`. Or copy the skill folder (skills/emailagy in LeoYeAI/openclaw-master-skills) into .agents/skills/smart-email-agent in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill smart-email-agent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-email-agent, .gemini/skills/smart-email-agent, .github/skills/smart-email-agent and .opencode/skills/smart-email-agent in your project.
Going by SKILL.md and its folder, Smart Email Agent needs JavaScript and Python for the scripts in its folder and the command-line tools its instructions call (python3, npm and brew). Our summary lists: Python 3; Node.js; A credential in ANTHROPIC_API_KEY; A credential in SAFE_BROWSING_API_KEY.
SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Smart Email Agent is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.7k tokens (SKILL.md is roughly 19k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 779 tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Smart Email Agent: Performance Patterns (s-morgan-jeffries/apple-mail-fast-mcp, 104 stars), Prismer Google Workspace (Prismer-AI/PrismerCloud, 1.6k stars), Google Workspace (RedWoodOG/Hermes-Desktop, 177 stars) and Community Google Workspace (ArgentAIOS/argentos-core, 126 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,160 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.