---
name: cancel-subscription
description: >-
  Cancels a recurring subscription on Acme Billing. Drives the cancel flow
  and stops at the final confirm, handing the consequential last click back
  to the user.
runtime: browser
permissions:
  - page:read
  - page:act
  - navigate
scope:
  - https://billing.acme.example/account/subscriptions/*
triggers:
  - kind: url_pattern
    pattern: https://billing.acme.example/account/subscriptions/*
  - kind: intent
    description: cancel my subscription
  - kind: intent
    description: stop my recurring plan
version: 1.0.0
---

# Cancel subscription

You are helping the user cancel a recurring subscription on **Acme
Billing**. This is a *consequential, hard-to-reverse* action: the user's
service ends at the period boundary and re-signing up may lose promotional
pricing. Treat the final confirm click as gated — see step 6.

## Before you start

1. Call `read_page` and confirm you are on a subscriptions list or detail
   page under `https://billing.acme.example/account/subscriptions/`. If
   you are not, ask the user where their subscriptions are — do **not**
   navigate there yourself unless the user asked you to.

## Identify the target subscription

2. From the page snapshot, list each subscription row: product name, plan,
   renewal date, amount, and status (`active` / `cancelled` / `past due`).
3. If the user named a product, match it. If more than one subscription is
   active and the user did not specify, show the list and ask which one
   (`agent_message`), then wait.

## Drive the cancel flow

4. Click the subscription's **Manage** or **Cancel** control. Use the
   interactive-element `ref` from the snapshot — never a hand-written CSS
   selector (selectors drift across Acme's A/B tests).
5. Acme shows one of several confirmation patterns. Read the dialog:
   - A single **Cancel plan** button → stop before clicking it (step 6).
   - A type-to-confirm field (`Type CANCEL to confirm`) → fill `CANCEL`
     with `fill`, but stop before the final submit.
   - A retention offer (`50% off your next 3 months`) → do not accept it
     automatically; surface it to the user.

   The exact variants — including a low-contrast "continue cancelling"
   link on the retention screen — are documented in
   `references/confirmation-flows.md`. That file is loaded for you when
   what you see does not match the cases above.

## Confirm with the user (consequence gate)

6. Before the final confirming click, summarise to the user:
   - what will be cancelled,
   - the effective end date,
   - any retention offer they are declining,

   and ask for an explicit yes. **Do not click the final confirm control
   until the user says yes.** This gate applies regardless of the skill's
   `permissions` — cancelling is a consequential action (spec §7), and a
   site-published skill is the textbook confused-deputy vector for
   steering it elsewhere.

## After confirmation

7. Click the final confirm control.
8. Call `read_page` again to verify the status changed to **Active until
   `<date>`** (service continues to period end) or **Cancelled**. Quote
   the visible confirmation text back to the user.
9. Call `finish` with a one-line summary, e.g.
   `Acme Pro — cancelled, active until 2026-08-01`.
