ワンクリックで
review
// Review code quality, security, and maintainability before committing. Use when reviewing code changes, checking code quality, performing security review, or validating changes before commit.
// Review code quality, security, and maintainability before committing. Use when reviewing code changes, checking code quality, performing security review, or validating changes before commit.
Create a beta pre-release for community testing with intelligent version detection. Use when creating beta releases, publishing pre-releases, or preparing versions for community testing.
Create a stable production release with intelligent detection (finalize beta or direct release). Use when publishing stable releases, finalizing beta versions, or creating production releases.
Debug errors, bugs, and unexpected behavior systematically in Home Assistant integration. Use when investigating errors, analyzing stack traces, fixing bugs, or troubleshooting unexpected behavior.
Implement approved plans with precision and quality for Linus Dashboard Home Assistant integration. Use when implementing features, executing approved plans, writing code following standards, or developing new functionality.
Check if project is ready for release with comprehensive pre-release validation. Use when verifying release readiness, running validation checks, or checking project quality before publishing.
Rollback a failed release by deleting tags and reverting version changes. Use when a release fails, needs to be cancelled, or when reverting a problematic release.
| name | review |
| description | Review code quality, security, and maintainability before committing. Use when reviewing code changes, checking code quality, performing security review, or validating changes before commit. |
Review code quality, security, and maintainability before committing changes to Linus Dashboard.
Senior code reviewer ensuring quality, security, and maintainability.
Context Required:
Readability:
Structure:
Type Safety:
Any without justificationexcept)asyncio.gather() for parallel opshass.data[DOMAIN][entry_id]entry.async_on_unload()# See what changed
git status
# View diff
git diff
# Check specific files
git diff path/to/file.py
For each changed file:
# TypeScript
npm run build
npm run type-check
npm run lint:check
# Run smoke tests
npm run test:smoke
Format:
File: path/to/file.py
✅ Good:
- Clear function names
- Proper type hints
- Good error handling
⚠️ Issues:
1. Line 42: Missing docstring
2. Line 78: Blocking I/O in async function
3. Line 103: Exception too broad
💡 Suggestions:
- Consider caching this result
- Extract this logic to separate function
Async/Await:
# ❌ Bad - blocking I/O
async def fetch_data():
response = requests.get(url) # Blocks event loop
# ✅ Good - async I/O
async def fetch_data():
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
return await response.json()
Error Handling:
# ❌ Bad - bare except
try:
do_something()
except:
pass
# ✅ Good - specific exception
try:
do_something()
except ValueError as err:
_LOGGER.error("Invalid value: %s", err)
raise
Type Hints:
# ❌ Bad - no types
def process_data(data):
return data.get("value")
# ✅ Good - with types
def process_data(data: dict[str, Any]) -> str | None:
"""Process data and return value."""
return data.get("value")
Type Safety:
// ❌ Bad - any type
function process(data: any): any {
return data.value;
}
// ✅ Good - proper types
function process(data: DataType): string | undefined {
return data.value;
}
Null Safety:
// ❌ Bad - no null check
const value = entity.state.toUpperCase();
// ✅ Good - null check
const value = entity.state?.toUpperCase() ?? "unknown";
Before approving:
Code Quality:
Functionality:
Maintainability:
Security:
APPROVE - Code meets all standards REQUEST CHANGES - Issues must be fixed COMMENT - Suggestions for improvement
# Check what changed
git diff
# Check specific file
git diff path/to/file
# See commit history
git log --oneline -10
# Run quality checks
npm run lint:check
npm run type-check
npm run build
# Run tests
npm run test:smoke