Token导航 LogoToken导航

Agent Skill · 研究检索

doc-accurate-codegen(文档准确的代码生成)

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

doc-accurate-codegen 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为需要联网;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 7,295。

总安装 19,388周安装 816GitHub Stars 公开资料未说明下载 6,789核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:doc-accurate-codegen(文档准确的代码生成)
来源仓库:https://github.com/tobisamaa/doc-accurate-codegen
安装命令:
openclaw skills install doc-accurate-codegen
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install doc-accurate-codegen

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

根据实际文档生成引用准确的代码,防止幻觉错误。适用于需要严格依据 API 文档编写代码的场景。支持加载文档后验证函数签名与参数匹配。doc-accurate-codegen 属于研究检索类 Skill,可作为该场景下的辅助能力补充。通过 clawhub 安装,需确保文档路径可被代理访问。

建议在关键项目中优先使用此技能以保证代码可靠性。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install doc-accurate-codegen;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

doc-accurate-codegen 怎么安装?

在终端执行 openclaw skills install doc-accurate-codegen。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

doc-accurate-codegen 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

doc-accurate-codegen 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

doc-accurate-codegen 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

doc-accurate-codegen 用的人多吗?

公开数据是累计安装 19,388 次,近一周安装 816 次,下载 6,789 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

doc-accurate-codegen 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
doc-accurate-codegen

文档准确的代码生成 · 本页

19,388—需要联网MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
doc-accurate-codegen
version
1.0.0
description
Generate code that references actual documentation, preventing hallucination bugs. ALWAYS loads docs first, validates against API signatures, and verifies correctness. Use for ANY code generation, API usage, or configuration creation.
metadata
openclaw
emoji
📚
requires
bins
["curl", "jq", "git"]
env
["BRAVE_API_KEY"]
install
kind
node
package
axios
bins
["axios"]

Documentation-Accurate Code Generation

CRITICAL: This skill prevents LLM hallucination by enforcing documentation reference.

When to Use

  • ALWAYS when generating code
  • ALWAYS when using APIs
  • ALWAYS when creating configurations
  • ALWAYS when implementing features

Core Philosophy

NEVER generate code from memory. ALWAYS reference documentation.

The Problem

  • LLMs hallucinate APIs that don't exist
  • Methods get renamed or removed
  • Parameters change or get deprecated
  • Return types shift unexpectedly
  • Configuration formats evolve

The Solution

  1. Load documentation FIRST — Before writing any code
  2. Extract API signatures — Get actual method signatures
  3. Generate from docs — Use real API data
  4. Validate against docs — Check generated code matches
  5. Reference tracking — Document which docs were used

Workflow

1. IDENTIFY → What code/API/tool is needed?
2. LOCATE → Find documentation source
3. LOAD → Fetch and parse documentation
4. EXTRACT → Pull API signatures, parameters, examples
5. GENERATE → Create code using actual docs
6. VALIDATE → Check code matches documentation
7. REFERENCE → Track what docs were used

Documentation Sources

1. OpenClaw Internal Docs

  • Location: `C:\Users\clipp\AppData\Roaming\

pm\ ode_modules\openclaw\docs`

  • Access: read tool
  • Use: For OpenClaw-specific APIs, tools, skills

2. Tool Documentation

  • Tool help: --help flags
  • Man pages: man <command>
  • Official docs: Use web_fetch to get docs

3. API Documentation

  • Official docs: Use web_fetch
  • OpenAPI specs: Parse and reference
  • Package docs: npm, pip, cargo docs

4. Code Examples

  • Existing code: Read similar implementations
  • Tests: Check test files for usage patterns
  • Examples: Find working code samples

Process for Code Generation

Step 1: Documentation Discovery

# For OpenClaw tools
read("openclaw-docs-path/tool-name.md")

# For external tools
web_fetch("https://docs.tool.com/api")

# For local tools
exec("tool --help")

Step 2: API Signature Extraction

# Extract:
- Method names
- Parameters (names, types, required/optional)
- Return types
- Error handling
- Examples
- Version information

Step 3: Code Generation

# Generate code using actual API data
def generate_from_docs(api_docs):
    # Use real method names
    # Use real parameter names
    # Use real return types
    # Include error handling from docs
    # Add docstrings from docs
    pass

Step 4: Validation

def validate_against_docs(code, api_docs):
    # Check method names match
    # Check parameter names match
    # Check types match
    # Check return types match
    # Verify no hallucinated methods
    pass

Quick Actions

  • codegen <api> — Generate code with doc reference
  • validate <code> — Check code against docs
  • doc-lookup <api> — Load and display documentation
  • api-extract <tool> — Extract API signatures

Usage Examples

"Generate code to use the OpenClaw sessions_spawn tool"
# Process: Load docs → Extract API → Generate → Validate

"Create a Python script using the requests library"
# Process: Fetch requests docs → Extract API → Generate → Validate

"Write configuration for OpenClaw channels"
# Process: Load config docs → Extract format → Generate → Validate

Validation Rules

1. Method Name Validation

  • Check method exists in docs
  • Verify spelling matches exactly
  • Confirm method is not deprecated

2. Parameter Validation

  • All required parameters present
  • Parameter names match docs exactly
  • Parameter types match docs
  • Optional parameters marked correctly

3. Return Type Validation

  • Return type matches docs
  • Error types match docs
  • Edge cases handled

4. Configuration Validation

  • Keys match documentation
  • Value types match schema
  • Required fields present
  • Format matches specification

Error Prevention

Common Hallucination Patterns

  1. Non-existent methods — Methods that don't exist
  2. Wrong parameter names — Hallucinated parameter names
  3. Wrong types — Incorrect parameter/return types
  4. Missing error handling — Ignoring documented errors
  5. Wrong configuration format — Incorrect config structure

Prevention Strategies

  1. Always load docs first — Never generate from memory
  2. Extract actual signatures — Don't guess API shape
  3. Validate everything — Check against real docs
  4. Reference tracking — Know which docs were used
  5. Test with real APIs — Verify code actually works

Integration Points

With Other Skills

  • Coding skill: Use this for doc-accurate code
  • Self-evolution: Update skills with doc validation
  • Content generation: Generate accurate code examples
  • Research: Research APIs from actual docs

With OpenClaw Tools

  • read: Load internal documentation
  • web_fetch: Fetch external documentation
  • exec: Run tools with --help for docs
  • edit/write: Create validated code

Reference Tracking

Format

# Code Generation Reference

## Generated Code
- File: path/to/file.py
- Generated: 2026-02-23
- Tool: doc-accurate-codegen

## Documentation Sources
1. OpenClaw Tool Docs: /docs/tools/exec.md
2. API Reference: https://docs.example.com/api
3. Examples: /examples/exec-usage.py

## Validation
- ✅ Method names validated
- ✅ Parameters validated
- ✅ Return types validated
- ✅ Error handling validated

## Notes
- Using exec tool with sandbox mode
- All parameters from official docs
- Error handling from API reference

Output Template

When generating code, always include:

# Code generated with documentation reference
# Source: [documentation URL or path]
# Validated: [timestamp]
# API Version: [version if available]

def function_name():
    """
    [Docstring from actual documentation]
    
    Source: [link to docs]
    Parameters: [from docs]
    Returns: [from docs]
    """
    # Implementation using actual API
    pass

Best Practices

  1. Docs First, Always — Never generate without loading docs
  2. Exact Matches — Use exact names, types, formats from docs
  3. Validate Everything — Check all generated code
  4. Track References — Document which docs were used
  5. Test Real APIs — Actually run the code to verify
  6. Update Regularly — Re-check docs as APIs evolve
  7. Error Handling — Include all documented errors
  8. Examples — Reference working examples from docs

Common Pitfalls

  1. Assuming API stability — APIs change, always re-check docs
  2. Memory over docs — Trust docs, not memory
  3. Partial loading — Load complete documentation
  4. No validation — Always validate generated code
  5. Missing references — Always track doc sources

Success Metrics

  • Hallucination rate: 0% (all code references actual docs)
  • Validation rate: 100% (all code validated)
  • Reference tracking: 100% (all code has doc sources)
  • Error rate: 0% (no API misuse)
  • Test pass rate: 100% (all generated code works)

Advanced Features

1. Automatic Doc Loading

  • Detect what APIs are needed
  • Automatically fetch relevant docs
  • Cache for future use

2. API Change Detection

  • Monitor docs for changes
  • Alert when APIs change
  • Suggest code updates

3. Multi-Source Validation

  • Cross-reference multiple doc sources
  • Detect conflicts between sources
  • Use most authoritative source

4. Example Extraction

  • Extract working examples from docs
  • Adapt examples to specific needs
  • Test examples before using

Integration with OpenClaw

Tool Documentation

# Get tool help
exec("tool --help")

# Read tool docs
read("openclaw/docs/tools/tool-name.md")

# Check tool examples
read("openclaw/examples/tool-usage.md")

Skill Documentation

# Read skill docs
read("skills/skill-name/SKILL.md")

# Check skill examples
read("skills/skill-name/examples/")

Configuration Documentation

# Read config docs
read("openclaw/docs/configuration.md")

# Check config examples
read("openclaw/examples/config/")

Remember: This skill exists because LLMs hallucinate. ALWAYS use it for code generation. The only way to prevent bugs is to reference actual documentation.

平台分布

OpenClaw

87.83%
按下载量换算5,963

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills