segment-users

Installation
SKILL.md

Read your database schema, generate queries for every behavioral segment, and give you the exact action to take with each group. No analytics platform required.

Phase 1: Read the Schema

Check the codebase for the user model. The signals you need:

  • Usage metric — What counts as activity? Credits consumed, API calls, generations, logins, content created. Find the field.
  • Timestampscreated_at, last_active_at, last_login_at. Any date fields on the user.
  • Plan / billing — Free vs paid, plan name, subscription status.
  • ORM — Prisma, Drizzle, Mongoose, raw SQL? Match your output to what's already in the codebase.

If any of the three signals are missing (usage, timestamps, plan), tell the user before generating queries. Don't fabricate fields that don't exist in the schema.

Phase 2: Define the Segments

Use whatever signals are available. Don't force a segment if the data isn't there.

Usage-Based (requires usage metric)

Installs
7
GitHub Stars
5
First Seen
Mar 8, 2026
segment-users — tushaarmehtaa/tushar-skills