tapo
CLAUDE.md870 starsChanged 6 days agoMITView on GitHub
When modifying Rust code that has Python bindings (tapo-py), always check if corresponding Python type stubs (.pyi files) need updating. The debug feature in tapo is user-facing public API — tapo-py enables it (features = ["python", "debug"]), so all debug-gated types are also exposed to Python. Treat changes behind cfg(feature = "debug") as public API changes requiring changelog entries for both Rust and Python. When a first fix attempt fails, step back and investigate the root cause before trying another…
In this repository9 other files it gives its agents.
- changelogSkill
- commitSkill
- merge-prSkill
- pre-commitSkill
- release-libsSkill
- release-mcpSkill
- release-openclaw-skillSkill
- update-maturinSkill
- verify-device-supportSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
serde_json::Value→ Python: Use crate::python::serde_object_to_py_dict. - Distinctive: line 25
When a first fix attempt fails, step back and investigate the root cause before trying another surface-level fix.
- Very specific: line 29
Always run /commit when committing.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Architecture
Workspace Members
tapo— Core Rust library (published to crates.io)tapo-py— Python bindings via PyO3/maturin (published to PyPI)tapo-mcp— MCP server exposing Tapo devices as AI tools/resources
Cross-Language Bindings
When modifying Rust code that has Python bindings (tapo-py), always check if corresponding Python type stubs (.pyi files) need updating. The debug feature in tapo is user-facing public API — tapo-py enables it (features = ["python", "debug"]), so all debug-gated types are also exposed to Python. Treat changes behind cfg(feature = "debug") as public API changes requiring changelog entries for both Rust and Python.
Exposing Rust Types to Python
- Simple value/result types: Annotate directly in the
tapocrate with#[cfg_attr(feature = "python", pyo3::prelude::pyclass(from_py_object, ...))]and#[cfg(feature = "python")] crate::impl_to_dict!(TypeName);. Do NOT create a redundant wrapper struct intapo-py. serde_json::Value→ Python: Usecrate::python::serde_object_to_py_dict. Do NOT write custom conversion functions — pyo3'sserdefeature does not auto-implementIntoPyObjectforValue.
Python Stub Conventions
Extclasses in.pyistubs (e.g.ToDictExt,DebugExt,OnOffExt) must usetyping.Protocolsince they describe capabilities of PyO3 classes without real Python-level inheritance.
Problem Solving
When a first fix attempt fails, step back and investigate the root cause before trying another surface-level fix. Explain the diagnosis before proposing the next approach.
Git Commits
Always run /commit when committing. It contains the project's commit conventions.
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.

