Borrowing it
Nothing to install: this file belongs to SeloraHomes/ha-selora-ai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SeloraHomes/ha-selora-ai/main/CLAUDE.mdgit clone --depth 1 https://github.com/SeloraHomes/ha-selora-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/selorahomes/ha-selora-ai/claude-md)<a href="https://agentmods.dev/instructions/selorahomes/ha-selora-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/selorahomes/ha-selora-ai/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/selorahomes/ha-selora-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/selorahomes/ha-selora-ai/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.32124 | $0.32124 |
| Opus 5 | $0.16062 | $0.16062 |
| Sonnet 5 | $0.06425 | $0.06425 |
| Haiku 4.5 | $0.03212 | $0.03212 |
Grade A, and why
ha-selora-ai CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 1,758 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Selora AI — Home Assistant Integration
This file is read by AI coding assistants (Claude Code, Zencoder, Copilot, etc.) to maintain consistency across developers and models. Keep it up to date.
What This Is
A custom Home Assistant integration (custom_components/selora_ai/) that acts as a "smart butler":
- Analyzes device states and usage patterns via LLM — Selora AI (Selora Cloud, or the on-device Selora AI Local model), Anthropic Claude, Google Gemini, OpenAI, OpenRouter, or local Ollama
- Auto-generates HA automations (disabled, prefixed
[Selora AI]for user review) - Accepts natural language commands via the Selora panel and Home Assistant Assist
- Discovers and onboards network devices during initial setup
Architecture
HA entity registry / state machine / recorder (SQLite)
|
v
DataCollector ──snapshot──> LLMClient (Selora Cloud / Selora Local / Anthropic / Gemini / OpenAI / OpenRouter / Ollama)
| |
| suggestions
v v
logging + sensors automations.yaml (disabled) + reload
Project Structure
custom_components/selora_ai/
├── __init__.py # Integration setup/teardown, entry routing
├── config_flow.py # UI config flow (LLM setup → device discovery → area assignment → results)
├── collector.py # Hourly data collection + LLM automation writer
├── llm_client/ # LLM facade package (client, prompts, parsers, intent, command_policy, lang_detect, state_filter, usage)
├── providers/ # Pluggable LLM backends (Selora Cloud/Local, Anthropic, Gemini, OpenAI, OpenRouter, Ollama)
├── device_manager.py # Device discovery, pairing, area assignment, dashboard generation
├── conversation.py # Assist Conversation Agent — routes natural language to HA service calls
├── automation_utils.py # Validation, risk assessment, YAML I/O, async automation CRUD
├── automation_normalize.py # Pure payload reshaping: field coercion, null-dropping, window merging
├── automation_store.py # Lifecycle + versioning for [Selora AI] automations
├── group_manager.py # HA group-helper CRUD (drives HA's own `group` config flow)
├── dashboard_manager.py # Lovelace view/card read + edit (chat tool surface)
├── registry_manager.py # Area/floor/entity/device registry reads + writes, helper inventory
├── script_manager.py # scripts.yaml CRUD (mapping, not a list — unlike automations)
├── label_manager.py # Label registry + delta assignment across entities/devices/areas
├── diagnostics_tools.py # Read-only: system_log errors, automation run traces
├── code_stamp.py # Source-signature skew detection (restart-required handshake)
├── scene_store.py # Scene creation + persistence
├── websocket/ # Panel websocket handlers, one module per domain (registered lazily)
├── button.py # Hub action buttons (Discover, Scan, Cleanup, Reset)
├── sensor.py # Hub sensors (Status, Devices, Discovery, Last Activity)
├── selora_auth.py # Multi-auth orchestration (HA token, MCP token, Selora JWT)
├── mcp_token_store.py # Local MCP API token store (CRUD, hash-only storage)
├── telemetry.py # Anonymous, opt-in repair-counter telemetry (PostHog)
├── types.py # Shared TypedDict definitions (automations, patterns, suggestions, etc.)
├── const.py # Constants, config keys, known integrations database
├── manifest.json # HA integration manifest
├── strings.json # UI strings for config flow
├── translations/ # HA-side translations (en, fr, de, es, it, nl, hu, pt, ru, ja, ko, zh-Hans, zh-Hant) — all keys must match strings.json
├── brand/ # Logo and icon assets
└── frontend/
└── src/
├── panel.js # LitElement host (properties, lifecycle, render dispatch)
└── panel/
├── render-automations.js # Automation list, cards, flowchart, unavailable modal
├── render-chat.js # Chat messages, YAML editor, new-automation dialog
├── render-settings.js # Settings tab
├── render-telemetry-consent.js # One-time telemetry opt-in banner
├── render-stale-code-notice.js # Restart/reload-required banner
├── version-actions.js # Code-skew handshake (unknown command ⇒ restart)
├── render-suggestions.js # Suggestion cards
├── render-version-history.js # Version history drawer + diff viewer
├── stale-automations.js # Stale detection helpers + stale modal/detail
├── automation-crud.js # CRUD websocket calls
├── automation-management.js # Bulk edit, enable/disable, filter
├── session-actions.js # Session list actions
├── suggestion-actions.js # Accept/dismiss/snooze suggestion actions
├── chat-actions.js # Send message, streaming
└── styles/ # CSS-in-JS style modules
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · +40 lines · +719 tokens per session dd421c4095bb
- 11d ago First seen · 1,718 lines · 31,405 tokens per session scan A 87faafd337f2
ha-selora-ai CLAUDE.md is an instructions file published in the GitHub repository SeloraHomes/ha-selora-ai (84 stars, last pushed 2d ago), licensed MIT. It adds 32,124 tokens to every session, about $0.1606 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.