← 返回 Skills 市场
anderskev

Docs Style

作者 Kevin Anderson · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
211
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install docs-style
功能描述
Core technical documentation writing principles for voice, tone, structure, and LLM-friendly patterns. Use when writing or reviewing any documentation.
使用说明 (SKILL.md)

Documentation Style Guide

Apply these principles when writing or reviewing documentation to ensure clarity, consistency, and accessibility for both human readers and LLMs.

Voice and Tone

Use Second Person

Address the reader directly as "you" rather than "the user" or "developers."

\x3C!-- Good -->
You can configure the API by setting environment variables.

\x3C!-- Avoid -->
The user can configure the API by setting environment variables.
Developers should configure the API by setting environment variables.

Prefer Active Voice

Write sentences where the subject performs the action. Active voice is clearer and more direct.

\x3C!-- Good -->
Create a configuration file in the root directory.
The function returns an array of user objects.

\x3C!-- Avoid -->
A configuration file should be created in the root directory.
An array of user objects is returned by the function.

Be Concise

Cut unnecessary words. Every word should earn its place.

\x3C!-- Good -->
Run the install command.

\x3C!-- Avoid -->
In order to proceed, you will need to run the install command.
\x3C!-- Good -->
This endpoint returns user data.

\x3C!-- Avoid -->
This endpoint is used for the purpose of returning user data.

Common phrases to simplify:

Instead of Use
in order to to
for the purpose of to, for
in the event that if
at this point in time now
due to the fact that because
it is necessary to you must
is able to can
make use of use

Document Structure

Write Clear, Descriptive Headings

Headings should tell readers exactly what the section contains. Avoid clever or vague titles.

\x3C!-- Good -->
## Install the CLI
## Configure Authentication
## Handle Rate Limits

\x3C!-- Avoid -->
## Getting Started (vague)
## The Fun Part (clever)
## Misc (uninformative)

Create Self-Contained Pages

Assume readers may land on any page directly from search. Each page should:

  • Explain what the feature/concept is
  • State prerequisites clearly
  • Provide complete context for the topic
\x3C!-- Good: Self-contained -->
# Webhooks

Webhooks let you receive real-time notifications when events occur in your account.

## Prerequisites

- An active API key with webhook permissions
- A publicly accessible HTTPS endpoint

## Create a Webhook

...

Use Semantic Markup

Choose the right format for the content type:

  • Headings: Follow proper hierarchy (h1 > h2 > h3, never skip levels)
  • Lists: Use for multiple related items
  • Tables: Use for structured data with consistent attributes
  • Code blocks: Use for any code, commands, or file paths
\x3C!-- Good: Table for structured data -->
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| api_key | string | Yes | Your API key |
| timeout | integer | No | Request timeout in seconds |

\x3C!-- Good: List for steps or options -->
To authenticate, you can:
- Use an API key in the header
- Use OAuth 2.0
- Use a service account

Make Content Skimmable

Break dense paragraphs into digestible chunks:

  • Keep paragraphs to 3-4 sentences maximum
  • Use bullet points for lists of items
  • Add subheadings to long sections
  • Put key information first (inverted pyramid)
\x3C!-- Good: Skimmable -->
## Error Handling

The API returns standard HTTP status codes.

### Common Errors

- **400 Bad Request**: Invalid parameters. Check the request body.
- **401 Unauthorized**: Invalid or missing API key.
- **429 Too Many Requests**: Rate limit exceeded. Wait and retry.

### Retry Strategy

For 429 errors, use exponential backoff starting at 1 second.

Consistency

Use One Term Per Concept

Pick a term and use it consistently. Switching terms confuses readers.

\x3C!-- Good: Consistent terminology -->
Generate an API key in the dashboard. Use your API key in the Authorization header.

\x3C!-- Avoid: Inconsistent terminology -->
Generate an API key in the dashboard. Use your API token in the Authorization header.

Document your terminology choices:

Concept Use Don't use
Authentication credential API key API token, secret key, access key
Configuration file config file settings file, preferences file
Command line CLI terminal, command prompt, shell

Apply Consistent Formatting

Use the same formatting for similar content types:

  • UI elements: Bold (Click Save)
  • Code/commands: Backticks (npm install)
  • File paths: Backticks (/etc/config.yaml)
  • Key terms on first use: Bold or italics
  • Placeholders: SCREAMING_CASE or angle brackets (YOUR_API_KEY or \x3Capi-key>)

LLM-Friendly Patterns

State Prerequisites Explicitly

List what users need before starting. This helps both humans and LLMs understand context.

## Prerequisites

Before you begin, ensure you have:

- Node.js 18 or later installed
- An active account with admin permissions
- Your API key (find it in **Settings > API**)

Define Acronyms on First Use

Spell out acronyms the first time they appear on a page.

\x3C!-- Good -->
The CLI (Command Line Interface) provides tools for managing your resources.
Subsequent uses can just say "CLI."

\x3C!-- Avoid -->
The CLI provides tools for managing your resources.

Provide Complete, Runnable Code Examples

Code examples should work when copied. Include:

  • All necessary imports
  • Realistic placeholder values
  • Expected output (when helpful)
\x3C!-- Good: Complete example -->
```python
import requests

API_KEY = "your-api-key"
BASE_URL = "https://api.example.com/v1"

response = requests.get(
    f"{BASE_URL}/users",
    headers={"Authorization": f"Bearer {API_KEY}"}
)

print(response.json())
# Output: {"users": [{"id": 1, "name": "Alice"}, ...]}

\x3C!-- Avoid: Incomplete snippet -->

response = requests.get(url, headers=headers)

### Write Descriptive Titles and Meta Descriptions

Page titles and descriptions help with search and LLM understanding.

```markdown
---
title: "Authentication - API Reference"
description: "Learn how to authenticate API requests using API keys, OAuth 2.0, or service accounts."
---

Pitfalls to Avoid

Don't Use Product-Centric Language

Orient documentation around user goals, not product features.

\x3C!-- Good: User-goal oriented -->
# Send Emails

Send transactional emails to your users with delivery tracking.

\x3C!-- Avoid: Product-centric -->
# Email Service

Our powerful email service provides enterprise-grade delivery.

Skip Obvious Instructions

Don't document self-explanatory UI actions.

\x3C!-- Good: Meaningful instruction -->
Enter your webhook URL. The URL must use HTTPS and be publicly accessible.

\x3C!-- Avoid: Obvious instruction -->
Click in the text field. Type your webhook URL. Click the Save button.

Avoid Colloquialisms

Colloquialisms hurt clarity and localization.

\x3C!-- Good -->
This approach significantly improves performance.

\x3C!-- Avoid -->
This approach is a game-changer for performance.
This will blow your mind.
Let's dive in!

Quick Reference Checklist

When writing documentation, verify:

  • Using "you" instead of "the user"
  • Active voice throughout
  • No unnecessary words
  • Headings are descriptive
  • Page is self-contained
  • Proper heading hierarchy
  • One term per concept
  • Prerequisites listed
  • Acronyms defined
  • Code examples are complete
  • No product-centric language
  • No colloquialisms

Applying This Skill

Use these principles when:

  1. Writing new documentation: Apply all principles from the start
  2. Reviewing documentation: Check against the quick reference checklist
  3. Editing existing docs: Prioritize voice/tone, then structure, then consistency
  4. Creating code examples: Ensure they are complete and runnable
安全使用建议
This skill is a straightforward, instruction-only documentation style guide and appears coherent with its purpose. You can install it without granting any credentials or system access. Before use, remember not to paste real secrets into example placeholders in documentation you author or test with the guide. If you want to call this guide manually, note that it's marked non-user-invocable (the agent may still use it autonomously).
功能分析
Type: OpenClaw Skill Name: docs-style Version: 1.0.1 The skill bundle contains a comprehensive documentation style guide (SKILL.md) designed to instruct an AI agent on technical writing best practices, such as using active voice and maintaining consistency. There is no executable code, no network activity, and no evidence of malicious intent or prompt injection; it functions purely as a set of formatting and stylistic guidelines.
能力标签
requires-oauth-token
能力评估
Purpose & Capability
The SKILL.md is a documentation style guide; the name and description match the file content. The skill requests no binaries, env vars, or config paths—everything requested is proportional to a writing/style guide.
Instruction Scope
Runtime instructions are purely editorial guidance (voice, tone, structure, LLM-friendly patterns). The file does not instruct the agent to read system files, access environment variables, make network calls, or transmit data to external endpoints. Example snippets reference hypothetical prerequisites (Node, API key) as doc examples only.
Install Mechanism
No install spec or code files are present (instruction-only). Nothing is written to disk and no external packages are fetched.
Credentials
requires.env is empty and the guide does not request credentials. Example placeholders (e.g., YOUR_API_KEY) appear in sample documentation snippets but are illustrative and do not indicate the skill needs secrets.
Persistence & Privilege
always is false (good). disable-model-invocation is false, so the agent may autonomously invoke this skill when deciding how to write or review docs—this is normal for instruction-only skills. user-invocable is false (meaning users can't directly call it); this is unusual for a style guide but not a security concern.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install docs-style
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /docs-style 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- The skill is now not user-invocable (`user-invocable: false` added). - No content or guidance changes; only the skill metadata was updated.
v1.0.0
Initial release of docs-style: a guide for writing clear, consistent technical documentation. - Outlines core principles for documentation voice, tone, and conciseness - Provides rules and examples for structure: headings, skimmability, self-contained pages, and markup - Sets consistency guidelines for terminology and formatting - Includes LLM-friendly patterns: prerequisites, acronym definition, and runnable code snippets - Lists common pitfalls to avoid (e.g., product-centric language, colloquialisms) - Provides a quick reference checklist for doc writers and reviewers
元数据
Slug docs-style
版本 1.0.1
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Docs Style 是什么?

Core technical documentation writing principles for voice, tone, structure, and LLM-friendly patterns. Use when writing or reviewing any documentation. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 211 次。

如何安装 Docs Style?

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

Docs Style 是免费的吗?

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

Docs Style 支持哪些平台?

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

谁开发了 Docs Style?

由 Kevin Anderson(@anderskev)开发并维护,当前版本 v1.0.1。

💬 留言讨论