infra-dify-ops

infra-dify-ops is a skill for Claude Code, Codex from seed-forge/harness-ai-kit. It costs 80 tokens per session (10,776 once invoked), scanned A, original, Apache-2.0.

A set of tools for managing Dify resources used by applications and workflows, including creating, checking, importing and exporting workflow files. It works at the platform-usage level, not with Dify deployment, databases or containers.

In plain words
What is it for?
Use it to create and validate workflow files, archive and export Dify apps, configure model providers, inspect apps with API keys, and check production workflows for broken graphs or unpublished changes.
Why use it?
It keeps Dify workflow files and application records organized and checks them before or after import. It also provides a fallback when the main Dify interface or API cannot complete an import.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is difyctl config init --base-url https://dify.example.com --workspace-dir ./fleet-platform/resources/dify.

Good fit Use it to create and validate workflow files, archive and export Dify apps, configure model providers, inspect apps with API keys, and check production workflows for broken graphs or unpublished changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/seed-forge/harness-ai-kit
agentmods
npx agentmods add skills/seed-forge/harness-ai-kit/infra-dify-ops

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for infra-dify-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/infra-dify-ops.svg)](https://agentmods.dev/skills/seed-forge/harness-ai-kit/infra-dify-ops)
Your own site
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/infra-dify-ops"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/infra-dify-ops.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 32
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 32
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Data Exfiltration · line 458
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.10776
Opus 5 $0.00040 $0.05388
Sonnet 5 $0.00016 $0.02155
Haiku 4.5 $0.00008 $0.01078

Measured 8d ago against content hash bf7ed9e28bf5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

infra-dify-ops scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST "$DIFY_BASE_URL/v1/workflows/run" \
skills/infra-dify-ops/SKILL.md · 637 lines

How it starts

The opening of the file, as written. The whole thing — 637 lines — stays where its author put it; the contents beside it link to each section on GitHub.

infra-dify-ops

配套 CLI difyctldifyresctl 旧包与 shim 已下线)。

用途

用于在 组织内部集群 场景中做 Dify 平台的使用层资源运维与 workflow DSL 创作,而不是处理部署层。它作为 AI 平台基础设施治理的一部分纳入 infra-*,但不接管 Dify Compose、数据库或容器生命周期。

这个 Skill 主要覆盖:

  • Dify app / workflow / chatflow / agent 等资源的本地归档
  • DSL 创作:从业务需求生成 import-ready DSL(workflow-create + spec v2)、本地校验(dsl validate
  • 双轨 DSL 导入:优先 Console API(dsl import --via auto),5xx/网络错误自动降级 Playwright;不再默认依赖 RPA
  • DSL 导出:经 Console API 拉取现网 app 的 DSL(dsl export
  • 导出的 DSL 文件校验、摘要、快照与 current 版本维护
  • 基于 app API key 的使用层检查
  • 模型 provider 配置(openai_api_compatible 加模型,联动 newapictl 消费)
  • Dify 1.13.x workflow DSL / graph 兼容性排障与生产验收
  • Studio 导入后 graph 损坏、未发布 app、输出结构漂移等使用层救援
  • 资源清单 resources.yml 的登记与批量筛选计划
  • 把后续新 workflow 及时沉淀到统一资源目录

DSL 创作与导入(0.2.0 新增)

三步创作流程

  1. difyctl workflow-create intake ... --spec-out ./specs/x.yml:从业务需求生成结构化 spec(默认 v2)
  2. difyctl workflow-create scaffold --spec ./specs/x.yml --output ./drafts/x.dify.yml:产出 import-ready DSL(含 app/kind: app/version: "0.6.0"/workflow.features/完整 graph node wrapper + position + edges)
  3. difyctl dsl validate ./drafts/x.dify.yml:本地校验(version/mode、图端点可达性、环检测、edge 引用、LLM 必填字段、变量引用语法、if-else handle)

双轨导入决策

  • difyctl dsl import --dsl ./drafts/x.dify.yml --via auto(推荐):
    • Console API 成功 → 返回 app_id + app_url
    • Console API 返回 5xx 或网络错误 → 自动降级 Playwright 浏览器导入
    • Console API 返回 4xx(配置/鉴权错误)→ 直接报错,不降级
  • --via api:只走 Console API,失败即报错(CI / 无 GUI 环境)
  • --via browser:只走 Playwright(现网 API 不可用时的兜底)

导入前默认自动跑一次 dsl validate;用 --skip-validate 跳过。

详细 DSL 结构、节点 schema、布局与踩坑见:

  • references/REFERENCE-DSL-AUTHORING.md
  • references/REFERENCE-DSL-GOTCHAS.md

输入

  • 当前资源目标,例如 appworkflowchatflow
  • 本地 DSL 导出文件路径
  • Dify app base URL 与 app API key(如需远端检查)
  • 资源 ID、标题、标签、app_id、app_name
  • 当前项目的资源工作区目录

输出

  • 规范化的资源目录
  • resource.json 元数据
  • dsl/current.*dsl/snapshots/* 快照
  • 远端 app 信息或参数检查结果
  • 对后续沉淀方式的明确建议

工作流

  1. 先判断这是“远端 app 检查”还是“本地资源沉淀”。
  2. 若需要远端检查:
    • 优先使用 difyctl app info
    • 必要时再用 difyctl app parameters
    • 如需补充环境描述,可再用 difyctl app meta
    • 若任务涉及命名、描述、发布对象或 Studio 卡片展示,先确认 live app 事实,再讨论本地 DSL 或 registry
  3. 若需要沉淀资源:
    • 先用 difyctl resource init <resource_id> --mode ...
    • 再把导出的 DSL 用 difyctl resource capture ... 归档
    • 默认维护 dsl/current.* 与时间戳快照
  4. 若要维护项目级资源清单:
    • 先用 difyctl registry init
    • 再用 difyctl registry upsert ...
    • 批量筛选时用 difyctl batch plan ...
  5. 若需要从零生成一个业务需求对应的 workflow:
    • 先用 difyctl workflow-create intake ...draft --from-demand ...
    • 再用 difyctl workflow-create validate-spec ...
    • 然后用 difyctl workflow-create scaffold ... 产出 DSL 草稿
  6. 若需要把本地资源同步回 Dify Studio:
    • 先用 difyctl studio create-plan ...
    • 或对已有资源用 difyctl studio export-plan ...
    • 或用 difyctl studio duplicate-plan ...
  7. 若准备切到真实浏览器自动化执行:
    • 先用 difyctl studio browser-doctor
    • 再用 difyctl studio import-dsl-run --dsl ...
    • 当前阶段要预期登录页和按钮选择器仍需现场微调
  8. 若只想快速理解一个 DSL:
    • 先用 difyctl dsl summarize <path>
  9. 每次新增或明显改造 workflow 后,都要判断是否应该:
    • 继续补当前资源目录
    • 新增一个独立资源目录
    • 回填到项目级知识卡片或 SOP
  10. 若导入后的 workflow 在 Dify 1.13.x 中无法运行或 Studio 无法正常打开:
  • 先把问题分层为 graph schemapublish stateruntime invoke 三类
  • 优先用黑盒 app API 调用和只读数据库检查定位,不要一上来就改库
  • 确认是旧 DSL 兼容性问题后,再决定是“最小字段补丁”还是“整图原生重建”
  1. 若需要做生产救援:
  • 先确认 draft graph、published workflow、apps.workflow_id、api_tokens 四个对象是否齐全
  • 再确认 startllmend 三类节点是否符合当前 Dify 原生 schema
  • 最后用真实样例做健康路径与异常路径双验证,结果通过后再宣布可用
  1. 若任务同时涉及 Git 台账、本地 DSL、Studio 页面和 live app:
  • 先把四层对象分开看,不要假设它们天然一致
  • 优先核对 live app,再核对 resources.yml / resource.json / dsl/current.*
  • 若只是 Studio 资产漂移,先修正 Studio,再把本地台账回写到一致状态
  1. 若需要查询/新增 Dify 模型提供商下的模型(模型台账):
  • difyctl provider login --username-env ... --password-env ... --headed 取 Console 会话,用返回的 full_cookie_header(含 csrf_token,纯 session_cookie 会 401)作为 --console-key
  • difyctl provider models --provider <full-path> 查某提供商已配置模型(台账视图),随时看清现状
  • difyctl provider add-model --provider <full-path> --model <name> --endpoint-url <base>/v1 --api-key <key> 给 openai_api_compatible 类可自定义模型的提供商加单个模型;先 --dry-run 预览 payload(无需 Console 会话)
  • newapi 消费 key 无法经 Admin API 读取(服务端全程脱敏、忽略客户端传入 key),必须从 newapi Web UI 复制或由用户提供;获取后 newapi/v1/chat/completions 冒烟测试确认模型可用再注册
  1. 若需要改某 workflow 的 LLM 节点模型:
  • GET /console/api/apps 定位 app_id → GET .../workflows/draft 取 graph
  • data.type=="llm" 节点的 model.providermodel.namePOST .../workflows/draft 保存 → POST .../workflows/publish 发布
  • POST .../workflows/draft/run(SSE 流)跑一次,确认 node_finished/workflow_finishedstatus=succeedederror=None

Read the full file on GitHub · 637 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 637 lines · 80 tokens per session scan A bf7ed9e28bf5

Subscribe to this mod's changes

infra-dify-ops is a skill published in the GitHub repository seed-forge/harness-ai-kit (22 stars, last pushed 8d ago), licensed Apache-2.0. It adds 80 tokens to every session and 10,776 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

api-tester

Test and document API endpoints - validate responses, check status, generate examples.

gooseworks-ai/goose-skills · 18 tokens

helius

Skill "helius" from helius-labs/core-ai, covering helius — build on solana, prerequisites, 1. helius mcp server, 2. mcp router surface and 3. api key.

helius-labs/core-ai · 0 tokens

audit-backend-architecture

Read-only audit and decision advisor for backend architecture, topology-gated by stack. Use when "audit backend architecture", "which pattern should I use", "am I over-engineering", "sync vs event-driven". Mechanical boundary rules → enhance-arch-boundaries.

kensaurus/cursor-kenji · 59 tokens

debug-fe-be-integration

Diagnose and fix frontend↔backend contract failures by tracing client requests, server logs, validation, auth, and responses on both sides. Use for API 4xx/5xx, mismatched payloads, validation failures, or "frontend and backend disagree". Single-layer errors → debug-error.

kensaurus/cursor-kenji · 66 tokens

audit-fe-api

Audit frontend API calls against backend implementation for contract alignment and network shape. Use when "API audit", "FE-BE contract", or "review frontend API integration". Live 4xx/5xx reproduction → debug-fe-be-integration.

kensaurus/cursor-kenji · 52 tokens

audit-realworld

Read-only full-stack conformance audit against RealWorld ("Conduit"): formal API spec, shared E2E suite, and closest-stack reference. Use when "audit against RealWorld", "Conduit conformance", or "is my full-stack app complete?". General user journeys → audit-ux-journeys.

kensaurus/cursor-kenji · 67 tokens