ha-home-keeper
Which test tier covers what, how to write a test that can fail, and the e2e and translation gates.
Install / Use
npx skills add prestomation/ha-home-keeperInstalls into whichever agent you are using.
Amazon Q Rules
Amazon Q Developer rules
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of ha-home-keeper
ha-home-keeper scores 60/100 on our quality scale, 4155th of 4,700 Development & Engineering skills we index.
Its Amazon Q Rules is 12 KB long, well organised into 10 sections and no code examples: a thorough specification that gives an agent plenty to work with.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- We could not determine when the repository was last updated.
- Our last check on 2026-11-12 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 68/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-16. Automated pattern scan on 2026-11-16. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ha-home-keeper compared with similar skills
All 4 of these similar skills score higher than ha-home-keeper; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ha-home-keeper (this skill)by prestomation | 60 | 0 | — | Amazon Q Rules |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install ha-home-keeper?
- Run
npx skills add prestomation/ha-home-keeper. The install tabs above show the steps for each supported agent. - Which AI agents does ha-home-keeper work with?
- It is written for Amazon Q, as a Amazon Q Rules file. Other agents that read the same format can often use it too.
- Is ha-home-keeper safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 68/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ha-home-keeper still maintained?
- We could not determine when the repository was last updated.
Skill content
View source on GitHubtitle: Testing rules summary: Which test tier covers what, how to write a test that can fail, and the e2e and translation gates.
Testing rules
Run the tests locally before you push. CI is not the test runner.
Tiers and how to run them
| Tier | Where | Run |
|---|---|---|
| Unit (pure core) | tests/unit | pytest tests/unit |
| Frontend | tests/frontend, frontend/test | bash ci/test-frontend.sh |
| Integration | tests/integration (Docker HA) | bash ci/test-python-integration.sh |
| Browser | tests/e2e (Playwright) | bash ci/e2e-up.sh |
| Upgrade | tests/upgrade | stage fixtures with bash ci/fetch-glues.sh first |
| Noise budget | tests/noise (Docker HA) | bash ci/test-noise.sh |
- The pure unit lane needs only
pip install pytest PyYAML Babel hypothesis jsonschema python-dateutil. The full unit suite addspytest-homeassistant-custom-component.ci/setup-ci-deps.shinstalls everything into.venv. The SessionStart hook puts.venv/binfirst onPATH. Elsewhere, runsource .venv/bin/activatefirst. tests/conftest.pyruns each pure module under its real dotted name (custom_components.home_keeper.<mod>) with stub parent packages, and registershk.<mod>andhk_<mod>as aliases. Keep the real name: mutmut matches a mutant key to__module__. Keephka distinct package, not an alias of the real one, orfrom . import xin a module loaded ashk.<mod>pulls in the real HA siblings.- After a local Docker run, restore
tests/integration/ha_config/.storage/home_keeperandcore.config_entries. Never commit state that a run changed.
Dependencies
- A missing test dependency fails the run. It never skips. Import every package in
requirements-test.txtplainly, so a broken environment does not look like a choice. Usepytest.importorskiponly forhomeassistantandvoluptuous. - A dependency that changes what other tests skip stays out of
requirements-test.txt.voluptuous-openapipulls involuptuous, which decides whethertest_config_flow.pyruns.ci/install-schema-deps.shinstalls it andjsonschemain the one job that needs them, under Home Assistant's constraints. - The published-schema gate runs only where
HK_SCHEMA_GATEis set, which is the mypy job inlint.yml. It needs a current Home Assistant, not only an importable one. The job checks the HA version and greps the output to prove that the tests ran. Run it locally withHK_SCHEMA_GATE=1 pytest tests/unit/test_generate_schema.pyafterpip install homeassistant voluptuous-openapi jsonschemaon a Python at HA's floor. - Give an opt-in gate a sibling in the lane that every PR runs
(
test_no_exported_value_is_nullfor the schema gate). - Never subtract the
EXCLUDED_*keys from the published schema. They name what export omits, and import still accepts some of them. KeepadditionalPropertiesopen.
Property-based tests
- Write a property test when the claim is about a whole domain ("the fast path always agrees with the slow one"). Write an ordinary test for a single case.
- They live in
tests/unit/test_*_properties.py, sharetests/unit/property_strategies.py, and carry thepropertymarker. - Build inputs with
models.build_taskorassets.build_asset. Never hand-roll a dict. - A property holds for every input it can draw, or its generator is scoped until it
does. Pin a real defect with
xfail(strict=True)and an@examplereproducer. Never widen an assertion to swallow a failure. HK_HYPOTHESIS_PROFILEpicksdev(default),ci(derandomized) ormutmut(no shrink). The runner scripts export it. Never cache.hypothesis/in CI.- The mutation gate scores property tests. Each one names the mutant it kills; prove it by mutating the line and watching the test go red.
Writing a test that can fail
- Test the shipped function, never a copy. To unit-test a module that imports HA,
stub the HA symbols, register fakes for its HA siblings, load the real file as
hk.<mod>, and patch its bindings.test_calendar.pyandtest_device_heal.pyshow it. - Check that a new test can fail. Mutate the line and watch it go red. A fake that can only produce the passing case reports coverage that the code does not have.
- A known-broken contract gets
xfail(strict=True), never a weaker assertion. - A framework contract needs an integration test. Device registry, entity registry and device automation behavior is invisible to a unit test that mocks the framework.
- Cross-version behavior needs an upgrade test.
tests/upgradeboots a frozen pre-split HA, seeds it, then boots the current HA on the same config dir. Never bump the frozen pin: it defines what users upgrade from. A PR that changes the split repair (devices.py,store.py) runs the upgrade suite before it merges. - A panel assertion does not cover a native entity. The panel and the
todoandcalendarentities are separate views of the store. Assert on the surface that must change. - Assert disappearance too. Test a transition from both ends: present before, gone
after (
expectAbsentFromActiveSurfaces,expectOnTodoListintests/e2e/tests/helpers.ts). - A second delivery path needs a test that removes the first one.
tests/e2e/tests/card-registration.spec.tsstrips the card import from the shell and asserts that the card still renders. It blocks service workers and asserts that the unstripped shell had the import, so it cannot pass for the wrong reason. - Never commit a real
.storagedump. Build fixtures from synthetic data, and use each fixture in a test.
Browser tests
- Auth and onboarding are in
tests/e2e/global-setup.ts. It also writesPRESET_NUDGE_SEENtohome_keeper_preset_nudge, so no spec meets the preset dialog. A step that shows the suggestions clears the key and writes it back after (tests/e2e/user-data.ts). - A spec owns what it creates. The container's task store is the committed seed
fixture. Delete created ids in
afterEach(createTask,deleteTaskinhelpers.ts) and give fixtures stable names, never aDate.now()suffix. - Seeded ids are real
uuid4s, reached throughtests/e2e/fixture-ids.ts. Never paste a bare uuid into a spec. Renaming a fixture id also moves its blobs underha_config/home_keeper/documents/and the.gitignoreentry that names them. - Assert an
ha-selectpick by its effect, and wrap the open, the click and the check in 1expect(...).toPass()(pickUntilinwalkthrough.capture.ts). - Verify a spec that touches browser plumbing with the CI browser. CI runs Playwright's
headless shell, and
CHROMIUM_EXECis an older full Chromium. Run it again withCHROMIUM_EXECunset:cd tests/e2e && CI=true npx playwright test <spec>. - A spec that rewrites a document with
route.fulfillpasses--disable-features=LocalNetworkAccessChecksin its owntest.use({ launchOptions }), never inplaywright.config.ts.launchOptionsreplaces the config's copy, so the spec setsCHROMIUM_EXECitself. - Bring the container down before you clean the fixture. Reset with
git clean -fdX tests/integration/ha_config/before each capture, and checkgit status tests/integration/after. The clean deletes the bind mountpoint, and a running container then serves a 404 for the panel bundle.
Three widths
- The suite has 3 Playwright projects:
desktop(1280x720),tablet(820x1180) andphone(390x844).tests/e2e/viewports.tsis the only place that writes a width. - A spec opts in with a tag that starts with
@:@responsive(all 3),@narrow(phone and tablet),@phoneor@tablet. Untagged runs on desktop only. The@matters, because Playwright also matchesgrepagainst the project name. - A test that crosses a breakpoint stays untagged and resizes itself.
- Never name a tab bar in a spec. Use
gotoTab(),expectTabActive()andopenSettingsSection(), because CSS picks which bar shows. - A viewport project sets the viewport only, never a device descriptor.
- A phone folds the task list's filter controls. A spec or a capture that uses a scope
pill, Profile, Group by, Layout or Print labels on the Tasks tab calls
openListFilters(panel)first. - A capture config pins the desktop project with
captureConfig()fromtests/e2e/capture-config.ts.--listmust show 1 project. - Measure layout by relations (A is above B), never by coordinates. Assert that a list is not empty before you loop over it.
Noise budget
tests/noise counts what each action writes: logbook rows, flips to and from
unavailable, home_keeper_* events, store writes and entry reloads. It compares the
counts with tests/noise/baseline.json. Issue #467 is why: a restart rename loop and a
reload on each options change filled the logbook, and no test saw it.
ci/test-noise.shruns it on its own Home Assistant, on a temporary copy of the fixture with the test-onlyhk_noise_probeintegration added. The scenarios share state and run in file order. TheNoise budgetjob inintegration.ymlruns it on each PR.- A budget is a maximum. Some counters are
pinnedat 0 (a restart, an idle tick, a no-op call). A pinned counter changes only by hand, with a reason in the PR. - Change a budget on purpose.
HK_NOISE_UPDATE=1 bash ci/test-noise.shwrites the measured numbers, except pinned counters and known bugs. Commit the diff and say why in the PR body. - A known bug is a
knownentry with the bug id, atargetand anowper counter. It is a strict xfail for each counter, andnowis exact: only a count equal tonowis an expected failure. Abovenowfails. At or belowtargetfails, so the PR that fixes the bug deletes the entry and sets the budget. - A part fix lowers
nowin the same PR. A count betweentargetandnowfails too. Ifnowstays high, a later regression up to the old value is not seen. - A new reload trigger, sync or listener gets a scenario in
tests/noise/test_noise_budget.pyin the same PR. - State the loop guard. Code that listens to a state, a registry or a bus event and writes the store, an entity or another integration says in a comment what stops its own write from coming back as an input (compare before write, an origin marker, a debounce, a fixed point). Name the guard in the PR body too.
Blocking calls and the log gate
Home Assistant logs Detected blocking call for a file read on the event loop (#247).
blockbusterin the unit tests. An autouse fixture intests/unit/conftest.pyraisesBlockingErrorwhen a blocking call runs on a running loop. It does nothing on a bare install. A fakeasync_add_executor_jobusesrun_in_executor, never inline.- Python dev mode in the Docker lanes.
docker-compose.ymlsetsPYTHONDEVMODEandPYTHONASYNCIODEBUGfromHK_DEVMODE. Only the integration and noise lanes set it. - The log gate. Those 2 lanes save
ha.logand runpython ci/check_ha_log.py --domain home_keeper --lane <lane> ha.loglast, also after a failed test. It fails on a warning or error from the integration's logger, on a blocking call that names it, and on a bad pattern (unawaited coroutine, unclosed resource, deprecation, a slow callback of 0.5 s or more, set by--slow-callback-min: shorter ones are chance on a shared runner, so never allowlist a timing line).test_surfaces.pyintests/integrationcalls diagnostics, options and services. - Allowlist an expected warning in
ci/ha_log_allowlist.txt: a reason comment, then a narrow regex (logger name and full message), for a warning that a test provokes on purpose. Fix a real finding. An entry that hid nothing in a run of its lane (defaultintegration;# lane: noisesets another) is stale and fails the gate.
Translations
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
