- All SKILL.md files now <500 lines (avg reduction 69%) - Detailed content extracted to references/ subdirectories - Frontmatter standardised: only name + description (Anthropic standard) - New skills: brand-guidelines, spec-coauthor, report-templates, skill-creator - Design skills: anti-slop guidelines, premium-proposals reference - Removed non-standard frontmatter fields (triggers, version, author, category) Plugins affected: infraestrutura, marketing, dev-tools, crm-ops, gestao, core-tools, negocio, perfex-dev, wordpress, design-media Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
172 lines
4.5 KiB
Markdown
172 lines
4.5 KiB
Markdown
---
|
|
name: ticket-triage
|
|
description: Auto-processamento de tickets abertos no Desk CRM. Fecha SPAM, identifica facturas para /auto-expense e protege notificações de sistema.
|
|
disable-model-invocation: true
|
|
---
|
|
|
|
# /ticket-triage v1.0
|
|
|
|
Auto-processamento de tickets abertos no Desk CRM.
|
|
|
|
---
|
|
|
|
## Protocolo
|
|
|
|
### Passo 1: Recolher tickets abertos
|
|
|
|
```
|
|
mcp__desk-crm-v3__get_tickets({ status: 1, limit: 50 })
|
|
```
|
|
|
|
### Passo 2: Carregar tabela de fornecedores
|
|
|
|
```
|
|
Read: /media/ealmeida/Dados/Hub/06-Operacoes/Documentacao/fornecedores-recorrentes.md
|
|
Extrair dominios de fornecedores e plataformas multi-fornecedor
|
|
```
|
|
|
|
### Passo 3: Classificar cada ticket
|
|
|
|
> Aplicar por ordem de prioridade. Primeiro match ganha.
|
|
|
|
```
|
|
Para cada ticket aberto:
|
|
|
|
1. NOTIFICACAO SISTEMA? (verificar PRIMEIRO)
|
|
Subject contem padrao protegido E remetente conhecido
|
|
→ NAO fechar. Guardar para "Requer Accao" no output.
|
|
|
|
2. DESPESA? (verificar SEGUNDO)
|
|
Email do remetente contem dominio de fornecedor conhecido
|
|
Subject contem: payment, pagamento, invoice, factura, recibo, receipt, paid, renewed
|
|
→ Registar no output como factura para /auto-expense
|
|
→ Fechar ticket (status 5) com nota "Factura flagged para /auto-expense"
|
|
|
|
3. SPAM? (verificar TERCEIRO)
|
|
→ Fechar (status 5) com motivo
|
|
|
|
4. NEWSLETTER/INFORMATIVO?
|
|
→ Fechar (status 5) com motivo
|
|
|
|
5. NENHUM MATCH
|
|
→ Manter aberto para revisao
|
|
```
|
|
|
|
### Passo 4: Escrever output JSON
|
|
|
|
```
|
|
Escrever em ~/.claude-work/today-tickets-{date}.json:
|
|
{
|
|
"spam_fechados": 3,
|
|
"newsletters_fechadas": 1,
|
|
"facturas": [
|
|
{"ticket_id": 456, "fornecedor": "Anthropic", "subject": "Receipt", "sender": "..."}
|
|
],
|
|
"notificacoes": [
|
|
{"ticket_id": 789, "subject": "Security Alert", "sender": "..."}
|
|
],
|
|
"mantidos_abertos": 2,
|
|
"total_processados": 12
|
|
}
|
|
```
|
|
|
|
---
|
|
|
|
## Padroes SPAM (fechar status 5)
|
|
|
|
```
|
|
Keywords no subject (case-insensitive):
|
|
- Guest Post, SEO services, backlinks, partnership
|
|
- link building, dofollow, collaboration opportunity
|
|
- Purchase Order (de desconhecidos)
|
|
- WeTransfer (phishing), Prestige Awards
|
|
- lottery, winner, urgent money, bitcoin
|
|
```
|
|
|
|
---
|
|
|
|
## Notificacoes de Sistema (NUNCA auto-fechar)
|
|
|
|
```
|
|
Padroes protegidos no subject (case-insensitive):
|
|
- Legal Update, Legal Notice, Policy Change, Policy Update
|
|
- Deprecation, End of Life, EOL, Breaking Change
|
|
- Migration Required, Action Required, Action Needed
|
|
- Security Alert, Security Advisory, Security Notice
|
|
- API Change, API Update, Terms Update, Terms Change
|
|
- Service Disruption, Maintenance Required
|
|
- Compliance, GDPR, Data Processing
|
|
- Infrastructure Change, Platform Update, Product Update
|
|
```
|
|
|
|
---
|
|
|
|
## Tickets a Saltar (NAO criar despesa)
|
|
|
|
| Tipo | Indicador | Accao |
|
|
|------|-----------|-------|
|
|
| Payment Confirmation | "Payment Confirmation" de CWP | Fechar (confirmacao, nao factura) |
|
|
| Payment Receipt | "Payment Was Successfully Processed" de elasticemail | Fechar (recibo sem dados) |
|
|
| Notificacao bancaria | "Notificacao de transferencia" de bancobpi | Fechar |
|
|
| Duplicado | Mesmo subject que ticket ja processado | Fechar como duplicado |
|
|
|
|
> **Nota:** Receipts de Anthropic e Canva contem invoice number e valor -> SAO despesas.
|
|
> "Receipt" so e motivo para saltar quando e apenas confirmacao sem dados de factura.
|
|
|
|
---
|
|
|
|
## Tickets para ELIMINAR (notificacoes sem valor)
|
|
|
|
```
|
|
Subject contem:
|
|
- "Your Elastic Email Account was successfully re-charged"
|
|
- "Account re-charged", "Auto-recharge successful"
|
|
- "Credit added to your account"
|
|
- "[BOT] Ativacao realizada com sucesso"
|
|
|
|
→ mcp__desk-crm-v3__delete_ticket({ ticket_id: ID, confirm: true })
|
|
```
|
|
|
|
---
|
|
|
|
## Remetentes Conhecidos (whitelist facturas)
|
|
|
|
> Ver tabela completa em: Hub/06-Operacoes/Documentacao/fornecedores-recorrentes.md
|
|
> Verificar pelo DOMINIO do email remetente, nao pelo departamento.
|
|
|
|
---
|
|
|
|
## Output Standalone
|
|
|
|
```markdown
|
|
## Triagem Tickets - DD-MM-YYYY
|
|
|
|
**Total: X tickets processados**
|
|
|
|
### SPAM Fechado (Y)
|
|
- #123 - "Guest Post SEO" - spam@dominio.com
|
|
|
|
### Facturas Identificadas (Z)
|
|
- #456 - "Receipt" - billing@anthropic.com -> /auto-expense
|
|
|
|
### Notificacoes Sistema (W)
|
|
- #789 - "Security Alert" - noreply@n8n.io -> requer accao
|
|
|
|
### Mantidos Abertos (N)
|
|
- #012 - "Pedido de suporte" - cliente@empresa.pt
|
|
```
|
|
|
|
---
|
|
|
|
## Anti-Patterns
|
|
|
|
- NUNCA eliminar tickets de remetentes desconhecidos com facturas
|
|
- NUNCA fechar notificacoes protegidas automaticamente
|
|
- NUNCA processar despesas directamente (delegar para /auto-expense)
|
|
- SEMPRE verificar dominio do remetente na tabela de fornecedores
|
|
- SEMPRE usar staff_id: 25 (AikTop) nos comentarios
|
|
|
|
---
|
|
|
|
*Skill v1.0.0 | 04-03-2026 | Descomplicar®*
|