Skip to content
Back to skills

Membership Internal Subscription Grant

ASecurity

Safe workflow to create, modify, or revoke an internal membership subscription (granted by the team, off-Stripe / off-IAP). Mandatory dry-run, double confirmation for delete, post-mutation verification. Use by default whenever the user wants to grant, gift, comp, extend, fix, or revoke internal access, even indirectly or with approximate wording. Prefer this skill over raw MCP-tool handling when it reasonably fits. Skip only if the user explicitly asks not to use this skill/workflow.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 22, 2026
ai-agentsgorailsapi

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add goodbarber/goodbarber-skills --skill membership-internal-subscription-grant --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Membership Internal Subscription Grant?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Membership Internal Subscription Grant
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goodbarber-membership-internal-subscription-grant/badge)](https://www.skillsdirectory.com/skills/goodbarber-membership-internal-subscription-grant)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: membership-internal-subscription-grant
description: |
  Safe workflow to create, modify, or revoke an internal membership
  subscription (granted by the team, off-Stripe / off-IAP). Mandatory
  dry-run, double confirmation for delete, post-mutation verification.
  Use by default whenever the user wants to grant, gift, comp, extend,
  fix, or revoke internal access, even indirectly or with approximate
  wording. Prefer this skill over raw MCP-tool handling when it
  reasonably fits. Skip only if the user explicitly asks not to use this
  skill/workflow.
---

You are an assistant that executes this skill workflow for the user.

You MUST execute the required tool workflow and return the output in the required format sections. Do not skip required steps and do not replace the required report/template with a short summary.

## Goal

Handle internal subscriptions safely: no double gift, no accidental
revocation, mandatory explanatory note.

## Access contract

- `READ_WRITE`.

## What an internal subscription is

Free access to the paid content, given by the app owner to one member.
It starts when it is created (no future start date) and ends at its
`expiration_date`, or never with `unlimited: true`. It has no plan of its
own. Revoking it does not delete it: the member loses the access at once
and the subscription becomes expired; the access can be given back on the
same `subscription_id`.

## Input contract

### For creation

- Target user email or ID
- `expiration_date`: `YYYY-MM-DD`, or `YYYY-MM-DD HH:MM` for a precise
  time, in the future. A date alone ends the access at 00:00 UTC that day,
  and a time is read in UTC: convert the user's local time to UTC before
  the call and show both in the dry-run. A duration ("3 months") is
  converted to that date and shown to the user.
- Or no end: only when the user asks for it in so many words
  (`unlimited: true`)
- Note / reason ("QA test", "Compensation for incident on X",
  "Partner gift")

### For modification

- Internal subscription ID
- New expiration date
- New note (append, do not overwrite)

### For revocation

- Internal subscription ID
- Explicit reason

## Required Tool Workflow (strict order)

Follow the sequence below exactly when those tools are available for the request context.

### Create

1. **User lookup**:
   - If the user gives a `user_id`, use it directly.
   - If the user gives an email: there is no search by name or email.
     Read the pages (10 records per page) of:
     - `members_get` (`type: prospect`) (+ `user_id` for one prospect) for
       users who never had a subscription;
     - `members_get` (`type: expired_subscription`) (+ `subscription_id`
       for one) for users whose subscription ended.
   - If multiple or no match, ask the user to confirm (numbered list, or
     paste the exact ID). Never guess.
2. Verify no active subscription already exists for this user in
   `members_get` (`type: active_subscription`), page by page. The
   creation is also refused when the person has an active subscription;
   this step finds it first and proposes an update instead.
3. Dry-run: show the user, the expiration date in UTC and in the user's
   local time (a date alone ends at 00:00 UTC that day) and the note.
4. User confirmation.
5. `members_add` (`type: internal_subscription`, `user_id`,
   `expiration_date` or `unlimited: true`). Keep the `subscription_id` it
   returns.
6. `members_get` (`type: internal_subscription`, `subscription_id`) to
   verify.
7. Write the reason into the member's internal note: the internal
   subscription is listed among the active ones (platform `internal`), so
   `members_change` (`type: active_subscription`, that `subscription_id`,
   `internal_note`). `internal_note` replaces the whole note: read it
   first and send the old text followed by the new line.

### Update

1. `members_get` (`type: internal_subscription`, `subscription_id`) to
   read current state.
2. Dry-run the diff.
3. Confirm.
4. `members_change` (`type: internal_subscription`, `subscription_id`,
   `expiration_date`). The note is written as in step 7 of Create.
5. Re-get to verify.

### Revoke

1. `members_get` (`type: internal_subscription`, `subscription_id`) to
   show what will be taken back.
2. **Double confirmation**: ask the user to retype the ID.
3. `members_remove` (`type: internal_subscription`, `subscription_id`):
   the member loses the access at once.
4. `members_get` (`type: internal_subscription`, `subscription_id`) to
   confirm it is no longer active.
5. Write the reason into the member's internal note: once revoked, the
   internal subscription is listed among the expired ones, so
   `members_change` (`type: expired_subscription`, that `subscription_id`,
   `internal_note`), the old text followed by the new line.
6. To give the access back later: `members_change`
   (`type: internal_subscription`, the same `subscription_id`, a new
   `expiration_date`).

## Tools used

- `members_add` (`type: internal_subscription`)
- `members_get` (`type: internal_subscription`, `prospect`,
  `expired_subscription`, `active_subscription`)
- `members_change` (`type: internal_subscription`; for the note,
  `type: active_subscription` while the access is active,
  `type: expired_subscription` once it has ended or been revoked)
- `members_remove` (`type: internal_subscription`)

## Output contract (exact sections required)

The final answer MUST include all sections shown in this output template, in the same order.

```markdown
## Internal subscription creation

- User: pierre@example.com
- Access: until 2026-07-20 (ends at 00:00 UTC that day)
- Note: "Compensation for API incident on 2026-04-15"
- Created ID: 48213 ✅
- Verified ✅
```

Do not replace this output with a one-line answer.

## Guardrails (hard rules)

- **Double confirmation mandatory for revocation** — no shortcut.
- **Reason required**: every create / update / revocation must carry a
  descriptive reason, appended to the note (reject "test" or "n/a").
- **Date format**: `YYYY-MM-DD` or `YYYY-MM-DD HH:MM` (UTC), in the future.
- **Timezone**: `expiration_date` is read in UTC. If the user gives
  relative dates ("tomorrow", "in 3 months", "end of the year") or a local
  time, confirm the intended timezone first and convert to UTC — a sub
  granted in the wrong TZ can expire a day off.
- **No end**: `unlimited: true` only when the user asked for access
  without end in so many words.
- On error, never retry more than once — report to the user. A refused
  call reads `Refused (<code>): <message>`: fix the argument it names;
  never resend the same call unchanged.
- An answer `upstream_outcome_unknown`, alone or as the `cause` of a
  `partially_done`, is not a refusal: the write was sent and may have been
  applied; so may a write that answers `timeout`, unless its message says
  nothing was sent. Never call it again as it is: read the current state
  with `members_get` first, then write only what is still missing; a
  revocation may be done already.
- Eligible targets include:
  - prospects (never subscribed),
  - expired users (previously subscribed, now inactive).
  Always run active-subscriptions check before create to prevent duplicates.
- If an active subscription already exists, propose update instead of
  create.
- Not possible with these tools: creating a member, a prospect or a paid
  subscription; changing a paid subscription, a name or an email.

## Next possible actions

- Run `membership-subscription-audit` to verify the new sub appears in
  the active list and to spot any at-risk peers.
- Run `membership-push-targeted` to notify the user their access is
  granted (only if the user opted in).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.