一键导入
csharp-docs-wiki
Generate a Markdown wiki in the docs folder from the compiler-generated C# XML documentation file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate a Markdown wiki in the docs folder from the compiler-generated C# XML documentation file.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | csharp-docs-wiki |
| description | Generate a Markdown wiki in the docs folder from the compiler-generated C# XML documentation file. |
| user-invocable | true |
| argument-hint | [optional path to XML documentation file] |
| metadata | {"author":"Jeremy Knight","version":"0.1"} |
This skill converts the compiler-generated C# XML documentation file into a structured Markdown wiki inside the docs folder. It organizes output by namespace and type, producing readable documentation pages for classes, methods, parameters, return values, remarks, and other XML doc elements.
To use this skill, ensure your .csproj enables XML documentation generation:
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
After building the project, the XML documentation file will appear under bin/ (for example: bin/Debug/net10.0/MyProject.xml).
Use this skill when you want to:
docs folder.Invoke it with:
/csharp-docs-wiki — agent discovers projects, builds, and generates docs from XML/csharp-docs-wiki bin/Debug/net10.0/MyProject.xml — process a single XML fileThis skill uses a .NET file-based app (XmlDocsToWiki.cs) that converts XML documentation files into Markdown. It requires .NET 10 SDK or later. The agent is responsible for building projects and passing the resulting XML files to the tool.
When invoked, the agent should:
.sln or .slnx files.csproj files under src/ (excluding test projects)GenerateDocumentationFile enableddotnet build <csproj> -f net10.0bin/Debug/net10.0/<skill-base-directory>/templates which contains type.md and member.mddotnet run --file .agents/skills/csharp-docs-wiki/XmlDocsToWiki.cs -- --help
dotnet run --file .agents/skills/csharp-docs-wiki/XmlDocsToWiki.cs -- --files <xml-file> [xml-file ...] --templatePath <path> [--output <path>]
--files — One or more paths to XML documentation files (required)--templatePath — Path to the templates directory containing type.md and member.md (required)--output — Output directory (default: ./docs)--help — Show usage and option details# Agent builds projects that emit XML documentation, then runs the tool
dotnet build path/to/MyProject.csproj -f net10.0
dotnet build path/to/MyProject.Data.csproj -f net10.0
dotnet run --file .agents/skills/csharp-docs-wiki/XmlDocsToWiki.cs -- \
--files \
path/to/MyProject/bin/Debug/net10.0/MyProject.xml \
path/to/MyProject.Data/bin/Debug/net10.0/MyProject.Data.xml \
--templatePath <skill-base-directory>/templates \
--output docs
Documentation is organized by project root namespace, with child namespaces as subfolders. Each type gets its own Markdown file. Each folder gets a README.md index.
docs/
├── README.md
├── MyProject/
│ ├── README.md
│ ├── MyClass.md
│ └── Models/
│ ├── README.md
│ └── Order.md
├── MyProject.Data/
│ ├── README.md
│ └── Extensions/
│ └── RecordExtensions.md
└── MyProject.Core/
└── README.md
The tool uses the project name as the top-level folder (or RootNamespace if set in the .csproj). Child namespaces only include additional segments:
| Full Namespace | Output Folder |
|---|---|
MyProject | MyProject/ |
MyProject.Models | MyProject/Models/ |
MyProject.Data.Extensions | MyProject.Data/Extensions/ |
MyProject.Core.Services | MyProject.Core/Services/ |
templates/ (powered by Fluid)<see>, <code>, <example>, <list>, etc. to Markdown<see cref> converted to bold type namesTemplates use Liquid syntax via the Fluid template engine:
| Feature | Syntax | Example |
|---|---|---|
| Variable | {{ Variable }} | {{ TypeName }} |
| Loop | {% for item in Items %}...{% endfor %} | {% for m in Methods %}{{ m.Body }}{% endfor %} |
| Conditional | {% if Condition %}...{% endif %} | {% if HasReturns %}**Returns:** {{ Returns }}{% endif %} |
| Nested access | {{ item.Property }} | {{ param.Name }} |
Template files are in templates/:
type.md — page template for each typemember.md — template for methods, properties, events, and fields--files