Skip to content
Skills Library
DevOps & cloud · Automation

loading-environ

/loading-environ

Run a command with a chasky environment's secrets loaded from its dotenv output, delivered through an anonymous pipe (`--fifo --fifo-mode=fd`) so nothing is written to disk. Use when the user asks to load, use or run something with a chasky environ (e.g. "run X with the `my_app` env"). If no environ is named, list available environs and offer a suitable one based on its description.

Repository
chasky ↗
Licence
Apache-2.0
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Run a command with a chasky environment's secrets loaded from its dotenv output, delivered through an anonymous pipe (`--fifo --fifo-mode=fd`) so nothing is written to disk. Use when the user asks to load, use or run something with a chasky environ (e.g. "run X with the `my_app` env"). If no environ is named, list available environs and offer a suitable one based on its description.

Triggers from the description

run X with the `my_app` env

Arguments

/loading-environ [environ] [-- command args...]
Original author description

Run a command with a chasky environment's secrets loaded from its dotenv output, delivered through an anonymous pipe (`--fifo --fifo-mode=fd`) so nothing is written to disk. Use when the user asks to load, use or run something with a chasky environ (e.g. "run X with the `my_app` env"). If no environ is named, list available environs and offer a suitable one based on its description.

How it works

  1. How it works
  2. Steps
  3. Rules
Original SKILL.md headings · 82 lines, 644 words
SKILL.md preview
---
name: loading-environ
description: Run a command with a chasky environment's secrets loaded from its dotenv output, delivered through an anonymous pipe (`--fifo --fifo-mode=fd`) so nothing is written to disk. Use when the user asks to load, use or run something with a chasky environ (e.g. "run X with the `my_app` env"). If no environ is named, list available environs and offer a suitable one based on its description.
argument-hint: [environ] [-- command args...]
---

# chasky-env

Loads a chasky environ (`output: env` or `output: dotenv`) and makes its variables
available to a command, without the secrets ever touching the disk.

## How it works

```bash
chasky <env> --fifo --fifo-mode=fd -- <command>
```

- `--fifo` makes the file-backed outputs use a pipe instead of a temp file. With `--fifo`, `output: env` stops exporting the variables directly and exposes them as a file too.
- `--fifo-mode=fd` exposes it as an inherited anonymous pipe (`/dev/fd/N`) that only
  the spawned command (and its children) can open. The path is passed in `$DOTENV_FILE` (for both `output: env` and `output: dotenv`).
- The pipe is **single-read**: the first reader gets the contents, a second read sees EOF.
  So read `$DOTENV_FILE` exactly once, and do it inside the spawned command.
- chasky refuses to run inside another chasky environment (`CHASKY_ENVNAME` set).
- Unix only (Linux, macOS).

## Steps

1. Check that `chasky` is installed (`command -v chasky`). If it is unavailable, tell the
   user to install it before continuing. Suggest either of these methods (the install
   script requires the GitHub CLI):

   ```bash
   go install github.com/jcchavezs/chasky/cmd/chasky@latest
   ```

   ```bash
   gh release download --repo jcchavezs/chasky --pattern 'install.sh' -O - | sh
   ```

   Do not install it without the user's permission.
2. Take the environ name from the user's request (`$ARGUMENTS`). If it is missing, run
   `chasky list` and show the available environ names and descriptions to the user. Based
   on the user's task, recommend a relevant environ if its description is a good fit, and
   ask the user to confirm they want to use it before running any command that loads its
   secrets. If none is a clear fit, ask the user which environ to use. Do not load an
   environ until the user confirms the recommendation or names one.
3. Load the env file once (`eval "$(cat ...)"`, not `.`/`source`: some shells read 0 bytes when they size a pipe up front) inside the spawned process, then exec the target command.
   Each Bash tool call is a fresh shell, so the environ only lives for that one call;
   bundle everything that needs the secrets into the same invocation:

   ```bash
   chasky <env> --fifo --fifo-mode=fd -- sh -c '
     set -a; eval "$(cat "$DOTENV_FILE")"; set +a
     exec "$@"
   ' sh <command> [args...]
   ```

   For several commands, pass `sh -c 'set -a; eval "$(cat "$DOTENV_FILE")"; set +a; cmd1 && cmd2'`
   instead of exec'ing "$@".
4. If the consumer natively takes an env file (e.g. `docker run --env-file`), skip the
   sourcing and pass the path directly. It still gets one read:

   ```bash
   chasky <env> --fifo --fifo-mode=fd -- sh -c 'docker run --env-file "$DOTENV_FILE" image'
   ```

   Note the single quotes: the variable must expand inside the chasky-spawned shell,
   not in the calling shell.
5. Report the command's result to the user.

## Rules

- Never `cat`/`echo`/print `$DOTENV_FILE`, the sourced variables, or `env` output; these
  are secrets and would end up in the transcript. If you need to confirm a variable is
  set, test it without printing it: `[ -n "$VAR" ] && echo "VAR is set"`.
- Never copy the dotenv contents to a file or fall back to the default disk mode
  (omitting `--fifo`) unless the user explicitly asks for it.
- Do not read `$DOTENV_FILE` more than once (e.g. no `source` followed by a second
  `--env-file`); the second read is empty. If two consumers are needed, source once
  and let the second inherit the exported variables.
- If the command fails with an empty environment, the likely causes are: the pipe was
  already read, the consumer cannot read `/dev/fd/N`, or the environ has neither an `env` nor a `dotenv`
  output. Check the environ's config with `chasky edit` (ask the user first) rather
  than switching modes silently.
- `named-pipe` mode (`--fifo` alone) is reachable by any same-user process; only suggest
  it if the user wants multiple reads and accepts that trade-off.

Versions

The database has no other skills named loading-environ.

Database snapshot: 13.11.2026 · package version 73ab080f7ab5 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100dotenv-manager
    Manage dotenv manager operations. Auto-activating skill for DevOps Basics. Triggers on: dotenv manager, dotenv manager Part of the DevOps Basics skill category. Use when working with dotenv manager functionality. Trigger with phrases like "dotenv manager", "dotenv manager", "dotenv".
  • 90design
    Choose between standard and FIFO queues, SNS fan-out, and dead-letter and redrive settings for a workload, and check what a FIFO send needs. Use when designing message flows.
  • 100env-manager
    Manage environment variables and secrets across development, staging, and production environments. Use when someone needs to audit env vars, sync secrets between environments, detect missing or mismatched variables, rotate credentials, or set up a new environment from an…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.