AddThisFeature

Team Invitations

Let people bring their team into your app.

involved User Accounts

What it adds

Invite teammates by email into a shared workspace, with roles.

What your agent is told to do

4
  1. 1

    Invite by email with a role. Store pending invites separately from users — an invite is not an account.

  2. 2

    Use a cryptographically random, expiring token in the invite link.

  3. 3

    Handle both cases: the invitee already has an account, and they don't.

  4. 4

    Let an admin see, resend, and revoke pending invites.

Edge cases it handles

5
  • Accepting an invite while signed in as a DIFFERENT user must not silently add the wrong account. Ask.
  • An expired or revoked invite must fail clearly, not 500.
  • Accepting the same invite twice must not create two memberships.
  • Removing a member must revoke their sessions and access immediately.
  • The last remaining admin must not be able to remove or demote themselves.

Definition of done

8
  • Invites use random, expiring tokens.
  • Both existing and new users can accept.
  • Accepting while signed in as someone else is handled explicitly.
  • Invites can be resent and revoked.
  • Double-accepting cannot create duplicate memberships.
  • The last admin cannot lock the team out.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.