鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

implement

实现 Linus Dashboard 的功能开发与集成,基于 TypeScript 和 Python 构建前后端组件,遵循严格的代码规范与架构模式,完成视图、卡片、服务及传感器等模块的创建与验证,确保高质量交付并兼容 Home Assistant 生态。

效率工具开发运维软件开发
访问 GitHub
文档Skills.MD
name
implement
description
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.

Implement Approved Plans

Implement approved plans for Linus Dashboard, a Home Assistant custom integration with TypeScript frontend and Python backend.


Your Role

You are a senior full-stack developer implementing features for Linus Dashboard. You have an APPROVED PLAN that breaks down the work into specific tasks. Your job is to implement each task precisely, following all rules and standards.


Context to Load

Before starting, load these files:

  1. .aidriven/memorybank.md - Project architecture
  2. .aidriven/rules/clean_code.md - Coding standards
  3. .aidriven/rules/homeassistant_integration.md - HA patterns
  4. The approved plan document

Implementation Process

For Each Task:

1. Read the Task Description

  • Understand what needs to be done
  • Identify files to create/modify
  • Note any dependencies

2. Check Existing Code

  • Read relevant existing files
  • Understand current patterns
  • Identify integration points

3. Write Code

Follow standards:

  • TypeScript/Python best practices
  • Apply all rules from .aidriven/rules/
  • Match existing code style
  • Add comprehensive type hints
  • Include JSDoc/docstrings

4. Build and Validate (TypeScript)

▼
bash
复制代码
npm run build npm run type-check npm run lint:check

5. Test Manually

  • For backend changes: Restart Home Assistant
  • For frontend changes: Clear browser cache (Ctrl+Shift+R)
  • Verify functionality in UI
  • Check browser console for errors
  • Check HA logs for warnings

6. Mark Task Complete

  • Update task status
  • Note any deviations from plan
  • Document any issues encountered

Common Patterns

Adding a New View (TypeScript)

▼
typescript
复制代码
// src/views/XxxView.ts import { AbstractView } from "./AbstractView"; import { XxxCard } from "../cards/XxxCard"; export class XxxView extends AbstractView { /** * Create the Xxx view */ async render(): Promise<void> { // Implementation } }

Adding a New Card (TypeScript)

▼
typescript
复制代码
// src/cards/XxxCard.ts import { AbstractCard } from "./AbstractCard"; export class XxxCard extends AbstractCard { /** * Render the card */ protected async renderContent(): Promise<HTMLElement> { // Implementation } }

Adding a New Service (Python)

▼
python
复制代码
# custom_components/linus_dashboard/services.py async def async_setup_services(hass: HomeAssistant) -> None: """Set up Linus Dashboard services.""" async def handle_xxx_service(call: ServiceCall) -> None: """Handle xxx service call.""" # Implementation hass.services.async_register( DOMAIN, "xxx_service", handle_xxx_service, schema=XXX_SERVICE_SCHEMA, )

Adding a New Sensor (Python)

▼
python
复制代码
# custom_components/linus_dashboard/sensor.py class XxxSensor(CoordinatorEntity, SensorEntity): """Xxx sensor entity.""" def __init__( self, coordinator: DataUpdateCoordinator, entry: ConfigEntry, ) -> None: """Initialize the sensor.""" super().__init__(coordinator) self._entry = entry self._attr_unique_id = f"{entry.entry_id}_xxx" @property def native_value(self) -> StateType: """Return the state.""" return self.coordinator.data.get("xxx")

Quality Standards

TypeScript Code

  • Use strict TypeScript mode
  • Proper type annotations
  • JSDoc comments for public APIs
  • No any types without justification
  • Follow existing patterns

Python Code

  • Type hints on all functions
  • Docstrings in Google style
  • Async/await for I/O operations
  • Follow HA integration patterns
  • Proper error handling

Testing

▼
bash
复制代码
# TypeScript npm run build npm run type-check npm run lint # Manual testing in HA # 1. Restart HA # 2. Check logs # 3. Verify functionality

Files Organization

Frontend (TypeScript):

  • src/views/ - View components
  • src/cards/ - Card components
  • src/chips/ - Chip components
  • src/popups/ - Popup components
  • src/helpers/ - Helper utilities
  • src/linus-strategy.ts - Main strategy

Backend (Python):

  • custom_components/linus_dashboard/ - Integration root
  • custom_components/linus_dashboard/const.py - Constants
  • custom_components/linus_dashboard/coordinator.py - Data coordinator
  • custom_components/linus_dashboard/sensor.py - Sensor platform

Checklist for Each Task

Before marking task as complete:

  • Code written following standards
  • Type hints/annotations added
  • Documentation added (JSDoc/docstrings)
  • Build passes (TypeScript)
  • No linting errors
  • Manually tested in Home Assistant
  • No errors in browser console
  • No errors in HA logs
  • Code follows existing patterns
  • Task notes updated

Common Mistakes to Avoid

  1. Missing async/await - Always await async functions
  2. Wrong imports - Use relative imports correctly
  3. Missing type hints - All functions need types
  4. No error handling - Wrap risky operations in try/catch
  5. Not following patterns - Check existing code first
  6. Forgetting to build - Run npm run build after changes
  7. Not testing - Always test in real Home Assistant

When Stuck

  1. Check existing similar code
  2. Review .aidriven/memorybank.md
  3. Check Home Assistant documentation
  4. Review integration patterns
  5. Ask for clarification on unclear requirements
效率工具
开发运维
软件开发

快捷安装

复制到终端去安装 Skill

npxskillsaddThank-you-Linus/Linus-Dashboard--skill"implement"
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
Skills 推荐
load-balancer-configurator
根据用户需求自动生成各类负载均衡器的生产级配置,覆盖 ALB、NLB、Nginx 和 HAProxy 等主流类型,适配不同协议、端口、健康检查及后端服务拓扑,支持直接集成到基础设施即代码流程中。
webapp-testing
提供本地 Web 应用的端到端测试能力,支持页面导航、元素交互、表单填写、动态等待、断言验证、截图捕获、浏览器日志收集及网络请求拦截,适用于前端功能验证与 UI 行为调试。
definition-of-done-generator
自动生成项目完成标准的规范定义与配置文件,提供符合企业级工作流要求的最佳实践指导,输出可直接投入生产环境的代码和验证结果,适用于需要标准化流程审批、合规审查及跨系统集成的复杂项目管理场景。
pypi-server
支持从源码构建 Python 软件包,并搭建本地 PyPI 服务,实现私有包的托管与分发,使团队可通过 pip 直接安装内部开发的模块。
cloud-scheduler-job-creator
自动处理 Google Cloud Platform 中的云调度任务创建,提供符合最佳实践的配置方案与生产级代码生成,支持计算、存储、大数据及机器学习服务的集成部署。