setup-dev-env
Scannednpx machina-cli add skill yu-iskw/coding-agent-fabric/setup-dev-env --openclawSetup Development Environment
This skill automates the process of setting up the development environment to ensure all tools and dependencies are correctly installed and configured.
Workflow Checklist
- Step 1: Environment Validation
- Check Node.js version against
.node-version - Check for
trunkinstallation
- Check Node.js version against
- Step 2: Dependency Installation
- Run
pnpm install
- Run
- Step 3: Tooling Setup
- Run
trunk installto fetch managed linters and formatters
- Run
Detailed Instructions
1. Environment Validation
Node.js Version
Read the .node-version file in the workspace root. Ensure the current Node.js environment matches this version. If there's a mismatch, inform the user to switch Node versions (e.g., using nvm or fnm).
Trunk CLI
Check if trunk is installed by running trunk --version.
If trunk is not found, advise the user to install it. On macOS, use:
brew install trunk-io
For other platforms, refer to the Trunk installation documentation.
2. Dependency Installation
Run the following command at the workspace root to install all project dependencies. Refer to ../common-references/pnpm-commands.md for more pnpm commands.
pnpm install
3. Tooling Setup
Trunk manages linters and formatters hermetically. Run the following command to ensure all required tools are downloaded and ready. Refer to ../common-references/trunk-commands.md for more Trunk commands.
trunk install
Success Criteria
- All
pnpmdependencies are installed successfully. trunkis installed and all managed tools are initialized.- The Node.js version matches the requirement in
.node-version.
Post-Setup Verification
To ensure the environment is fully operational:
- Invoke Verifier: Run the
verifiersubagent (../../agents/verifier.md). This confirms that the freshly installed dependencies allow for a successful build, pass lint checks, and satisfy all unit tests. - Handle Failure: If the
verifierfails, follow its reporting to resolve environment-specific issues.
Source
git clone https://github.com/yu-iskw/coding-agent-fabric/blob/main/.claude/skills/setup-dev-env/SKILL.mdView on GitHub Overview
Automates the setup of the project’s dev environment, ensuring tools and dependencies are correct. It validates Node.js against the .node-version file, confirms trunk is installed, installs dependencies with pnpm, and initializes tooling with trunk install. A verifier check helps confirm a clean, working setup and points to remediation if issues arise.
How This Skill Works
It reads the .node-version in the workspace root and compares it with the current Node.js version, guiding the user to switch versions if needed. It then checks for trunk by running trunk --version and prompts installation with OS-specific guidance. Finally it runs pnpm install to resolve dependencies, followed by trunk install to fetch managed tools like linters and formatters.
When to Use It
- When starting a new task or onboarding to ensure a consistent dev environment
- When dependencies drift or after pulling changes that modify node_modules
- When you encounter environment setup failures or missing tooling
- Before running a build or tests to guarantee a clean baseline
- When upgrading Node.js or changing workspaces to verify version alignment
Quick Start
- Step 1: Validate environment by checking .node-version and trunk presence
- Step 2: Install dependencies with pnpm install
- Step 3: Initialize tooling with trunk install and run the verifier
Best Practices
- Always run the setup from the project root to ensure correct path context
- Verify .node-version matches the active Node.js version before proceeding
- Run pnpm install after any dependency changes
- Run trunk install to initialize managed tools like linters and formatters
- Use the verifier after setup to confirm a successful build, lint, and tests
Example Use Cases
- Fresh clone: run the skill to initialize the environment and verify via the verifier
- Dependencies drift: re-run pnpm install and trunk install to fix tooling
- Trunk missing: install trunk-io (macOS) or follow OS docs, then re-run setup
- Node version drift: switch to the required version using nvm or fnm and retry
- Verifier failure: follow its remediation steps to resolve environment issues