env-setup-assistant
Expert guide for setting up development environments including IDE configuration, tooling, dependencies, and developer onboarding. Use when bootstrapping new projects or standardizing team environments.
What this skill does
# Environment Setup Assistant Skill
## Overview
This skill helps you create reproducible, developer-friendly environments. Covers IDE configuration, tool installation, dependency management, onboarding documentation, and cross-platform compatibility.
## Environment Setup Philosophy
### Principles
1. **One command setup**: New developers should run one command
2. **Reproducible**: Same environment everywhere
3. **Documented**: Clear instructions for edge cases
4. **Versioned**: Lock tool and dependency versions
### Goals
- **DO**: Automate everything possible
- **DO**: Detect and report issues early
- **DO**: Support multiple platforms (macOS, Linux, Windows)
- **DON'T**: Assume global installations
- **DON'T**: Require manual steps without documentation
## Project Setup Script
### Comprehensive Setup Script
```bash
#!/bin/bash
# scripts/setup.sh
set -e # Exit on error
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
log_info() { echo -e "${GREEN}[INFO]${NC} $1"; }
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
# ===================
# Check Prerequisites
# ===================
check_command() {
if ! command -v "$1" &> /dev/null; then
log_error "$1 is not installed"
return 1
fi
log_info "$1 found: $(command -v $1)"
return 0
}
check_prerequisites() {
log_info "Checking prerequisites..."
local missing=0
check_command "node" || missing=$((missing + 1))
check_command "npm" || missing=$((missing + 1))
check_command "git" || missing=$((missing + 1))
# Check Node version
local node_version=$(node -v | cut -d'v' -f2)
local required_version="18.0.0"
if ! [ "$(printf '%s\n' "$required_version" "$node_version" | sort -V | head -n1)" = "$required_version" ]; then
log_error "Node.js version must be >= $required_version (found: $node_version)"
missing=$((missing + 1))
fi
if [ $missing -gt 0 ]; then
log_error "$missing prerequisite(s) missing"
echo ""
echo "Install missing tools:"
echo " - Node.js: https://nodejs.org/ or 'nvm install 20'"
echo " - Git: https://git-scm.com/"
exit 1
fi
log_info "All prerequisites met!"
}
# ===================
# Environment Setup
# ===================
setup_env() {
log_info "Setting up environment..."
if [ ! -f .env ]; then
if [ -f .env.example ]; then
cp .env.example .env
log_info "Created .env from .env.example"
log_warn "Please update .env with your values"
else
log_error "No .env.example found"
exit 1
fi
else
log_info ".env already exists"
fi
}
# ===================
# Install Dependencies
# ===================
install_dependencies() {
log_info "Installing dependencies..."
npm ci
log_info "Dependencies installed!"
}
# ===================
# Setup Git Hooks
# ===================
setup_git_hooks() {
log_info "Setting up Git hooks..."
npx husky install 2>/dev/null || log_warn "Husky not configured"
log_info "Git hooks configured!"
}
# ===================
# Database Setup
# ===================
setup_database() {
log_info "Setting up database..."
# Check if database is running
if ! pg_isready -h localhost -p 5432 &>/dev/null; then
log_warn "PostgreSQL not running on localhost:5432"
log_info "Start with: docker-compose up -d db"
return
fi
# Run migrations
npm run db:migrate 2>/dev/null || log_warn "No migrations to run"
# Seed data (development only)
if [ "$NODE_ENV" != "production" ]; then
npm run db:seed 2>/dev/null || log_warn "No seed script found"
fi
log_info "Database setup complete!"
}
# ===================
# Verify Setup
# ===================
verify_setup() {
log_info "Verifying setup..."
# Type check
npm run typecheck 2>/dev/null && log_info "TypeScript: OK" || log_warn "TypeScript check failed"
# Lint
npm run lint 2>/dev/null && log_info "Linting: OK" || log_warn "Linting issues found"
# Build test
npm run build 2>/dev/null && log_info "Build: OK" || log_error "Build failed"
}
# ===================
# Main
# ===================
main() {
echo ""
echo "================================"
echo " Project Setup"
echo "================================"
echo ""
check_prerequisites
echo ""
setup_env
echo ""
install_dependencies
echo ""
setup_git_hooks
echo ""
setup_database
echo ""
verify_setup
echo ""
echo "================================"
echo " Setup Complete!"
echo "================================"
echo ""
echo "Next steps:"
echo " 1. Update .env with your values"
echo " 2. Start development: npm run dev"
echo " 3. Open http://localhost:3000"
echo ""
}
main "$@"
```
## Version Management
### .nvmrc / .node-version
```
20.10.0
```
### Tool Versions (asdf)
```ini
# .tool-versions
nodejs 20.10.0
pnpm 8.12.0
python 3.11.6
```
### Volta Configuration
```json
// package.json
{
"volta": {
"node": "20.10.0",
"npm": "10.2.5"
}
}
```
## IDE Configuration
### VSCode Settings
```json
// .vscode/settings.json
{
// Editor
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.rulers": [80, 120],
// Files
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
"**/.next": true
},
// TypeScript
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.tsdk": "node_modules/typescript/lib",
// Tailwind
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
],
// ESLint
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
// Prettier
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
```
### VSCode Extensions
```json
// .vscode/extensions.json
{
"recommendations": [
// Essential
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
// TypeScript
"ms-vscode.vscode-typescript-next",
"yoavbls.pretty-ts-errors",
// React/Next.js
"dsznajder.es7-react-js-snippets",
"formulahendry.auto-rename-tag",
// Git
"eamodio.gitlens",
"mhutchie.git-graph",
// Productivity
"streetsidesoftware.code-spell-checker",
"usernamehw.errorlens",
"christian-kohler.path-intellisense",
// Theme (optional)
"GitHub.github-vscode-theme"
],
"unwantedRecommendations": []
}
```
### VSCode Launch Configuration
```json
// .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Next.js: debug server-side",
"type": "node",
"request": "attach",
"port": 9229,
"skipFiles": ["<node_internals>/**"]
},
{
"name": "Next.js: debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Next.js: debug full stack",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/next",
"args": ["dev"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal"
},
{
"name": "Jest: current file"Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.