원클릭으로
agentic-patterns
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to smart home automation and IoT orchestration
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to smart home automation and IoT orchestration
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Select and coordinate multi-agent teams (topology kits, role-based squads, lifecycle, worktree isolation). Use this skill whenever launching parallel agents, designing a review board, running a debug council, scheduling an orchestrator-workers team, configuring agent tool restrictions, or deciding between solo and team execution. Triggers on: "launch a team", "parallel agents", "review board", "debug council", "architect-implementer-reviewer", "swarm", "multi-agent", "subagents for X", "team topology", "agent lifecycle".
Select and wire an agentic design pattern (reflection, prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, ReAct, blackboard) into the 5-layer Claude Code stack. Use this skill whenever deciding how to structure a multi-step task, whether to spawn subagents, how to run parallel review, or when to use which pattern. Triggers on: "which pattern", "orchestrate", "parallel review", "self-review", "chain of thought", "eval-optimizer loop", "blackboard", "ReAct", "how to decompose this task".
Auto mode permission handling — classifier-based approvals, PermissionDenied hook, defer permissionDecision, and autonomy profiles for hands-off Claude Code usage
Configure Claude Code's autonomous operating mode — profile selection (conservative, balanced, aggressive, unattended-review), permission blocks, and the three gate agents (planner, verifier, reviewer). Use this skill whenever enabling autonomous mode, switching profiles, tightening permissions for production branches, or setting up unattended execution. Triggers on: "autonomy", "unattended mode", "auto-approve", "permission mode", "autonomy profile", "gates", "/cc-autonomy", "planner verifier reviewer", "let claude run on its own".
Manage Claude Code's context window — token arithmetic, /compact strategy, anchor preservation, progressive loading, session analytics. Use this skill whenever a session gets long, context approaches limits, after /compact, when deciding what to load into CLAUDE.md vs leave in references, or when analyzing session cost/token usage. Triggers on: "context full", "compact", "too many tokens", "budget", "session analytics", "save tokens", "context window", "/compact strategy".
Evidence-driven deep analysis for hard coding problems — architecture decisions, root-cause investigation, high-stakes refactor planning, performance bottleneck isolation. Use this skill whenever the user asks for "the best approach", a "deep analysis", "root cause", "principal engineer review", or runs /cc-intel. Also triggers on hard debugging questions, major architectural choices, tricky performance problems, or any task where a hypothesis tree and evidence table matter more than a fast answer.
| name | agentic-patterns |
| description | Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to smart home automation and IoT orchestration |
Patterns from "Agentic Design Patterns" (Gulli & Sauco, 2025) applied to smart home automation and IoT orchestration
Relevance: Home Assistant exposes a rich REST/WebSocket API surface — lights, thermostats, media players, locks, cameras, and hundreds of integrations all require precise tool invocations.
Current Implementation: Commands like ha-control, ha-sensor, and ha-mcp already issue direct API calls to HA's /api/services, /api/states, and /api/events endpoints.
Enhancement: Formalise a tool registry that maps device domains (light, climate, cover, alarm_control_panel) to their allowed service calls with typed parameters. Agents should select tools from this registry rather than constructing raw API paths, enabling safe service discovery and preventing invalid call combinations.
Relevance: Automation triggers arrive from many sources — time schedules, state changes, Zigbee events, webhook callbacks, and voice commands — each requiring a different response pipeline.
Current Implementation: ha-automation creates automations with trigger/condition/action blocks. Routing logic lives inside individual YAML automations.
Enhancement: Implement a trigger-routing agent that classifies incoming events by domain (presence, energy, security, comfort, maintenance) and dispatches them to the correct specialist sub-agent or automation group. Add confidence scoring so ambiguous triggers fall through to a human-review queue.
Relevance: Smart home configuration is inherently multi-step: discover devices → group by room/domain → create automations → set schedules → validate dependencies → deploy.
Current Implementation: ha-deploy handles deployment sequencing. Individual commands handle discrete configuration tasks.
Enhancement: Add a planning agent that generates a full configuration plan before any changes are applied. The plan should enumerate all entities affected, order steps by dependency (e.g., helpers must exist before automations that reference them), and produce a diff preview. Use a scratchpad for intermediate reasoning before committing the plan.
Relevance: IoT devices fail silently — sensors go unavailable, integrations time out, firmware updates break entity IDs. Unhandled exceptions cascade into broken automations. Current Implementation: Basic error reporting exists in deployment commands. Device unavailability is not systematically handled. Enhancement: Wrap all device API calls in a structured exception handler with three tiers: (1) transient — retry with exponential back-off; (2) recoverable — switch to fallback device or mode; (3) fatal — notify owner and disable dependent automations gracefully. Log all exceptions with entity_id, service, and timestamp for post-mortem analysis.
Relevance: Device state is inherently temporal. Automations need awareness of recent history (was the front door opened in the last 10 minutes?) not just current state. Current Implementation: HA's own recorder integration persists history. Agent context does not leverage this history beyond the current request. Enhancement: Implement a state-memory layer that maintains a rolling window of significant state transitions per entity, occupancy patterns by time-of-day, and anomaly baselines. Agents query this memory before making decisions — e.g., "lights usually on at 18:00 → investigate why they are off today."
Relevance: Home automation mistakes can be dangerous: unlocking doors at the wrong time, disabling smoke alarm bypass, overriding HVAC safety limits. Current Implementation: No programmatic safety constraints exist beyond what individual automations enforce. Enhancement: Define a guardrail policy layer that intercepts all service calls before execution. Policies include: never unlock exterior doors without presence confirmation, never disable security entities between 22:00–06:00, cap climate setpoints at configurable safety bounds, require dual confirmation for alarm-related services. Guardrails run as a pre-execution hook and can block or escalate calls.
Relevance: Some home control actions — firmware updates, security mode changes, guest access grants — warrant explicit human approval before execution.
Current Implementation: ha-deploy includes a dry-run preview, but there is no interactive approval gate.
Enhancement: Add a HITL checkpoint for high-impact actions. The agent pauses, renders a human-readable action summary (affected entities, expected outcome, rollback plan), and waits for explicit approval via HA's persistent_notification integration or a companion app notification before proceeding.
Relevance: Many home automation tasks are independent: turning off all lights in different rooms, polling sensors across areas, or running diagnostics on multiple integrations simultaneously.
Current Implementation: Commands execute sequentially. ha-control can issue a single service call at a time.
Enhancement: Introduce a parallel execution engine that groups non-conflicting service calls by domain and fires them concurrently using HA's /api/services batch endpoint or simultaneous async calls. Include a merge step that collects results and surfaces any per-device failures without blocking the overall action.
Relevance: Optimal home automation rules are highly personal and shift with seasons, household routines, and lifestyle changes. Static rules degrade in quality over time. Current Implementation: Automations are static YAML once deployed. No feedback loop exists. Enhancement: Implement a learning loop that tracks manual overrides (user manually turns off what an automation turned on) as negative signals and automation outcomes (comfort sensor satisfied after climate adjustment) as positive signals. Periodically surface suggested automation adjustments for human review. Over time, time-based triggers self-calibrate to observed occupancy patterns.
User Request / External Event
│
▼
[ROUTING] ──── classify trigger by domain
│
├─ Security domain ──► [GUARDRAILS] ──► [HITL] ──► Tool Use
│
├─ Comfort / Energy ──► [PLANNING] ──► [PARALLELIZATION] ──► Tool Use
│ │
│ [MEMORY] ◄─── state history queries
│
└─ Maintenance ──► [EXCEPTION HANDLING] ──► retry / escalate
│
└─ patterns captured ──► [LEARNING] ──► automation refinement
Key interactions: