csharp-xml-docs

C# XML documentation with on-demand Haiku→Expert Review→Final workflow. Flexible Korean/English language support. Use when documenting C# APIs, properties, methods, classes, and interfaces.

8 stars

Best use case

csharp-xml-docs is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

C# XML documentation with on-demand Haiku→Expert Review→Final workflow. Flexible Korean/English language support. Use when documenting C# APIs, properties, methods, classes, and interfaces.

Teams using csharp-xml-docs should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/csharp-xml-docs/SKILL.md --create-dirs "https://raw.githubusercontent.com/creator-hian/claude-code-plugins/main/csharp-plugin/skills/csharp-xml-docs/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/csharp-xml-docs/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How csharp-xml-docs Compares

Feature / Agentcsharp-xml-docsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

C# XML documentation with on-demand Haiku→Expert Review→Final workflow. Flexible Korean/English language support. Use when documenting C# APIs, properties, methods, classes, and interfaces.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# C# XML Documentation Guide

Comprehensive XML documentation standards for Unity C# projects with flexible language choice.

## Overview

**Foundation Required**: `csharp-code-style` (mPascalCase, Async 접미사 금지, var 금지)

**Core Principle**: XML documentation samples with flexible language choice
- All XML comments (`<summary>`, `<remarks>`, etc.) can be written in Korean or English
- Provides universal reference for documentation standards
- Choose the language that best serves your team and project needs

## Quick Start

```csharp
public class ActionResult
{
    // Simple property - English
    /// <summary>
    /// Indicates whether the action executed successfully
    /// </summary>
    public bool Success { get; set; }

    // Simple property - Korean
    /// <summary>
    /// 액션 실행 성공 여부
    /// </summary>
    public bool Success { get; set; }

    // Complex concept with remarks
    /// <summary>
    /// Indicates whether the action was skipped
    /// </summary>
    /// <remarks>
    /// Set to true when skipped due to unmet conditions.
    /// If true, the action was not executed regardless of Success value.
    /// </remarks>
    public bool Skipped { get; set; }
}
```

## Language Choice Guidelines

### Acceptable Options

1. **Pure Korean** (한글 전용)
2. **Pure English** (영문 전용)
3. **Mixed Korean + English** (혼용)

### Context-Based Recommendations

| Context | Recommended Language | Rationale |
|---------|---------------------|-----------|
| Internal team project | Korean or Team preference | Maximum clarity for team members |
| Open source / International | English or Mixed | Broader accessibility |
| Company standard exists | Follow company policy | Consistency across projects |
| Mixed team | English or Both | Accommodate all members |
| Legacy codebase | Match existing style | Maintain consistency |

### Consistency Rules

**Within a single file:**
- Consistent: All Korean OR All English OR All Mixed
- Inconsistent: Random switching between languages

**Across the project:**
- Maintain similar language strategy across similar components
- Document language choice in project README or CLAUDE.md
- Use consistent language for related interfaces and implementations

## Quick Decision Matrix

| Scenario | Summary | Remarks | Additional Tags | Example |
|----------|---------|---------|-----------------|---------|
| Simple property | Yes | No | No | `bool Success` |
| Complex concept | Yes | Yes | No | `bool Skipped` with conditions |
| Property with side effects | Yes | Optional | `<value>` | `CurrentMode` |
| Public class/struct | Yes | Yes | No | `class ActionResult` |
| Factory method | Yes | Only if special case | No | `CreateSuccess()` |
| Method with exceptions | Yes | Optional | `<exception>` per exception | `LoadVRM()` |
| Internal method | Optional | No | No | `initializeDefaults()` |
| Enum type | Yes | Optional | No | `EAnimationMode` |
| Enum values | Yes (each) | No | No | `VRMAnimation`, `AnimatorController` |
| Extension method | Yes | Optional | Document `this` param | `ActivateWithConfigAsset()` |
| Interface method | Yes (full) | Yes | All applicable | `IActionHandler.Execute()` |
| Implementation method | `<inheritdoc/>` | Implementation details only | Override if needed | `PlayerPrefsActionHandler.Execute()` |

## On-Demand Documentation Workflow

**Critical Principle**: XML documentation is **NOT auto-applied**. Only generated when explicitly requested.

### 3-Step Review Process

1. **Claude-Haiku (Draft Generation)**
   - Fast, efficient initial documentation draft
   - Follows established patterns from Pattern Library
   - Sets foundation for review

2. **Gemini or Codex CLI (Expert Review)**
   - Professional review and refinement
   - Cross-validates patterns and consistency
   - Improves clarity and completeness

3. **Final Approval**
   - Manual confirmation of reviewed documentation
   - Integration into codebase

See **[XML Documentation Workflow](references/xml-workflow.md)** for detailed process.

## Reference Documentation

### [Pattern Library](references/pattern-library.md)
Complete examples for all common scenarios:
- Simple properties and fields
- Complex concepts requiring remarks
- Classes and structs
- Methods (simple, complex, multi-step)
- Factory methods
- Enums and bit flags
- Exception documentation
- Extension methods
- Interface vs Implementation patterns

### [Formatting Guidelines](references/formatting-guidelines.md)
When to use various XML tags:
- `<br/>` vs `<list>` for structured content
- `<value>` for properties with side effects
- `<exception>` for documented exceptions
- `<para>` for multi-paragraph remarks

### [Best Practices](references/best-practices.md)
Essential principles for effective documentation:
- Keep it simple for straightforward elements
- Add context where needed
- Be consistent with language choice
- Avoid redundancy
- Document special cases

### [XML Documentation Workflow](references/xml-workflow.md)
3-step documentation process using Claude-Haiku, Gemini/Codex review, and final approval

## Critical Pattern: Interface vs Implementation

**Interface: Full Documentation**
```csharp
/// <summary>
/// Interface dedicated to VTuber Animation control (ISP compliance)
/// </summary>
/// <remarks>
/// Interface for clients that only control animation playback.<br/>
/// State Query and Observable features are separated into distinct interfaces.
/// </remarks>
public interface IVTuberAnimationController
{
    /// <summary>
    /// Plays animation asynchronously
    /// </summary>
    /// <param name="animationPath">Animation path</param>
    /// <param name="wrapMode">Playback mode (Loop/Once/PingPong)</param>
    /// <returns>
    /// true: Playback start succeeded<br/>
    /// false: Playback start failed
    /// </returns>
    /// <remarks>
    /// <strong>Preconditions:</strong><br/>
    /// - Context must be ready (IsReady = true)<br/>
    /// - animationPath must not be null
    /// </remarks>
    UniTask<bool> PlayAnimation(string animationPath, WrapMode wrapMode);
}
```

**Implementation: Use `<inheritdoc/>` + Implementation Details**
```csharp
public partial class VRMController : IVTuberAnimationController
{
    private IAnimationSystem mCurrentSystem;
    private readonly Dictionary<string, Animation> mAnimations;

    /// <inheritdoc/>
    /// <remarks>
    /// <strong>Implementation:</strong> Path prefix-based auto-routing ("VRMA/" -> VRMAnimation, "State/{Layer}/{Identifier}" -> AnimatorController)<br/>
    /// <strong>Main Failures:</strong> Unknown prefix, System activation failure, invalid Layer/Identifier<br/>
    /// <strong>Note:</strong> wrapMode ignored when using AnimatorController
    /// </remarks>
    public async UniTask<bool> PlayAnimation(string animationPath, WrapMode wrapMode)
    {
        Debug.Assert(animationPath != null);
        // Implementation...
    }
}
```

## Key Principles

1. **On-Demand Only**: XML documentation is NEVER auto-applied. Only generate when explicitly requested
2. **Keep it simple**: Concise summaries for straightforward elements
3. **Add context where needed**: Complex concepts deserve detailed explanations in remarks
4. **Think about your audience**: Choose language (Korean/English/Mixed) that serves your team best
5. **Be consistent**: Follow established patterns and use consistent language throughout
6. **Dual-Review Process**: Claude-Haiku draft → Expert Review (Gemini/Codex) → Final Approval
7. **Interface vs Implementation**: Full docs in interface, `<inheritdoc/>` + implementation specifics in class
8. **Document exceptions**: Use `<exception>` for exceptions that are part of the method's contract
9. **Property side effects**: Use `<value>` tag when getter/setter have non-obvious behavior
10. **POCU Naming**: Use mPascalCase for private fields, camelCase for private methods

## IDE Experience

**IntelliSense Display:**

Simple Property:
```
Success (bool)
Indicates whether the action executed successfully
```

Complex Property with Remarks:
```
Skipped (bool)
Indicates whether the action was skipped

[Show more...] <- Click to expand remarks
```

## Common Examples

**Simple Property:**
```csharp
/// <summary>Number of retry attempts</summary>
public int RetryCount { get; set; }
```

**Method with Parameters (POCU Style):**
```csharp
public class DataService
{
    private readonly Dictionary<string, object> mOutputData;

    /// <summary>
    /// Retrieves output data
    /// </summary>
    /// <typeparam name="T">Data type to return</typeparam>
    /// <param name="key">Key to retrieve</param>
    /// <param name="defaultValue">Default value if key not found</param>
    /// <returns>Retrieved data or default value</returns>
    public T GetOutputData<T>(string key, T defaultValue = default(T))
    {
        Debug.Assert(key != null);

        object value;
        if (mOutputData == null || !mOutputData.TryGetValue(key, out value))
        {
            return defaultValue;
        }

        return convertValue<T>(value, defaultValue);
    }

    private T convertValue<T>(object value, T defaultValue)
    {
        try
        {
            if (value is T directValue)
            {
                return directValue;
            }

            return (T)Convert.ChangeType(value, typeof(T));
        }
        catch
        {
            return defaultValue;
        }
    }
}
```

**Multi-Step Process:**
```csharp
public class EventExecutor
{
    private readonly IEventRepository mRepository;
    private readonly IActionProcessor mProcessor;

    /// <summary>
    /// Executes event
    /// </summary>
    /// <remarks>
    /// <para>
    /// <strong>Execution Process:</strong><br/>
    /// 1. Event definition lookup<br/>
    /// 2. Event-level condition evaluation<br/>
    /// 3. Direct action list processing<br/>
    /// 4. Execution time and metadata configuration
    /// </para>
    /// </remarks>
    public async UniTask<EventActionResult> ExecuteEvent(
        string systemId, string eventId, object contextDataOrNull = null)
    {
        Debug.Assert(systemId != null);
        Debug.Assert(eventId != null);

        EventDefinition definition = await mRepository.GetDefinition(systemId, eventId);
        return await processEvent(definition, contextDataOrNull);
    }

    private async UniTask<EventActionResult> processEvent(
        EventDefinition definition, object contextDataOrNull)
    {
        Debug.Assert(definition != null);
        // Implementation...
    }
}
```

Related Skills

unity-csharp-fundamentals

8
from creator-hian/claude-code-plugins

Unity C# fundamental patterns including TryGetComponent, SerializeField, RequireComponent, and safe coding practices. Essential patterns for robust Unity development. Use PROACTIVELY for any Unity C# code to ensure best practices.

csharp-code-style

8
from creator-hian/claude-code-plugins

C# code style and naming conventions based on POCU standards. Covers naming rules (mPascalCase for private, bBoolean prefix, EEnum prefix), code organization, C# 9.0 patterns. Use PROACTIVELY for C# code reviews, refactoring, or establishing project standards.

csharp-async-patterns

8
from creator-hian/claude-code-plugins

Modern C# asynchronous programming patterns using async/await, proper CancellationToken usage, and error handling in async code. Use when guidance needed on async/await best practices, Task composition and coordination, ConfigureAwait usage, ValueTask optimization, or async operation cancellation patterns. Pure .NET framework patterns applicable to any C# application.

unity-vcontainer

8
from creator-hian/claude-code-plugins

VContainer dependency injection expert specializing in IoC container configuration, lifecycle management, and Unity-optimized DI patterns. Masters dependency resolution, scoped containers, and testable architecture design. Use PROACTIVELY for VContainer setup, service registration, or SOLID principle implementation.

unity-unitask

8
from creator-hian/claude-code-plugins

UniTask library expert specializing in allocation-free async/await patterns, coroutine migration, and Unity-optimized asynchronous programming. Masters UniTask performance optimizations, cancellation handling, and memory-efficient async operations. Use PROACTIVELY for UniTask implementation, async optimization, or coroutine replacement.

unity-unirx

8
from creator-hian/claude-code-plugins

UniRx (Reactive Extensions) library expert for legacy Unity projects. Specializes in UniRx-specific patterns, Observable streams, and ReactiveProperty. Use for maintaining existing UniRx codebases. For new projects, use unity-r3 skill instead.

unity-ui

8
from creator-hian/claude-code-plugins

Build and optimize Unity UI with UI Toolkit and UGUI. Masters responsive layouts, event systems, and performance optimization. Use for UI implementation, Canvas optimization, or cross-platform UI challenges.

unity-textmeshpro

8
from creator-hian/claude-code-plugins

TextMeshPro (TMPro) expert for Unity text rendering with advanced typography, performance optimization, and professional text effects. Masters font asset creation, dynamic fonts, rich text formatting, material presets, and text mesh optimization. Use PROACTIVELY for text rendering, font management, localization text, UI text performance, or text effects implementation.

unity-testrunner

8
from creator-hian/claude-code-plugins

Unity Test Framework CLI automation and test writing patterns. Masters batchmode execution, NUnit assertions, EditMode/PlayMode testing, and TDD workflows. Use PROACTIVELY for test automation, CI/CD pipelines, or test-driven development in Unity.

unity-r3

8
from creator-hian/claude-code-plugins

R3 (Reactive Extensions) library expert specializing in modern reactive programming patterns, event-driven architectures, and Observable streams. Masters R3-specific features, async enumerable integration, and Unity-optimized reactive patterns. Use PROACTIVELY for R3 implementation, reactive programming, or MVVM/MVP architecture.

unity-performance

8
from creator-hian/claude-code-plugins

Optimize Unity game performance through profiling, draw call reduction, and resource management. Masters batching, LOD, occlusion culling, and mobile optimization. Use for performance bottlenecks, frame rate issues, or optimization strategies.

unity-networking

8
from creator-hian/claude-code-plugins

Implement multiplayer games with Unity Netcode, Mirror, or Photon. Masters client-server architecture, state synchronization, and lag compensation. Use for multiplayer features, networking issues, or real-time synchronization.