mcpField
T
tier-management

tier-management

github.com/pollinationsOther5.3k65 installsUpdated today
Repository

About tier-management

tier-management is an operational skill for evaluating and updating user tiers in the pollinations repository. It documents eligibility checks, database updates, balance handling, and batch upgrade scripts.

Key features

  1. 01Check GitHub activity for tier eligibility
  2. 02Query and update user tiers in D1
  3. 03Handle tier balance refills and immediate updates
  4. 04Find billing-error users for review
  5. 05Run batch developer upgrades with dry runs

Use cases

  1. 01Evaluate a user's eligibility for Seed or Flower
  2. 02Update a tier and optionally set its balance
  3. 03Review billing-error accounts or process developer upgrades

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pollinations/pollinations --skill tier-management

After installing, type/tier-managementin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

.gitignore
scripts/
check-github-dev.sh
check-user-balance.sh
fetch-stargazers.sh
update-tier.sh
upgrade-devs.sh

Details

From the project README

Requirements

Before using this skill, ensure you have:

  • GitHub CLI: brew install gh && gh auth login
  • Node.js/npx: brew install node
  • Wrangler: npm install -g wrangler
  • jq: brew install jq (for parsing JSON)
  • sops: brew install sops (for decrypting secrets)

Must run from the pollinations repo root with access to enter.pollinations.ai/.


Tier Levels

TierEmojiPollenCadenceCriteria
microbe🦠0noneAccount under review
spore🍄0.01hourlyVerified accounts
seed🌱0.15hourlyGitHub engagement
flower🌸0.4hourlyContributor
nectar🍯0.8hourlyLegacy — still supported for existing users, no longer granted

Upgrade Paths

🍄 Spore → 🌱 Seed

  • ⭐ Starred the pollinations repo
  • 💬 Opened an issue or PR
  • 💳 Made a purchase

🌱 Seed → 🌸 Flower

  • 🛠️ Pushed code to pollinations/pollinations
  • 📦 Has a project in our showcase
  • 🌐 Built something open-source using our API

Evaluate User Tier

Check for Flower (any ONE qualifies)

Has commits to pollinations?

gh api 'search/commits?q=repo:pollinations/pollinations+author:USERNAME' --jq '.total_count'

Has a project in our lists?

grep -ri "author.*USERNAME" pollinations.ai/src/config/projects/

Check for Seed (any ONE qualifies)

Involved in issues/PRs?

gh api 'search/issues?q=repo:pollinations/pollinations+involves:USERNAME' --jq '.total_count'

Starred repo?

.claude/skills/tier-management/scripts/fetch-stargazers.sh USERNAME

Update User Tier

How Tiers Work Now

  • Tier balance refills hourly for all tiers
  • No rollover - balance resets to tier amount each period
  • Just update D1 - no external subscription system needed

Quick Update

Step 1: Find user
cd enter.pollinations.ai
npx wrangler d1 execute DB --remote --env production \
  --command "SELECT id, github_username, email, tier, tier_balance FROM user WHERE LOWER(github_username) LIKE '%USERNAME%';"
Step 2: Update tier
npx wrangler d1 execute DB --remote --env production \
  --command "UPDATE user SET tier='TIER' WHERE github_username='USERNAME';"

Balance will update automatically at next hourly refill cycle.

Step 3 (Optional): Immediate balance update
# Set balance immediately (e.g., flower = 0.4 pollen)
npx wrangler d1 execute DB --remote --env production \
  --command "UPDATE user SET tier='flower', tier_balance=0.4 WHERE github_username='USERNAME';"
Step 4: Notify user on GitHub
Hey @USERNAME! You've been upgraded to [EMOJI] [TIER] tier!

Your benefits:
- [POLLEN] free compute (refills hourly)
- All standard models

Batch Processing

Find Users with Billing Issues

Use the model-debugging skill to find users hitting 402 errors (billing/quota):

# Find spore-tier users with >10 402 errors in last 24 hours
.claude/skills/model-debugging/scripts/find-402-users.sh 24 10 spore

# Save to file for batch processing
.claude/skills/model-debugging/scripts/find-402-users.sh 24 10 spore | cut -f1 > /tmp/users.txt

Note: 402 = billing issues (pollen balance, key budget). 403 = permission issues (model access denied).

Check if User is a Developer

# Check single user
.claude/skills/tier-management/scripts/check-github-dev.sh OliverCWY
# Output: dev: repos=12 followers=13 account_year=2017

Batch Upgrade Devs to Seed

# Dry run first (no changes)
.claude/skills/tier-management/scripts/upgrade-devs.sh /tmp/users.txt --dry-run

# Apply upgrades
.claude/skills/tier-management/scripts/upgrade-devs.sh /tmp/users.txt

The script:

  • Checks GitHub profile for dev activity (repos, followers, account age)
  • Only upgrades users currently on spore tier (won't downgrade)
  • Has 2s delay between GitHub API calls to avoid rate limiting
  • Shows summary of upgraded/skipped users

Check User Balance

.claude/skills/tier-management/scripts/check-user-balance.sh username_or_email

Key Files

FilePurpose
enter.pollinations.ai/src/tier-config.tsTier → pollen mapping (source of truth)
enter.pollinations.ai/src/scheduled.tsCron handler: tier refill (hourly/daily)
enter.pollinations.ai/src/auth.tsSets tier on new user registration
enter.pollinations.ai/wrangler.tomlCron schedule: 0 0 * * *

Notes

  • Tier balance refills hourly for all tiers; no rollover
  • New users get spore tier + 0.01 pollen/hour
  • Tier upgrades take effect on next refill (or set tier_balance manually)

Comments

Markdown supported