← 返回 Skills 市场
amumulam

Diataxis Writing

作者 amumu · GitHub ↗ · v1.2.1
cross-platform ⚠ suspicious
523
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install diataxis-writing
功能描述
Diataxis documentation framework practice guide. Provides diagnosis, classification, templates, and quality assessment for four documentation types (Tutorial...
使用说明 (SKILL.md)

Diátaxis Documentation Framework Practice

Quick Start

When creating or refactoring documentation:

Pre-Writing Questions (Must Ask)

Before starting, ask the user:

  1. Language Preference: "What language should this document be written in?"

    • English / 中文 / Other
  2. Output Method: "After completion, how would you like to output this document?"

    • Chat message (default)
    • Feishu document (via MCP/mcporter)
    • Local Markdown file
    • GitHub repository
    • Other platforms

Tool Availability Check (After User Selection)

After user selects output method, automatically check tool availability:

# Run auto-detection (script is in ./scripts/ relative to this skill)
python3 scripts/output-handler.py --detect

Check results:

  • ✅ Tool available → Proceed with selected output method
  • ⚠️ Tool not available → Inform user and suggest alternatives

For Feishu output via MCP:

  • Check if mcporter is installed
  • Check if MCP feishu server is configured (typically in /root/config/mcporter.json or ~/.mcporter/mcporter.json)
  • Test connection to Feishu MCP server

If tool not available:

  1. Inform user: "Selected output method [X] is not available"
  2. Suggest alternatives: "Available options: [list]"
  3. Ask user to confirm alternative or configure tool

Writing Workflow

After confirming language, output preference, and tool availability:

  1. Identify User Needs - Use the Diataxis Compass to determine document type
  2. Select Template - Choose the corresponding template from templates/
  3. Apply Checklist - Use the corresponding checklist during writing
  4. Quality Assessment - Use the quality framework to evaluate the final draft
  5. Execute Output - Output using the user's chosen method and language

Four Documentation Types

Diataxis identifies four fundamentally different documentation types, corresponding to four user needs:

Type User Need Document Purpose Key Characteristics
Tutorial Acquire skills (study) Provide learning experience Practice-oriented, minimize explanation, concrete steps
How-to Guide Apply skills (work) Help complete tasks Goal-oriented, assume competence, handle real scenarios
Reference Apply skills (work) Describe technical facts Neutral description, accurate and complete, structured
Explanation Acquire skills (study) Provide understanding context Discursive, allows opinions, provides context

Type Details

Using the Diataxis Compass

When unsure about document type, use the compass tool: references/compass.md

Ask two questions:

  1. Content Type: Is it action guidance (action) or cognitive knowledge (cognition)?
  2. User State: Is the user acquiring skills (acquisition/study) or applying skills (application/work)?

Common Use Cases

Use Case 1: Troubleshooting Records → How-to Guide or Explanation

Troubleshooting records typically belong to:

  • How-to Guide: If it's step-by-step guidance on "how to solve X problem"
  • Explanation: If it's principle analysis on "why X problem occurred"

Template: templates/template-troubleshooting.md

Use Case 2: Experience Summary → How-to Guide or Explanation

  • Best Practices: How-to Guide (guidance on how to do things correctly)
  • Lessons Learned: Explanation (explaining why certain approaches are wrong)

Template: templates/template-best-practices.md

Use Case 3: Learning Notes → Tutorial or Explanation

  • Learning Notes: Tutorial (if containing practical steps)
  • Theory Summary: Explanation (if conceptual understanding)

Template: templates/template-learning-notes.md

Use Case 4: Exploratory Sharing → Explanation

Technical exploration, experiment records, and comparative analysis typically belong to Explanation.

Template: templates/template-exploration.md

Checklists

Use checklists during and after writing:

Quality Assessment

Use the Functional Quality and Deep Quality framework: references/quality-framework.md

Functional Quality

  • Accuracy, completeness, consistency, usability, precision

Deep Quality

  • Flow, fitting human needs, beauty, anticipating user needs

Common Mistakes

Avoid the following error patterns: references/common-mistakes.md

  1. Type Conflation - Mixing Reference content into Tutorial
  2. Misplacement - Writing Explanation as Tutorial
  3. Boundary Blur - Mixing too much explanation into How-to
  4. Structural Misalignment - Reference not reflecting product architecture

Language Style

Four types use different language styles: references/writing-language.md

  • Tutorial: "We will...", "Notice...", "Now do X..."
  • How-to: "If you want X, do Y", "Refer to X documentation for complete options"
  • Reference: "X inherits Y", "Subcommands: a, b, c", "Must use X"
  • Explanation: "The reason for X is...", "W is better than Z because..."

Output Methods

After completing the document, output using the user's chosen method:

Available Output Methods

  1. Chat Message - Display directly in conversation (default)
  2. Feishu Document - Create/update Feishu document via MCP/mcporter (requires MCP feishu server)
  3. Local Markdown - Save as .md file (built-in support)
  4. GitHub Repo - Commit to code repository (requires MCP github or git)
  5. Other Platforms - User provides platform and MCP capabilities

Important: For Feishu output, always use MCP/mcporter method, NOT channel tools.

Detect Available Tools

Use scripts/output-handler.py to auto-detect (script is in ./scripts/ relative to this skill file):

python3 scripts/output-handler.py --detect

Tool Availability Check

After user selects output method, check if tool is available:

  1. Run output-handler.py --detect
  2. Check if selected tool is configured and available
  3. If not available:
    • Inform user: "Selected output method [X] is not available"
    • Suggest alternatives from available tools list
    • Ask user to confirm alternative

Choose Output Method

Must ask user: "Document completed, how would you like to output?"

Based on user selection:

  • Chat → Reply directly
  • Feishu (MCP) → Use mcporter to call Feishu MCP server
    node /path/to/mcporter/dist/cli.js call feishu doc.create '{"title":"...", "content":"..."}'
    # Note: mcporter path varies by installation, common paths:
    # - ~/.npm/_npx/*/node_modules/mcporter/dist/cli.js
    # - Or use: npx mcporter call feishu doc.create ...
    
  • Local → Call write tool or output-handler.py --output local
  • GitHub → Call output-handler.py --output github
  • Other → Ask user to provide MCP server information

Language Considerations

Output in the user's chosen language:

  • If English → Output in English
  • If Chinese (中文) → Output in Chinese
  • If other → Confirm translation capabilities

Output Platform Details

Complete platform list and configuration methods: references/output-platforms.md

Platform Required Tools Configuration Difficulty Use Case
Chat None - Quick reply
Feishu (MCP) MCP feishu server Medium Team collaboration
Local MD write Low Personal knowledge
GitHub MCP github/git Medium Tech blog
Notion MCP notion Medium Knowledge base
Google Docs MCP google High Google ecosystem

Theoretical Framework

Complete Diataxis theory:

Using Scripts (Optional)

Use the diagnosis script to automatically identify document types (script is in ./scripts/ relative to this skill):

python3 scripts/diagnose.py \x3Cdocument content or file path>

Skill Version: 1.0
Theory Source: https://diataxis.fr
Author: Zhua Zhua (Created for Master)

安全使用建议
This skill largely does what its description promises (templates, checklists, diagnosis), but the runtime scripts can read local configuration files and test external services (Feishu via MCP, GitHub) and may create local logs or outputs. Before installing or running it, review the two bundled scripts (scripts/output-handler.py and scripts/diagnose.py) to see exactly which files they read, what network calls they make, and whether they send any sensitive data. If you plan to use Feishu or GitHub outputs, expect to provide credentials — prefer giving those interactively and not storing secrets in global locations. If you are unsure, run the skill in a sandbox/container or with network disabled, or ask the maintainer for explicit documentation of what the detection/test step does and where logs/configs are read/written.
功能分析
Type: OpenClaw Skill Name: diataxis-writing Version: 1.2.1 The skill's primary purpose is benign (documentation writing). However, it is classified as 'suspicious' due to its reliance on the powerful external 'mcporter' tool and the direct passing of potentially user-controlled input (document title and content) to it via `subprocess.run` in `scripts/output-handler.py`. This presents a vulnerability risk (e.g., command injection if 'mcporter' is not robustly designed to handle arbitrary arguments, or misuse of 'mcporter's capabilities if the agent is prompted maliciously). Additionally, `scripts/output-handler.py` hardcodes a configuration path `/root/config/mcporter.json`, which is a minor information disclosure.
能力评估
Purpose & Capability
The name, description, templates, checklists and diagnosis functionality all match a documentation-authoring skill. Supporting multiple output targets (chat, local markdown, GitHub, Feishu/MCP) is reasonable for this purpose. However the skill neither declares required credentials (e.g., GitHub token, Feishu/MCP config) nor required binaries for some outputs (mcporter/Node.js for MCP), which is an incomplete alignment between claimed capabilities and declared requirements.
Instruction Scope
SKILL.md instructs the agent to run the bundled script python3 scripts/output-handler.py --detect to auto-detect available tools and to "test connection to Feishu MCP server" and to check MCP config files (mentions /root/config/mcporter.json and ~/.mcporter/mcporter.json). That implies the script will read local config files (including an absolute /root path) and perform network operations. Those actions go beyond purely generating text and could expose local configuration or attempt outgoing network connections. The instructions do not explicitly require user-supplied credentials or clarify what the detection/test does with any found configs.
Install Mechanism
There is no external install spec — the skill is instruction-plus-bundled-scripts only. No remote downloads or package installs are declared, which reduces supply-chain risk. The changelog indicates the scripts add output-management and an error-logs directory (i.e., the skill may write files locally), but nothing in the manifest shows it pulls arbitrary code from external URLs.
Credentials
The registry metadata declares no required environment variables or credentials, but the skill supports outputs (Feishu via mcporter, GitHub repository) that normally require tokens/configuration. SKILL.md references specific config file paths (including /root) and expects mcporter to be installed/configured; these are sensitive locations and privileges not reflected in the declared requirements. The absence of declared env vars while instructing access to local config and external services is disproportionate and unclear.
Persistence & Privilege
always:false and autonomous invocation are unchanged (normal). The changelog and README mention error-logging and output handlers — the skill will likely create local files (error logs, local markdown outputs) and may write to chosen output destinations (GitHub, Feishu). It does not request permanent platform-wide privileges or indicate it modifies other skills, but it will have the ability to write files and perform network IO when invoked.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install diataxis-writing
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /diataxis-writing 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.1
Initial release
元数据
Slug diataxis-writing
版本 1.2.1
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Diataxis Writing 是什么?

Diataxis documentation framework practice guide. Provides diagnosis, classification, templates, and quality assessment for four documentation types (Tutorial... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 523 次。

如何安装 Diataxis Writing?

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

Diataxis Writing 是免费的吗?

是的,Diataxis Writing 完全免费(开源免费),可自由下载、安装和使用。

Diataxis Writing 支持哪些平台?

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

谁开发了 Diataxis Writing?

由 amumu(@amumulam)开发并维护,当前版本 v1.2.1。

💬 留言讨论