GitHub Issue Solver
This skill guides you through solving GitHub issues for the Home Assistant device-card project. It ensures comprehensive planning, testing, documentation, and release notes.
When to Use
- Use this skill when the user provides a GitHub issue URL or issue details
- Use when asked to solve, fix, or implement something from a GitHub issue
- Use when planning work based on an issue or feature request
Instructions
IMPORTANT: This skill runs in PLAN MODE first. You MUST present a comprehensive plan to the user and wait for their approval before implementing any code changes.
Step 1: Analyze the GitHub Issue
Fetch the issue details:
- If a GitHub issue URL is provided, fetch it using the web fetch tool or ask the user for the issue details
- Extract key information:
- Issue title and description
- Issue type (bug fix, feature request, enhancement, etc.)
- Labels and milestones
- Comments and discussion
- Related issues or PRs
Understand the requirements:
- Identify what needs to be fixed or implemented
- Note any edge cases or special considerations mentioned
- Check if there are any related issues or dependencies
Step 2: Create and Present the Plan (STOP HERE - DO NOT IMPLEMENT YET)
Break down the work:
- List all files that need to be created or modified
- Identify the core functionality changes required
- Note any dependencies or related components
- Review existing code patterns in the project for consistency
Create a comprehensive task list:
- Use the todo_write tool to create a structured task list with all tasks marked as "pending"
- Include detailed tasks for:
- Code implementation (specific files and functions)
- Test creation/updates (specific test files and test cases)
- Documentation updates (specific sections and files)
- Release notes (draft the entry)
- README roadmap update (if new feature, draft the entry)
Present the plan to the user:
- CRITICAL: You MUST stop here and present the complete plan
- Show a clear, formatted plan including:
- Summary of the issue and what needs to be done
- List of files to be created/modified
- Overview of code changes needed
- Test strategy and test cases
- Documentation updates planned
- Draft release notes entry
- Draft roadmap entry (if new feature)
- Wait for user approval before proceeding to Step 3
- Use language like: "Here's my plan. Please review and let me know if you'd like me to proceed with implementation."
Step 3: Implement the Solution (ONLY AFTER USER APPROVAL)
DO NOT proceed to this step until the user has reviewed and approved the plan from Step 2.
Code changes:
- Follow TypeScript best practices
- Match the existing code style (check
.prettierrc for formatting)
- Ensure type safety (check
tsconfig.json)
- Follow the project's file structure conventions
Key areas to consider:
src/cards/ - Card implementations
src/delegates/ - Business logic and data retrieval
src/html/ - HTML rendering components
src/hass/ - Home Assistant integration code
src/common/ - Shared utilities
src/types/ - TypeScript type definitions
Step 4: Write Tests
Test coverage:
- PREFER updating existing tests over creating many new test cases
- When possible, add assertions to existing tests that already cover similar functionality
- Create or update test files in
test/ directory matching the source structure
- Follow existing test patterns (check
test/ directory for examples)
- Use Mocha test framework (check
.mocharc.json and mocha.setup.ts)
Test requirements:
- Keep tests concise: Aim for 1-2 focused test cases, or update existing tests to cover multiple scenarios
- Unit tests for new functions and methods
- Edge case testing (when necessary, but consolidate into existing tests when possible)
- Integration tests if applicable
- Ensure tests pass:
yarn test or npm test
Test file naming:
- Test files should match source files with
.spec.ts extension
- Example:
src/cards/device-card/card.ts → test/cards/device-card/card.spec.ts
Test consolidation strategy:
- Reuse existing setup/mocks: Before creating new test cases, check if existing tests already have similar mocks, stubs, or setup code that can be reused
- Review existing tests to see if new functionality can be tested alongside existing assertions
- Update existing test data/mocks to include new scenarios rather than creating separate tests
- Only create new test cases when the functionality is truly distinct and cannot be tested within existing tests
- Avoid duplicating setup code: If multiple tests need similar mocks or stubs, consider:
- Adding shared setup to
beforeEach hooks
- Extending existing mock data structures
- Creating helper functions for common test setup
Test quality review:
- Review the entire test file after making changes to ensure:
- No duplicative tests that test the same thing in slightly different ways
- No low-value tests that don't add meaningful coverage
- Tests are well-organized and follow the existing patterns
- Setup code is not unnecessarily duplicated across tests
- If you notice duplicative or low-value tests while working, consider removing or consolidating them
- Focus on tests that provide real value: catching bugs, ensuring correctness, and documenting expected behavior
Step 5: Update Documentation
README.md updates:
- If adding a new feature, add it to the "Features" section
- Update "Configuration Options" table if adding new config options
- Add example configurations in "Example Configurations" section
- Update the "Project Roadmap" section (see Step 7)
Code comments:
- Add JSDoc comments for public functions and classes
- Document complex logic and algorithms
- Explain non-obvious decisions
Translation files (if adding user-facing strings):
- Update
src/translations/en.json (English)
- Consider updating other language files:
fr.json, pt.json, ru.json
- Follow the existing translation structure
Step 6: Create/Update Release Notes
Release notes format:
- Create or update a release notes file (check if one exists, otherwise create
RELEASE_NOTES.md or similar)
- Format entries clearly with issue/PR references
Release notes structure:
- Main header: Release title with 2 random emojis at the end
- Each bug/feature: Use
## heading (level 2) for each bug fix or feature, starting with a relevant emoji
- Notes under each section: Small descriptive notes under each heading
Release notes content:
- Bug fixes: "Fixed [description] - fixes #[issue-number]"
- New features: "Added [feature name] - fixes #[issue-number]" (or equivalent plain-language lead)
- Enhancements: "Improved [description] - fixes #[issue-number]"
- Breaking changes: Clearly mark with "⚠️ BREAKING CHANGE:" prefix
- Do not thank contributors in release notes — appreciation belongs in the README roadmap (Step 7), not in
RELEASE_NOTES.md.
Tone and links:
- Prefer short, user-facing copy; avoid deep technical detail (file names, internal APIs) unless necessary for migration.
- Link where it helps: Home Assistant documentation, relevant integration pages, or this repo’s published docs (e.g. GitHub Pages) so users can go further.
Example format:
# Hidden Entity Filtering & Dark Mode!🎉✨
## 🔍 Hidden Entity Filtering
Hidden entities are now filtered out to match Home Assistant’s more-info behavior - fixes #43
## 🌙 Dark Mode Support
Dark mode option for low-light dashboards - fixes #123
See [Home Assistant themes](https://www.home-assistant.io/integrations/frontend/) for related settings.
Home Assistant user-friendly language:
- Write in clear, non-technical language
- Focus on what users can do or what problems are solved
- Avoid internal implementation details
- Use Home Assistant terminology where appropriate
Step 7: Update README Roadmap (for New Features)
Check if it's a new feature:
- If the issue is a feature request or adds new functionality
- If it's a bug fix, skip this step
Add to roadmap:
Thank the contributor:
- If the issue was opened by a GitHub user, include their username
- Format:
- thanks @[username]
- If multiple contributors, list them all
Step 8: Final Checklist
Before completing, verify:
Step 9: Summary
Provide a summary of:
- What was implemented
- Files created/modified
- Test coverage added
- Documentation updates
- Release notes entry
- Roadmap update (if applicable)
Notes
- CRITICAL: This skill operates in PLAN MODE - always present the plan first and wait for user approval
- Never implement code changes without showing the plan and getting user confirmation
- Always maintain consistency with existing code patterns
- Follow the project's TypeScript and testing conventions
- Ensure backward compatibility unless it's a breaking change
- Consider Home Assistant version compatibility
- Test with multiple browsers if UI changes are involved
- Release notes (
RELEASE_NOTES.md): user-facing, no contributor thanks (those go in the README roadmap); include links to Home Assistant or project docs where relevant; avoid unnecessary technical detail
Plan Presentation Format
When presenting the plan, use this structure:
## Plan for Issue #[number]: [Title]
### Issue Summary
[Brief summary of what needs to be done]
### Files to Create/Modify
- `path/to/file1.ts` - [what will change]
- `path/to/file2.ts` - [what will change]
- ...
### Implementation Approach
[High-level description of how you'll implement the solution]
### Test Strategy
- Test file: `test/path/to/file1.spec.ts`
- **Prefer updating existing tests** rather than creating many new test cases
- **Reuse existing setup/mocks**: [describe what existing mocks or setup will be reused]
- If updating existing test: [which test and what will be added]
- If new test needed: [brief description of why and what it covers, and how it reuses existing setup]
- Aim for 1-2 focused test cases total
- **Review test file**: Check for any duplicative or low-value tests that could be removed or consolidated
### Documentation Updates
- README.md: [what sections will be updated]
- Code comments: [what will be documented]
- Translations: [if applicable]
### Release Notes Draft
```markdown
## [Emoji] [Feature/Bug Name]
Brief description, optional YAML example, links to HA or project docs; no contributor thanks; fixes issue when applicable.
```
Roadmap Entry Draft (if new feature)
[Draft of the roadmap entry]
Ready to proceed? Please review the plan above and let me know if you'd like me to continue with implementation.
## Example Workflow
1. User provides: "Solve issue #123: Add dark mode support"
2. Fetch issue details from GitHub
3. **PLAN MODE**: Create comprehensive plan:
- Files to modify: `src/cards/device-card/styles.ts`, `src/cards/device-card/types.ts`, `src/cards/device-card/editor.ts`
- Tests: Update existing test in `test/cards/device-card/card.spec.ts` to include dark mode scenarios (prefer updating over creating new tests)
- Documentation: Update README.md Features section, add config option to table
- Release notes draft: "## Dark Mode Support\n\nAdded dark mode theme option - fixes #123" (no thanks; link to HA docs if useful)
- Roadmap draft: "- [ ] **`Dark mode support`**: Add dark mode theme option - thanks @username"
4. **PRESENT PLAN TO USER** - Wait for approval
5. **ONLY AFTER APPROVAL**: Implement code changes
6. **ONLY AFTER APPROVAL**: Create/update test files
7. **ONLY AFTER APPROVAL**: Update documentation
8. **ONLY AFTER APPROVAL**: Create/update release notes
9. **ONLY AFTER APPROVAL**: Update roadmap
10. Summary: List all changes made
Source: homeassistant-extras/device-card — distributed by TomeVault.
1---2name: github-issue-solver3description: Accept a GitHub issue URL or issue details, create a comprehensive plan (in plan mode - shows plan first), then implement the solution including tests and documentation, create/update release notes for Home Assistant users, and update the README roadmap for new features. Use when the user provides a GitHub issue or asks to solve an issue. ALWAYS presents the plan first and waits for user approval before implementing. Use when this capability is needed.4---56# GitHub Issue Solver78This skill guides you through solving GitHub issues for the Home Assistant device-card project. It ensures comprehensive planning, testing, documentation, and release notes.910## When to Use1112- Use this skill when the user provides a GitHub issue URL or issue details13- Use when asked to solve, fix, or implement something from a GitHub issue14- Use when planning work based on an issue or feature request1516## Instructions1718**IMPORTANT: This skill runs in PLAN MODE first. You MUST present a comprehensive plan to the user and wait for their approval before implementing any code changes.**1920### Step 1: Analyze the GitHub Issue21221. **Fetch the issue details**:23 - If a GitHub issue URL is provided, fetch it using the web fetch tool or ask the user for the issue details24 - Extract key information:25 - Issue title and description26 - Issue type (bug fix, feature request, enhancement, etc.)27 - Labels and milestones28 - Comments and discussion29 - Related issues or PRs30312. **Understand the requirements**:32 - Identify what needs to be fixed or implemented33 - Note any edge cases or special considerations mentioned34 - Check if there are any related issues or dependencies3536### Step 2: Create and Present the Plan (STOP HERE - DO NOT IMPLEMENT YET)37381. **Break down the work**:39 - List all files that need to be created or modified40 - Identify the core functionality changes required41 - Note any dependencies or related components42 - Review existing code patterns in the project for consistency43442. **Create a comprehensive task list**:45 - Use the todo_write tool to create a structured task list with all tasks marked as "pending"46 - Include detailed tasks for:47 - Code implementation (specific files and functions)48 - Test creation/updates (specific test files and test cases)49 - Documentation updates (specific sections and files)50 - Release notes (draft the entry)51 - README roadmap update (if new feature, draft the entry)52533. **Present the plan to the user**:54 - **CRITICAL: You MUST stop here and present the complete plan**55 - Show a clear, formatted plan including:56 - Summary of the issue and what needs to be done57 - List of files to be created/modified58 - Overview of code changes needed59 - Test strategy and test cases60 - Documentation updates planned61 - Draft release notes entry62 - Draft roadmap entry (if new feature)63 - **Wait for user approval before proceeding to Step 3**64 - Use language like: "Here's my plan. Please review and let me know if you'd like me to proceed with implementation."6566### Step 3: Implement the Solution (ONLY AFTER USER APPROVAL)6768**DO NOT proceed to this step until the user has reviewed and approved the plan from Step 2.**69701. **Code changes**:71 - Follow TypeScript best practices72 - Match the existing code style (check `.prettierrc` for formatting)73 - Ensure type safety (check `tsconfig.json`)74 - Follow the project's file structure conventions75762. **Key areas to consider**:77 - `src/cards/` - Card implementations78 - `src/delegates/` - Business logic and data retrieval79 - `src/html/` - HTML rendering components80 - `src/hass/` - Home Assistant integration code81 - `src/common/` - Shared utilities82 - `src/types/` - TypeScript type definitions8384### Step 4: Write Tests85861. **Test coverage**:87 - **PREFER updating existing tests** over creating many new test cases88 - When possible, add assertions to existing tests that already cover similar functionality89 - Create or update test files in `test/` directory matching the source structure90 - Follow existing test patterns (check `test/` directory for examples)91 - Use Mocha test framework (check `.mocharc.json` and `mocha.setup.ts`)92932. **Test requirements**:94 - **Keep tests concise**: Aim for 1-2 focused test cases, or update existing tests to cover multiple scenarios95 - Unit tests for new functions and methods96 - Edge case testing (when necessary, but consolidate into existing tests when possible)97 - Integration tests if applicable98 - Ensure tests pass: `yarn test` or `npm test`991003. **Test file naming**:101 - Test files should match source files with `.spec.ts` extension102 - Example: `src/cards/device-card/card.ts` → `test/cards/device-card/card.spec.ts`1031044. **Test consolidation strategy**:105 - **Reuse existing setup/mocks**: Before creating new test cases, check if existing tests already have similar mocks, stubs, or setup code that can be reused106 - Review existing tests to see if new functionality can be tested alongside existing assertions107 - Update existing test data/mocks to include new scenarios rather than creating separate tests108 - Only create new test cases when the functionality is truly distinct and cannot be tested within existing tests109 - **Avoid duplicating setup code**: If multiple tests need similar mocks or stubs, consider:110 - Adding shared setup to `beforeEach` hooks111 - Extending existing mock data structures112 - Creating helper functions for common test setup1131145. **Test quality review**:115 - **Review the entire test file** after making changes to ensure:116 - No duplicative tests that test the same thing in slightly different ways117 - No low-value tests that don't add meaningful coverage118 - Tests are well-organized and follow the existing patterns119 - Setup code is not unnecessarily duplicated across tests120 - If you notice duplicative or low-value tests while working, consider removing or consolidating them121 - Focus on tests that provide real value: catching bugs, ensuring correctness, and documenting expected behavior122123### Step 5: Update Documentation1241251. **README.md updates**:126 - If adding a new feature, add it to the "Features" section127 - Update "Configuration Options" table if adding new config options128 - Add example configurations in "Example Configurations" section129 - Update the "Project Roadmap" section (see Step 7)1301312. **Code comments**:132 - Add JSDoc comments for public functions and classes133 - Document complex logic and algorithms134 - Explain non-obvious decisions1351363. **Translation files** (if adding user-facing strings):137 - Update `src/translations/en.json` (English)138 - Consider updating other language files: `fr.json`, `pt.json`, `ru.json`139 - Follow the existing translation structure140141### Step 6: Create/Update Release Notes1421431. **Release notes format**:144 - Create or update a release notes file (check if one exists, otherwise create `RELEASE_NOTES.md` or similar)145 - Format entries clearly with issue/PR references1461472. **Release notes structure**:148 - **Main header**: Release title with 2 random emojis at the end149 - **Each bug/feature**: Use `##` heading (level 2) for each bug fix or feature, starting with a relevant emoji150 - **Notes under each section**: Small descriptive notes under each heading1511523. **Release notes content**:153 - **Bug fixes**: "Fixed [description] - fixes #[issue-number]"154 - **New features**: "Added [feature name] - fixes #[issue-number]" (or equivalent plain-language lead)155 - **Enhancements**: "Improved [description] - fixes #[issue-number]"156 - **Breaking changes**: Clearly mark with "⚠️ BREAKING CHANGE:" prefix157 - **Do not thank contributors in release notes** — appreciation belongs in the README roadmap (Step 7), not in `RELEASE_NOTES.md`.1581594. **Tone and links**:160 - Prefer short, user-facing copy; avoid deep technical detail (file names, internal APIs) unless necessary for migration.161 - **Link where it helps**: [Home Assistant documentation](https://www.home-assistant.io/docs/), relevant integration pages, or this repo’s published docs (e.g. GitHub Pages) so users can go further.1621635. **Example format**:164165 ```markdown166 # Hidden Entity Filtering & Dark Mode!🎉✨167168 ## 🔍 Hidden Entity Filtering169170 Hidden entities are now filtered out to match Home Assistant’s more-info behavior - fixes #43171172 ## 🌙 Dark Mode Support173174 Dark mode option for low-light dashboards - fixes #123175176 See [Home Assistant themes](https://www.home-assistant.io/integrations/frontend/) for related settings.177 ```1781796. **Home Assistant user-friendly language**:180 - Write in clear, non-technical language181 - Focus on what users can do or what problems are solved182 - Avoid internal implementation details183 - Use Home Assistant terminology where appropriate184185### Step 7: Update README Roadmap (for New Features)1861871. **Check if it's a new feature**:188 - If the issue is a feature request or adds new functionality189 - If it's a bug fix, skip this step1901912. **Add to roadmap**:192 - Locate the "Project Roadmap" section in README.md193 - Add a new entry in the format:194 ```markdown195 - [ ] **`Feature Name`**: Description of feature - thanks @[username]196 ```197 - Use present tense for completed features (change `[ ]` to `[x]` after implementation)198 - Use future tense for planned features1992003. **Thank the contributor**:201 - If the issue was opened by a GitHub user, include their username202 - Format: `- thanks @[username]`203 - If multiple contributors, list them all204205### Step 8: Final Checklist206207Before completing, verify:208209- [ ] All code changes are implemented210- [ ] All tests are written and passing211- [ ] **Test quality**: Reviewed test files for duplicative or low-value tests that could be removed212- [ ] **Test reuse**: Confirmed that existing test setup/mocks were reused where possible213- [ ] Documentation is updated (README.md, code comments)214- [ ] Release notes are created/updated215- [ ] README roadmap is updated (if new feature)216- [ ] Code follows project style guidelines217- [ ] TypeScript types are correct218- [ ] No linter errors219- [ ] Translation files updated (if needed)220221### Step 9: Summary222223Provide a summary of:224225- What was implemented226- Files created/modified227- Test coverage added228- Documentation updates229- Release notes entry230- Roadmap update (if applicable)231232## Notes233234- **CRITICAL**: This skill operates in PLAN MODE - always present the plan first and wait for user approval235- Never implement code changes without showing the plan and getting user confirmation236- Always maintain consistency with existing code patterns237- Follow the project's TypeScript and testing conventions238- Ensure backward compatibility unless it's a breaking change239- Consider Home Assistant version compatibility240- Test with multiple browsers if UI changes are involved241- **Release notes** (`RELEASE_NOTES.md`): user-facing, no contributor thanks (those go in the README roadmap); include links to Home Assistant or project docs where relevant; avoid unnecessary technical detail242243## Plan Presentation Format244245When presenting the plan, use this structure:246247````markdown248## Plan for Issue #[number]: [Title]249250### Issue Summary251252[Brief summary of what needs to be done]253254### Files to Create/Modify255256- `path/to/file1.ts` - [what will change]257- `path/to/file2.ts` - [what will change]258- ...259260### Implementation Approach261262[High-level description of how you'll implement the solution]263264### Test Strategy265266- Test file: `test/path/to/file1.spec.ts`267 - **Prefer updating existing tests** rather than creating many new test cases268 - **Reuse existing setup/mocks**: [describe what existing mocks or setup will be reused]269 - If updating existing test: [which test and what will be added]270 - If new test needed: [brief description of why and what it covers, and how it reuses existing setup]271 - Aim for 1-2 focused test cases total272 - **Review test file**: Check for any duplicative or low-value tests that could be removed or consolidated273274### Documentation Updates275276- README.md: [what sections will be updated]277- Code comments: [what will be documented]278- Translations: [if applicable]279280### Release Notes Draft281282```markdown283## [Emoji] [Feature/Bug Name]284285Brief description, optional YAML example, links to HA or project docs; no contributor thanks; fixes issue when applicable.286```287````288289### Roadmap Entry Draft (if new feature)290291[Draft of the roadmap entry]292293---294295**Ready to proceed?** Please review the plan above and let me know if you'd like me to continue with implementation.296297```298299## Example Workflow3003011. User provides: "Solve issue #123: Add dark mode support"3022. Fetch issue details from GitHub3033. **PLAN MODE**: Create comprehensive plan:304 - Files to modify: `src/cards/device-card/styles.ts`, `src/cards/device-card/types.ts`, `src/cards/device-card/editor.ts`305 - Tests: Update existing test in `test/cards/device-card/card.spec.ts` to include dark mode scenarios (prefer updating over creating new tests)306 - Documentation: Update README.md Features section, add config option to table307 - Release notes draft: "## Dark Mode Support\n\nAdded dark mode theme option - fixes #123" (no thanks; link to HA docs if useful)308 - Roadmap draft: "- [ ] **`Dark mode support`**: Add dark mode theme option - thanks @username"3094. **PRESENT PLAN TO USER** - Wait for approval3105. **ONLY AFTER APPROVAL**: Implement code changes3116. **ONLY AFTER APPROVAL**: Create/update test files3127. **ONLY AFTER APPROVAL**: Update documentation3138. **ONLY AFTER APPROVAL**: Create/update release notes3149. **ONLY AFTER APPROVAL**: Update roadmap31510. Summary: List all changes made316```317318---319> Source: [homeassistant-extras/device-card](https://github.com/homeassistant-extras/device-card) — distributed by [TomeVault](https://tomevault.io).320<!-- tomevault:4.0:skill_md:2026-06-24 -->