.claude/skills/core-module/SKILL.md
Core framework module reference — MVC base classes, Composition system, service interfaces, extensions, and animation system. Use when working with MVC patterns, creating views/controllers/models, lifecycle management, or UI animations.
npx skillsauth add punkfuncgames/tetris-clone core-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.core | Define: PUNKFUNC_CORE
Location: Packages/com.punkfuncgames.core/Runtime/PunkFuncGames.Core/
Core/MVC/)IModel : IDisposable — string Id, bool IsInitialized, Initialize(), Reset()
IModel<TData> : IModel (TData : struct) — TData Data, SetData(TData)
IController : IDisposable — bool IsActive, Activate(), Deactivate()
IController<TModel, TView> — TModel Model, TView View, Initialize(TModel, TView)
IView : IDisposable — ReadOnlyReactiveProperty<bool> IsVisible, bool IsInteractable, ShowAsync(ct), HideAsync(ct), SetVisibleImmediate(bool)
IView<TData> : IView — Bind(TData), Unbind()
ModelBase : IModel
CompositeDisposable DisposablesOnInitialize(), OnReset(), OnDispose()ModelBase<TData> : ModelBase (TData : struct)
TData Data (read-only), ReadOnlyReactiveProperty<TData> DataChangedSetData(TData) → triggers OnDataChanged(TData)ControllerBase : IController
CompositeDisposable DisposablesOnActivate(), OnDeactivate(), OnDispose()ControllerBase<TModel, TView> — adds Model, View properties
OnInitialize(), BindModelToView(), BindViewToModel()OnActivate() calls both Bind methods automaticallyViewBase : MonoBehaviour, IView — requires CanvasGroup
ViewAnimatorAsset _showAnimator, ViewAnimatorAsset _hideAnimatorILifecycleComponent Lifecycle, CompositeDisposable Disposables, CancellationToken DestroyCancellationToken, CanvasGroup CanvasGroupOnAwake(), OnInjected(), OnShown(), OnHidden()ViewBase<TData> — adds TData BoundData, bool IsBound
OnBind(TData) — must implementOnUnbind()builder.RegisterMVC<TModel, TView, TController>(lifetime)builder.RegisterMVCWithView<TModel, TView, TController>(view, lifetime)MVCBinder.InitializeAndActivate(controller, model, view)MVCEntryPoint<TModel, TView, TController> : IStartable, IDisposable — auto-wires MVC on Start()
Core/Composition/)ILifecycleComponent : IDisposableComponent, ICancellableComponent — combines disposal + cancellation
IDisposableComponent — CompositeDisposable Disposables, bool IsDisposed, AddDisposable(IDisposable)
ICancellableComponent — CancellationToken CancellationToken, Cancel(), CreateLinkedToken(CancellationToken)
IInjectableComponent — bool IsInjected, event Action OnInjected, NotifyInjected()
ComposableBehaviour : MonoBehaviour (abstract base for DI-aware MonoBehaviours)
ILifecycleComponent Lifecycle, IInjectableComponent Injectable, CompositeDisposable Disposables, CancellationToken DestroyCancellationToken, bool IsInjectedCreateLifecycleComponent(), CreateInjectableComponent(), OnInjected(), OnDestroy()Core/Interface/)IService — marker interface
IAsyncInitializable — InitializeAsync(ct), IsInitialized
IResettable — Reset()
IDisposableService : IService — IDisposable
IAnalyticsService : IService — TrackLevelStart/Complete/Fail, TrackItemAcquired/Used,
TrackAchievementUnlocked, TrackPurchase, SetUserId, FlushAsync
Core/Extension/)R3Helper (static extensions):
SubscribeAndAddTo(source, onNext, disposables) — subscribe + auto-disposeWhereTrue() / WhereFalse() — bool filteringAsUnitObservable(), Log(tag), DelayFrames(count), ThrottleFrames(count)MessagePipeR3Helper:
subscriber.Subscribe(handler, disposables) — MessagePipe → CompositeDisposablesubscriber.AsObservable() — convert ISubscriber<T> to Observable<T>UnityR3Helper:
EveryUpdate(), EveryFixedUpdate(), EveryLateUpdate() — frame observablesTimerUnscaled(delay), IntervalUnscaled(period) — unscaled timeCore/Animation/)IViewAnimator — float Duration, AnimateAsync(CanvasGroup, ct)
IReversibleAnimator — adds AnimateReverseAsync(CanvasGroup, ct)
ViewAnimatorAsset (ScriptableObject base) — _duration = 0.3f
Built-in animators (all support unscaled time):
Core/Attributes/)DrawIfAttribute — conditionally show/hide inspector fields based on other field values
[DrawIf("_myBool", true)] or [DrawIf("_myEnum", MyEnum.Value, DisablingType.ReadOnly)]// 1. Define data struct
public struct PlayerData { public int Health; public int Score; }
// 2. Create Model
public sealed class PlayerModel : ModelBase<PlayerData>
{
public override string Id => "Player";
}
// 3. Create View
public sealed class PlayerView : ViewBase<PlayerData>
{
[SerializeField] private TMP_Text _healthText;
protected override void OnBind(PlayerData data) => _healthText.text = data.Health.ToString();
}
// 4. Create Controller
public sealed class PlayerController : ControllerBase<PlayerModel, PlayerView>
{
protected override void BindModelToView()
{
Model.DataChanged.Subscribe(data => View.Bind(data)).AddTo(Disposables);
}
}
// 5. Register in Installer
builder.RegisterMVC<PlayerModel, PlayerView, PlayerController>();
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.