# Lint .env files for duplicated keys and unsafe formatting with dotenv-linter

> Check dotenv files for duplicated keys, malformed values, and formatting mistakes before they break local runs or secret handoffs.

- Skill: `agentskillexchange/lint-env-files-for-duplicated-keys-and-unsafe-formatting-wit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/lint-env-files-for-duplicated-keys-and-unsafe-formatting-wit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/lint-env-files-for-duplicated-keys-and-unsafe-formatting-wit/raw
- Safety review: pending (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/lint-env-files-for-duplicated-keys-and-unsafe-formatting-wit

---


# Lint .env files for duplicated keys and unsafe formatting with dotenv-linter

Check dotenv files for duplicated keys, malformed values, and formatting mistakes before they break local runs or secret handoffs.

## Prerequisites

The dotenv-linter CLI or binary and a repository containing dotenv files to check.

## Installation

Requirements and caveats from upstream:
- [wemake-services/dotenv-linter](https://github.com/wemake-services/dotenv-linter) (Python)

Basic usage or getting-started notes:
- &nbsp;&nbsp;&nbsp;&nbsp;The <code>.env</code> file has a simple key-value format, for example: <code>FOO=BAR</code>.<br />
- ## 🚀 Usage
- $ dotenv-linter diff .env .env.example

- Source: https://github.com/dotenv-linter/dotenv-linter
- Extracted from upstream docs: https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/HEAD/README.md

## Documentation

- https://dotenv-linter.readthedocs.io/

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/lint-dotenv-files-for-duplicated-keys-and-unsafe-formatting-with-dotenv-linter/)

