← Back to Skills Marketplace
whswhs1128

dify-flow-access

by whswhs1128 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
52
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install dify-flow-access
Description
Query and interact with company knowledge bases or workflows using Dify API with multi-turn context and streaming response support.
README (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.

Usage Guidance
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.
Capability Tags
requires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install dify-flow-access
  3. After installation, invoke the skill by name or use /dify-flow-access
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug dify-flow-access
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is dify-flow-access?

Query and interact with company knowledge bases or workflows using Dify API with multi-turn context and streaming response support. It is an AI Agent Skill for Claude Code / OpenClaw, with 52 downloads so far.

How do I install dify-flow-access?

Run "/install dify-flow-access" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is dify-flow-access free?

Yes, dify-flow-access is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does dify-flow-access support?

dify-flow-access is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created dify-flow-access?

It is built and maintained by whswhs1128 (@whswhs1128); the current version is v1.0.0.

💬 Comments