Expert development guidelines for ha-legacy-gsm-sms addon project. Enforces surgical editing patterns, test/prod variant management, and comprehensive feature implementation across MQTT, REST API, and documentation.
Expert development skill for the ha-legacy-gsm-sms project, which provides legacy GSM SMS notifications via GSM modem for Home Assistant using HACS or HA Add-on options.
This repository contains multiple addon variants with **intentional differences**:
**ALWAYS** make surgical, line-by-line edits when syncing features or fixes. **NEVER** copy entire files from one addon to another.
The test addon has these **intentional differences** that must be preserved:
#### `config.yaml`
#### `support.py`
Before editing any config file:
1. **Read the file first** using available tools
2. **Identify what needs to change** - only those specific lines
3. **Make surgical edits** - change only what's necessary
4. **Verify with diff** - check that only intended changes were made
These values have been tuned for this project and differ from upstream:
**Never modify these without explicit user approval.**
When adding a new feature to both production and test addons:
1. Implement in production addon first (`addon-gsm-gateway/`)
2. For Python files (`mqtt_publisher.py`, `run.py`): These CAN be synced (except `support.py`)
3. For `config.yaml`: Make **individual line edits** - never copy the whole file
4. Always verify test addon customizations are preserved after changes
Both should be bumped together when features are added.
When adding a new SMS feature, it **must** be implemented in ALL these places:
**Do not mark the task complete until all four are implemented.**
Phone numbers can contain: `+`, digits, spaces, `-`, `(`, `)`, `,`
The `+` character can appear **anywhere** (not just at the start) because multiple international numbers are comma-separated: `+1234567890,+0987654321`
**Correct regex**: `^[\+\d\s\-\(\),]*$`
**Wrong regex**: `^\+?[\d\s\-\(\),]*$` (only allows + at start)
Before marking a task as complete:
1. Run Python syntax check on all modified `.py` files
2. Test the logic with edge cases (multiple values, empty values, special characters)
3. Verify with `git diff` that only intended changes were made
4. Check that both production AND test addons are updated (if applicable)
5. Confirm documentation matches the implementation
If unsure whether a file has custom settings or special handling:
This project is based on [PavelVe/hassio-addons](https://github.com/PavelVe/hassio-addons).
When syncing upstream features, always credit the source in `CHANGELOG.md`.
```
User: "Add support for SMS delivery reports"
Assistant workflow:
1. Implement MQTT command handling in addon-gsm-gateway/mqtt_publisher.py
2. Add REST API endpoint in addon-gsm-gateway/run.py
3. Sync Python changes to addon-test-current/ (surgical edits only)
4. Update README.md with new feature documentation
5. Add entry to CHANGELOG.md
6. Bump version in both addons (e.g., 2.15.0 and 2.15.0-test)
7. Run syntax validation on all .py files
8. Verify with git diff before completion
```
```
User: "Fix phone number validation in production addon"
Assistant workflow:
1. Fix regex in addon-gsm-gateway/mqtt_publisher.py
2. Make identical surgical edit in addon-test-current/mqtt_publisher.py
3. Verify test addon config.yaml still has TEST settings intact
4. Update CHANGELOG.md
5. Bump patch version (e.g., 2.14.1 and 2.14.1-test)
6. Validate with git diff
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/home-assistant-gsm-sms-addon-development/raw