agentleFS
agentsdanceagentsdance/agentskills/skills/env-setup/SKILL.md

env-setup

Skill3 starsChanged 11 months agoApache-2.0View on GitHub

Set up development environment configurations. Use when the user needs to create .env files, manage environment variables, or configure development settings.

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Environment Setup

Configure development environment variables and settings.

.env File Structure

# Application
APP_NAME=MyApp
APP_ENV=development
APP_DEBUG=true
APP_URL=http://localhost:3000

# Database
DB_HOST=localhost
DB_PORT=5432
DB_NAME=myapp_dev
DB_USER=postgres
DB_PASSWORD=secret

# External Services
REDIS_URL=redis://localhost:6379
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_REGION=us-east-1

# API Keys
STRIPE_SECRET_KEY=sk_test_...
SENDGRID_API_KEY=SG...

Best Practices

PracticeDescription
Never commit secretsAdd .env to .gitignore
Use .env.exampleTemplate with placeholder values
Validate on startupFail fast if required vars missing
Use strong typingParse and validate values

.env.example Template

# Copy this file to .env and fill in the values
APP_NAME=MyApp
APP_ENV=development
APP_DEBUG=false

# Database (required)
DB_HOST=
DB_PORT=5432
DB_NAME=
DB_USER=
DB_PASSWORD=

# Optional services
REDIS_URL=

Loading Environment Variables

Node.js (dotenv)

import 'dotenv/config';
const dbHost = process.env.DB_HOST;

Python (python-dotenv)

from dotenv import load_dotenv
load_dotenv()
db_host = os.getenv('DB_HOST')

Validation (zod)

import { z } from 'zod';

const envSchema = z.object({
  DB_HOST: z.string(),
  DB_PORT: z.coerce.number().default(5432),
  APP_DEBUG: z.coerce.boolean().default(false),
});

export const env = envSchema.parse(process.env);

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.