Agent skill

Dify Docs Env Vars

by langgenius in langgenius/dify-docs

Rule pack for the environment variable reference — en/self-host/deploy/configuration/environments.mdx.

CC-BY-4.0Auto-check passedDevOps & Cloud

Install Dify Docs Env Vars

skills CLI
$ npx skills add langgenius/dify-docs --skill dify-docs-env-vars -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install langgenius/dify-docs dify-docs-env-vars --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/langgenius/dify-docs.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/dify-docs-env-vars .claude/skills/dify-docs-env-vars && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dify-docs-env-vars
GitHub stars
178
Token cost
~2.5k tokens
SKILL.md length
1,299 words
Files
3 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
CC-BY-4.0

At a glance

Rule pack for the environment variable reference — en/self-host/deploy/configuration/environments.mdx.

  • Works in 5 steps: (S2): Trace each variable in the codebase → (S2): Write a plain-language explanation → (S5): Write the user-facing description → …
  • Tasks that involve Secrets management
  • SKILL.md covers Procedure (S2 → S6), S7 verifiers, Source of Truth and Document Structure, plus 1 more section
  • Runs Python scripts from its folder; calls python3; needs SECRET_KEY

What it does

Dify Docs Env Vars is an agent skill from langgenius/dify-docs. Rule pack for the environment variable reference — en/self-host/deploy/configuration/environments.mdx. Carries the tracing procedure, description rules, verifier, and document structure. Loaded by dify-docs-write; not an entry point.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/style-overrides.md` and `verify-env-docs.py`).

It sits in DevOps & Cloud, covering Secrets management and Markdown. It works with Dify and Docker. The licence is CC-BY-4.0.

When your agent uses it

  • Tasks that involve Secrets management
  • Tasks that involve Markdown

Example prompts

  • “/dify-docs-env-vars”

Requirements

  • Python 3
  • Docker
  • A credential in SECRET_KEY

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. (S2): Trace each variable in the codebase
  2. (S2): Write a plain-language explanation
  3. (S5): Write the user-facing description
  4. (S4 contribution): Report
  5. (S5/S6): Edit the documentation

What it can do on your machine

Read from SKILL.md and the folder at commit 01f1cb6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SECRET_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dify Docs Env Vars loads about 2.5k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 1,299 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from langgenius/dify-docs at commit 01f1cb6, republished under its CC-BY-4.0 licence (© langgenius). 1,299 words, ~2,536 tokens.

Download SKILL.mdSave it as .claude/skills/dify-docs-env-vars/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
dify-docs-env-vars
description
Rule pack for the environment variable reference — en/self-host/deploy/configuration/environments.mdx. Carries the tracing procedure, description rules, verifier, and document structure. Loaded by dify-docs-write; not an entry point.

Dify Environment Variable Documentation

Not an entry point — run under dify-docs-write; the procedure below implements its stages for en/self-host/deploy/configuration/environments.mdx. Read references/style-overrides.md (in this skill directory — env-var-specific style rules and description anti-patterns) together with this pack. Use the ref pinned at S1; cite it in the S4 scope report.

Procedure (S2 → S6)

Work through in order. Every variable goes through steps 1–4 without exception — do not skip a variable because it seems "obvious".

Step 1 (S2): Trace each variable in the codebase

When using subagents for tracing, assign 3–5 related variables per agent. Tracing depth depends on variable type:

Variable typeDepth
Python config vars (defined in api/configs/)Full trace (below).
Frontend vars (mapped in web/docker/entrypoint.sh)Trace the Docker-to-NEXT_PUBLIC_* mapping in entrypoint.sh; verify the default in both docker/.env.example and web/.env.example; run grep -rn "<VAR_NAME>" <path-to-dify-repo>/api/ — any match means the var is dual-purpose and needs a full trace.
Docker/container service vars (only in docker-compose.yaml)grep -rn "<VAR_NAME>" <path-to-dify-repo>/api/ must return no matches; then document from .env.example comments.
Plugin daemon vars (PLUGIN_* not in api/configs/)Document from .env.example comments.

Full trace:

  1. Find the definition in api/configs/ — Pydantic field type, default, description, and any validation_alias (fallback) settings.
  2. Find every usage — grep both the env var name and the Python attribute (dify_config.VARIABLE_NAME); read the surrounding code.
  3. Determine behavior when empty vs set — trace fallback chains; identify what breaks.
Step 2 (S2): Write a plain-language explanation

Cover: what the variable does in practical terms; the specific features that depend on it (name them); what happens if left empty; what happens if set; key code file paths (no line numbers — they shift). This explanation goes into the S4 scope report.

Step 3 (S5): Write the user-facing description
  • Lead with the practical impact, not the technical mechanism
  • Name the features that require the variable (e.g., "Required for the Human Input node")
  • Explain what breaks if misconfigured (e.g., "If empty, email links will be broken")
  • Mention fallback behavior if any (e.g., "falls back to CONSOLE_API_URL")
  • Include relationships with other variables when relevant
  • Apply every rule in references/style-overrides.md
Step 4 (S4 contribution): Report

The S4 scope report presents: the plain-language explanations, the proposed descriptions, and the pinned ref. The pipeline's S4 gate applies.

Step 5 (S5/S6): Edit the documentation

Edit en/self-host/deploy/configuration/environments.mdx following Document Structure. Update the zh/ and ja/ copies in the same pass, per tools/translate/formatting-zh.md, tools/translate/formatting-ja.md, and writing-guides/glossary.md.

S7 verifiers

Run the verifier

The canonical command scans BOTH env sources — never pass only one:

bash
python3 .claude/skills/dify-docs-env-vars/verify-env-docs.py \
  --env-example <path-to-dify-repo>/docker/.env.example \
  --env-example <path-to-dify-repo>/docker/envs \
  --compose <path-to-dify-repo>/docker \
  --docs en/self-host/deploy/configuration/environments.mdx

--compose reads the ${VAR} references in docker/docker-compose*.y*ml. A variable a compose file consumes with no .env.example entry is invisible to every other check — EXPOSE_WEAVIATE_GRPC_PORT went undocumented for eleven months that way — so the script lists them under === IN COMPOSE BUT NOT IN ANY .env.example (<n>) === and treats them as source variables from then on. --compare-rev reads the compose files at both refs on its own. docker-compose.pytest.ports.yaml is skipped in both modes and the skip is printed: it publishes vector-store ports for the integration tests, and nothing a deployment reads.

--env-example is repeatable; a directory argument is globbed **/*.env.example recursively. The script first prints the list of files it parsed — confirm it shows docker/.env.example plus the files under docker/envs/, then the compose file count. A single-source run under-scans and produces false "extra in docs" results.

Output contract: on a fully clean doc the last line is ALL CHECKS PASSED — documentation matches .env.example and the script exits 0; otherwise it prints TOTAL ISSUES: <n> with per-category counts and exits 1.

Cadence. The full command above is the baseline audit, and the baseline was cleared at dify tag 1.17.1. A release pass runs --compare-rev — it diffs both the .env.example files and the compose references between two refs, so a clean baseline stays clean incrementally. Re-run the full command whenever this script, the ignore list's location, or the .env.example layout changes, and after any pass that touched more than a handful of variables; it must end on ALL CHECKS PASSED or every remaining line must be accounted for in the ignore list. Run it against the zh and ja pages too — the parser understands 默认值:, デフォルト値: and (空), so their counts are as meaningful as English's.

Pass bar for every task: the full command ends on ALL CHECKS PASSED, or every remaining line is accounted for in the ignore list with a reason. Missing from docs stopped being standing backlog when the baseline was cleared at tag 1.17.1: a nonzero count now means a variable arrived since, and it is documented or ignored before the task ends. If the script prints WARNING: ignore list not found, it stops with exit status 2 and prints no counts: fix the path and re-run.

Show full SKILL.md (524 more words)Show less
Update the ignore list if needed

The verifier filters out variables listed in the registry's guides/env-ignored-vars.md. That list stays in the private registry because its entries name unreleased work. The verifier finds it through $DIFY_DOCS_REGISTRY or a sibling clone of this repo; pass --ignored PATH to point somewhere else. When you:

  • Remove a variable from the docs as Cloud-only → add it under Cloud-only (SaaS).
  • Skip documenting an experimental or internal flag → add it under Experimental / internal.
  • Document a supported variable whose .env.example entry is commented out (#FOO=bar) → add it under Verifier false positives. This bucket is only for vars present in .env.example in commented form; see Source of Truth for vars absent entirely.

Every entry must include a source reference (PR, commit, or audit date).

Source of Truth

After Dify PR #31586, the supported self-host knob surface is split across:

  • docker/.env.example — essential startup values
  • docker/envs/**/*.env.example — categorized optional vars (core-services, databases, infrastructure, security, vectorstores, middleware)

The verifier reads both — always use the canonical verifier command above, which passes both sources.

Var locationAction
In any .env.example file, uncommentedDocument.
In any .env.example file, commented (#FOO=bar)Document; add to Verifier false positives in env-ignored-vars.md (the verifier can't parse defaults from comments).
Only in api/configs/ Pydantic, not in any .env.exampleDon't document. Upstream-deferred; file a PR adding it to the appropriate .env.example file first.
In .env.example and still parsed, but upstream-deprecated with a replacementKeep the row; lead the description with the deprecation and the replacement: "Deprecated; use X." Deprecated means still parsed — a removed var never gets a Deprecated label.
Removed from .env.example because the code no longer reads itRemove from docs — no tombstone rows (a documented row implies the var still takes effect). If a successor variable replaced it, add one clause to the successor's description so the old names stay findable via search: "Replaces the former EDITION, ignored from 1.17.0 onward." With no successor, remove without trace; upgrader discoverability belongs in upstream Dify release notes.

The verifier's "extra in docs" signal is not an escape hatch. Never suppress it for Pydantic-only vars via env-ignored-vars.md.

Document Structure

The doc groups variables by subsystem, broadly following the docker/.env.example and docker/envs/** layout (Common Variables, Server Configuration, Web Frontend Service, Database Service, and so on). Match an existing ## section for a new variable; don't invent one. If a variable genuinely fits no section, raise it with the user rather than guessing.

ElementUse for
TablesGroups of related, straightforward variables (connection settings, credentials, tuning knobs).
Individual headingsImportant variables needing explanation — enum-type selectors (STORAGE_TYPE, VECTOR_STORE) or variables where the "why" matters (SECRET_KEY, FILES_URL).
TabsFrontend variables where Docker and source deployments use different names. Tabs cannot sit inside table cells, so tabbed variables need individual headings.
AccordionsProvider-specific configuration (storage backends, vector databases, mail providers) — users only need one provider.

Reader Persona

Same audience as en/self-host/deploy/ documentation (see the dify-docs-guides pack): DevOps engineers and system administrators deploying Dify. Assume strong infrastructure knowledge. Readers are actively configuring a deployment and scanning for a specific variable, not reading linearly. They need to know what each variable does, when to change it, and what breaks if they get it wrong.

© langgenius, CC-BY-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in .claude/skills/dify-docs-env-vars of langgenius/dify-docs.

  • SKILL.md
  • references/style-overrides.md
  • verify-env-docs.py

Open the folder on GitHubat commit 01f1cb6

Compare with similar skills

Dify Docs Env Vars next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dify Docs Env Vars compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dify Docs Env Vars this skilllanggenius/dify-docs178—~2.5kAutomated safety check: PassCC-BY-4.0
LangBot Deployment Guidelangbot-app/LangBot18k—~1.2kAutomated safety check: NotesApache-2.0
Add Config Env Varbaserow/baserow6.1k—~1.1kAutomated safety check: PassCustom licence
Monstermq Broker Configvogler75/monster-mq143—~2.2kAutomated safety check: PassGPL-3.0
Deploymentmatrixorigin/memoria608—~1.6kAutomated safety check: NotesApache-2.0
Docker Compose Development Patternsaffaan-m/ECC275k4 repos~2.1kAutomated safety check: NotesMIT

Similar skills

  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Add Config Env Var

    baserow/baserow

    Add a Baserow configuration environment variable for the backend, frontend, or both, and propagate it through settings, Nuxt runtime config, Docker Compose, documentation, consumers, and tests as…

    6.1k GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Monstermq Broker Config

    vogler75/monster-mq

    Guide for configuring, deploying, and operating the MonsterMQ broker.

    143 GitHub stars~2.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Deployment

    matrixorigin/memoria

    Deploy Memoria with Docker Compose or Kubernetes. An agent skill from matrixorigin/memoria.

    608 GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Practical Docker and Docker Compose patterns for local development: stacks, override files, networking, volumes, container hardening and debugging.

    275k GitHub starsUsed in 4 repos~2.1k tokens
    DevOps & CloudAuto-check: notes
  • Official

    A skill your agent uses when authoring, planning, or running a declarative sbxenv.yaml file for Docker Sandboxes (sbx env create/run/plan/exec/rm), even if the user just says they want to "check in…

    539 GitHub stars~4k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed

More from langgenius/dify-docs

All 11 skills in this repo
  • Dify Docs Feature Research

    langgenius/dify-docs

    Research a Dify feature before writing or optimizing documentation.

    178 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Dify Docs Format Check

    langgenius/dify-docs

    Check formatting compliance in changed documentation against writing-guides/formatting-guide.md and tools/translate/formatting-{zh,ja}.md.

    178 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Dify Docs Terminology Check

    langgenius/dify-docs

    Audit terminology consistency across documentation against the codebase UI labels and the glossary — in prose and in the UI strings shown in screenshots.

    178 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Dify Docs API Reference

    langgenius/dify-docs

    Rule pack for the Service API specs ({en,zh,ja}/api-reference/openapiservice.json): spec conventions, app-type scoping, code-verification rules, and the audit machinery.

    178 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Dify Docs Write

    langgenius/dify-docs

    The entry point for writing or revising any documentation in this repo: user guides, deployment pages, plugin-dev pages, API specs, the env-var reference, CLI pages.

    178 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Dify Docs Editor Test

    langgenius/dify-docs

    Judge a finished draft as the docs owner would: a fresh agent reads it against the style guide and the reference page in its genre, marks the sentences that fall short, and returns a ship verdict on…

    178 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Dify Docs Env Vars

What does Dify Docs Env Vars do?

Rule pack for the environment variable reference — en/self-host/deploy/configuration/environments.mdx. Dify Docs Env Vars is an agent skill from langgenius/dify-docs.mdx.

When should I use Dify Docs Env Vars?

Dify Docs Env Vars fits situations like: tasks that involve Secrets management; tasks that involve Markdown.

How do I install Dify Docs Env Vars in Claude Code?

Run `npx skills add langgenius/dify-docs --skill dify-docs-env-vars -a claude-code`. Or copy the skill folder (.claude/skills/dify-docs-env-vars in langgenius/dify-docs) into .claude/skills/dify-docs-env-vars in your project. Claude Code loads it when a task matches its description.

How do I install Dify Docs Env Vars in Codex?

Run `npx skills add langgenius/dify-docs --skill dify-docs-env-vars -a codex`. Or copy the skill folder (.claude/skills/dify-docs-env-vars in langgenius/dify-docs) into .agents/skills/dify-docs-env-vars in your project. Codex loads it when a task matches its description.

Can I use Dify Docs Env Vars in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add langgenius/dify-docs --skill dify-docs-env-vars -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dify-docs-env-vars, .gemini/skills/dify-docs-env-vars, .github/skills/dify-docs-env-vars and .opencode/skills/dify-docs-env-vars in your project.

What does Dify Docs Env Vars need to run?

Going by SKILL.md and its folder, Dify Docs Env Vars needs Python for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named SECRET_KEY. Our summary lists: Python 3; Docker; A credential in SECRET_KEY.

Does Dify Docs Env Vars access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dify Docs Env Vars safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dify Docs Env Vars use?

Dify Docs Env Vars is published under the CC-BY-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dify Docs Env Vars use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 870 tokens, read only when the agent opens those files.

What are the alternatives to Dify Docs Env Vars?

Skills that share tags, products or a category with Dify Docs Env Vars: LangBot Deployment Guide (langbot-app/LangBot, 18k stars), Add Config Env Var (baserow/baserow, 6.1k stars), Monstermq Broker Config (vogler75/monster-mq, 143 stars) and Deployment (matrixorigin/memoria, 608 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dify Docs Env Vars?

langgenius (a GitHub organization) maintains it in langgenius/dify-docs, which has 178 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 2026.

Source: langgenius/dify-docs on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.