/architecture
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,
$ npx -y skills add iOfficeAI/AionUi --skill architecture --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/architecture
Context preview
The summary Claude sees to decide when to auto-load this skill.
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,
SKILL.md
architecture.SKILL.mdname: 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](references/renderer.md)
- **Main process & shared layer** (bridges, services, worker, preload): [references/process.md](references/process.md)
- **Project root & monorepo layout** (directory structure, migration status): [references/project-layout.md](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
1. **Directory size limit**: Max **10** direct children. Split into subdirectories by responsibility when approaching. 2. **No single-file directories**: Merge into parent or related directory. 3. **Single file vs directory**: If a component needs a private sub-component or hook, convert to a directory with `index.tsx`. 4. **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/
Read more
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](references/renderer.md)
- **Main process & shared layer** (bridges, services, worker, preload): [references/process.md](references/process.md)
- **Project root & monorepo layout** (directory structure, migration status): [references/project-layout.md](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
1. **Directory size limit**: Max **10** direct children. Split into subdirectories by responsibility when approaching. 2. **No single-file directories**: Merge into parent or related directory. 3. **Single file vs directory**: If a component needs a private sub-component or hook, convert to a directory with `index.tsx`. 4. **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/
Open-source 24/7 Cowork app for OpenClaw, Hermes, Claude Code, Codex, OpenCode and 20+ more CLI Agent | Customize your assistants | Team them up|Star if you like it!
Repo: iOfficeAI/AionUi
Other skills on aionui.
- /bump-version
Use when bumping the AionUi version: query AionCore release, verify artifacts, update package.json, generate CHANGELOG, branch, commit, push, create PR, auto-merge, tag release.
Open skill - /i18n
Internationalization (i18n) workflow and standards for managing translations. Use when: (1) Adding new user-facing text, (2) Creating new components with user-facing text, (3) Reviewing code for i18n compliance, (4) Adding a new translation module.
Open skill - /testing
Testing workflow and quality standards for writing and running tests. Use when: (1) Writing new tests, (2) Adding a new feature that needs tests, (3) Modifying logic that has existing tests, (4) Before claiming a task is complete.
Open skill

