api-docs-lint
БесплатноБез исполняемых скриптовНе проверенAPI docstring style guide for public endpoint handlers and external API types. Use when writing or reviewing doc comments in nexus/external-api or…
от oxidecomputer★ 631 звезда на GitHubОб этом скилле
API Docstring Style Guide
This guide covers public docstrings (///) on endpoint handlers in
nexus/external-api/src/lib.rs and on structs, fields, and enums in
nexus/types/src/external_api/. These docstrings become user-facing API
documentation.
Capitalization
Start all docstrings with a capital letter.
// Bad
/// the source of an identity provider metadata descriptor
pub idp_metadata_source: IdpMetadataSource,
// Good
/// The source of an identity provider metadata descriptor.
pub idp_metadata_source: IdpMetadataSource,
Punctuation
Short, label-like descriptions do not need periods. This includes endpoint summary lines, struct-level descriptions, and brief field annotations. Longer explanatory text (especially multi-clause or multi-sentence docstrings) should end sentences with periods.
// Endpoint summary lines: no period
/// Fetch silo
/// List identity providers for silo
/// Create IP pool
// Struct-level descriptions: no period
/// View of a Silo
/// A collection of resource counts used to describe capacity and utilization
// Short field descriptions: no period
/// Number of virtual CPUs
/// Common identifying metadata
/// Size of blocks in bytes
// Longer explanatory text: use periods
/// Accounts for resources allocated to running instances or storage
/// allocated via disks or snapshots.
///
/// Note that CPU and memory resources associated with stopped instances
/// are not counted here, whereas associated disks will still be counted.
Articles
Omit articles ("a", "an", "the") in endpoint summary lines. Look at existing
endpoints in nexus/external-api/src/lib.rs for reference. A few examples of
the different shapes:
// Bad
/// Fetch a silo
/// Create an IP pool
/// Delete the project
/// List the silos
// Good
/// Fetch silo
/// Create IP pool
/// Delete project
/// List silos
/// Fetch resource utilization for user's current silo
/// List identity providers for silo
/// Add range to IP pool
Paragraph Separation
Separate distinct thoughts or notes with a blank /// line. This produces
proper paragraph breaks in rendered documentation.
// Bad - renders as one run-on paragraph
/// A unique, immutable, system-controlled identifier for the token.
/// Note that this ID is not the bearer token itself, which starts with
/// "oxide-token-".
pub id: Uuid,
// Good - renders as two paragraphs
/// A unique, immutable, system-controlled identifier for the token.
///
/// Note that this ID is not the bearer token itself, which starts with
/// "oxide-token-".
pub id: Uuid,
Acronyms and Abbreviations
Use standard casing for acronyms:
- "IdP" (Identity Provider)
- "SP" (Service Provider)
- "SAML", "ID", "IP", "VPC", "CPU", "RAM", "DER"
Doc Comments vs Regular Comments
Use /// for public API documentation that users will see. Use // for
internal implementation notes that should not appear in generated docs.
// Bad - this won't appear in API docs
// A list containing the IDs of the secret keys.
pub secrets: Vec<WebhookSecret>,
// Good - this will appear in API docs
/// A list containing the IDs of the secret keys.
pub secrets: Vec<WebhookSecret>,
Scope
These rules apply to:
- Endpoint handler docstrings (
/// Fetch silo) - Public struct docstrings (
/// View of a Silo) - Public field docstrings (
/// The IP address held by this resource.) - Public enum variant docstrings (
/// The sled is currently active.)
These rules do NOT apply to:
- Private functions or structs
- Internal comments (
//) - Module-level documentation (
//!)
General
Follow standard English grammatical rules: correct articles ("a" vs "an"), subject-verb agreement, proper spelling, etc.
Установить api-docs-lint в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл api-docs-lint?
API docstring style guide for public endpoint handlers and external API types. Use when writing or reviewing doc comments in nexus/external-api or nexus/types/src/external_api.
Как установить скилл api-docs-lint?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-docs-lint запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic