Reference
Contributing to CoWork OS
Synced from github.com/CoWork-OS/CoWork-OS/docs
Thanks for helping. This page says what we want most, how to avoid duplicate work, and what a mergeable pull request looks like. Setup details live in the Development Guide. Please follow the Code of Conduct.
What we want, in priority order
- Bug fixes. Crashes, wrong results, data loss, broken flows. A failing test plus the fix is the best possible PR.
- Cross-platform work. Windows parity, Intel Mac support, Linux packaging. Most maintainers use Apple Silicon Macs, so reports and fixes from other systems are especially valuable.
- Security hardening. Access-profile gaps, approval bypasses, credential handling, sandbox escapes. Report vulnerabilities privately first; see SECURITY.md.
- Robustness. Better recovery from provider errors, timeouts, flaky tests, migrations that survive upgrades.
- Broadly useful skills. A skill that helps many people with a common task (see "Skill or tool?" below).
- Documentation. Fix what confused you; you are the best judge of what is missing.
- New tools. Rarely. Prefer a skill unless the work needs new capabilities in the app itself.
Good starting points are labeled good first issue and help wanted. Comment on the issue to claim it.
Search first
Before you open an issue or start coding:
- Search open and closed issues and pull requests.
- Search Discussions for questions and design ideas, or ask in #contributors on Discord.
- For anything larger than a bug fix, open an issue or Discussion describing the change before writing it, so we can agree on the approach. We reply to new issues within a day.
Skill or tool?
CoWork OS has two extension points. Pick the smaller one that works.
| Skill | Tool | |
|---|---|---|
| What it is | Instructions and optional scripts in a SKILL.md folder | A TypeScript class the agent calls directly |
| Where | resources/skills/<name>/ | src/electron/agent/tools/<name>-tools.ts, registered in tools/registry.ts |
| Use when | The model can already do the work with existing tools and needs know-how, a workflow, or a template | The work needs a new capability: a new API, OS integration, file format, or permission boundary |
| Review cost | Low | High: security review of the tool policy, approvals and file access |
Skills must pass npm run skills:check. New tools must explain in their description when to use them, go through the tool policy in src/electron/security/, and never bypass approval checks.
Development setup
You need Node.js 24 or later, npm 10 or later, Git, and macOS or Windows for the desktop app.
git clone https://github.com/YOUR_USERNAME/CoWork-OS.git
cd CoWork-OS
npm run setup # dependencies, native modules, git hooks with a gitleaks secret scan
npm run dev # Electron app and renderer with hot reload
Install gitleaks so the pre-commit secret scan can run. More commands, debugging and the project layout are in the Development Guide.
Making a pull request
-
Branch from
mainwith a descriptive name, for examplefix/approval-card-timeoutordocs/windows-install. -
Keep the change focused. One fix or feature per PR; unrelated formatting changes make review harder.
-
Add or update tests next to the code, in a
__tests__/folder. -
Run the checks for what you touched.
npm run type-checkalone is not enough: the Electron build uses a stricter config.npm run build:electron # main process npm run build:react # renderer npm run type-check npm run lint npm run test # runs skills:check first -
Open the PR using the template. Link the issue, say how you tested it (untested, lightly tested, fully tested), and add screenshots for UI changes.
-
Expect a first review within a few days. We may push small fixes to your branch to get it merged.
Code conventions
- TypeScript strict mode. No unused imports, no implicit
any, noconsole.log(use the logger module). - Shared types live in
src/shared/types.ts. IPC channel names come from constants insrc/shared/, and main-process handlers validate every input from the renderer. - Credentials go through Electron
safeStorage. Never write secrets to SQLite, logs or test fixtures. - File access on user-supplied paths goes through
checkProjectAccessinsrc/electron/security/project-access.ts. - Format only the lines you changed (
npx oxfmt <file>on new files); do not reformat whole existing files. - UI changes should match the existing quiet, monochrome style. Sidebar notices go through
src/renderer/components/sidebar/SidebarNotices.tsx.
Commit messages
Use conventional commits: type(scope): description, where type is feat, fix, docs, refactor, test, perf or chore. For example fix(gateway): retry Telegram polling after a network drop.
Reporting bugs and requesting features
Use the issue templates. For bugs, include steps to reproduce, expected and actual behavior, your OS and CoWork OS version, and relevant logs with secrets removed. For features, describe the problem you are trying to solve before the solution you have in mind.
Questions
Ask in Discussions, or chat in #contributors on Discord. Maintainer release steps are in the Development Guide.