Electron Build
DevOps & Securityelectron-buildElectron Build is an Agent Skill for devops & security published in the RocketChat/Rocket.Chat.Electron repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Build and test the Electron app with proper worktree isolation
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/RocketChat/Rocket.Chat.Electron/blob/HEAD/.claude/skills/electron-build/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/electron-build, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Electron Build
Build, lint, and test the Rocket.Chat Electron app. Uses git worktrees to avoid disrupting the user's working directory.
Arguments
platform(optional): Target platform -mac,win,linux, orall. Defaults to current platform.skip-worktree(optional): If "true", build in the current directory instead of creating a worktree.
Steps
1. Setup
If skip-worktree is not "true":
- Create a worktree from the current branch:
mkdir -p ../Rocket.Chat.Electron-worktrees git worktree add ../Rocket.Chat.Electron-worktrees/build-$(git branch --show-current) HEAD - Change to the worktree directory
- Install dependencies:
yarn
2. Lint
yarn lint
Fix any lint errors before proceeding.
3. Test
yarn test
All tests must pass before building.
4. Build
Build the app bundle:
yarn build
Then build platform packages if requested:
| Platform | Command |
|---|---|
| macOS | yarn build-mac |
| Windows | yarn build-win (includes --x64 --ia32 --arm64) |
| Linux | yarn build-linux |
5. Workspace Build
If changes touch workspaces/desktop-release-action/:
yarn workspaces:build
rm -rf workspaces/desktop-release-action/dist/dist
6. Cleanup
If a worktree was created:
git worktree remove ../Rocket.Chat.Electron-worktrees/build-$(git branch --show-current)
Report
After completion, report:
- Lint status (pass/fail with error count)
- Test status (pass/fail with test count)
- Build status and output location