{
    "format": "skillpro/v1",
    "skill_id": "lobehub-lobehub-agents-skills-desktop-skill-md",
    "name": "desktop",
    "version": "1.0.0",
    "description": "Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management.",
    "category": [
        "内容创作"
    ],
    "trigger_words": [],
    "tags": [],
    "source": "DeepseekModel",
    "source_url": "https://deepseekmodel.com/skill?id=lobehub-lobehub-agents-skills-desktop-skill-md",
    "exported_at": "2026-09-16T07:48:02+08:00",
    "system_prompt": "name desktop description Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management. disable-model-invocation true Desktop Development Guide Architecture Overview LobeHub desktop is built on Electron with main-renderer architecture: Main Process ( apps/desktop/src/main ): App lifecycle, system APIs, window management Renderer Process : Reuses web code from src/ Preload Scripts ( apps/desktop/src/preload ): Securely expose main process to renderer Adding New Desktop Features 1. Create Controller Location: apps/desktop/src/main/controllers/ import { ControllerModule , IpcMethod } from '@/controllers' ; export default class NewFeatureCtr extends ControllerModule { static override readonly groupName = 'newFeature' ; @IpcMethod () async doSomething ( params : SomeParams ): Promise < SomeResult > { // Implementation return { success : true }; } } Register in apps/desktop/src/main/controllers/registry.ts . 2. Define IPC Types Location: packages/electron-client-ipc/src/types.ts export interface SomeParams { /* ... */ } export interface SomeResult { success : boolean ; error ?: string ; } 3. Create Renderer Service Location: src/services/electron/ import { ensureElectronIpc } from '@/utils/electron/ipc' ; const ipc = ensureElectronIpc (); export const newFeatureService = async ( params : SomeParams ) => { return ipc. newFeature . doSomething (params); }; 4. Implement Store Action Location: src/store/ 5. Add Tests Location: apps/desktop/src/main/controllers/__tests__/ Detailed Guides See references/ for specific topics: Feature implementation : references/feature-implementation.md Local tools workflow : references/local-tools.md Menu configuration : references/menu-config.md Window management : references/window-management.md Best Practices Security : Validate inputs, limit exposed APIs Performance : Use async methods, batch data transfers UX : Add progress indicators, provide error feedback Code organization : Follow existing patterns, add documentation",
    "model_config": {
        "provider": "deepseek",
        "model": "deepseek-chat",
        "temperature": 0.7,
        "max_tokens": 4096,
        "top_p": 0.9
    },
    "examples": [
        {
            "input": "请用desktop帮我处理问题",
            "output": "好的，我是desktop。Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management. 我会根据你的需求提供专业帮助。"
        },
        {
            "input": "介绍一下你的能力",
            "output": "我是desktop，专注于内容创作领域。Electron desktop development guide — IPC handlers, controllers, preload scripts, window/menu management."
        }
    ],
    "install_guide": {
        "coze": "在 Coze 平台创建 Bot -> 技能配置 -> 导入此 .skill 文件",
        "dify": "在 Dify 平台创建应用 -> 添加知识库 -> 导入此 .skill 配置",
        "claude": "将 system_prompt 字段内容复制到 Claude 自定义指令中",
        "custom": "将此 .skill 文件加载到你的 AI Agent 框架中，解析 system_prompt 和 model_config 即可使用"
    },
    "scripts": {
        "python": "# desktop - Python extension\n# Add custom Python logic here\ndef process(input_data):\n    return input_data\n",
        "javascript": "// desktop - JavaScript extension\n// Add custom JS logic here\nfunction process(inputData) {\n    return inputData;\n}\n"
    },
    "tools": {
        "mcp_servers": [],
        "api_endpoints": []
    },
    "dependencies": {
        "python": [],
        "node": []
    },
    "hooks": {
        "on_load": "echo \"Skill loaded: desktop\"",
        "on_call": "",
        "on_error": "echo \"Skill error: please check logs\""
    }
}