← 返回 Skills 市场
whswhs1128

dify-flow-access

作者 whswhs1128 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
52
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install dify-flow-access
功能描述
Query and interact with company knowledge bases or workflows using Dify API with multi-turn context and streaming response support.
使用说明 (SKILL.md)

Dify Workflow - OpenClaw CLI for Dify API

Use OpenClaw to query company knowledge base or execute workflows via Dify API. Supports multi-turn conversation and streaming responses.

Trigger Conditions

When users need to access internal knowledge bases, documentation queries, Q&A systems, or execute specific workflows, this skill handles those requests such as "help me check the knowledge base" or "query Dify workflow".

Features

  • ✅ Call Dify Workflow API (workflow mode)
  • ✅ Call Dify ChatApp API (chat mode)
  • ✅ Multi-turn conversation context management
  • ✅ Streaming response support (show results incrementally)
  • ✅ Automatic timeout and error handling
  • ✅ Configurable request parameters

Quick Start

# Basic ChatApp mode query (recommended, no workflow ID needed)
/dify-workflow "如何部署项目?" --chat

# Workflow mode query (requires specifying workflow ID)
/dify-workflow "查询 AI 助手信息" --wf wf_123456abcdef

# Multi-turn conversation (use conversation_id from previous response)
/dify-workflow "那退款流程呢?" --conv conv_xyz789

# Streaming response (show results incrementally)
/dify-workflow "解释一下这个概念" --stream

# Combined usage
/dify-workflow "查询中电港 AI 助手相关信息" --chat

Configuration

Base URL: http://10.10.10.159/v1
API Key: app-jUhDcPj3lcnEG04JW4gRsfyy

Environment Variables (Optional Overrides)

You can override defaults via environment variables:

export DIFY_BASE_URL="http://your-dify-server/v1"
export DIFY_API_KEY="your-api-key-here"
export DEFAULT_TIMEOUT=120

Command Line Options

Option Description Example
--chat Use ChatApp mode (default for most apps) --chat
--wf ID Specify workflow ID for Workflow mode --wf wf_xxx
--conv ID Specify conversation ID for multi-turn --conv conv_xxx
--stream Enable streaming response mode --stream

API Endpoints

  • Workflow: POST /v1/workflows/run - Execute predefined workflows
  • ChatApp: POST /v1/chat-messages - Chat interface with knowledge base

Request Format Examples

ChatApp Mode

{
  "inputs": {},
  "query": "user query",
  "conversation_id": "conv_xxx",  // Optional for multi-turn
  "response_mode": "blocking",     // or "streaming"
  "user": "openclaw-user",
  "files": []
}

Workflow Mode

{
  "workflow_id": "wf_xxx",
  "inputs": {
    "query": "user query"
  },
  "response_mode": "blocking",
  "user": "openclaw-user"
}

Response Extraction

The script automatically extracts answers from different Dify response formats:

  • ChatApp: .data.answer
  • Workflow: .data.outputs.answer or .data.outputs.*
  • Advanced Chat: .answer (top-level)

Common Use Cases

1. Knowledge Base Query

/dify-workflow "员工手册中的报销政策是什么?" --chat

2. Multi-turn Conversation

# First query returns conversation_id: conv_abc123
/dify-workflow "那加班制度呢?" --conv conv_abc123

3. Execute Specific Workflow

/dify-workflow "生成月度报告" --wf wf_report_gen_xyz

4. Streaming Large Outputs

/dify-workflow "分析这个数据集" --stream

Troubleshooting

Common Errors and Solutions

  1. "not_workflow_app"

    • Cause: Using Workflow mode for a ChatApp
    • Solution: Use --chat flag: /dify-workflow "query" --chat
  2. "conversation_id_invalid"

    • Cause: Expired or incorrect conversation ID
    • Solution: Start fresh without --conv option
  3. "workflow_not_found"

    • Cause: Invalid workflow ID
    • Solution: Verify the workflow ID exists in your Dify app (should start with wf_)
  4. "query missing parameter"

    • Cause: Query parameter not included in payload
    • Solution: Ensure query is properly specified

Getting IDs from Dify Dashboard

ChatApp Mode:

  • No additional setup needed
  • Conversation IDs are automatically returned in responses

Workflow Mode:

  1. Open your Workflow app in Dify dashboard
  2. Go to "API Access" or check the URL
  3. Look for IDs starting with wf_

Technical Details

Unicode Support

  • Automatic decoding of Unicode escape sequences (e.g., \u4f60\u597d你好)
  • Supports Chinese and other multi-language responses

Error Handling

  • Clear error messages with actionable suggestions
  • Timeout protection (default 120 seconds)
  • Graceful fallback for missing dependencies

Dependencies

  • Python 3.x (for JSON parsing and Unicode decoding)
  • curl (for HTTP requests)
  • jq (optional, for advanced output formatting)

Version Information

  • Version: 1.0.0
  • Last Updated: 2026-05-20
  • Author: OpenClaw Team
  • License: Internal use only

Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Verify your Dify API credentials and configuration
  3. Ensure network connectivity to Dify server at http://10.10.10.159/v1

Note: Default timeout is 120 seconds to accommodate complex workflow executions. Adjust via DEFAULT_TIMEOUT environment variable if needed.

安全使用建议
Treat this as an inconclusive low-confidence review. Re-run the scan in an environment that can read metadata.json and artifact/ before relying on this skill assessment.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
No artifact content could be read because local shell commands failed before execution, so purpose and capabilities could not be validated.
Instruction Scope
Instruction scope could not be assessed from SKILL.md or artifact files due to the inspection failure.
Install Mechanism
Install metadata and install artifacts could not be read, so install behavior remains unverified.
Credentials
The review environment rejected filesystem inspection commands with a sandbox loopback setup error before any artifact data was returned.
Persistence & Privilege
Persistence, credential use, and privilege behavior could not be assessed without artifact access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install dify-flow-access
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /dify-flow-access 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Dify-flow-access v1.0.0 initial release: - Enables querying company knowledge base and executing workflows via Dify API. - Supports both workflow and chat modes with multi-turn conversation context management. - Provides streaming responses and robust error handling. - Highly configurable through environment variables and CLI options. - Includes detailed usage examples, troubleshooting steps, and API response handling.
元数据
Slug dify-flow-access
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

dify-flow-access 是什么?

Query and interact with company knowledge bases or workflows using Dify API with multi-turn context and streaming response support. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 52 次。

如何安装 dify-flow-access?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install dify-flow-access」即可一键安装,无需额外配置。

dify-flow-access 是免费的吗?

是的,dify-flow-access 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

dify-flow-access 支持哪些平台?

dify-flow-access 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 dify-flow-access?

由 whswhs1128(@whswhs1128)开发并维护,当前版本 v1.0.0。

💬 留言讨论