workflow-env

Source env.sh before build, run, or deployment commands.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/plutowang/term.conf --skill workflow-env
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-env
Source: https://github.com/plutowang/term.conf/tree/main/opencode/skills/global/workflow-env
Command: npx skills add https://github.com/plutowang/term.conf --skill workflow-env

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This rule ensures that an optional env.sh is sourced before any build, run, or deployment command, preventing missing environment configuration from causing failures.

Core Features & Use Cases

  • Environment preloading: If env.sh exists at the project root, it is sourced automatically before the command.
  • Wide compatibility: Applies to common workflows across Node (pnpm, bun, npm scripts like dev/build/start), compilers (zig, go, cargo, dotnet), task runners (make, just, rake), and infra tools (docker, docker-compose, terraform, kubectl).
  • Safe fallback: If env.sh is absent, commands run normally with existing environment variables.

Quick Start

Place an env.sh at your project root containing your environment exports. Then run your usual build or deployment command (e.g., pnpm build); if env.sh exists, it will be sourced first.

Frequently Asked Questions about workflow-env

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically load environment variables before running a build or deployment command?

You can automatically load environment variables by placing an env.sh file at your project root. The skill sources this file before executing build, run, or deployment commands to ensure a consistent runtime environment.

Does this environment sourcing approach work with Node, Cargo, and Docker workflows?

Yes, this environment sourcing works across Node, compilers like Cargo, and infrastructure tools like Docker. It applies to various workflows including pnpm, go, make, terraform, and kubectl to preload configurations.

What happens if there is no env.sh file in my project root?

If an env.sh file is absent from your project root, commands run normally with existing environment variables. This safe fallback ensures your build or deployment proceeds without failing.

Why do my deployment commands fail due to missing environment configuration?

Deployment commands fail when required environment variables are not loaded. Sourcing an env.sh file before execution enforces environment preloading, preventing missing configurations from causing build or deployment failures.

Can I use a shell script to manage environment configuration for task runners like Make?

Yes, you can use an env.sh shell script to manage environment configuration for task runners like Make. The script is automatically sourced before your make or just commands execute.

What is the best way to ensure consistent runtime environments across different compilers and tools?

The best way to ensure consistent runtime environments is to source a centralized env.sh file before commands. This enforces loading environment configuration across compilers and infrastructure tools.