スキル一覧に戻る
bleuropa

docs

by bleuropa

Opinionated rails for OpenCode development. Forked from bcooke/balustrade (Claude Code version)

0🍴 1📅 2026年1月12日
GitHubで見るManusで実行

SKILL.md


name: docs description: Writing clear, maintainable documentation for code, APIs, and vault documents

Documentation Writing Skill

Guidelines for writing clear, useful documentation that stays current and serves both humans and AI agents.

Documentation Types

1. Code Comments

When to comment:

  • Why (not what) - Explain reasoning
  • Complex algorithms
  • Non-obvious solutions
  • Workarounds for bugs

When NOT to comment:

  • Obvious code
  • What code does (code shows this)
  • Redundant information
// Bad
counter++ // Increment counter by 1

// Good
// Use exponential backoff to avoid overwhelming the API
await retryWithBackoff(apiCall)

2. Function Documentation

/**
 * Calculate compound interest for an investment.
 *
 * @param principal - Initial investment amount
 * @param rate - Annual interest rate (decimal)
 * @param years - Number of years
 * @returns Final amount including principal and interest
 */
function calculateCompoundInterest(principal, rate, years) {
  return principal * Math.pow(1 + rate, years)
}

3. API Documentation

For each endpoint document:

  • Purpose and use case
  • Authentication requirements
  • Request format
  • Response format
  • Possible errors
  • Examples

4. README Files

Essential sections:

  • Brief description
  • Quick Start
  • What It Does
  • Key Features
  • Documentation links
  • Tech Stack
  • License

5. Vault Documents

Evergreen docs (product/, architecture/, features/):

  • Describe current state
  • No "will", "soon", "planned"
  • Update when reality changes

PM docs (pm/):

  • Track progress and status
  • Temporal language OK
  • Link to evergreen docs

Writing Style

Be Concise

Bad:  "The function that we have implemented here is designed
      for the purpose of taking into consideration..."

Good: "Calculates compound interest."

Use Active Voice

Bad:  "The data is processed by the server"
Good: "The server processes the data"

Be Specific

Bad:  "Update the thing when needed"
Good: "Update the cache when user preferences change"

Use Examples

Show, don't just tell with code examples.

Structuring Documents

Use Headings Hierarchy

# Main Title (H1) - One per document
## Major Section (H2)
### Subsection (H3)

Use Lists for Scanability

Instead of walls of text, break into bullet points.

Vault Patterns

Atomic Notes

One concept per file with rich internal linking.

Evergreen vs Temporal

  • Evergreen: Describe current state, no temporal language
  • Temporal: Track progress, temporal language OK

Documentation Checklist

  • Clear purpose/overview
  • Examples included
  • Technical details accurate
  • Links work
  • Code samples tested
  • Accessible to target audience

Common Mistakes

Don't:

  • Write docs that duplicate code
  • Use jargon without explanation
  • Skip examples
  • Let docs get outdated

Do:

  • Explain "why" not just "what"
  • Define terms clearly
  • Show concrete examples
  • Keep docs current

Remember

  • Documentation is code
  • Update docs with features
  • Write for humans AND agents
  • Examples are valuable
  • Less is more (be concise)

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新

+5
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です