AgentSkillsCN

documentation-testing

提供实用技巧,帮助识别不完整或存在缺陷的文档。当验证 README 设置说明、测试入职流程,或审计文档质量时,可选用此技能。触发词:文档、README、入职流程、设置验证、文档审计。

SKILL.md
--- frontmatter
name: documentation-testing
description: Provides heuristics for identifying incomplete or broken documentation. Use when validating README setup instructions, testing onboarding flows, or auditing documentation quality. Triggers: docs, readme, onboarding, setup validation, documentation audit.
allowed-tools: Read

Documentation Testing Skill

Purpose

Provides systematic heuristics for identifying incomplete, outdated, or broken documentation. This skill helps catch the gaps that make onboarding painful for new developers.

Common Documentation Failures

Missing Prerequisites

Projects often assume these are installed without documenting them:

CategoryExamples
JavaScriptNode.js, npm, yarn, pnpm (and which version)
PythonPython, pip, poetry, conda (and which version)
ContainersDocker, docker-compose, podman
DatabasesPostgreSQL, MySQL, Redis, MongoDB, SQLite
Cloud CLIsaws, gcloud, az, terraform
Build toolsmake, cmake, gcc, clang
Version managersnvm, pyenv, rbenv, asdf

Missing Environment Configuration

Look for these patterns that indicate undocumented environment variables:

LanguagePattern to detect
JavaScript/TypeScriptprocess.env.XXX
Pythonos.environ["XXX"] or os.getenv("XXX")
RubyENV["XXX"]
Goos.Getenv("XXX")
Ruststd::env::var("XXX")

Red flags:

  • References to .env files without .env.example
  • config.yaml with placeholder values but no instructions
  • Environment variables mentioned in code but not in README

Incomplete Setup Steps

Common missing steps that break new developer onboarding:

StepWhat's often missing
Database setupcreatedb, migrations, seed data
Service dependenciesStarting Redis, Postgres, etc. before the app
SSL/TLSLocal HTTPS setup, certificate generation
Host files/etc/hosts modifications for local domains
PortsRequired ports and how to check if they're in use
PermissionsFile/directory permissions, sudo requirements
Git hooksPre-commit hooks that need manual setup
IDE setupExtensions, settings, debug configurations

Platform-Specific Gaps

Documentation often assumes one OS. Check for:

IssueExample
Shell commandssed -i (GNU) vs sed -i '' (BSD/macOS)
Path separators/ vs \
Package managersapt vs brew vs choco vs winget
Line endingsLF vs CRLF issues
Case sensitivityFilesystem differences
DockerDocker Desktop vs native Docker

Validation Sequence

Execute setup validation in this order to catch cascading failures:

code
1. Prerequisites Check
   └─ Are all required tools installed?
   └─ Are versions compatible?

2. Repository Setup
   └─ Clone works?
   └─ Submodules initialized?
   └─ Git LFS files pulled?

3. Dependency Installation
   └─ npm install / pip install / etc.
   └─ Any errors or warnings?
   └─ Postinstall scripts succeed?

4. Environment Configuration
   └─ .env file created from template?
   └─ All required variables filled?
   └─ Config files generated?

5. Build Step (if applicable)
   └─ Compilation succeeds?
   └─ Assets generated?
   └─ No TypeScript/type errors?

6. Database/Service Setup
   └─ Services started (DB, cache, queue)?
   └─ Database created?
   └─ Migrations run?
   └─ Seed data loaded?

7. Application Start
   └─ Dev server starts?
   └─ No port conflicts?
   └─ No missing config errors?

8. Verification
   └─ Health endpoint responds?
   └─ Can log in / perform basic action?
   └─ Tests pass?

Output Standards

Rate each documentation section with these markers:

StatusMeaningAction
PASSInstructions work exactly as writtenNone needed
AMBIGUOUSInstructions work but could confuse newcomersSuggest clarification
FAILInstructions do not work as writtenDocument the bug
MISSINGExpected section does not existRecommend adding

Documentation Health Report Format

markdown
## Documentation Health Report

### Summary
- Total steps tested: N
- Passed: X
- Ambiguous: Y
- Failed: Z
- Missing sections: W

### Detailed Results

#### PASS: [Section Name]
- Step: "Run npm install"
- Result: Completed successfully

#### AMBIGUOUS: [Section Name]
- Step: "Install dependencies"
- Issue: Doesn't specify npm vs yarn
- Suggestion: "Run `npm install` to install dependencies"

#### FAIL: [Section Name]
- Step: "Start the development server"
- Command: `npm run dev`
- Error: `Error: Cannot find module 'dotenv'`
- Documentation Bug: Missing step to create .env file from .env.example

#### MISSING: Database Setup
- Expected: Instructions for database creation and migrations
- Impact: App crashes on start with "relation does not exist"
- Recommendation: Add section with `createdb` and migration commands

Anti-Patterns to Avoid

When testing documentation, do NOT:

  1. Improvise missing steps - If docs say "install dependencies" without a command, that's a bug
  2. Use domain knowledge - Pretend you don't know npm from pip
  3. Skip verification - Always confirm each step actually worked
  4. Assume success - An empty output might be an error
  5. Fix the code - Your job is to fix the instructions, not the implementation