doxygen-comments
Skill3k starsChanged 5 months agoMITView on GitHub
Conventions and a checklist for writing, updating, and correcting Doxygen documentation comments in WIL's public C++ headers under `include/` so they match the repository's style and build without warnings. Applies only to headers under `include/` — not `tests/` or other code. Use when adding or fixing `//!` or `/** */` doc comments, `@param`/`@tparam`/`@return` tags, `@ref`/`@see` cross-references, or briefs, or when resolving warnings from the Doxygen `docs` build target.
1 other project uses a version of this.
Trending
Quiet since September.about the whole repository
Most recently taken up by
- Conceptual-Machines/magda-coretheir own version, first seen Sep 28, 2026
Who's talking about microsoft/wil
- A Hacker News story“Windows Implementation Libraries: type-safe C++ interfaces for Windows patterns”Hacker News · May 11, 2019 · 148 points
- A Hacker News story“Microsoft/Wil: Windows Implementation Library”Hacker News · May 15, 2026 · 3 points
- conan-io/conan-center-index“wil: add version 1.0.260126.7”GitHub · Mar 12, 2026 · 3 reactions
- dolphin-emu/dolphin“WASAPI code improvements”GitHub · Aug 17, 2019 · 3 reactions
- Azure/azure-sdk-for-cpp“Consider increasing language version from C++14.”GitHub · Apr 3, 2026 · 1 reactions
The biggest 5 of 30 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 30
Talked about on GitHub, Hacker News and Bluesky (30 times).
On GitHub · 25
- Mar 12, 2026wil: add version 1.0.260126.7 — conan-io/conan-center-index3 reactions · 1 comment
- Aug 17, 2019WASAPI code improvements — dolphin-emu/dolphin3 reactions · 21 comments
- Apr 3, 2026Consider increasing language version from C++14. — Azure/azure-sdk-for-cpp1 reaction · 1 comment
- Mar 6, 2026[request] wil/1.0.260126.7 — conan-io/conan-center-index1 reaction
- Aug 7, 2024wil: add version 1.0.240803.1 — conan-io/conan-center-index1 reaction · 4 comments
20 more on GitHub
- Aug 6, 2020WIL for Rust — microsoft/windows-rs1 reaction · 11 comments
- May 8, 2019[New port request] Windows Implementation Libraries — microsoft/vcpkg1 reaction
- Sep 26, 2026Bump submodules/wil from `7fb2e75` to `f6f3069` — microsoft/win-net-test0 reactions
- Sep 26, 2026Bump submodules/wil from `81abc8e` to `f6f3069` in the actions group — microsoft/xdp-for-windows0 reactions
- Sep 12, 2026Bump submodules/wil from `7fb2e75` to `81abc8e` — microsoft/win-net-test0 reactions · 1 comment
- Aug 29, 2026Bump submodules/wil from `2ec8cf0` to `7fb2e75` — microsoft/win-net-test0 reactions
- Aug 25, 2026Bump submodules/wil from `2ec8cf0` to `63c13c0` — microsoft/win-net-test0 reactions · 1 comment
- Jun 16, 2025WinRT: Replace custom ClassFactory with WIL CppWinRTClassFactory — forderud/ComSamples0 reactions
- Mar 20, 2025Leveraging Windows Implementation Libraries (WIL) and Win32 metadata — dcdelia/sniper0 reactions · 1 comment
- Feb 15, 2025wanted: microsoft/wil — bazelbuild/bazel-central-registry0 reactions
- Sep 28, 2024Bump submodules/wil from `68ab8c1` to `d0f7e44` — M-Chandru/xdp-for-windows0 reactions
- Nov 19, 2023Add "Windows Implementation Library" (wil) library — compiler-explorer/infra0 reactions
- Nov 10, 2022This will break consumers. The expectation is that they can write to `buffer()` — AliAzarafza/packetSnifer0 reactions
- Aug 11, 2022Mingw support — XeroKimo/MoWin20 reactions · 1 comment
- Jun 19, 2022Use WIL — vanjac/chromafiler0 reactions
- Nov 19, 2021Consider using https://github.com/Microsoft/wil to make code cleaner — microsoft/ebpf-for-windows0 reactions · 2 comments
- Mar 4, 2021Consider using WIL to simplify COM operations — McYoloSwagHam/win3wm0 reactions · 1 comment
- Aug 22, 2020Notify users when build adapter module's group id are misconfigured — nokeedev/gradle-native0 reactions
- Aug 9, 2019Implement VersionInfo — s-martin/Sugarpp0 reactions
- May 30, 2019Replace all usages of Win32 API with WIL — Netdex/twinject0 reactions
On Hacker News · 4
- May 11, 2019Windows Implementation Libraries: type-safe C++ interfaces for Windows patterns148 points · 25 comments
- May 15, 2026Microsoft/Wil: Windows Implementation Library3 points
- Jul 29, 2021Windows Implementation Libraries (WIL)1 point
- May 9, 2019Windows Implementation Libraries (WIL)1 point · 1 comment
On Bluesky · 1
- Apr 24, 2025時代は WIL らしいので、ちょっと前にがんばって Mozc を WIL に切り替えました。 ATL -> WRL -> WIL と… github.com/microsoft/wil — @yuryu.net1 likes and repost · 1 reply
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Conceptual-Machines/magda-core★ 229same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Do not rewrite comments purely for style, and do not document private/internal helpers (see "Public API only" below).
- Very specific: line 35
Tag style is
@, never\: Use @param, @tparam, @return, @brief, @ingroup, @ref, @see, @note, @file, etc. - Very specific: line 38
Keep it on its own physical line.
- Distinctive: line 71
When adding or fixing comments, verify:
- Distinctive: line 81
The description still matches behavior: after any signature or behavior change.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Updating and correcting Doxygen comments in WIL
WIL's public API is documented with Doxygen comments in the headers under include/wil/, and the docs are generated from
docs/Doxyfile. Use this skill to add, update, or fix those comments so they stay consistent with the codebase and generate
cleanly.
Scope
This skill applies only to WIL's public headers under include/ (primarily include/wil/*.h). Do not apply these
conventions to test code (tests/), documentation sources (docs/), packaging, or build scripts — those files are not part of
the generated API reference. If a request targets files outside include/, this skill does not apply.
When to use
- Writing new documentation comments for public functions, classes, templates, or macros.
- Correcting existing comments after a signature or behavior change.
- Fixing Doxygen build warnings (mismatched parameters, undocumented members, broken references, etc.).
Do not rewrite comments purely for style, and do not document private/internal helpers (see "Public API only" below).
WIL Doxygen conventions
- Comment markers. WIL documents public API with either
//!line comments or/** ... */block comments. Match the style already used in the surrounding file / nearby declarations instead of mixing both.//!is common for file banners and member comments;/** */is common for free functions and templates. - Tag style is
@, never\. Use@param,@tparam,@return,@brief,@ingroup,@ref,@see,@note,@file, etc. The codebase uses zero backslash-style tags — keep it that way. - Brief = first sentence, on its own line.
JAVADOC_AUTOBRIEFmakes the first sentence (up to the first period) the brief. Keep it on its own physical line; start the detailed description on the next line. An explicit@briefis rarely needed. - Wrap at 130 columns. This matches
.clang-format(ColumnLimit: 130) and applies to comment text too. - Public API only.
EXTRACT_ALL = NOandEXTRACT_PRIVATE = NO, so private members and undocumented internals are not emitted. Focus documentation on the public surface; don't add Doxygen tags to private helpers expecting them to appear in the output. - Hide internal
detailsnamespaces. WIL's implementation details live in namespaces nameddetails(and similarly named variants such asdetails_abi). These must not emit documentation — wrap the entire namespace in a/// @cond…/// @endcondpair (note the///marker used for these structural tags) so Doxygen skips its contents. Put/// @condon its own line immediately before the namespace and/// @endcondimmediately after its closing brace. See the example below. - Add a usage example when the call pattern is non-obvious. Include a short
~~~fenced example for functions whose correct use isn't clear from the signature alone — e.g. callback or functor contracts (what the callback must do and return), paired or multi-step call sequences, RAII helpers whose placement or lifetime matters, round-trip or reverse operations, or subtle buffer/ownership conventions. Skip examples for self-explanatory helpers such as simple getters, predicates, or arithmetic. Doxygen fenced code blocks are delimited with~~~(any matching run of three or more tildes); inside//!banners, prefix each example line with//!. - Cross-references. Link to other entities with
@ref <name>and@see, and group related members with@ingroup <group>(for example@ingroup outparam). - Namespaces. Public entities live under
wil::; STL-mirroring pieces live underwistd::. - Prefer a
PREDEFINEDmacro over a per-guard escape; useWIL_DOXYGENonly when needed. Doxygen evaluates#ifguards againstdocs/Doxyfile'sPREDEFINEDlist, which already forces many conditions true in docs — e.g.WINAPI_FAMILY_PARTITION(partition)=1,WIL_USE_STL=1,WIL_ENABLE_EXCEPTIONS,WIL_RESOURCE_STL, and many__cpp_lib_*feature macros. First check whether the guard is already satisfied there; if so, no escape is needed. If a declaration is gated on a feature macro that is broadly useful, add that macro toPREDEFINEDrather than sprinkling escapes. Only when the condition can't be satisfied that way — notably the mutually-exclusive__WIL_*/__WIL_*_STLheader-wrapper guards inresource.h/registry.h— OR|| defined(WIL_DOXYGEN)into the condition (convert#ifdef X/#ifndef Xto#if defined(X); when the line wraps, continue with a trailing\and putdefined(WIL_DOXYGEN)on the next line). A standalone#ifdef WIL_DOXYGENblock is for doc-only constructs with no real declaration to attach to. - Macros are expanded for docs. Several macros are expanded when generating documentation (
WI_NOEXCEPT→noexcept,WI_NODISCARD→[[nodiscard]], and others indocs/Doxyfile'sPREDEFINED), so document the logical signature rather than the macro-heavy source.
Correction checklist
When adding or fixing comments, verify:
- Every
@param/@tparamname matches the signature — no stale, missing, misspelled, or reordered names. This is the most common source ofWARN_IF_DOC_ERRORwarnings. @returnis present and accurate for functions that return a meaningful value; omit it forvoid.- The error-handling flavor is described where relevant. WIL entities come in neutral, exception-based,
_failfast, and_nothrow/NoThrowvariants — state how the function reports failure (throws, fail-fasts, or returns anHRESULT). - Tags use
@(convert any\param,\brief, etc.). - The brief is a real one-line summary on its own line (the first sentence), not a restatement of the name.
- Cross-references resolve —
@ref/@seetargets exist and are spelled correctly. - The description still matches behavior after any signature or behavior change.
- Lines wrap at 130 columns and the comment marker style matches the surrounding code.
- No documentation is added to private/internal members unless they are intentionally part of the documented surface.
- Internal
details/details_*namespaces are wrapped in/// @cond…/// @endcondso their contents are excluded from the generated documentation. - Conditionally-compiled public declarations are visible in docs — the guard is either already satisfied by
PREDEFINEDor ORs in|| defined(WIL_DOXYGEN)(reserved for conditionsPREDEFINEDcan't cover, like the header-wrapper guards). - Non-obvious functions carry a
~~~usage example — anything with a callback contract, a paired/multi-step call sequence, or subtle ownership/buffer semantics shows how to call it; trivial helpers do not.
Validating changes
Doxygen is configured with WARN_IF_UNDOCUMENTED = YES and WARN_IF_DOC_ERROR = YES, and formats warnings as $file:$line:
$text, so a docs build points directly at problems. From an already-configured build directory, run the docs target (it
requires Doxygen on PATH, and WIL_BUILD_TESTS = ON, which is the default):
ninja docs # run from the configured build directory, e.g. build/msvcThe docs target just runs Doxygen, so it is independent of the selected configuration. Review its output for new warnings
referencing the files you touched — mismatched parameters, undocumented public members, and broken references all surface there.
Generated HTML lands under the build directory. If Doxygen is not installed, at minimum re-check each comment against the current
signature using the checklist above.
Example
Correcting stale parameter names and backslash tags:
// Before — backslash tags, @param name doesn't match the signature, missing @return.
/** Opens the widget.
\param widgetName The name to open.
*/
HRESULT open_widget_nothrow(PCWSTR name, wil::unique_hwidget& widget);
// After — @-style tags, names match the signature, failure mode and return documented, wrapped at 130 columns.
/** Opens the named widget.
Returns an error code rather than throwing, so it is safe for callers built without exceptions.
@param name Name of the widget to open.
@param widget Receives the opened widget on success.
@return `S_OK` on success, or a failure `HRESULT` from the underlying `OpenWidget` call. */
HRESULT open_widget_nothrow(PCWSTR name, wil::unique_hwidget& widget);Hiding an internal details namespace so Doxygen excludes it from the output:
/// @cond
namespace details
{
// Internal implementation — intentionally undocumented.
template <typename T>
using ensure_trivially_destructible_t = typename ensure_trivially_destructible<T>::type;
} // namespace details
/// @endcondAdding a WIL_DOXYGEN escape so a guarded public declaration still appears in the docs:
// Before — only compiled when <objbase.h> has been included, so Doxygen never sees this signature.
#if defined(__WIL_OBJBASE_H_)
template <typename T>
com_ptr<T> make_com_ptr(T* ptr);
#endif
// After — OR in defined(WIL_DOXYGEN) (which Doxygen predefines) so the signature is documented.
#if defined(__WIL_OBJBASE_H_) || defined(WIL_DOXYGEN)
template <typename T>
com_ptr<T> make_com_ptr(T* ptr);
#endifStatus
This skill is an intentional starting point. The conventions above are grounded in the current headers and docs/Doxyfile, but
the checklist and examples are expected to grow as we refine it. When a rule here disagrees with real, nearby code in the file you
are editing, prefer matching the surrounding code and flag the discrepancy.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

