Skip to content

mattgierhart/PRD-driven-context-engineering / .claude/skills/prd-v06-environment-setup

prd-v06-environment-setup

Flagged

Document development environment requirements for team consistency and AI agent understanding during PRD v0.6 Architecture. Triggers on requests to define environment setup, document tooling, create dev setup guide, or when user asks "what tools do I need?", "environment setup", "dev environment", "CLI requirements", "project setup", "onboarding setup". Consumes TECH- (stack selections), ARC- (architecture decisions). Outputs ENV- entries for development, CI/CD, and infrastructure environments. Feeds v0.7 Build Execution.

FileKindSize
SKILL.mdskill md10.7 KB
assets/env.mdmarkdown5.0 KB
references/examples.mdmarkdown7.3 KB

references/examples.md

View on GitHub
# Environment Setup Examples

Real-world examples of ENV- specifications for different tech stacks.

---

## Example 1: Node.js/TypeScript Web Application

### ENV-001: Development Environment

**ID**: ENV-001
**Category**: Development Setup
**Status**: Approved | Date: 2026-01-15
**Owner**: Engineering Team

#### CLIs (Global)

```bash
# macOS
brew install mise jq gh ripgrep httpie

# Linux
apt install jq gh ripgrep
curl https://mise.run | sh
```

| Tool | Version | Purpose |
|------|---------|---------|
| `mise` | latest | Version manager for Node.js |
| `jq` | 1.7+ | JSON processing |
| `gh` | 2.x | GitHub CLI for PR workflows |
| `rg` | 14.x | Fast code search |

#### Packages (Per-Project)

```bash
npm install --save-dev \
  typescript \
  eslint \
  prettier \
  @typescript-eslint/parser \
  @typescript-eslint/eslint-plugin \
  jest \
  @types/jest
```

| Package | Purpose |
|---------|---------|
| `typescript` | Type checking |
| `eslint` | Linting |
| `prettier` | Code formatting |
| `jest` | Testing framework |

#### Configuration Files

| File | Purpose |
|------|---------|
| `tsconfig.json` | TypeScript compiler options |
| `.eslintrc.js` | ESLint rules |
| `.prettierrc` | Prettier formatting |
| `jest.config.js` | Test configuration |
| `.mise.toml` | Tool versions |

#### Scripts (package.json)

```json
{
  "scripts": {
    "validate": "npm run lint && npm run typecheck && npm run test",
    "lint": "eslint . --ext .ts,.tsx",
    "lint:fix": "eslint . --ext .ts,.tsx --fix",
    "typecheck": "tsc --noEmit",
    "format": "prettier --write .",
    "format:check": "prettier --check .",
    "fix": "npm run lint:fix && npm run format",
    "test": "jest",
    "test:watch": "jest --watch",
    "build": "tsc"
  }
}
```

#### Environment Manager (.mise.toml)

```toml
[tools]
node = "20"

[tasks.validate]
run = "npm run validate"
description = "Run all quality checks"

[tasks.fix]
run = "npm run fix"
description = "Auto-fix code issues"
```

#### Verification

```bash
# 1. Verify mise and Node
mise --version
node --version  # Should show v20.x

# 2. Verify project setup
npm install
npm list --dev | head -20

# 3. Verify quality checks
npm run validate

# 4. Verify build
npm run build
```

#### Related IDs

- TECH-001: Next.js framework selection
- TECH-002: TypeScript strict mode decision
- ARC-001: Monolith structure

---

## Example 2: Python Data Science Project

### ENV-001: Development Environment

**ID**: ENV-001
**Category**: Development Setup
**Status**: Approved | Date: 2026-01-15
**Owner**: Data Team

#### CLIs (Global)

```bash
# macOS
brew install mise jq httpie

# Linux
curl https://mise.run | sh
apt install jq
```

| Tool | Version | Purpose |
|------|---------|---------|
| `mise` | latest | Manages Python + tools |
| `jq` | 1.7+ | JSON processing |

#### Packages (Per-Project)

```bash
# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dev dependencies
pip install -e ".[dev]"
```

**pyproject.toml:**
```toml
[project.optional-dependencies]
dev = [
    "ruff",
    "mypy",
    "pytest",
    "pytest-cov",
    "ipykernel",
]
```

| Package | Purpose |
|---------|---------|
| `ruff` | Fast linting + formatting |
| `mypy` | Type checking |
| `pytest` | Testing framework |
| `pytest-cov` | Coverage reporting |

#### Configuration Files

| File | Purpose |
|------|---------|
| `pyproject.toml` | Project config, dependencies |
| `ruff.toml` | Linting rules |
| `.python-version` | Python version (mise) |

#### Scripts (Makefile)

```makefile
.PHONY: validate lint format typecheck test fix

validate: lint typecheck test

lint:
	ruff check .

format:
	ruff format .

typecheck:
	mypy src/

test:
	pytest --cov=src

fix:
	ruff check . --fix
	ruff format .
```

#### Environment Manager (.mise.toml)

```toml
[tools]
python = "3.12"

[tasks.validate]
run = "make validate"
description = "Run all quality checks"

[tasks.fix]
run = "make fix"
description = "Auto-fix code issues"
```

#### Verification

```bash
# 1. Verify Python version
python --version  # Should show 3.12.x

# 2. Verify venv and packages
source .venv/bin/activate
pip list | grep -E "ruff|mypy|pytest"

# 3. Verify quality checks
make validate
```

---

## Example 3: Go Microservice

### ENV-001: Development Environment

**ID**: ENV-001
**Category**: Development Setup
**Status**: Approved | Date: 2026-01-15
**Owner**: Platform Team

#### CLIs (Global)

```bash
# macOS
brew install mise jq gh golangci-lint

# Linux
curl https://mise.run | sh
apt install jq
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
```

| Tool | Version | Purpose |
|------|---------|---------|
| `mise` | latest | Go version manager |
| `golangci-lint` | 1.55+ | Meta-linter for Go |
| `jq` | 1.7+ | JSON processing |

#### Configuration Files

| File | Purpose |
|------|---------|
| `go.mod` | Module dependencies |
| `.golangci.yml` | Linter configuration |
| `Makefile` | Build/test commands |

#### Scripts (Makefile)

```makefile
.PHONY: validate lint test build fix

validate: lint test

lint:
	golangci-lint run

test:
	go test -v -race -coverprofile=coverage.out ./...

build:
	go build -o bin/app ./cmd/app

fix:
	golangci-lint run --fix
	go fmt ./...
```

#### Verification

```bash
# 1. Verify Go version
go version  # Should show 1.22.x

# 2. Verify dependencies
go mod download
go mod verify

# 3. Verify quality checks
make validate

# 4. Verify build
make build
```

---

## CLI vs MCP Decision Examples

### Example: GitHub Operations

| Operation | CLI | MCP | Decision |
|-----------|-----|-----|----------|
| Create PR | `gh pr create` | GitHub MCP | **CLI** - works in CI |
| List issues | `gh issue list` | GitHub MCP | **CLI** - scriptable |
| View PR diff | `gh pr diff` | GitHub MCP | **CLI** - standard output |

### Example: Database Operations

| Operation | CLI | MCP | Decision |
|-----------|-----|-----|----------|
| Run migrations | `prisma migrate` | None | **CLI** - only option |
| Query data | `psql` / db CLI | DB MCP | **CLI** - works everywhere |
| Generate types | `prisma generate` | None | **CLI** - build step |

### Example: When MCP is Appropriate

| Operation | CLI | MCP | Decision |
|-----------|-----|-----|----------|
| Jira ticket creation | None native | Jira MCP | **MCP** - no CLI available |
| Confluence updates | None native | Confluence MCP | **MCP** - no CLI available |
| Figma design access | None | Figma MCP | **MCP** - visual context needed |

---

## Common Verification Patterns

### Node.js Project

```bash
#!/bin/bash
set -e

echo "=== Verifying Node.js Environment ==="

# 1. Check Node version
echo "Node: $(node --version)"
[[ $(node --version) == v20* ]] || echo "Warning: Expected Node 20.x"

# 2. Check npm packages
npm install
npm list --depth=0

# 3. Run validation
npm run validate

echo "=== Environment verified ==="
```

### Python Project

```bash
#!/bin/bash
set -e

echo "=== Verifying Python Environment ==="

# 1. Check Python version
echo "Python: $(python --version)"

# 2. Check venv
[[ -d .venv ]] || python -m venv .venv
source .venv/bin/activate

# 3. Install and verify
pip install -e ".[dev]"
make validate

echo "=== Environment verified ==="
```

### Go Project

```bash
#!/bin/bash
set -e

echo "=== Verifying Go Environment ==="

# 1. Check Go version
echo "Go: $(go version)"

# 2. Verify modules
go mod download
go mod verify

# 3. Run validation
make validate

echo "=== Environment verified ==="
```
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall