You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/dify-docs-env-vars/SKILL.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,18 @@ Read these shared guides:
17
17
2.`writing-guides/formatting-guide.md`
18
18
3.`writing-guides/glossary.md`
19
19
20
+
## Source of Truth: `docker/.env.example`
21
+
22
+
The doc mirrors `docker/.env.example`, the supported self-host knob surface.
23
+
24
+
| Var location | Action |
25
+
|---|---|
26
+
| In `.env.example`, uncommented | Document. |
27
+
| In `.env.example`, commented (`#FOO=bar`) | Document; add to **Verifier false positives** in `ignored-vars.md` (the verifier can't parse defaults from comments). |
28
+
| Only in `api/configs/` Pydantic, not in `.env.example`|**Don't document.** Upstream-deferred; file a PR adding it to `.env.example` first. |
29
+
30
+
The verifier's "extra in docs" signal is not an escape hatch. Never suppress it for Pydantic-only vars via `ignored-vars.md`.
31
+
20
32
## Four-Step Process
21
33
22
34
**Pull the latest Dify code** before tracing. In the Dify codebase directory:
@@ -143,7 +155,7 @@ Some variables in `.env.example` are deliberately not documented (Cloud-only, ex
143
155
144
156
- Remove a variable from the docs as Cloud-only → add it under **Cloud-only (SaaS)** in `ignored-vars.md`.
145
157
- Skip documenting an experimental or internal flag → add it under **Experimental / internal**.
146
-
- Document a supported variable whose `.env.example` entry is commented out→ add it under **Verifier false positives**.
158
+
- Document a supported variable whose `.env.example` entry is **commented out** (e.g., `#FOO=bar`) → add it under **Verifier false positives**. This bucket is **only** for vars that exist in `.env.example` in commented form. Do not use it to suppress verifier signal for vars that are absent from `.env.example` entirely — those are upstream-deferred (see [Source of Truth](#source-of-truth-docker-env-example)) and must not be documented.
147
159
148
160
Every entry must include a source reference (PR, commit, or audit date).
@@ -1479,3 +1479,35 @@ The existing entry near line 937 describes behavior correctly, but the stated de
1479
1479
### POSTGRES_MAX_CONNECTIONS — default correction
1480
1480
1481
1481
Covered in the "PostgreSQL / MySQL Performance Tuning Variables" section. `docker/.env.example` bumped the default from `100` to `200` upstream (`docker-compose.yaml` passes it as `-c max_connections=${POSTGRES_MAX_CONNECTIONS:-200}` to the Postgres container). The higher default is safer for Dify's multi-worker + Celery + async-task traffic shape; operators can still lower it on constrained hosts.
Creator Center is the submission portal where users upload Dify apps as DSL templates. Submitted templates are reviewed and, once approved, listed on Dify Marketplace. The console's **Publish to Marketplace** button (i18n key `common.publishToMarketplace` in `web/i18n/{en-US,zh-Hans,ja-JP}/workflow.json`) drives this flow.
1488
+
1489
+
**Flow:**
1490
+
1491
+
1. User clicks **Publish to Marketplace** in the app builder. The button is gated on `systemFeatures.enable_creators_platform` (frontend: `web/app/components/app/app-publisher/index.tsx`).
3. Endpoint (`api/controllers/console/app/app.py: AppPublishToCreatorsPlatformApi`) returns 403 when `CREATORS_PLATFORM_FEATURES_ENABLED` is false. Otherwise it exports the app DSL via `AppDslService.export_dsl(include_secret=False)`.
1494
+
4. `core/helper/creators.upload_dsl()` POSTs the DSL to `{CREATORS_PLATFORM_API_URL}/api/v1/templates/anonymous-upload` and receives a `claim_code`.
1495
+
5. `get_redirect_url()` builds the redirect with `?dsl_claim_code=...`. If `CREATORS_PLATFORM_OAUTH_CLIENT_ID` is non-empty, it also signs an OAuth authorization code via `OAuthServerService.sign_oauth_authorization_code(client_id, user_account_id)` and adds `&oauth_code=...`.
1496
+
6. Frontend opens the redirect URL in a new tab, taking the user into Creator Center to fill in template details.
1497
+
1498
+
**Behavior by var state:**
1499
+
1500
+
- `CREATORS_PLATFORM_FEATURES_ENABLED=false`: button hidden, console API returns 403. Self-hosters use this to remove the one-click publish path.
1501
+
- `CREATORS_PLATFORM_API_URL` overridden: only meaningful with a self-hosted Creator Center instance. Default `https://creators.dify.ai`.
1502
+
- `CREATORS_PLATFORM_OAUTH_CLIENT_ID` empty (default): anonymous upload — the receiving Creator Center cannot attribute the template to the publishing user.
**Naming note:** Env var prefix is `CREATORS_PLATFORM_*` and the backend Pydantic class is `CreatorsPlatformConfig`, but the user-facing product name is **Creator Center** and the UI button reads "Publish to Marketplace" (templates appear on Marketplace after Creator Center review). Use "Creator Center" in user-facing prose; the prefix is a backend-only artifact.
If either is missing as a working directory, ask the user for the path.
24
+
25
+
**Pull latest code** before investigating. Run in each repo directory:
19
26
```bash
20
27
git fetch origin && git checkout main && git pull origin main
21
28
```
22
-
If the user specified a different branch, substitute accordingly.
29
+
If the user specified a different branch for either repo, substitute accordingly.
23
30
24
-
**GitHub repo**: `langgenius/dify`
31
+
**Version pinning matters.** dify pins graphon to a specific version. Before reading graphon code, check the pinned version and verify against that tag, not graphon `main`:
# e.g. "graphon~=0.2.2" → check out v0.2.2 in graphon, not main
35
+
```
36
+
If you read graphon `main` and document behavior that ships only in an unreleased graphon version, the docs will not match what users see. When in doubt, ask the user whether to verify against the pinned version or graphon `main` (the latter is appropriate when documenting something the user knows is about to ship).
25
37
26
38
## Research Process
27
39
28
40
Run Phase 1 and Phase 2 in parallel using subagents where possible.
29
41
30
42
### Phase 1: Codebase Investigation
31
43
32
-
Locate and read the source code for the feature. Cover all three layers:
44
+
First decide which repo owns the backend implementation:
33
45
34
-
**Backend implementation** — Find the core logic. For workflow nodes, check `api/dify_graph/nodes/<node_name>/`. Read:
**Frontend UI** — Find the React components. For workflow nodes, check `web/app/components/workflow/nodes/<node_name>/`. Read:
63
+
**Frontend UI** — Find the React components in the dify repo (the web frontend was not split out). For workflow nodes, check `web/app/components/workflow/nodes/<node_name>/`. Read:
**API surface** — Trace how the feature's output reaches the API response. Check controllers, response converters, and serialization.
68
+
**API surface** — Trace how the feature's output reaches the API response. Check controllers, response converters, and serialization (all in dify).
45
69
46
70
Produce a summary of:
47
71
- What the feature does (based on code, not existing docs)
@@ -56,13 +80,19 @@ Flag any behavior inferred from code rather than observed in the running product
56
80
57
81
Search for user-reported problems and questions across these channels:
58
82
59
-
**GitHub Issues** — Run multiple searches with varied terms:
83
+
**GitHub Issues** — Run multiple searches with varied terms. Always search dify; also search graphon when the feature is a built-in workflow node, the graph engine, runtime, or model_runtime:
60
84
```bash
61
85
gh issue list --repo langgenius/dify --search "<feature name>" --limit 30
62
86
gh issue list --repo langgenius/dify --search "<alternative name>" --limit 30
End users typically file in dify even for graphon-owned behavior; graphon's tracker tends to hold engineering-side reports. Check both to avoid missing pain points.
95
+
66
96
**GitHub Discussions** — Search for related discussion topics:
67
97
```bash
68
98
gh api "repos/langgenius/dify/discussions?per_page=30" --jq '.[] | select(.title | test("<pattern>"; "i"))'
When checking dify PRs, also scan recent merges in `langgenius/graphon` for the same release window. A user-visible workflow change may ship as a graphon release plus a dify pin bump (look for changes to `api/pyproject.toml` and `api/uv.lock`).
116
120
117
121
**Important**: These mappings are heuristic. For every candidate match:
Copy file name to clipboardExpand all lines: AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ For task-specific guidance, see `writing-guides/index.md`.
15
15
- Write in English only, except when specifically optimizing Chinese or Japanese translations.
16
16
- Only edit the English section in `docs.json`. Translation sections sync automatically.
17
17
- MDX files require `title` and `description` in YAML frontmatter.
18
-
- When writing about a feature, verify behavior against the Dify codebase, not just existing docs. Existing docs may be outdated or completely wrong. When rewriting a page, treat every claim in the original as unverified. Check field names, types, required/optional status, and behavior descriptions against the current code. Never carry forward details from legacy docs without independent verification.
18
+
- When writing about a feature, verify behavior against the Dify codebase, not just existing docs. Existing docs may be outdated or completely wrong. When rewriting a page, treat every claim in the original as unverified. Check field names, types, required/optional status, and behavior descriptions against the current code. Never carry forward details from legacy docs without independent verification. The backend is split across two repos: built-in workflow nodes, the graph engine, runtime, and model_runtime live in the `graphon` repo (version-pinned in `dify/api/pyproject.toml`); integration nodes (Agent, Knowledge, Datasource, Trigger), orchestration, RAG, and tools stay in `dify`. Verify against the graphon version actually pinned by dify, not graphon `main`.
19
19
- For new features, the user may specify a development branch. Code on development branches may be in flux—when behavior is ambiguous, ask rather than assume.
20
20
- When adding or updating internal-only instructions, tooling, configs, or other non-public files, ensure all paths that should not be exposed by Mintlify are covered in `.mintignore`.
0 commit comments