/lihfolk:lihfolk-systemsfrom lihfolk
Installs and configures LihFolk game systems (currency, inventory, shop, quests, leaderboard, etc.) for Roblox Luau projects. Includes data, net, receipts, codes, daily, rebirth, and odds modules with session locking and idempotency.
Ships in lihfolk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Strict Luau modules that already pass the hard gates of quality-score/rubrics/system.md by construction, so an agent installs and configures them instead of re-deriving session locking, receipt idempotency or odds disclosure (the places where generated code is most often subtly wrong). Each module follows roblox-secure-remotes, roblox-datastore-safety and roblox-monetization-compliance, and the shapes of the vault's Worked Builds.
Honesty label: all code is reviewed, not run in Studio. It was checked with a structural checker (blocks, brackets, interpolation, deprecated APIs), parsed by Roblox LSP with zero syntax errors, and built into a place with Rojo 7.7. The specs in tests/ have not been executed. Until they pass in Studio, the rubric gate "runs without errors / tests pass" is open and the score is capped at 5.0. Say so.
LIB: this folder (skills/lihfolk-systems/). VAULT: the plugin root's LihFolk Vault V2/ folder, i.e. <base directory>/../../LihFolk Vault V2 resolved to an absolute path from the base directory Claude Code shows when this skill loads (start with VAULT/INDEX.md). Use LIB the same way: <base directory> as an absolute path.ProcessReceipt, existing remotes.| File | Install as | Role |
|---|---|---|
src/Shared/Signal.luau | ReplicatedStorage/LihFolk/Signal | events between modules |
src/Shared/Janitor.luau | ReplicatedStorage/LihFolk/Janitor | cleanup of connections, instances, threads |
src/Shared/RateLimit.luau | ReplicatedStorage/LihFolk/RateLimit | token bucket per player, cleared on leave |
src/Shared/Net.luau | ReplicatedStorage/LihFolk/Net | the one place remotes are created; rate + type + range validation |
src/Shared/Odds.luau | ReplicatedStorage/LihFolk/Odds | flatten, pick, format, pity maths, chi-square |
src/Shared/Feedback.luau | ReplicatedStorage/LihFolk/Feedback | client: result codes to kind messages |
src/Server/*.luau | ServerScriptService/LihFolk/<Name> | PlayerData, Policy, Currency, Inventory, Rewards, Receipts, Shop, EggHatch, Codes, DailyRewards, Rebirth, Quests, Leaderboard |
src/Config/LihFolkConfig.luau | ReplicatedStorage/LihFolkConfig | display-safe config (items, prices, odds, quests) |
src/Config/LihFolkSecrets.luau | ServerStorage/LihFolkSecrets | codes (never replicated) |
examples/Main.server.luau | ServerScriptService/Main (Script) | the only server Script; wiring order |
examples/<System>.server.luau / .client.luau | Script / LocalScript | minimal wiring per system (use these OR Main) |
tests/Runner.luau, tests/*.spec.luau | ServerScriptService/LihFolkTests | TestEZ-style specs + tiny runner |
default.project.json | project root | Rojo mapping of the modules and Main (the place you publish) |
test.project.json | project root | same mapping plus tests/ as ServerScriptService/LihFolkTests; build a separate test place with rojo build test.project.json -o LihFolkTest.rbxl |
Rojo users: merge default.project.json into theirs. Studio-only users: create the folders above and paste each file into a ModuleScript (.server = Script, .client = LocalScript). Enable Game Settings > Security > Enable Studio Access to API Services. Studio automatically uses <storeName>_STUDIO, so tests never touch live saves.
ProcessReceipt, GetDataStore, UpdateAsync, SetAsync, RemoteEvent, RemoteFunction. If a data module or receipt handler already exists, do not install a second one: either migrate to PlayerData/Receipts (one writer, one ProcessReceipt) or adapt the services to the existing module's Get/MarkDirty equivalent. Two writers or two receipt handlers is a hard failure.PlayerData; Rewards needs Currency + Inventory; Inventory needs Policy; Shop needs Receipts; EggHatch needs Currency, Inventory, Policy. All need the Shared folder.LihFolkConfig (replace every id = 0 with real Developer Product / Game Pass ids; ask the user, or leave 0 and say so: id 0 products are never prompted) and LihFolkSecrets. Mark every currency paid = true if Robux can buy it directly or indirectly.examples/Main.server.luau): PlayerData.Configure -> Policy.Init -> service Init(config) calls -> cross-module hooks (luck sources, custom grants, prompt checks, quest feeds) -> Receipts.Start -> PlayerData.Start. Services register their profile slice and remotes in Init; nothing loads before the slices exist; Receipts.Start asserts every product has a grant.Net.Request / Net.On, render attributes (Coins, Rebirths, EffectiveLuck, Pass_<key>, PaidRandomAllowed, DataReady) and show Feedback.Text(result.code). Build real UI with roblox-ui-builder.Init(config) that asserts config, calls PlayerData.RegisterSlice, declares remotes with Net.Handle; public functions that validate then mutate profile.Data synchronously and call PlayerData.MarkDirty.quality-score (system rubric, minimum 8.5).Net.Handle(name, { rate = { burst, perSecond }, args = { validators }, handler }). Order: rate limit -> arg count -> per-arg type/range -> handler (context checks, act). Extra args rejected. exclusive (default on) gives one in-flight request per player per remote. Rejections are scored (Net.Violation, Net.GetViolationScore), logged at most once per 30 s per player, never kicked on one. Validators: T.integer, T.number, T.string(maxBytes, pattern) (UTF-8 checked), T.key(map), T.oneOf, T.guid, T.vector3, T.array, T.instance, T.optional. No InvokeClient exists anywhere.{Token, JobId, ExpiresAt} (90 s) checked inside UpdateAsync; every save fenced by token; ready/locked/failed/corrupt/newer are distinct and only ready has a save path; staggered dirty-gated autosave that doubles as the lease heartbeat (30 s, clamped to lease/3); save + release on leave; PlayerData.OnRelease(hook) registers final writes on leave (Leaderboard uses it); parallel BindToClose waits for the saves and those hooks with a 26 s deadline (3 s in Studio); findUnsavable refuses NaN, infinity, Instances/Vector3, mixed or holed arrays before writing; keyInfo user ids and metadata passed through. ProcessPurchaseAsync records grant + PurchaseId + purchase log in the same document and write; returns granted only after the save. Studio switches (ServerStorage attributes): TestProfileKey, SimulateLoadFailure.ProcessReceipt. Unknown product, absent player or unloaded profile -> NotProcessedYet. Paid grants force past a full bag. Limits and policy are checked at prompt time in Shop.PromptProduct, never by refusing a paid receipt. Retired products keep their entry. Receipts.Granted fires at most once per purchase, after the save (not for a redelivered receipt), so use it for announcements and analytics and keep anything the player owns in the grant.Shop.Buy(key, qty): price from server config, affordability and bag space checked, then spend + grant with no yield. Passes: ownership cache from UserOwnsGamePassAsync (errors retried, never cached as "not owned"), updated by PromptGamePassPurchaseFinished. Prices on screen: GetProductInfoAsync on the client (see examples/Shop.client.luau).computeFinals (luck, pity counter, obtained once-items) feeds both the roll and Eggs.GetOdds, so display and roll cannot diverge. Luck has one function and one cap; paid luck sources and boosts are excluded for restricted players. EffectiveLuck attribute + Eggs.OddsChanged push keep open odds panels live. Boost preview returns numeric before/after and atCap. Boost products check IsAtMaxLuck and CanAddTimedBoost at prompt time; GrantTimedBoost always lands for a paid purchase (with the list full it extends or merges into an existing boost). Paid eggs (price currency paid = true or paid flag) are refused server-side when ArePaidRandomItemsRestricted is not exactly false; restrictedNote names the alternative (the example config gives a free quest path). Pity counters are saved. Hatched uniques carry Paid provenance.CanBuyPaidRandom and CanTradePaid, fail closed (missing key, error, not fetched = restricted), retried in the background. ForceRestrictedPolicy ServerStorage attribute forces the restricted path in Studio.CanAdd before Add; CanTrade(player, uid) combines tradable with Policy.CanTradePaid for Paid items.Rewards.CanGrant; refused (nothing marked) on a full bag. Codes: server-only list, normalised input, expiry by server UTC, one use per player, miss lockout by UserId. Daily: fixed UTC reset with offset, streak/grace as pure functions, countdown computed on the server. Quests: progress only from server code via Quests.Report.<storeName>_STUDIO boards, like PlayerData. Writes every 120 s only when changed, plus once on leave from the detached profile; reads one page per board per 120 s, staggered; budget checked before both; monotonic boards never lower; weekly boards are a new store each Monday 00:00 UTC; LogEncode for simulator-scale numbers; exclude for bans and deletion requests.| Decision | Default | Why |
|---|---|---|
| Load failure | kick with a clear message | never play on defaults that could save over real data |
| Newer schema | refuse and kick | rolling updates would strip new fields |
| Day reset | 00:00 UTC + offset | honest countdown, every server agrees |
| Full bag on free reward | refuse, nothing marked | all-or-nothing |
| Full bag on paid receipt | grant anyway (force) | the player already paid |
| Rebirth | whole balance resets | the leftover is part of the trade |
| Timed luck boosts | expire in real time, offline too | simple and honest; state it in UI |
| Odds disclosure | on every egg, paid or not | removes the "is this paid?" grey zone |
| Gate | Met by | Still needs |
|---|---|---|
| Runs without errors / tests pass | 18 spec modules + runner; structural and LSP parse clean; Rojo build OK | run tests/Runner and a Play test in Studio (not done) |
| Server-authoritative remotes (type, range, rate) | Net.Handle/Net.Listen on every remote; no client prices, rewards, odds or time | keep new remotes on Net |
| Data: pcall + retry, session lock, BindToClose, idempotent receipts | PlayerData + Receipts | one writer: remove any other DataStore writer |
| Paid random items: odds shown, PolicyService fail-closed | EggHatch + Odds + Policy + Shop.PromptProduct | an "Odds" labelled button on every purchase surface in the UI |
| No deprecated APIs, no unbounded loops | task.* only; long-lived loops yield every iteration | keep it that way |
Criteria help: S1 edge cases (rejoin, leave mid-load, double submit, redelivered receipts) are handled in PlayerData/Net/Receipts; S2 exploits table below; S3 pushes are coalesced, per-player tables cleared on leave; S4 config separate, typed modules; S5 depends on the UI you build (Feedback gives the messages); S6 scripted specs.
test.project.json, so the specs stay out of the published place), run require(game.ServerScriptService.LihFolkTests.Runner)() from the command bar: expect N passed, 0 failed.TestProfileKey = "a": fresh profile. SimulateLoadFailure = true: kicked, save untouched. Play/Stop/Play fast: the locked path behaves.ForceRestrictedPolicy = true: paid eggs, luck products and the luck pass are refused server-side; free eggs show base-luck odds.Invalid/TooFast, nothing created from nothing (roblox-anti-exploit-review).| Attack | Stopped by |
|---|---|
| Wrong types, NaN, infinity, fractions, long or invalid UTF-8 strings, extra args | Net validators |
| Remote floods / auto-clickers | RateLimit per remote per player, exclusive busy flag |
| Double submit / race to dupe | synchronous check-and-write, no yields, busy flag |
| Second server writing old data | lease + token fence in every UpdateAsync |
| Redelivered or concurrent receipts | PurchaseId recorded with the grant, duplicate path |
| Client-sent prices, odds, rewards, time | none accepted; all from server config and os.time() |
| Brute-forcing codes | rate limit + miss lockout by UserId |
| Restricted player buying paid random items via a side pop-up | gate in the server prompt path, not the UI |
Not stopped on its own: future server code that calls Currency.Add or Inventory.Add with unvalidated values; trades between players (no Trade module yet: use Inventory.CanTrade for both sides plus a ledger, vault Trading Systems Without Duplication); movement and combat exploits (use the Melee Combat worked build).
Combat (follow 24 Worked Builds/Melee Combat System End to End.md with Net + RateLimit), trading (ledger claimed with UpdateAsync; gate both players with Inventory.CanTrade), live codes and global code limits (Codes Redemption System End to End.md), MemoryStore matchmaking. Build these with roblox-system-builder on top of this library's PlayerData and Net.
PlayerData, one Receipts.Start (ProcessReceipt), one Main Script, one place that creates remotes (Net).schemaVersion.PlayerData.Get inside a leaderboard source (use the profile argument).id = 0; never hard-code a Robux price.24 Worked Builds/LihFolk Systems Library.md (this library) and 24 Worked Builds/LihFolk Systems - Data and Purchase Guarantees.md24 Worked Builds/Saved Inventory End to End.md, Shop with Game Passes and Developer Products End to End.md, Pet Hatching and Following End to End.md, Codes Redemption System End to End.md, Daily Rewards System End to End.md, Global Leaderboards End to End.md, Quest Chain System End to End.md, Rebirth and Prestige System End to End.md04 Data and Persistence/Session Locking and Profile Libraries.md, Purchase Data and Receipts.md, Trading Systems Without Duplication.md11 Monetization Publishing and Live Ops/Paid Random Items and Odds Disclosure in Practice.md, Developer Products and ProcessReceipt.md, Roblox Policies Ratings and Compliance.md03 Architecture and Networking/Rate Limiting and Abuse Prevention.md, 22 Anti-Exploit and Security/Testing Your Own Remotes - Fuzzing and Abuse Tests.mddefault.project.json (opens in a new tab)examples/Codes.client.luau (opens in a new tab)examples/Codes.server.luau (opens in a new tab)examples/Currency.client.luau (opens in a new tab)examples/Currency.server.luau (opens in a new tab)examples/DailyRewards.client.luau (opens in a new tab)examples/DailyRewards.server.luau (opens in a new tab)examples/EggHatch.client.luau (opens in a new tab)examples/EggHatch.server.luau (opens in a new tab)examples/Inventory.client.luau (opens in a new tab)examples/Inventory.server.luau (opens in a new tab)examples/Leaderboard.client.luau (opens in a new tab)examples/Leaderboard.server.luau (opens in a new tab)examples/Main.server.luau (opens in a new tab)examples/Net.client.luau (opens in a new tab)examples/Net.server.luau (opens in a new tab)examples/PlayerData.client.luau (opens in a new tab)examples/PlayerData.server.luau (opens in a new tab)examples/Quests.client.luau (opens in a new tab)examples/Quests.server.luau (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub lihfolk-cy/v2-vault --plugin lihfolk22 skills in this plugin
/council-methodLihFolk Council: blind multi-agent verdict for high-stakes Roblox decisions, ship-readiness, "be objective", "second opinion". Not for routine coding./lihfolkLihFolk Roblox knowledge router (1,300+ notes; "check the vault"). Use before non-trivial Roblox work: Luau, Studio, remotes, data, UI, building, VFX, animation, design, money, performance, security, publishing./lihfolk-assetsFind and import assets from the local LihFolk Asset Pack (models, materials, skies, animations, VFX). Use for "LihFolk asset", "what assets do we have"./lihfolk-figmaFigma frame to Roblox ScreenGui (Figma MCP or exported JSON), variables to theme tokens. Use for "Figma", "turn this design into Roblox UI"./lihfolk-sfxLihFolk combat and UI sounds (licensed only, pooled layered module). Use for "sfx", hit/swing/footstep/UI click sounds, repetitive or late-feeling hits./lihfolk-tutorialRoblox tutorials and onboarding (FTUE) that keep new players: first 60 s, guide arrows, stuck hints, skip/resume, funnels. Use when new players leave early or "don't know what to do".2 plugins ship this exact skill · first indexed Oct 30, 2026
Other plugins' skills for the same job