Preferences
SkillFiles & storageExplains the sparse key-value storage used for personal preferences, including DM delivery preferences. Use when adding, reading, updating, querying, or exporting preferences.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Preferences skill
What this skill tells your AI
The instructions your AI receives, as published by mxz7/nypsi in .agents/skills/preferences/SKILL.md and read by ahel’s review.
Preferences is the single sparse key-value table for all personal preferences, including DM delivery preferences. It has a composite (userId, key) primary key and a JSON value. Defaults and UI metadata live in data/preferences.json; rows are only stored for values that differ from their default. DM preferences are nested under preferences.dms in application code and stored with dms.* keys; general preferences remain top-level.
Use the helpers in src/utils/functions/users/preferences.ts:
getPreferences()andupdatePreference()are the only read/write API.- Setting a key back to its default removes its row.
- All preferences share one per-user
RedisCacheentry.
Add new preferences to data/preferences.json and the Preferences interface in src/types/Preferences.ts. A Prisma schema change is not needed.
String option sets belong in application type files as as const arrays and derived unions, not as Prisma enums.
Direct Prisma filters must account for sparse defaults. Only query Preferences directly when the desired value is necessarily an override, such as dms.voteReminder = true when its default is false. Otherwise hydrate through the helpers.
Signals
- GitHub stars
- 69
- Forks
- 31
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
preferences- Source
- github.com/mxz7/nypsi