direnv-shell-commands

direnv-shell-commands is a skill for Claude Code, Codex from cdbattags/ai. It costs 66 tokens per session (2,025 once invoked), scanned B, original, MIT.

A writing guide for producing Markdown files that pass markdownlint, a checker for common Markdown formatting problems, without warnings.

In plain words
What is it for?
Use it when creating or editing Markdown, MDX, README files, Cursor rules, or skills, especially when the project enforces markdownlint.
Why use it?
It helps prevent documentation and configuration files from failing automated checks because of formatting issues.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or editing Markdown, MDX, README files, Cursor rules, or skills, especially when the project enforces markdownlint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cdbattags/ai/direnv-shell-commands
View source ↗ cdbattags/ai
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cdbattags/ai --skill direnv-shell-commands
Clone the repo
git clone --depth 1 https://github.com/cdbattags/ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for direnv-shell-commands

README.md
[![agentmods](https://agentmods.dev/badge/skills/cdbattags/ai/direnv-shell-commands.svg)](https://agentmods.dev/skills/cdbattags/ai/direnv-shell-commands)
Your own site
<a href="https://agentmods.dev/skills/cdbattags/ai/direnv-shell-commands"><img src="https://agentmods.dev/badge/skills/cdbattags/ai/direnv-shell-commands.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,025 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.02025
Opus 5 $0.00033 $0.01012
Sonnet 5 $0.00013 $0.00405
Haiku 4.5 $0.00007 $0.00202

Measured 8d ago against content hash 20769b944008, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

direnv-shell-commands scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (generate-cursor-env.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- `chmod 600` because the file contains `.env` secrets
src/skills/direnv-shell-commands/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Running Shell Commands with direnv + Nix Flake

This project uses direnv + flake.nix for a reproducible dev environment. The Nix daemon is sourced in ~/.zshenv so nix and direnv are always on PATH — even in non-interactive shells like Cursor's Shell tool.

Bootstrap Pattern (cascading, fastest first)

Cursor's Shell tool runs non-interactive zsh. The direnv hook zsh from .zshrc does NOT fire, so load the environment explicitly:

[[ -n "$IN_NIX_SHELL" ]] || { source .direnv/cursor-env.zsh 2>/dev/null || eval "$(DIRENV_LOG_FORMAT= direnv export zsh)"; }

This cascade tries three paths in order:

  1. Already loaded ($IN_NIX_SHELL set from a previous call) — skip (~0ms)
  2. Cached env file (.direnv/cursor-env.zsh exists and fresh) — source (~0ms)
  3. Live direnv export (cache missing or stale) — full evaluation (~1-4s)

Run from the workspace root (where .envrc lives). The Shell tool is stateful — subsequent calls in the same session inherit the environment.

First command in a session (bootstrap + run)

[[ -n "$IN_NIX_SHELL" ]] || { source .direnv/cursor-env.zsh 2>/dev/null || eval "$(DIRENV_LOG_FORMAT= direnv export zsh)"; } && pnpm dev

With working_directory set to the workspace root.

Subsequent commands (environment persists)

cd modules/web-app && pnpm db:seed

Quick Reference

Pattern Command
Bootstrap + run [[ -n "$IN_NIX_SHELL" ]] || { source .direnv/cursor-env.zsh 2>/dev/null || eval "$(DIRENV_LOG_FORMAT= direnv export zsh)"; } && <your command>
Generate cache (full) ~/.cursor/skills/direnv-shell-commands/generate-cursor-env.sh
Generate cache (minimal) ~/.cursor/skills/direnv-shell-commands/generate-cursor-env.sh --minimal
Force live export eval "$(DIRENV_LOG_FORMAT= direnv export zsh)"

Three Bootstrap Tiers

Tier 1: nix-direnv (global, already active)

nix-direnv is installed to ~/.nix-profile and sourced in ~/.config/direnv/direnvrc. It overrides direnv's built-in use flake with a faster implementation that:

Read the full file on GitHub · 180 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 180 lines · 66 tokens per session scan B 20769b944008

Subscribe to this mod's changes

direnv-shell-commands is a skill published in the GitHub repository cdbattags/ai (4 stars, last pushed 6mo ago), licensed MIT. It adds 66 tokens to every session and 2,025 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

implementation-loop

Disciplined plan-build-verify loop for implementing a feature or change. Use when building something new or modifying existing behavior, especially across multiple files.

KingEmma7/cursor-os · 33 tokens

debugging-loop

Systematic reproduce-isolate-fix-verify loop for bugs, test failures, and unexpected behavior. Use when something is broken and the cause is not yet known.

KingEmma7/cursor-os · 37 tokens

tw-component

Generate a UI component using correct Tailwind CSS v4 utility classes, CSS variable theming, and accessibility best practices. Prevents v3 syntax hallucination by grounding output in verified v4 patterns.

RoninForge/roninforge-tailwind-v4 · 43 tokens

tw-migrate

Analyze a Tailwind CSS v3 project and generate a complete migration plan to v4. Scans config, CSS, and template files for v3 patterns and produces a prioritized checklist with exact find-and-replace commands.

RoninForge/roninforge-tailwind-v4 · 48 tokens

tw-validate

Scan a Tailwind CSS project for v3/v4 version mixing, deprecated patterns, and common mistakes. Reports issues with exact file locations and suggested fixes.

RoninForge/roninforge-tailwind-v4 · 35 tokens

android-feature

Workflow for implementing a new Android feature, screen, fragment, activity, dialog, adapter, or enhancement in this XML/MVVM template. Use whenever the user asks to add, build, implement, or extend functionality — before writing any code. Covers planning, the MVVM/MVI skeleton, the Android configuration checklist…

orbitalsonic/AndroidPilot · 72 tokens