tippinggame/f8framework/f8-features-ui-workflow

Claude Code and agent skill by tippinggame/f8framework

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when creating, modifying, opening, closing, animating, binding, loading, debugging, or validating F8Framework UI views and items, including UIManager layers, BaseView/BaseItem templates, ComponentBind generation, canvas setup, Notify/Dialog behavior, and UI resource cleanup.

Install

npx vskill@latest install tippinggame/f8framework/f8-features-ui-workflow

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as tippinggame/f8framework/f8-features-ui-workflow.

F8 UI Feature Workflow

Mission and operating rules

Use this skill as the runtime source of truth for the F8Framework UI feature flow. Make the workflow executable by another agent: identify the correct source files, preserve generator-owned code, implement the smallest change, and verify the complete open/close path.

When receiving a UI task, follow this order:

  1. Classify the request as runtime behavior, editor authoring, generated code, or a combination.
  2. Read the relevant source files listed below before editing. Treat current source as authoritative over README examples.
  3. Check the bootstrap gate and the asset key before diagnosing a UI symptom.
  4. Decide the layer and lifecycle (BaseView or BaseItem) before writing code.
  5. Keep generated regions intact and regenerate them from the editor when the prefab hierarchy changes.
  6. Validate both the first activation and a cached re-open; test destruction separately when isDestroy is involved.
  7. Report the UIID, asset key, layer, lifecycle hooks, binding mode, cleanup behavior, tests run, and remaining risks.

Do not silently invent a new UI manager, layer, prefab-loading path, or binding convention. If the requested behavior conflicts with the implementation, show the conflict and route the change to the owning source file.

Scope, paths, and routing

Prefer Assets/F8Framework. If the project is package-based, apply the same relative paths below under Packages/F8Framework.

AreaSource of truth
UI manager and public APIAssets/F8Framework/Runtime/UI/UIManager.cs
View lifecycle and tracked resourcesAssets/F8Framework/Runtime/UI/Base/BaseView.cs
Item lifecycle and tracked resourcesAssets/F8Framework/Runtime/UI/Base/BaseItem.cs
Async handleAssets/F8Framework/Runtime/UI/Base/UILoader.cs
Callback/state recordsAssets/F8Framework/Runtime/UI/ViewParams.cs and DelegateComponent.cs
Layer behaviorAssets/F8Framework/Runtime/UI/Layer/
Binding generatorAssets/F8Framework/Runtime/ComponentBind/ComponentBind.cs
Binding name mapAssets/F8Framework/Runtime/ComponentBind/DefaultCodeBindNameTypeConfig.cs
Binding inspectorAssets/F8Framework/Editor/ComponentBind/ComponentBindEditor.cs
Script templates and creation menuAssets/F8Framework/Editor/UI/BaseViewTemplate.cs.txt, BaseItemTemplate.cs.txt, CreateUIScript.cs
UI editor utilitiesAssets/F8Framework/Editor/UI/
Usage examplesAssets/F8Framework/Tests/UI/README.md, README_EN.md, and DemoUIManager.cs

Route related work as follows:

  • Bootstrap or module-order questions: f8-foundation-bootstrap-workflow.
  • Prefab/resource keys, Resources/AssetBundle mode, or unloading details: f8-features-assetmanager-workflow.
  • Open/close tweens and sequences: f8-features-tween-workflow.
  • Event ownership and global messages: f8-features-event-workflow.
  • Component naming or Inspector generation: f8-editor-componentbind-workflow.
  • Template creation, atlas/slicing, image tools, and UI editor menus: f8-editor-ui-workflow.
  • Localization components or the Chinese-text collector: f8-features-localization-workflow.

Bootstrap gate

Do not debug FF8.UI before confirming that F8 has been initialized. The minimum valid order is:

csharp
IEnumerator Start()
{
ModuleCenter.Initialize(this); // required first
FF8.Asset = ModuleCenter.CreateModule<AssetManager>();
// The standard launcher loads AssetBundleManifest here when AB mode is used.
FF8.Tween = ModuleCenter.CreateModule<Tween>(); // required before UI tween code
FF8.UI = ModuleCenter.CreateModule<UIManager>();
FF8.UI.Initialize(configs); // creates the six UI layers
}

The project launcher creates the other dependency modules and awaits AssetBundleManager.Instance.LoadAssetBundleManifest() after AssetManager and before later modules. Preserve that order; use the bootstrap skill for the complete launcher sequence. MessageManager, TimerManager, InputManager, and Tween must exist before code that uses their APIs.

ModuleCenter.CreateModule<UIManager>() invokes UIManager.OnInit. If no EventSystem.current exists, OnInit creates an EventSystem and the input module selected by the Unity compile symbols. Still verify that the scene has the expected input setup.

UIManager.Initialize(...) builds LayerGame, LayerUI, LayerPopUp, LayerDialog, LayerNotify, and LayerGuide. Call it once after creating a manager and before any Open call. If the manager is terminated and recreated, initialize the new instance again; do not repeatedly initialize the same live manager just to change one config, because initialization creates new layer objects.

Press F8 before relying on AssetBundle indexes or generated config data. In development, follow the AssetManager skill when IsEditorMode is required.

Configuration and layer selection

UIConfig contains only a LayerType and an AssetManager AssetName. The key can be an enum or an int; enum overloads are converted to int internally.

csharp
public enum UIID
{
Main = 1,
Notify = 2,
}
private readonly Dictionary<UIID, UIConfig> configs = new Dictionary<UIID, UIConfig>
{
{ UIID.Main, new UIConfig(LayerType.UI, "Main") },
{ UIID.Notify, new UIConfig(LayerType.Notify, "Notify") },
};

Use the exact asset key recognized by AssetManager. Do not add a .prefab suffix or a new path convention unless that key is how the project indexes the asset.

LayerDefault sort orderSelect it forImportant behavior
Game100Game-world or game HUD bucketStandard LayerUI behavior.
UI200Normal screens, menus, HUD panelsOne active/loading view per prefab path.
PopUp300A separate standard popup bucketNo special queue logic in the current implementation.
Dialog400Modal dialogs that must serializeOne queue per uiId; only the oldest is shown.
Notify500Toasts/notifications that may coexistMultiple instances are allowed; close by Guid for one instance.
Guide600Tutorial/guide bucketStandard LayerUI behavior.

For normal layers, opening an already active or loading prefab is a duplicate: synchronous Open usually returns string.Empty, while asynchronous OpenAsync returns the existing loader. isDestroy = false hides and caches the instance; isDestroy = true destroys it and releases the prefab load. A cached instance is not active, so Has only reports currently active views.

Normal-layer uniqueness is keyed by UIConfig.AssetName (the prefab path), not only by uiId. Do not register the same prefab under multiple normal-layer IDs unless sharing one instance is intentional. A direct Close while a view is still pending its first async load is ignored by the current layer implementation; Clear(...) is the API that cancels pending loads. A view in Closing state is also treated as a duplicate, so wait for the close tween/removal to finish before reopening the same prefab.

Dialog requests with the same uiId are queued. The oldest request is displayed; after it closes, the next request is shown after one frame. Do not implement a second queue in the view script. For a queued asynchronous request, wait for its own UILoader and then verify that its view is actually active.

For a queued synchronous Dialog request, the returned guid identifies the currently shown or cached view rather than a newly instantiated queued object. Use the callbacks or an async loader when the caller must track an individual queued request.

Notify can show the same prefab more than once. Each active instance has a unique Guid; call FF8.UI.Close(uiId, isDestroy, guid) or BaseView.Close(...) when closing one notification. Omitting the guid closes instances for that prefab according to the layer implementation.

End-to-end workflow for a new view

Execute these steps in order and stop to fix the first failed gate:

  1. Prepare a prefab under a loadable location (AssetBundles for the normal production path or Resources for prototyping). Confirm its AssetManager key and press F8 when indexes are stale.
  2. Select the project folder in Unity and use Assets/(F8UI界面管理功能)/(BaseView.cs) to create a view script, or (BaseItem.cs) for a reusable list/card item. Attach the generated script to the prefab root (not to a nested visual child).
  3. Keep the generated class name, namespace, and file name compilable. A BaseView root represents one UIManager-managed prefab; a BaseItem root represents a reusable child item.
  4. Add a stable UIID and a matching UIConfig. Choose the layer from the table above; keep the asset key identical to the prefab key used by AssetManager.
  5. Build the hierarchy and name bindable children using the ComponentBind contract below. Put a BaseItem subtree behind its own binding boundary.
  6. On the root component, click the convention or all-components binding button. The Inspector labels are 按照约定名称UI组件绑定(需要点击两次) and 搜索全部UI组件绑定(需要点击两次); click again if Unity has not refreshed the generated script.
  7. Wait for compilation and inspect the generated fields, listener override, and SetComponents assignments. If a field is null, fix the hierarchy/name and regenerate; do not hand-patch the generated block.
  8. Initialize UI once, then configure Canvas and CanvasScaler if the defaults are not suitable. Configure them before opening views.
  9. Use Open for an immediate synchronous path or OpenAsync when loading may take time. Pass view data through object[] and use callbacks only for external orchestration.
  10. Implement lifecycle logic in the appropriate hook. Test first activation, close, cached reopen, and destroy/recreate before calling the feature complete.

For a change to an existing view, first identify whether the change belongs in the prefab, the hand-written region of the view script, the template, or ComponentBind.cs. Regenerate after hierarchy changes and keep the generated region reproducible.

AI code-generation protocol

Use this protocol whenever an AI agent is asked to create or extend a UI script. Separate authored behavior from Unity-generated bindings:

ResponsibilityOwnerRequired action
Script skeleton and lifecycle hooksUnity template + AICreate from the BaseView/BaseItem template when possible; then fill only the hand-written hooks.
Prefab hierarchy and component placementUnity Editor/userCreate or inspect the prefab and attach the root script. Do not fabricate hierarchy facts from a screenshot-free prompt.
Serialized component fields, paths, arrays, and control listenersComponentBindName the objects, click the binding button, and let the generator write the delimited region.
UI behavior and data flowAIImplement OnAdded, Refresh, ButtonClick, ValueChange, tween hooks, callbacks, and cleanup outside the generated region.
Compile and prefab-reference verificationUnity EditorRefresh/compile, inspect the generated fields, and run the first-open/reopen test.

Follow these AI steps:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
870
Repository forks
139
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/tippinggame/f8framework/f8-features-ui-workflow/badge)](https://verified-skill.com/skills/tippinggame/f8framework/f8-features-ui-workflow)

Something wrong with this skill or its page? Tell us.