Skill: Package Organization
SkillFiles & storageRestructure, create, or reorganize Home Assistant packages following the homelab's packages/ directory layout (areas, functions, integrations, private, projects, routines, system, toys) and naming conventions. Use when restructuring existing packages, creating new package files, moving entities between packages, consolidating or splitting large package files, or adding new areas.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Skill: Package Organization skill
What this skill tells your AI
The instructions your AI receives, as published by apocrathia/home-assistant-config in .agents/skills/package-organize/SKILL.md and read by ahel’s review.
Purpose
Restructure, create, or reorganize Home Assistant packages following the homelab's established directory structure and naming conventions.
When to Use
- Restructuring existing packages
- Creating new package files
- Moving entities between packages
- Consolidating or splitting large package files
- Adding new areas or modifying the area registry
Package Directory Structure
packages/
├── areas/ # Room/location-specific configs
├── functions/ # Bundled functionality configs
├── integrations/ # Integration/device configs
├── private/ # Local-only packages (gitignored except README)
├── projects/ # Multi-device projects
├── routines/ # Time/event-based automations
├── system/ # HA system management
├── toys/ # Fun/non-essential automations
└── README.md # Package documentation
Steps
- Determine target package — Use nomenclature.md to select the right directory
- Check existing files — Read the target package file to see if the entity already exists
- Follow naming conventions — Use prefixes from nomenclature.md
- Maintain file structure — Keep consistent section headers and ordering
- New areas — Create via Home Assistant UI (Settings → Areas). Add
packages/areas/<area>.yamlfor location-specific config; keepnomenclature.mdarea list in sync - Validate — Run config-validate skill after changes
File Structure Convention
Each package file should follow this section order:
# <Area/Function> Configuration
# Last updated: YYYY-MM-DD
# ============================
# Lights
# ============================
light: ...
# ============================
# Sensors
# ============================
sensor: ...
# ============================
# Automations
# ============================
automation: ...
Consolidation Rules
- Areas: One file per location, max ~200 lines. Split if larger.
- Functions: One file per functionality, max ~150 lines. Split if larger.
- Integrations: One file per integration. Can grow large — split into sub-sections with headers.
- Routines: One file per routine type, max ~100 lines.
Cross-File Dependencies
When moving entities between packages:
- Check for references in other packages (grep for entity_id)
- Update automation
entity_idreferences - Update any
rest_commandortemplatereferences - If the area itself changed, update the HA area registry in the UI and
nomenclature.md
Output Format
Restructuring packages/integrations/core.yaml:
- Moved recorder config to top-level section
- Added section headers for clarity
- Consolidated duplicate light: definitions
Notes
- Never merge two files without checking for entity conflicts first
- Area definitions live in Home Assistant's area registry (UI /
.storage/core.area_registry) — assign devices to areas when adding them - New areas require: (1) create area in HA UI, (2) optional
packages/areas/<area>.yamlfor location-specific config, (3) update Area Names innomenclature.md
Signals
- GitHub stars
- 179
- Forks
- 32
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
package-organize- Source
- github.com/apocrathia/home-assistant-config