update-card-benefits

Automate diff-based card-benefit migrations across Perks Reminder users with transactional safety.

15|3|Updated Apr 28, 2025
One-click install
npx skills add https://github.com/lifan-builds/perks-reminder --skill update-card-benefits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-card-benefits
Source: https://github.com/lifan-builds/perks-reminder/tree/main/.cursor/skills/update-card-benefits
Command: npx skills add https://github.com/lifan-builds/perks-reminder --skill update-card-benefits

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill updates, adds, or removes benefits across all existing user cards in Perks Reminder to ensure changes propagate consistently.

Core Features & Use Cases

  • Automates diff-based migrations: compares predefined benefits with existing user data and applies precise updates without losing user progress.
  • Seed-driven template updates: refreshes the card templates so new users receive the latest benefits.
  • Safe, auditable changes: runs in transactions with dry-run options to preview impacts before applying.

Quick Start

Run the update-card-benefits script with a specific card name to preview changes using --dry-run, or apply them with --force.

Frequently Asked Questions about update-card-benefits

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update card benefits across all existing Prisma users without losing their current progress?

To update card benefits without losing user progress, run a diff-based migration script that compares predefined templates with existing data and applies additions, modifications, or removals transactionally. This ensures user statuses are preserved during the migration.

Can I preview changes to card benefits before applying them to my database?

Yes, you can preview card benefit changes by running the update script with the --dry-run flag. This allows you to audit the exact impact on existing user data before applying the actual updates with the --force flag.

Does the card benefits migration script require a specific database setup?

Yes, updating card benefits requires a functioning Prisma setup and access to the unified update-card-benefits.js script. This environment is necessary to execute the transactional database changes safely across all users.

What is the best way to add or remove perks from existing user cards in a seed-driven application?

The best way to add or remove perks is through seed-driven template updates that automatically refresh card templates. The migration script then propagates these template changes to existing users while maintaining transactional safety.

Why should I use transactional migrations for updating user card perks?

Transactional migrations are necessary for updating user card perks because they apply precise diff-based changes without losing user progress. If an error occurs during the update, the transaction rolls back to prevent partial data corruption.

Do I need to manually update each user when a card benefit is modified?

No, you do not need to manually update each user when a card benefit is modified. The automation script handles the migration across all existing users simultaneously, applying additions, modifications, and removals consistently.