Agent skill
add-device
Add a new implementation of the primary protocol/interface (Alex Rivera's workflow)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/add-device
SKILL.md
Add a new implementation of the primary protocol/interface: $ARGUMENTS
Follow Alex Rivera's hardware integration standards:
-
Study the protocol: Read the primary protocol/interface definition in the core layer (see Key Abstractions and Protocol Methods in project config)
-
Implement the class in the core layer file:
- MUST satisfy the primary protocol/interface
- Follow the future annotations pattern (see stack concepts in project config)
- All methods MUST have return type annotations
- Document protocol-specific commands with clear comments
- Raise the discovery error exception if resource not detected on
open() - Raise the connection error exception on communication failures
- Track
is_openstate accurately close()MUST be idempotent — safe to call multiple times
-
Update config if new settings are needed:
- Add to the config file's Settings class with the project's env prefix
- Document in the env example file with defaults and description
-
Update the mock implementation to mirror any new behavior:
- Same exceptions for same error conditions
- Same state transitions
-
Wire into lifespan in the app factory:
- Add selection logic in the lifespan function
- Ensure the fail-safe operation runs on both startup and shutdown for the new implementation
-
Write tests in the core layer test file (see test file mapping in project config):
- Test
open()/close()lifecycle - Test state-changing operations for valid and invalid inputs
- Test
get_info()returns expected structure - Test error conditions raise typed exceptions
- Test
is_openproperty accuracy
- Test
-
Verify: Run the test command and the type-check command (see project config)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?