Agent skill
control-office-lamp
Control office lamp via Home Assistant. Use when the user asks to turn on, turn off, or toggle their office lamp, or check its status. Triggers on phrases like "turn on my lamp", "office light on/off", "toggle the lamp", or "is my lamp on".
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/control-office-lamp
SKILL.md
Home Assistant Office Lamp Control
Control the office lamp through Home Assistant's REST API.
Setup (First-Time Only)
Create your config file at ~/.claude/skill-config/control-office-lamp/config.json:
{
"url": "http://your-home-assistant:8123",
"token": "YOUR_LONG_LIVED_ACCESS_TOKEN_HERE",
"entity_id": "light.office_lamp"
}
This location persists across skill updates.
To create a Long-Lived Access Token:
- Open Home Assistant -> Profile (bottom-left)
- Scroll to "Long-Lived Access Tokens" -> Create Token
- Copy the token into config.json
Config lookup order:
HA_CONFIG_PATHenvironment variable~/.claude/skill-config/control-office-lamp/config.json(recommended)${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/config.json(plugin root)<script-directory>/../config.json(fallback)
Usage
The script is located relative to the plugin root using ${CLAUDE_PLUGIN_ROOT}:
# Turn lamp on
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" on
# Turn lamp off
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" off
# Toggle lamp state
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" toggle
# Check current status
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" status
Response Handling
Success response:
{"success": true, "action": "turn_on", "entity_id": "light.office_lamp", "response": [...]}
Error response:
{"success": false, "error": "Connection failed: ..."}
If errors occur, verify:
- Home Assistant is running at the configured URL
- The token is valid and not expired
- The entity_id exists in Home Assistant
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?