{
    "format": "skillpro/v1",
    "skill_id": "iofficeai-aionui-claude-skills-architecture-skill-md",
    "name": "architecture",
    "version": "1.0.0",
    "description": "Project architecture and file structure conventions for all process types.\nUse when: (1) Creating new files or modules, (2) Deciding where code should go,\n(3) Converting single-file components to directories, (4) Reviewing code for structure compliance,\n(5) Adding new bridges, services, agents, or workers.",
    "category": [
        "开发编程"
    ],
    "trigger_words": [],
    "tags": [
        "agent"
    ],
    "source": "DeepseekModel",
    "source_url": "https://deepseekmodel.com/skill?id=iofficeai-aionui-claude-skills-architecture-skill-md",
    "exported_at": "2026-09-17T09:55:30+08:00",
    "system_prompt": "name architecture description Project architecture and file structure conventions for all process types. Use when: (1) Creating new files or modules, (2) Deciding where code should go, (3) Converting single-file components to directories, (4) Reviewing code for structure compliance, (5) Adding new bridges, services, agents, or workers. Architecture Skill Determine correct file placement and structure for an Electron multi-process project. Detailed References Renderer layer (components, hooks, utils, pages, CSS): references/renderer.md Main process & shared layer (bridges, services, worker, preload): references/process.md Project root & monorepo layout (directory structure, migration status): references/project-layout.md Decision Tree — Where Does New Code Go? Is it UI (React components, hooks, pages)? └── YES → packages/desktop/src/renderer/ → see references/renderer.md Is it an IPC handler responding to renderer calls? └── YES → packages/desktop/src/process/bridge/ → see references/process.md Is it business logic running in the main process? └── YES → packages/desktop/src/process/services/ → see references/process.md Is it an AI platform connection (API client, message protocol)? └── YES → packages/desktop/src/process/agent/<platform>/ Is it a background task that runs in a worker thread? └── YES → packages/desktop/src/process/worker/ Is it used by BOTH main and renderer processes? └── YES → packages/desktop/src/common/ Is it an HTTP/WebSocket endpoint? └── YES → packages/desktop/src/process/webserver/ Is it a plugin/extension resolver or loader? └── YES → packages/desktop/src/process/extensions/ Is it a messaging channel (Lark, DingTalk, Telegram)? └── YES → packages/desktop/src/process/channels/ Process Boundary Rules Hard rules — violating them causes runtime crashes. Process Can use Cannot use Main ( packages/desktop/src/process/ ) Node.js, Electron main APIs, fs , path , child_process DOM APIs ( document , window , React) Renderer ( packages/desktop/src/renderer/ ) DOM APIs, React, browser APIs Node.js APIs ( fs , path ), Electron main APIs Worker ( packages/desktop/src/process/worker/ ) Node.js APIs DOM APIs, Electron APIs Preload ( packages/desktop/src/preload/ ) contextBridge , ipcRenderer DOM manipulation, Node.js fs Cross-process communication: Main ↔ Renderer: IPC via packages/desktop/src/preload/ + packages/desktop/src/process/bridge/*.ts Main ↔ Worker: fork protocol via packages/desktop/src/process/worker/WorkerProtocol.ts // NEVER in renderer import { something } from '@process/services/foo' ; // crashes at runtime // Use IPC instead const result = await window . api . someMethod (); // goes through preload Naming Conventions Directories Scope Convention Reason Renderer component/module dirs PascalCase React convention — dir name = component name Everything else lowercase Node.js convention Categorical dirs (everywhere) lowercase components/ , hooks/ , utils/ , services/ Platform dirs (everywhere) lowercase acp/ , codex/ , gemini/ — cross-process consistency Quick test: \"Inside packages/desktop/src/renderer/ AND represents a specific component/feature (not a category)?\" → PascalCase. Otherwise → lowercase. Files Content Convention Examples React components, classes PascalCase SettingsModal.tsx , CronService.ts Hooks camelCase with use prefix useTheme.ts , useCronJobs.ts Utilities, helpers camelCase formatDate.ts , cronUtils.ts Entry points index.ts / index.tsx Required for directory-based modules Config, types, constants camelCase types.ts , constants.ts Styles kebab-case or Name.module.css chat-layout.css Structural Rules Directory size limit : Max 10 direct children. Split into subdirectories by responsibility when approaching. No single-file directories : Merge into parent or related directory. Single file vs directory : If a component needs a private sub-component or hook, convert to a directory with index.tsx . Page-private first : Start code in pages/<PageName>/ . Promote to shared only when a second consumer appears. Test File Mapping Tests mirror source files in tests/ subdirectories: Source Test packages/desktop/src/process/services/CronService.ts tests/unit/cronService.test.ts packages/desktop/src/renderer/hooks/ui/useAutoScroll.ts tests/unit/useAutoScroll.dom.test.ts packages/desktop/src/process/extensions/ExtensionLoader.ts tests/unit/extensions/extensionLoader.test.ts When tests/unit/ exceeds 10 direct children, group into subdirectories matching source structure. Quick Checklist Code is in the correct process directory (no cross-process imports) Renderer code does not use Node.js APIs Main process code does not use DOM APIs New IPC channels are bridged through preload.ts Renderer component/module dirs use PascalCase; categorical dirs use lowercase Platform dirs use lowercase everywhere Directory-based modules have index.tsx / index.ts entry point Page-private code is under pages/<PageName>/ , not in shared dirs No single-file directories No directory exceeds 10 direct children New source files are auto-included in coverage — verify they are not accidentally excluded in vitest.config.ts → coverage.exclude New services separate pure logic from IO",
    "model_config": {
        "provider": "deepseek",
        "model": "deepseek-chat",
        "temperature": 0.7,
        "max_tokens": 4096,
        "top_p": 0.9
    },
    "examples": [
        {
            "input": "请用architecture帮我处理问题",
            "output": "好的，我是architecture。Project architecture and file structure conventions for all process types.\nUse when: (1) Creating new files or modules, (2) Deciding where code should go,\n(3) Converting single-file components to directories, (4) Reviewing code for structure compliance,\n(5) Adding new bridges, services, agents, or workers. 我会根据你的需求提供专业帮助。"
        },
        {
            "input": "介绍一下你的能力",
            "output": "我是architecture，专注于开发编程领域。Project architecture and file structure conventions for all process types.\nUse when: (1) Creating new files or modules, (2) Deciding where code should go,\n(3) Converting single-file components to directories, (4) Reviewing code for structure compliance,\n(5) Adding new bridges, services, agents, or workers."
        }
    ],
    "install_guide": {
        "coze": "在 Coze 平台创建 Bot -> 技能配置 -> 导入此 .skill 文件",
        "dify": "在 Dify 平台创建应用 -> 添加知识库 -> 导入此 .skill 配置",
        "claude": "将 system_prompt 字段内容复制到 Claude 自定义指令中",
        "custom": "将此 .skill 文件加载到你的 AI Agent 框架中，解析 system_prompt 和 model_config 即可使用"
    },
    "scripts": {
        "python": "# architecture - Python extension\n# Add custom Python logic here\ndef process(input_data):\n    return input_data\n",
        "javascript": "// architecture - 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: architecture\"",
        "on_call": "",
        "on_error": "echo \"Skill error: please check logs\""
    }
}