a5c-ai/babysitter / library/specializations/cli-mcp-development/skills/env-var-mapper
env-var-mapper
VerifiedGenerate environment variable to CLI argument mapping with prefix support, type conversion, and fallback chains for configuration.
README.md
View on GitHub# Environment Variable Mapper Skill
Generate environment variable to CLI argument mapping with prefix support and type conversion.
## Overview
This skill generates code for mapping environment variables to CLI arguments, supporting prefix-based loading, type conversion, and fallback chains for flexible configuration.
## When to Use
- Mapping environment variables to CLI arguments
- Creating prefix-based configuration loading
- Implementing configuration fallback chains
- Supporting .env files in CLI applications
## Quick Start
### Basic Mapping
```json
{
"language": "typescript",
"prefix": "MYAPP_",
"mappings": [
{
"envVar": "PORT",
"argument": "port",
"type": "number",
"default": 3000
},
{
"envVar": "DEBUG",
"argument": "debug",
"type": "boolean"
}
]
}
```
## Features
### Prefix Support
- Namespaced env vars (MYAPP_PORT)
- Fallback to non-prefixed vars
- Consistent naming
### Type Conversion
- String to number
- String to boolean
- Enum validation
### .env Support
- Automatic .env loading
- Override hierarchy
- Sensitive value masking
## Integration with Processes
| Process | Integration |
|---------|-------------|
| argument-parser-setup | Env to arg mapping |
| configuration-management-system | Config loading |
| cli-application-bootstrap | Environment setup |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |