.claude/skills/idle-module/SKILL.md
IdleModule reference — production, upgrades, prestige, boosts, automation, offline progress, multipliers, and time services for idle/incremental games. Use when implementing idle game mechanics.
npx skillsauth add punkfuncgames/tetris-clone idle-moduleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Package: com.punkfuncgames.idle | Define: PUNKFUNC_IDLE
Location: Packages/com.punkfuncgames.idle/Runtime/PunkFuncGames.Idle/
Namespace: PunkFuncGames.Idle
ReadOnlyReactiveProperty<BigDouble> TotalProductionRate(string currencyId)BigDouble GetProductionRate(string currencyId)RegisterProducer(string producerId, string currencyId, BigDouble baseProduction)SetProducerLevel(string producerId, int level)SetProducerMultiplier(string producerId, BigDouble multiplier)UnregisterProducer(string producerId)IEnumerable<string> GetAllProducerIds()string GetProducerCurrencyId(string producerId)Implementation: ProductionService : IProductionService, ITickable, IDisposable
IWalletService, IPublisher<ProductionChangedEvent>Observable<(string upgradeId, int level)> OnUpgradePurchasedRegisterUpgrade(IUpgradeDefinition definition)bool CanAfford(string upgradeId)bool TryPurchase(string upgradeId, int count = 1)int GetLevel(string upgradeId)BigDouble GetCost(string upgradeId, int count = 1)BigDouble GetEffect(string upgradeId)int GetMaxAffordable(string upgradeId) — capped at 1000bool IsMaxLevel(string upgradeId) / bool IsUnlocked(string upgradeId)IUpgradeDefinition — Blueprint interface:
string Id, string CurrencyId, int MaxLevel (0=unlimited)BigDouble GetCost(int level), BigDouble GetEffect(int level), bool IsUnlocked()Implementation: UpgradeService : IUpgradeService, IStartable, IDisposable
IWalletService, ISaveService, IPublisher<UpgradePurchasedEvent>int PrestigeCount, BigDouble PrestigeCurrency, BigDouble PendingPrestigeCurrencyObservable<PrestigeEvent> OnPrestigeBigDouble CalculatePrestigeReward()bool CanPrestige()UniTask<PrestigeResult> PerformPrestigeAsync(ct)Implementation: Minimum 1M gold, formula: floor(sqrt(totalValue / 1000) * (1 + prestigeCount * 0.1))
TimeSpan MaxOfflineTime (24h default), bool HasPendingProgressObservable<OfflineProgressResult> OnOfflineProgressCalculatedOfflineProgressResult CalculateOfflineProgress()ApplyOfflineProgress(), DismissOfflineProgress(), SaveCurrentTime()Implementation: Auto-calculates on startup if elapsed > 60s
ActivateBoost(string boostId, BigDouble multiplier, TimeSpan duration, string targetId)bool IsBoostActive(string boostId), TimeSpan GetRemainingTime(string boostId)IEnumerable<ActiveBoost> GetActiveBoosts()Observable<string> OnBoostExpiredAddMultiplier(string sourceId, string targetId, BigDouble value)RemoveMultiplier(string sourceId, string targetId)BigDouble GetTotalMultiplier(string targetId) — multiplicative: m1 * m2 * m3IReadOnlyDictionary<string, BigDouble> GetMultiplierBreakdown(string targetId)Observable<(string targetId, BigDouble newTotal)> OnMultiplierChangedDateTime GetCurrentTime(), DateTime GetSessionStartTime(), TimeSpan GetSessionDuration()bool IsTimeTampered, Observable<bool> OnTimeTamperDetectedValidateTime(), TimeSpan GetElapsedSince(DateTime pastTime)RegisterAutomation(string id, AutomationType type, float intervalSeconds, Func<bool> unlockCheck)SetEnabled(string id, bool enabled)bool IsUnlocked(string id), bool IsEnabled(string id)Observable<string> OnAutomationTriggeredAutomationType enum: AutoBuy, AutoClick, AutoPrestige
| Event | Key Fields |
|-------|------------|
| ProductionChangedEvent | CurrencyId, OldRate, NewRate |
| UpgradePurchasedEvent | UpgradeId, NewLevel, PreviousLevel, Cost |
| GeneratorPurchasedEvent | GeneratorId, Count, TotalCost |
| PrestigeEvent | PrestigeCount, PrestigeCurrencyEarned, ResetCurrencies |
| OfflineProgressEvent | ElapsedTime, CappedTime, TotalEarnings |
| BoostActivatedEvent | BoostId, Multiplier, Duration |
| BoostExpiredEvent | BoostId |
| AutomationTriggeredEvent | AutomationId, TargetId |
ActiveBoost — BoostId, TargetId, Multiplier, RemainingTime, TotalDuration OfflineProgressResult — RawElapsed, CappedElapsed, Earnings dict, LastSaveTime, WasCapped PrestigeResult — Success, Earned, NewPrestigeCount
NumberFormatter (static):
Format(BigDouble, NumberFormatStyle, decimals) — Suffix (K/M/B/T/aa-zz), Scientific, EngineeringFormatTime(TimeSpan, showSeconds), FormatPerSecond(BigDouble, decimals)IdleInstaller.Install(builder, options);
// Registers: TimeService, ProductionService, OfflineProgressService, AutomationService,
// BoostService, MultiplierService, PrestigeService, UpgradeService
// + all 8 event brokers
public sealed class MyGameController : IStartable, ITickable, IDisposable
{
private readonly IProductionService _production;
private readonly IUpgradeService _upgrades;
private readonly IMultiplierService _multipliers;
private readonly CompositeDisposable _disposables = new();
public MyGameController(IProductionService production, IUpgradeService upgrades,
IMultiplierService multipliers) { /* assign fields */ }
public void Start()
{
_production.RegisterProducer("Mine", "Gold", new BigDouble(1));
_upgrades.RegisterUpgrade(new MineUpgrade());
_upgrades.OnUpgradePurchased
.Subscribe(evt => _production.SetProducerLevel("Mine", evt.level))
.AddTo(_disposables);
}
public void Tick()
{
BigDouble mult = _multipliers.GetTotalMultiplier("GoldProduction");
foreach (string id in _production.GetAllProducerIds())
_production.SetProducerMultiplier(id, mult);
}
public void Dispose() => _disposables.Dispose();
}
development
WalletModule reference — currency management with BigDouble support, reactive properties, caps, lifetime stats, and persistence. Use when working with currencies, wallets, or financial systems.
development
UnlockConditionModule reference — composable unlock conditions using ScriptableObjects with AND/OR/NOT logic, stat/currency/upgrade/prestige/gamestate/boolean checks, reactive service layer with progress tracking. Use when implementing unlock systems, gating, or progression requirements.
development
UndoModule reference — command pattern with undo/redo stacks, command merging, and reactive state. Use when implementing undo/redo, undoable actions, or command patterns.
tools
Unity UI Toolkit reference — UXML documents, USS styling, MVVM pattern (ViewModel + Presenter), custom VisualElements, responsive layout, animations, performance guidelines, and complete Figma-to-UI-Toolkit property mapping. Use when building or modifying UI with UI Toolkit, creating UXML/USS files, writing ViewModels or Presenters, designing screens/panels/components, or converting Figma designs to UI Toolkit.