Official agent skill

Binlog Generation

by microsoft in microsoft/testfx

Generate MSBuild binary logs (binlogs) for build diagnostics and analysis.

OfficialMITAuto-check passedDevelopment

Install Binlog Generation

skills CLI
$ npx skills add microsoft/testfx --skill binlog-generation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/testfx binlog-generation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/testfx.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/binlog-generation .claude/skills/binlog-generation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
binlog-generation
GitHub stars
1k
Used in
2 other repos
Token cost
~824 tokens
SKILL.md length
266 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
MIT

At a glance

Generate MSBuild binary logs (binlogs) for build diagnostics and analysis.

  • Works in 4 steps: Unique names prevent overwrites - You… → Failure analysis - When a build fails,… → Comparison - You can compare builds… → …
  • : adding /bl:{} to any dotnet build
  • SKILL.md covers Commands That Require /bl, Preferred: Use {} for…, Why This Matters and Examples, plus 2 more sections
  • Calls dotnet and git

What it does

Binlog Generation is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ / .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use…

Its SKILL.md is about 820 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Root cause analysis. It works with .NET, PowerShell, npm and C++. The repository describes itself as: This repository holds the source code of Microsoft.Testing.Platform (MTP), a lightweight alternative to VSTest, as well as MSTest adapter and framework. The licence is MIT.

When your agent uses it

  • : adding /bl:{} to any dotnet build
  • Restore command to capture a full build execution trace
  • Prerequisite for binlog-failure-analysis and build-perf-diagnostics skills
  • Enabling post-build investigation of errors

Example prompts

  • “/binlog-generation”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Unique names prevent overwrites - You can always go back and analyze previous builds
  2. Failure analysis - When a build fails, the binlog is already there for immediate analysis
  3. Comparison - You can compare builds before and after changes
  4. No re-running builds - You never need to re-run a failed build just to generate a binlog

What it can do on your machine

Read from SKILL.md and the folder at commit 44b9dcc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • dotnet
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Binlog Generation loads about 824 tokens when it runs. Until then it costs about 142 tokens; SKILL.md has 266 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~142
When it runs · the whole SKILL.md, loaded when a task matches
~824

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/testfx at commit 44b9dcc, republished under its MIT licence (© microsoft). 266 words, ~824 tokens.

Download SKILL.mdSave it as .claude/skills/binlog-generation/SKILL.md (or your agent's skills folder).
name
binlog-generation
description
Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. USE FOR: adding /bl:{} to any dotnet build, test, pack, publish, or restore command to capture a full build execution trace, prerequisite for binlog-failure-analysis and build-perf-diagnostics skills, enabling post-build investigation of errors or performance. Requires MSBuild 17.8+ / .NET 8 SDK+ for {} placeholder; PowerShell needs -bl:{{}}. DO NOT USE FOR: non-MSBuild build systems (npm, Maven, CMake), analyzing an existing binlog (use binlog-failure-analysis instead).
license
MIT

Generate Binary Logs

Pass the /bl switch when running any MSBuild-based command. This is a non-negotiable requirement for all .NET builds.

Commands That Require /bl

You MUST add the /bl:{} flag to:

  • dotnet build
  • dotnet test
  • dotnet pack
  • dotnet publish
  • dotnet restore
  • msbuild or msbuild.exe
  • Any other command that invokes MSBuild

Preferred: Use {} for Automatic Unique Names

Note: The {} placeholder requires MSBuild 17.8+ / .NET 8 SDK or later.

The {} placeholder in the binlog filename is replaced by MSBuild with a unique identifier, guaranteeing no two builds ever overwrite each other — without needing to track or check existing files.

bash
# Every invocation produces a distinct file automatically
dotnet build /bl:{}
dotnet test /bl:{}
dotnet build --configuration Release /bl:{}

PowerShell requires escaping the braces:

powershell
# PowerShell: escape { } as {{ }}
dotnet build -bl:{{}}
dotnet test -bl:{{}}

Why This Matters

  1. Unique names prevent overwrites - You can always go back and analyze previous builds
  2. Failure analysis - When a build fails, the binlog is already there for immediate analysis
  3. Comparison - You can compare builds before and after changes
  4. No re-running builds - You never need to re-run a failed build just to generate a binlog

Examples

bash
# ✅ CORRECT - {} generates a unique name automatically (bash/cmd)
dotnet build /bl:{}
dotnet test /bl:{}

# ✅ CORRECT - PowerShell escaping
dotnet build -bl:{{}}
dotnet test -bl:{{}}

# ❌ WRONG - Missing /bl flag entirely
dotnet build
dotnet test

# ❌ WRONG - No filename (overwrites the same msbuild.binlog every time)
dotnet build /bl
dotnet build /bl

When a Specific Filename Is Required

If the binlog filename needs to be known upfront (e.g., for CI artifact upload), or if {} is not available in the installed MSBuild version, pick a name that won't collide with existing files:

  1. Check for existing *.binlog files in the directory
  2. Choose a name not already taken (e.g., by incrementing a counter from the highest existing number)
bash
# Example: directory contains 3.binlog — use 4.binlog
dotnet build /bl:4.binlog

Cleaning the Repository

When cleaning the repository with git clean, always exclude binlog files to preserve your build history:

bash
# ✅ CORRECT - Exclude binlog files from cleaning
git clean -fdx -e "*.binlog"

# ❌ WRONG - This deletes binlog files (they're usually in .gitignore)
git clean -fdx

This is especially important when iterating on build fixes - you need the binlogs to analyze what changed between builds.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/binlog-generation of microsoft/testfx.

Open the folder on GitHubat commit 44b9dcc

Used in 2 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in microsoft/testfx, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Binlog Generation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Binlog Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Binlog Generation this skillmicrosoft/testfx1k2 repos~824Automated safety check: PassMIT
Msbuild Antipatternsrunceel/ReactiveProperty944—~3.7kAutomated safety check: PassMIT
Debugging CodeJetBrains/skills3631 repos~3.8kAutomated safety check: PassNone
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
Test Smell Detectiondotnet/skills5.6k1 repos~2.5kAutomated safety check: PassMIT
Grade Testsdotnet/skills5.6k1 repos~5.2kAutomated safety check: PassMIT

Similar skills

  • Msbuild Antipatterns

    runceel/ReactiveProperty

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    944 GitHub stars~3.7k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Debugging Code

    JetBrains/skills

    Official

    A skill your agent uses for debugger-driven runtime root-cause analysis in Rider-supported solutions and projects, including .NET/C, F, VB, C++, Unity, Unreal Engine, and other GameDev or…

    363 GitHub starsUsed in 1 repo~3.8k tokens
    Game DevelopmentAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Official

    Audits existing tests in any language using formal, research-backed test smell names and the testsmells.org 19-smell academic taxonomy.

    5.6k GitHub starsUsed in 1 repo~2.5k tokens
    MobileAuto-check passed
  • Grade Tests

    dotnet/skills

    Official

    Assess a curated list of tests and produce a PR-ready table with a primary Pass, Failed, Uncertain, or Not applicable result plus A-F quality detail for every resolved test; Uncertain and Not…

    5.6k GitHub starsUsed in 1 repo~5.2k tokens
    MobileAuto-check passed
  • Official

    Audits and updates the supported-os.json files for .NET releases, checking them against upstream lifecycle data and regenerating the markdown with the release-notes tool.

    22k GitHub stars~4.1k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from microsoft/testfx

All 44 skills in this repo
  • Official

    Guide for organizing MSBuild infrastructure with Directory.Build.props, Directory.Build.targets, Directory.Packages.props, and Directory.Build.rsp.

    1k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Binlog Failure Analysis

    microsoft/testfx

    Official

    Analyze MSBuild binary logs to diagnose build failures. An agent skill from microsoft/testfx.

    1k GitHub starsUsed in 3 repos~730 tokens
    Auto-check passed
  • Coverage Analysis

    microsoft/testfx

    Official

    Project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects.

    1k GitHub stars~7.3k tokensUpdated today
    Auto-check passed
  • Incremental Build

    microsoft/testfx

    Official

    Guide for optimizing MSBuild incremental builds. An agent skill from microsoft/testfx.

    1k GitHub starsUsed in 3 repos~3.7k tokens
    Auto-check passed
  • Msbuild Modernization

    microsoft/testfx

    Official

    Guide for modernizing and migrating MSBuild project files to SDK-style format.

    1k GitHub starsUsed in 3 repos~4.3k tokens
    Auto-check passed
  • Msbuild Antipatterns

    microsoft/testfx

    Official

    Catalog of MSBuild anti-patterns with detection rules and fix recipes.

    1k GitHub stars~4.5k tokensUpdated today
    Auto-check passed

Categories

Questions about Binlog Generation

What does Binlog Generation do?

Generate MSBuild binary logs (binlogs) for build diagnostics and analysis. Binlog Generation is an agent skill from microsoft/testfx, published by the product's own GitHub organization. Generate MSBuild binary logs (binlogs) for build diagnostics and analysis.

When should I use Binlog Generation?

Binlog Generation fits situations like: : adding /bl:{} to any dotnet build; restore command to capture a full build execution trace; prerequisite for binlog-failure-analysis and build-perf-diagnostics skills; enabling post-build investigation of errors.

How do I install Binlog Generation in Claude Code?

Run `npx skills add microsoft/testfx --skill binlog-generation -a claude-code`. Or copy the skill folder (.agents/skills/binlog-generation in microsoft/testfx) into .claude/skills/binlog-generation in your project. Claude Code loads it when a task matches its description.

How do I install Binlog Generation in Codex?

Run `npx skills add microsoft/testfx --skill binlog-generation -a codex`. Or copy the skill folder (.agents/skills/binlog-generation in microsoft/testfx) into .agents/skills/binlog-generation in your project. Codex loads it when a task matches its description.

Can I use Binlog Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/testfx --skill binlog-generation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/binlog-generation, .gemini/skills/binlog-generation, .github/skills/binlog-generation and .opencode/skills/binlog-generation in your project.

What does Binlog Generation need to run?

Going by SKILL.md and its folder, Binlog Generation needs the command-line tools its instructions call (dotnet and git).

Does Binlog Generation access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Binlog Generation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Binlog Generation use?

Binlog Generation is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Binlog Generation use?

About 824 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Binlog Generation?

Skills that share tags, products or a category with Binlog Generation: Msbuild Antipatterns (runceel/ReactiveProperty, 944 stars), Debugging Code (JetBrains/skills, 363 stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars) and Test Smell Detection (dotnet/skills, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Binlog Generation?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/testfx, which has 1,047 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.

Source: microsoft/testfx on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.