Agent skill

Dify Docs API Reference

by langgenius in 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.

CC-BY-4.0Auto-check passedBackend & APIs

Install Dify Docs API Reference

skills CLI
$ npx skills add langgenius/dify-docs --skill dify-docs-api-reference -a claude-code

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

GitHub CLI
$ gh skill install langgenius/dify-docs dify-docs-api-reference --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-api-reference .claude/skills/dify-docs-api-reference && 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-api-reference
GitHub stars
178
Token cost
~2.5k tokens
SKILL.md length
1,295 words
Files
4 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
CC-BY-4.0

At a glance

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.

  • Works in 4 steps: S1 — scope. Identify which app types the… → S5 — write or edit to the conventions.… → S2/S7 — verify every detail against the… → …
  • Tasks that involve OpenAPI specifications
  • SKILL.md covers Procedures by stage, Reader Persona, Spec Structure and Verifying Against Code, plus 2 more sections
  • Calls git

What it does

Dify Docs API Reference is an agent skill from 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. Writing and editing run under dify-docs-write; the standalone audit of an existing spec ("audit the API spec") runs directly from this pack.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/audit-checklist.md`, `references/codebase-paths.md` and `references/spec-conventions.md`).

It sits in Backend & APIs, covering OpenAPI specifications. It works with Dify and OpenAPI. The licence is CC-BY-4.0.

When your agent uses it

  • Tasks that involve OpenAPI specifications

Example prompts

  • “audit the API spec”
  • “/dify-docs-api-reference”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. S1 — scope. Identify which app types the operation serves from the AppMode table in references/codebase-paths.md; every later check is…
  2. S5 — write or edit to the conventions. Apply references/spec-conventions.md for every element: summaries, operationId, descriptions…
  3. S2/S7 — verify every detail against the code. Nothing ships unverified (see Verifying Against Code). Use references/codebase-paths.md to…
  4. S7 verifiers (after the pipeline's check chain): the independent subagent audit — required for new or substantially changed endpoints…

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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Dify Docs API Reference loads about 2.5k tokens when it runs, and up to ~9.5k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 1,295 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
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
~9.5k

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,295 words, ~2,490 tokens.

Download SKILL.mdSave it as .claude/skills/dify-docs-api-reference/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
dify-docs-api-reference
description
Rule pack for the Service API specs ({en,zh,ja}/api-reference/openapi_service.json): spec conventions, app-type scoping, code-verification rules, and the audit machinery. Writing and editing run under dify-docs-write; the standalone audit of an existing spec ("audit the API spec") runs directly from this pack.

Dify API Reference Documentation

OpenAPI specs for developers integrating Dify over REST. The code is the source of truth: when the spec disagrees with the code, the spec is wrong. Every detail you write must be traceable to a controller, model, or converter in the Dify codebase.

Not an entry point for writing — editing or creating specs runs under dify-docs-write; the procedures below implement its stages for the Service API specs.

Standalone audit (read-only, own trigger — no pipeline needed): auditing an existing spec is the app-type lens (procedure 1 below) plus Verifying Against Code applied systematically from references/audit-checklist.md.

Procedures by stage

All four are non-negotiable.

  1. S1 — scope. Identify which app types the operation serves from the AppMode table in references/codebase-paths.md; every later check is filtered through that app-type lens (see App-Type Scoping). Read code at the ref pinned in S1 per writing-guides/index.md § "Syncing the Dify codebase safely"; never git checkout or git pull in a tree you have not confirmed is clean.
  2. S5 — write or edit to the conventions. Apply references/spec-conventions.md for every element: summaries, operationId, descriptions, parameters, responses, error format, schemas, examples, tags, ordering. That file is the single source for formatting rules; do not reinvent them here. At S6, say that this pack modifies the stage: all three language specs are edited directly in the same pass (see Spec Structure); parity_check replaces a separate translate step.
  3. S2/S7 — verify every detail against the code. Nothing ships unverified (see Verifying Against Code). Use references/codebase-paths.md to locate controllers, error definitions, and global handlers. Flag suspected code bugs; never silently document them (see Flagging Suspected Bugs).
  4. S7 verifiers (after the pipeline's check chain): the independent subagent audit — required for new or substantially changed endpoints — and the example/schema consistency pass (both under S7 Verifiers). Substantially changed = any change to paths, methods, parameters, schema fields or constraints, status codes, error codes, example values, or availability; only pure prose rewording (summaries, descriptions, translations) is exempt.

Reader Persona

Backend developers integrating Dify apps or knowledge bases via REST. Strong coding ability; familiar with HTTP, authentication patterns, and JSON. Be precise about parameter types, required vs optional, error codes, and realistic examples. Do not explain what a REST API is.

Spec Structure

One spec per language — {en,zh,ja}/api-reference/openapi_service.json — is the spec of record. Edit it directly, in all three languages; parity_check enforces structural parity with en. (The five legacy per-app-type source specs and the merge pipeline that consolidated them are retired; recover from git history if needed.)

App types map to AppMode values. The one mapping table (docs names, spec groups, key endpoints, and the modes the Service API does not cover) is references/codebase-paths.md § "AppMode ↔ app-type names" — use it, never memory.

Shared endpoints (file upload, audio, feedback, app info, parameters, meta, site, end-user) appear once, with an availability line and per-mode notes in the description — a fix applies in one place, no propagation. tools/api-pipeline/memberships.json records which app types support each operation and drives the app-type overview pages plus check-coverage.

Every operation carries x-mint.href (/{lang}/api-reference/{en-tag-kebab}/{en-summary-kebab} — English slugs in all languages for language-switcher parity) and x-mint.metadata.title/sidebarTitle (the translated summary; without them the sidebar shows the English slug). Set all of these when adding an operation, and keep the tags arrays index-aligned across languages.

After structural edits (adding, removing, retitling, or reordering operations, or changing availability): update memberships.json and the app-type overview pages, then run wire, check-coverage, lint_specs, and parity_check per tools/api-pipeline/README.md. Description-only edits need the lints but not wire.

App-Type Scoping

The codebase shares controllers and Pydantic models across app modes; the merged spec documents each shared endpoint once, mode-aware. Filter every claim through the app types the operation actually serves (its availability line and memberships.json):

  • Shared models: include only fields that have an effect in at least one supported mode; mark mode-specific fields in a mode note.
  • Shared error handlers: include only errors triggerable in a supported mode.
  • Internal-only fields (e.g., retriever_from): omit from the spec.

To judge relevance, check the controller's AppMode guard; when in doubt, trace through AppGenerateService.generate(). For example, workflow_id matters in chatflow mode, not chat.

Show full SKILL.md (621 more words)Show less

Verifying Against Code

Every detail in the spec MUST be verifiable against the codebase.

What must match exactly:

  • Schema constraints (default, minimum/maximum, enum): the Pydantic Field() arguments, verbatim.
  • Required/optional: Field(default=...) is optional; no default is required; FetchUserArg(required=True) is required.
  • Response status codes: the code's return ..., <status>.
  • Response body fields: what the code actually returns after converters.
  • Error codes and messages: only errors the endpoint raises, with names and description strings traced to the exception.

How to verify:

  1. Identify the correct controller. These specs are the Service API (servers base ends in /v1; controllers/service_api/). The same route name often also exists on the web or console blueprint with a different path, auth model, and required params (e.g., a required user); match the blueprint whose base URL matches servers, not the first controller you find.
  2. Read the controller method.
  3. For each parameter, find the Pydantic model or request.args.get() and note the Field() arguments.
  4. Trace string fields beyond the controller. A controller str may be cast to StrEnum/Literal or validated against a fixed list downstream; if so, the spec needs enum.
  5. For errors, trace except to raise to the exception class and its error_code/code in error.py, and through the global handlers in api/libs/external_api.py.
  6. For responses, read the return statement AND any response converter (they flatten, restructure, or inject fields).
  7. For service calls, read the service method to see what it actually returns or raises.

Flagging Suspected Bugs

The code is the source of truth, but the code itself can have bugs. When something looks irregular (off-by-one in le/ge, a body on a 204, error handling that differs from sibling endpoints, a required mismatch):

  1. Flag it explicitly. Never silently document the suspected bug.
  2. Show the evidence. Quote the exact line and explain why it looks wrong.
  3. Ask the user to decide: document as-is, or treat as an upstream bug.
  4. Never auto-correct. Do not write the "correct" value when the code says otherwise.

Beyond fidelity, act as a professional API writer: challenge questionable decisions with reasoning, suggest developer-experience improvements (kept clearly separate from required fixes), and push back on conflicting instructions with evidence.

S7 Verifiers

Independent code audit (required for new or substantially-changed endpoints)

Spec errors hide in plausible-looking JSON. Dispatch a subagent to audit the spec against the code, and instruct it not to trust your draft. The brief MUST:

  • Pin the verification refs: the exact dify tag/branch. Add the graphon version pinned in dify/api/pyproject.toml only when the endpoint's behavior runs through the graph engine (workflow execution and its streaming events); it does not apply to the Knowledge spec or to controller, parameter, or error checks, which live in dify.
  • Require the agent to load this skill and its references/ (spec-conventions, audit-checklist, codebase-paths).
  • Identify the correct controller (Service API at /v1, controllers/service_api/), not a same-named web/console route with different auth or params; see Verifying Against Code.
  • Per endpoint: check path/method, every parameter (required/optional/type), response status and body fields, and each error code traced exception to handler, all against code. Return a per-endpoint verdict with file:symbol evidence, plus a separate list of what code alone cannot confirm.
  • Trace opaque request fields (ids, tokens, file references) to where they are resolved and validated, not just the controller. Capture ownership and cross-request rules, such as an upload_file_id whose owning user must match the submit's.

Treat the audit as authoritative over your draft; reconcile every discrepancy before claiming done.

Example and schema consistency

A quick mechanical pass, independent of the audit:

  • Every key in a request or response example appears in the corresponding schema, and every documented field appears in at least one example.
  • Every documented enum value and oneOf branch is exercised by at least one example.

© 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 3 other files (references) in .claude/skills/dify-docs-api-reference of langgenius/dify-docs.

  • SKILL.md
  • references/audit-checklist.md
  • references/codebase-paths.md
  • references/spec-conventions.md

Open the folder on GitHubat commit 01f1cb6

Compare with similar skills

Dify Docs API Reference 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 API Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dify Docs API Reference this skilllanggenius/dify-docs178—~2.5kAutomated safety check: PassCC-BY-4.0
ToolJet Marketplace Plugin BuilderToolJet/ToolJet41k—~2.1kAutomated safety check: PassAGPL-3.0
Step Partsearthtojake/text-to-cad18k1 repos~1.5kAutomated safety check: PassMIT
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
OpenAPI to MCP Servermcp-use/mcp-use11k—~5.2kAutomated safety check: PassApache-2.0
Use Yaakmountain-loop/yaak19k—~1.9kAutomated safety check: PassMIT

Similar skills

  • Turns an API description, such as an OpenAPI file or a Postman collection, into a connector plugin for ToolJet's marketplace and checks it with the repo's validator.

    41k GitHub stars~2.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Step Parts

    earthtojake/text-to-cad

    Find, evaluate, and download common purchasable CAD parts from step.parts, including named off-the-shelf actuators, servos, motors, electronics boards, connectors, screws, bolts, nuts, washers…

    18k GitHub starsUsed in 1 repo~1.5k tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • OpenAPI to MCP Server

    mcp-use/mcp-use

    Turns an OpenAPI or Swagger spec into an MCP server with the mcp-use TypeScript SDK, mapping each operation to a tool, wiring auth, testing and deploying.

    11k GitHub stars~5.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Use Yaak

    mountain-loop/yaak

    A skill your agent uses when the user mentions Yaak, a Yaak workspace, or the yaak command, or asks to call, hit, or smoke test HTTP/REST endpoints, save or organize API requests for reuse or manual…

    19k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub starsUsed in 1 repo~3.4k tokens
    Backend & APIsAuto-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 7 days ago
    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 7 days ago
    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 7 days ago
    Auto-check passed
  • Dify Docs Env Vars

    langgenius/dify-docs

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

    178 GitHub stars~2.5k tokensUpdated 7 days ago
    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 7 days ago
    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 7 days ago
    Auto-check passed

Works with

Categories

Questions about Dify Docs API Reference

What does Dify Docs API Reference do?

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. Dify Docs API Reference is an agent skill from langgenius/dify-docs.json): spec conventions, app-type scoping, code-verification rules, and the audit machinery.

When should I use Dify Docs API Reference?

Dify Docs API Reference fits situations like: tasks that involve OpenAPI specifications.

How do I install Dify Docs API Reference in Claude Code?

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

How do I install Dify Docs API Reference in Codex?

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

Can I use Dify Docs API Reference 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-api-reference -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-api-reference, .gemini/skills/dify-docs-api-reference, .github/skills/dify-docs-api-reference and .opencode/skills/dify-docs-api-reference in your project.

What does Dify Docs API Reference need to run?

Going by SKILL.md and its folder, Dify Docs API Reference needs the command-line tools its instructions call (git).

Does Dify Docs API Reference access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dify Docs API Reference 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 API Reference use?

Dify Docs API Reference 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 API Reference 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 7k tokens, read only when the agent opens those files.

What are the alternatives to Dify Docs API Reference?

Skills that share tags, products or a category with Dify Docs API Reference: ToolJet Marketplace Plugin Builder (ToolJet/ToolJet, 41k stars), Step Parts (earthtojake/text-to-cad, 18k stars), API Designer (Jeffallan/claude-skills, 12k stars) and OpenAPI to MCP Server (mcp-use/mcp-use, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dify Docs API Reference?

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 September 30, 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.