{
  "schema": "https://ai-atoms.com/schemas/skill-v1.json",
  "type": "skill",
  "id": "skill/handle-complaint",
  "version": "1.0.0",
  "name": "handle-complaint",
  "description": "Handles an incoming customer complaint end-to-end — pulls context, drafts a response, and suggests an operational fix. Accepts optional email or ticket ID argument.",
  "system_prompt_fragment": "Run the complaint resolution workflow by chaining two skills. Read the complaint, gather context, draft a response, and suggest a fix so it doesn't happen again.\n\nParse arguments:\n- `EMAIL_OR_TICKET_ID` (optional) — Gmail thread ID, HubSpot ticket ID, or \"latest\" to pull the most recent unresolved complaint. If omitted, ask the owner to paste the complaint text.\n\n## Step 1 — Load the complaint (ticket-deflector)\n\nUsing the `ticket-deflector` skill workflow:\n\n1. If an ID was given: pull the full thread from Gmail or HubSpot.\n2. If \"latest\": pull the most recent unresolved HubSpot ticket or Gmail thread tagged as complaint/support.\n3. If neither: ask the owner to paste the complaint text directly.\n4. Identify: customer name, order/account info, what they're upset about, what they're asking for.\n\n## Step 2 — Pull context\n\n1. Search HubSpot for the customer's history: past purchases, prior complaints, deal stage, lifetime value.\n2. Search PayPal for relevant transaction: order status, refund history, dispute status.\n3. Summarize: \"This is a {new/returning} customer, ${lifetime_value} in purchases, {0/N} prior complaints. Their current issue is {one sentence}.\"\n\n## Step 3 — Draft response (ticket-deflector)\n\nUsing the `ticket-deflector` skill workflow for tone-matched response:\n\n1. Draft a reply matched to the severity and the customer's history:\n   - First-time complainers with high LTV → empathetic, generous\n   - Repeat complainers → professional, firm, solution-focused\n   - Abusive tone → professional, brief, boundary-setting\n2. Include: acknowledgment, explanation (if known), resolution offer, next step.\n3. Present the draft to the owner. Do NOT send.\n\n## Step 4 — Suggest operational fix (customer-pulse)\n\n1. Check if this complaint matches a known theme (from prior `/customer-pulse-check` runs or similar complaints in HubSpot).\n2. If it's a pattern: \"This is the {Nth} complaint about {issue} this month. Consider: {specific operational change}.\"\n3. If it's isolated: \"This looks like a one-off. No pattern detected.\"\n\n## Connector failures\n\nIf Gmail and HubSpot are both unreachable, ask the owner to paste the complaint text — the skill works with manual input. If PayPal is missing, skip transaction lookup and note \"PayPal not connected — order status unavailable, working from complaint text only.\"\n\n## Approval gates\n\n- **Never send a response without explicit owner approval.** Drafts only.\n- **Never issue refunds or credits automatically.** Present the option; the owner decides.\n- **Never close tickets or resolve disputes without owner confirmation.**\n\n## Output\n\nPresent the customer context summary, the drafted response, and any pattern-based operational suggestion. Ask: \"Want to send this response, edit it, or handle it differently?\"",
  "applicable_domains": [
    "business",
    "operations"
  ],
  "invocation": [
    "/handle-complaint"
  ],
  "tags": [
    "small-business",
    "anthropics",
    "knowledge-work"
  ],
  "authored_by": "anthropics",
  "source_url": "https://github.com/anthropics/knowledge-work-plugins/blob/main/small-business/skills/handle-complaint/SKILL.md",
  "lifecycle": "stable",
  "category": "support",
  "provenance": {
    "source": "anthropics/knowledge-work-plugins",
    "source_url": "https://github.com/anthropics/knowledge-work-plugins/blob/main/small-business/skills/handle-complaint/SKILL.md",
    "author": "Anthropic",
    "license": "Apache-2.0",
    "notes": "Imported by scripts/import-anthropic-skills.py."
  }
}