Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

doc-writer

БесплатноБез исполняемых скриптовНе проверен

Guidelines for producing accurate and maintainable documentation for the Hex1b TUI library. Use when writing XML API documentation comments, creating end-user…

mitchdennyот mitchdenny★ 186 звёзд на GitHub4 установки в других каталогах

Об этом скилле

Documentation Writer Skill

This skill provides guidelines for AI coding agents to help maintainers produce accurate and easy-to-maintain documentation for the Hex1b project. The repository contains two primary types of documentation, each serving different audiences and following different conventions.

Documentation Types

1. XML API Documentation

Location: C# source files in src/Hex1b/
Audience: Library consumers, API reference generators, IDE intellisense users
Format: XML doc comments (///)
Build Setting: GenerateDocumentationFile is enabled in src/Hex1b/Hex1b.csproj

Purpose

XML documentation comments provide:

  • Inline help in IDEs (IntelliSense, code completion)
  • Generated API reference documentation
  • Contract documentation for public APIs
  • Usage examples for complex APIs

Best Practices for XML Documentation

1. Document All Public APIs

Required for:

  • Public classes, structs, records, enums
  • Public properties and fields
  • Public methods and constructors
  • Public events and delegates

Example:

/// <summary>
/// Represents a color that can be used in the terminal.
/// </summary>
public readonly struct Hex1bColor
{
    /// <summary>
    /// Creates a color from RGB values.
    /// </summary>
    /// <param name="r">Red component (0-255)</param>
    /// <param name="g">Green component (0-255)</param>
    /// <param name="b">Blue component (0-255)</param>
    /// <returns>A new Hex1bColor instance with the specified RGB values.</returns>
    public static Hex1bColor FromRgb(byte r, byte g, byte b) => new(r, g, b);
}
2. Write Clear, Concise Summaries
  • Start with a verb (e.g., "Creates", "Gets", "Sets", "Calculates")
  • Keep it to one or two sentences
  • Describe what it does, not how it does it
  • Use third person ("Creates a widget" not "Create a widget")

Good:

/// <summary>
/// Creates a Layout that wraps a single child widget with clipping enabled.
/// </summary>

Bad:

/// <summary>
/// This method will take the child widget and wrap it in a layout.
/// The layout uses the clipMode parameter which defaults to Clip.
/// </summary>
3. Document Parameters and Return Values

Always document:

  • <param> for each parameter
  • <returns> for non-void methods
  • <exception> for thrown exceptions (when applicable)
  • <typeparam> for generic type parameters

Example:

/// <summary>
/// Arranges child widgets vertically within the given constraints.
/// </summary>
/// <param name="constraints">The size constraints for layout.</param>
/// <param name="children">The child widgets to arrange.</param>
/// <returns>The total size required for all children.</returns>
/// <exception cref="ArgumentNullException">Thrown when children is null.</exception>
public Size ArrangeVertical(Constraints constraints, Hex1bWidget[] children)
4. Include Usage Examples for Complex APIs

Use <example> and <code> tags for key APIs within the Hex1b framework. Examples should be consise yet contain sufficient context to help developers understand how they are used. For examples that use Hex1bApp to create sample applications favor the use of the fluent API since that is the intended usage pattern.

/// <summary>
/// The main entry point for building terminal UI applications.
/// </summary>
/// <example>
/// <para>Create a minimal Hex1b application:</para>
/// <code>
/// using Hex1b;
/// 
/// await using var terminal = Hex1bTerminal.CreateBuilder().WithHex1bApp(ctx =&gt;
///     ctx.VStack(v => [
///         v.Text("Hello, Hex1b!"),
///         v.Button("Quit").OnClick(e => e.Context.RequestStop())
///     ])
/// ).Build();
/// 
/// await terminal.RunAsync();
/// </code>
/// </example>

Note: HTML-encode special characters in code examples:

  • < becomes &lt;
  • > becomes &gt;
  • & becomes &amp;
5. Use Remarks for Additional Context

Use <remarks> for:

  • Implementation details that affect usage
  • Performance considerations
  • Related concepts or cross-references
/// <summary>
/// The main entry point for building terminal UI applications.
/// </summary>
/// <remarks>
/// Hex1bApp manages the render loop, input handling, focus management, and reconciliation
/// between widgets (immutable declarations) and nodes (mutable render state).
/// 
/// State management is handled via closures - simply capture your state variables
/// in the widget builder callback.
/// </remarks>
public class Hex1bApp : IDisposable, IAsyncDisposable
6. Cross-Reference Related APIs

Use <see> and <seealso> to link to related types:

/// <summary>
/// Theme elements for Scroll widgets.
/// </summary>
/// <seealso cref="ScrollPanelWidget"/>
/// <seealso cref="Hex1bTheme"/>
public static class ScrollTheme
7. Internal APIs Can Have Lighter Documentation

Internal APIs (marked with internal) should still be documented bu

Полный SKILL.md на GitHub

Установить doc-writer в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

ansi-generator/AnsiGenerator.csprojansi-generator/Program.csansi-generator/README.mdstatic-generator/Program.csstatic-generator/README.mdstatic-generator/StaticGenerator.csproj

FAQ

Что делает скилл doc-writer?

Guidelines for producing accurate and maintainable documentation for the Hex1b TUI library. Use when writing XML API documentation comments, creating end-user guides, or updating existing documentation.

Как установить скилл doc-writer?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл doc-writer запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить doc-writer с