Get the FREE Ultimate OpenClaw Setup Guide →

setup-dev-env

Scanned
npx machina-cli add skill yu-iskw/coding-agent-fabric/setup-dev-env --openclaw
Files (1)
SKILL.md
2.4 KB

Setup 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 trunk installation
  • Step 2: Dependency Installation
    • Run pnpm install
  • Step 3: Tooling Setup
    • Run trunk install to fetch managed linters and formatters

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 pnpm dependencies are installed successfully.
  • trunk is 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:

  1. Invoke Verifier: Run the verifier subagent (../../agents/verifier.md). This confirms that the freshly installed dependencies allow for a successful build, pass lint checks, and satisfy all unit tests.
  2. Handle Failure: If the verifier fails, 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

  1. Step 1: Validate environment by checking .node-version and trunk presence
  2. Step 2: Install dependencies with pnpm install
  3. 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

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers