verify-device-support
Skill877 starsChanged 5 days agoMITView on GitHub
Verify that every statement of which devices are supported and what each handler can do is correct, complete, and in sync across SUPPORTED_DEVICES.md, the "Tested with" sentences, the ApiClient builders, the handler and device-info docs, the Python stubs, the examples, and tapo-mcp
In this repository10 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- changelogSkill
- commitSkill
- merge-prSkill
- pre-commitSkill
- release-libsSkill
- release-mcpSkill
- release-openclaw-skillSkill
- review-loopSkill
- update-maturinSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Every finding the script prints is a real mismatch unless Step 3 says the wording is deliberate.
- Distinctive: line 53
Every handler has a "Handler for the ..." paragraph that names its models with links:
- Very specific: line 93
Read these by hand every time, and when the script printed a note:.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verify Device Support
Device support is stated in many places and none of them is generated from the others. This skill checks that they all agree with the code, which is the source of truth:
DeviceType::from_modelintapo/src/api/discovery/device_type.rssays which model strings the library knows and which category each belongs toDiscoveryResult::newintapo/src/api/discovery/discovery_result.rssays which handler each category gets- the
modelmatch intapo/src/responses/child_device_list_hub_result/child_device_hub_result.rssays which hub child models are decoded, and so which child handler each gets - each handler's
pubmethods (explicit ones plus the onestapo_handler!,tapo_child_handler!andhub_child_handlers!generate) say what it can do, and#[cfg(feature = "debug")]says which of them need thedebugfeature
Run the whole skill whenever a device model is added or removed, a handler gains or loses a method, a method's debug gating changes, or on request. On its own, this skill reports and does not change anything. When /pre-commit invokes it, or the user asked for the findings to be fixed, fix every finding, rerun the script until it exits 0, and report what was changed. Never post anywhere.
Step 1: Run the mechanical checks
python -I .claude/skills/verify-device-support/scripts/device_inventory.pyThe script reads the sources above and compares them with every documentation surface listed in Step 2. It prints one line per mismatch, prefixed with the check that found it, and exits 1 when there are any. Lines prefixed note: are not findings. They point at wording that is a superset of what the code serves (a shared device-info type, the camera doc naming untested models, a model alias the device reports) and need a human decision, which Step 3 covers.
If the script crashes or reports that it cannot find a handler, a table column, or a mapping, the code moved in a way the script does not understand. Fix the script in the same change, then rerun it. Do not work around it by reading the files by hand only; the script is what keeps the next run honest.
Every finding the script prints is a real mismatch unless Step 3 says the wording is deliberate. Carry each one into the report.
Step 2: What the script covers, and what to read when it reports something
The "Tested with" sentence
One sentence, identical in all of these:
README.md(tapo/README.mdandtapo-py/README.mdare symlinks to it; the script checks that they still are)tapo/Cargo.tomldescriptiontapo/src/lib.rscrate doc (split over several//!lines)tapo-py/pyproject.tomldescriptiontapo-py/tapo-py/tapo/api_client.pyimodule docstring andApiClientclass docstring
The script checks that the sentences are identical after joining lines, and that the models it names are exactly the models DeviceType::from_model maps (top-level devices) plus the models ChildDeviceHubResult decodes (switches and sensors). A model the code accepts but the sentence omits, or the other way round, is a finding.
The ApiClient builders
- Rust:
pub async fn l510(...) -> Result<LightHandler, Error>and friends intapo/src/api/api_client.rs - Python binding: the same names in
tapo-py/src/api/api_client.rs, returning thePy*handler - Python stub: the same names in
api_client.pyi, returning the stub handler, with aReturns:line that names the models the handler serves
The script checks that the three lists match, that each builder returns the same handler on every surface, that every top-level model in "Tested with" has a builder (a builder serves its own model and the M variant: p110 serves P110 and P110M, p304 serves P304M; a builder whose name is not a model serves every one-letter variant: l430 serves L430C and L430P), and that each stub Returns: line names either every model of that handler or only the builder's own model.
Handler docs
Every handler has a "Handler for the ..." paragraph that names its models with links:
- Rust: the doc comment on the
tapo_handler!/tapo_child_handler!invocation, or on the struct forCameraHubHandler - Python stub: the class docstring in
tapo-py/tapo-py/tapo/<handler>.pyi - the
handler:field docs of everyDiscoveryResultvariant indiscovery_result.rs, and the matching class indiscovery_result.pyi - the
Returns:line of every child builder (ke100,s200, ...,plug) inhub_handler.pyi,camera_hub_handler.pyi, and the two power strip stubs
The script checks that each of these names exactly the models discovery maps to that handler. The DeviceType variant docs in device_type.rs and device_type.pyi are checked the same way.
Handler methods
For each handler, the script collects the Rust methods (explicit pub fns plus the macro-generated ones, with their debug gating) and the Python stub methods (the class's own defs plus those of its *Ext Protocol bases). It reports a method present on one side only. Python always has the debug feature on, so a debug-gated Rust method must still be in the stub.
Device info docs
Every "Device info of Tapo ..." doc, and the "... power strip child plugs" docs, in tapo/src/responses/{device_info_result,child_device_list_hub_result,child_device_list_power_strip_result}/ and the stub with the same name under tapo-py/tapo-py/tapo/responses/. The script checks that Rust and Python name the same models and that the handler returning the type is covered by them.
SUPPORTED_DEVICES.md
Each table column is a group of models. The script maps the group to its handler through discovery, then checks every cell:
✅when the method exists in Rust and in the Python stub✓when it exists in Rust only- blank when the handler does not have it
(d)on the row when, and only when, the Rust method is behind#[cfg(feature = "debug")]
A handler that discovery never returns, such as SetupHandler for a device that is not on the network yet, has a section of its own, which SETUP_HANDLER_TABLES in the script maps by title. Its table has device type columns and one row named after the handler, and a "SetupHandler provides ..." sentence lists the handler's methods, with (d) on the debug-gated ones. The script checks that sentence against the handler's Rust methods and Python stub, and does not map the device type columns to models. A handler or example that is not exposed to Python yet is listed in RUST_ONLY_HANDLERS / RUST_ONLY_EXAMPLES, and its cells are expected to be ✓.
It also checks that every method of the handler has a row, that the columns for one handler list every model discovery maps to it, and that the set of models across all tables equals the "Tested with" set. Child builders (ke100, plug, *_unchecked) are not rows.
Examples
tapo/examples/tapo_*.rs and tapo-py/examples/tapo_*.py must come in pairs with the same name, and their first line (/// P304M and P316M Example) must name the same models.
tapo-mcp
GetCapability::TriggerLogs and GetCapability::TemperatureHumidityRecords are granted per child type in tapo-mcp/src/requests/get_devices.rs. The script checks that the models named in the GetCapability docs in tapo-mcp/src/models.rs, in the Get Capabilities table of tapo-mcp/README.md, and in the get_device_state examples of tapo-mcp/openclaw-skill/SKILL.md match what the code grants.
Step 3: Judgement checks the script cannot make
Read these by hand every time, and when the script printed a note:.
- Wording and links. In every "Handler for" and "Device info of" paragraph the models should be comma separated with "and" before the last, each linked as
[MODEL](https://www.tapo.com/en/search/?q=MODEL)(TP-Link-branded models such as the P300 and P304M link totp-link.com). Rust and Python should read the same. Check that a model added in one place got the same link style as its neighbours. - Supersets the script only notes.
DeviceInfoPowerStripResultis shared by both power strip handlers, so its doc names all four power strips. Decide whether each note is still the intended wording and, if it is not, report it as a finding. A device-info doc that names a modelDeviceType::from_modeldoes not map is a finding, not a note to keep. - Model aliases.
DeviceType::from_modelaccepts strings the device reports that are not product names (L530 Series,L535B). They belong in the match, its unit test, and theALIASESset in the script, and nowhere in the docs. The script reports an alias that reached the "Tested with" sentence and treats any other string in the match as a product name, so a new alias that is not inALIASESshows up as an undocumented model. Report an alias that has leaked into a doc, and a doc model that has been added to the match as if it were an alias. - "Tested" means tested. A model goes into the "Tested with" sentence only when someone has run the current code against that device.
SUPPORTED_DEVICES.md, the handler docs and the changelog say what is supported, which is a weaker claim. If the change adds a model, ask where the test evidence is (an issue comment,docs/TESTERS.md, which is local-only, or the user's own device). Do not add a model to "Tested with" on the strength of the device sharing a handler. - Family words. The
INSTRUCTIONSconst intapo-mcp/src/server.rsand thedescription:intapo-mcp/openclaw-skill/SKILL.mdlist device families in words ("plugs, lights, light strips, power strips, hubs and their child devices, cameras"). A newDeviceTypecategory needs a word in both. The "Tested with" sentence groups models into families too; a new model must land in the right group (light bulbs, light strips, plugs, power strips, hubs, switches, sensors, cameras). - Table shape. A handler whose models no longer fit one header cell is split over several columns (the cameras). The columns must be adjacent, and the legend lines above each table must be the same three lines.
- Changelog. A new model or method needs a changelog entry on both the Rust and the Python side; run
/changelogfor that rather than editing by hand. Do not verify historical entries. - TROUBLESHOOTING.md. It names models only inside issue reports ("plugs (P100, P110, P115) upgraded to firmware 1.4.0"). Those are historical and are not device-support claims; leave them alone.
Step 4: Report
Present the findings as one table with these columns: surface, what it says, what the code says, severity. Order by severity:
- High: a surface claims support the code does not have, or omits a model or method the code has (a user relying on it would be misled)
- Medium: Rust and Python disagree with each other but both are plausible
- Low: link style, wording, or a
note:the user may want to keep
Then list the note: lines the user has to decide on, with your recommendation for each in one sentence. If the script reported nothing and the judgement checks found nothing, say so plainly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

