prefab-workflowlisted
Install: claude install-skill TheArcForge/hades-plugin
# Prefab Workflow
Procedural guide for creating, editing, and managing Unity prefabs. Covers `PrefabUtility` API for programmatic prefab creation, prefab mode vs in-scene editing, variant strategies, and how to use Hades graph queries to discover existing prefabs before authoring new ones.
## When to Apply
Activate when the task involves:
- Creating a new prefab asset from a scene object or from scratch
- Deciding whether to create a new prefab vs a prefab variant vs modify an existing one
- Editing a prefab's structure, components, or serialised values
- Applying or reverting prefab instance overrides
- Nesting prefabs inside other prefabs
- Writing an editor script to batch-create or batch-configure prefab assets
Do NOT activate for deciding the overall prefab architecture (depth, variant strategy, data vs behaviour) — use `hades:unity-architect` and `hades:prefab-architecture` for that, then return here to execute.
## Project Context Check
Before creating or modifying any prefab:
1. **Discover existing prefabs:**
- Call `graph_query(edgeKind: "references", edgeTargetPath: "<path/to/Component.cs>")` to check whether a prefab with the required component already exists — avoid duplicating assets (get the script's path from `search_by_name` first if you only have the class name)
- Call `search_by_name("*.prefab")` for a full prefab inventory; narrow with `search_by_name("Enemy*.prefab")` or similar patterns when scope is known
- Call `recall_memory("prefab work