타겟 실행 전 프로젝트 파일 처리, import 체인 및 glob 확장 비용을 분석하여 MSBuild 평가 병목 현상을 진단합니다.
- GitHub 스타
- 5,942
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
eval-performance skill은 무엇을 하나요?
eval-performance은(는) agent skill입니다. 타겟 실행 전 프로젝트 파일 처리, import 체인 및 glob 확장 비용을 분석하여 MSBuild 평가 병목 현상을 진단합니다.
skill의 SKILL.md에서 생성된 요약입니다.
eval-performance skill 정보
복잡한 빌드 시스템을 관리하는 개발자가 타겟 실행 전 MSBuild 평가 병목 현상을 식별할 수 있도록 지원합니다. 이 SKILL은 MSBuild가 프로젝트 파일을 읽고, import를 처리하며, glob을 확장하는 단계에 집중합니다. 이 단계는 컴파일이 필요하지 않은 상황에서도 빌드 시작을 느리게 만드는 원인이 될 수 있습니다. 이 도구는 타겟 실행이나 증분 빌드 문제가 아닌, 평가 단계가 느려짐의 구체적인 원인임을 확인한 사용자에게 적합합니다.
binlog 또는 성능 요약에서 초기 프로젝트 처리 단계의 비용이 높게 나타날 경우 에이전트가 이 SKILL을 로드해야 합니다. 이 SKILL은 binlog MCP server를 사용하여 평가 소요 시간을 나열하고, 전역 속성을 검사하며, import 체인의 깊이를 분석합니다. 또한 전처리 기술을 활용하여 확장된 프로젝트 파일을 조사하고, node_modules나 .git 디렉토리를 탐색하는 것과 같이 비용이 많이 드는 glob 패턴을 식별합니다. 이러한 특정 지표를 분석함으로써 깊은 import 체인, 서로 다른 전역 속성에 따른 중복 평가, 또는 과도한 파일 I/O를 유발하는 속성 함수 중 무엇이 원인인지 정확히 찾아낼 수 있습니다.
agent가 수행할 수 있는 작업
- 1import 체인 깊이 분석프로젝트의 import 계층 구조가 지나치게 깊어 빌드 시작을 늦추고 있는지 확인합니다.
- 2중복 프로젝트 평가 감지서로 다른 전역 속성으로 인해 프로젝트가 여러 번 평가되고 있는지 확인합니다.
- 3속성 함수 비용 검사평가 단계에서 과도한 파일 I/O를 수행하는 속성 함수를 확인합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
eval-performance skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 eval-performance skill 설치
/plugin marketplace add dotnet/skills /plugin install dotnet-msbuild@dotnet-agent-skills
Claude Code에 eval-performance skill 설치
~/.claude/skills/eval-performance/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance ~/.claude/skills/eval-performanceClaude Code (project)에 eval-performance skill 설치
.claude/skills/eval-performance/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance .claude/skills/eval-performanceCodex에 eval-performance skill 설치
~/.agents/skills/eval-performance/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance ~/.agents/skills/eval-performanceGemini CLI에 eval-performance skill 설치
~/.gemini/skills/eval-performance/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance ~/.gemini/skills/eval-performanceClaude.ai에 eval-performance skill 설치
npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance eval-performance && zip -r eval-performance.zip eval-performance # claude.ai → Customize → Skills → + → Create skill → Upload a skill → eval-performance.zip
자동 검사
2026년 11월 15일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식
- 소스 저장소 연결 및 접근 가능dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance is public and reachablegithub.com/dotnet/skills/tree/HEAD/plugins/dotnet-msbuild/sk ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/dotnet/skills/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-msbuild/sk ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-msbuild/sk ↗통과
- SKILL.md가 Agent Skills 형식을 따름Valid name and description; says when to use it; 130 linesgithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-msbuild/sk ↗통과
SKILL.md
GitHub에서 보기Diagnosing MSBuild Evaluation Performance
Evaluation is the work MSBuild does before any target runs — reading project files, processing imports, expanding globs. This skill helps you find and confirm evaluation bottlenecks. Measure first; recommend a change only when a measurement proves it is warranted.
Confirm the problem before changing anything
Engage only when evaluation is measurably the bottleneck. Do NOT act when:
- The slowness is during compilation or target execution, not evaluation.
That is not an evaluation problem — use
build-perf-diagnosticsinstead. - The complaint is "rebuilds too much" / incremental build. Use
incremental-buildinstead. - You have no measurement. If no binlog or timing summary shows evaluation is slow, gather one first (see below). Do not guess from reading project files.
- A pattern below appears but evaluation is already fast. Broad globs, deep
imports, or
EnableDefaultItemsare only worth flagging when the numbers show they cost real time. A project that evaluates quickly needs no change.
When a pattern is present but unmeasured, report it as an observation and let the user decide — do not rewrite working configuration to match a "best practice" without evidence it costs measurable evaluation time. Prefer the smallest, most targeted change; never disable SDK defaults as a first move.
MSBuild Evaluation Phases
For a comprehensive overview of MSBuild's evaluation and execution model, see Build process overview.
- Initial properties: environment variables, global properties, reserved properties
- Imports and property evaluation: process
<Import>, evaluate<PropertyGroup>top-to-bottom - Item definition evaluation:
<ItemDefinitionGroup>metadata defaults - Item evaluation:
<ItemGroup>withInclude,Remove,Update, glob expansion - UsingTask evaluation: register custom tasks
Key insight: evaluation happens BEFORE any targets run. Slow evaluation = slow build start even when nothing needs compiling.
Diagnosing Evaluation Performance
Primary: binlog MCP (preferred)
Use the binlog MCP server (Microsoft.AITools.BinlogMcp, exposed under the binlog MCP namespace) to analyze evaluation performance:
- Use the evaluations tool to list all evaluations and their durations
- Use evaluation_global_properties to check for multiple evaluations with differing global properties
- Use evaluation_properties to inspect evaluated properties for a specific project+TFM
- Use imports tool to analyze the import chain depth and structure
- Use properties tool to check for expensive property function evaluations
Fallback: text-log replay and preprocessing (when MCP is unavailable)
Using binlog
- Replay the binlog:
dotnet msbuild build.binlog -noconlog -fl "-flp:v=diag;logfile=full.log" - Search for evaluation events:
grep -i 'Evaluation started\|Evaluation finished' full.log - Multiple evaluations for the same project = overbuilding
- Look for "Project evaluation started/finished" messages and their timestamps
Using /pp (preprocess)
dotnet msbuild -pp:full.xml MyProject.csproj- Shows the fully expanded project with ALL imports inlined
- Use to understand: what's imported, import depth, total content volume
- Large preprocessed output (>10K lines) = heavy evaluation
Using /clp:PerformanceSummary
- Add to build command for timing breakdown
- Shows evaluation time separately from target/task execution
Expensive Glob Patterns
Only pursue these remedies once a measurement shows item evaluation is slow and the globs are the cause; a custom glob that isn't walking large trees is fine.
- Globs like
**/*.cswalk the entire directory tree - Default SDK globs are optimized, but custom globs may not be
- Problem: globbing over
node_modules/,.git/,bin/,obj/— millions of files - Remedy: use
<DefaultItemExcludes>to exclude large directories - Remedy: be specific with glob paths:
src/**/*.csinstead of**/*.cs - Remedy: use
<EnableDefaultItems>false</EnableDefaultItems>only as a last resort (loses SDK defaults) — prefer the two options above first - Check: grep for Compile items in the diagnostic log → if Compile items include unexpected files, globs are too broad
Import Chain Analysis
- Deep import chains (>20 levels) slow evaluation
- Each import: file I/O + parse + evaluate
- Common causes: NuGet packages adding .props/.targets, framework SDK imports, Directory.Build chains
- Diagnosis:
/ppoutput → search for<!-- Importingcomments to see import tree - Remedy (only if the chain is measurably costly): reduce transitive package imports where possible, consolidate imports
Multiple Evaluations
- A project evaluated multiple times = wasted work
- Common causes: referenced from multiple other projects with different global properties
- Each unique set of global properties = separate evaluation
- Diagnosis:
grep 'Evaluation started.*ProjectName' full.log→ if count > 1, check for differing global properties - Fix: normalize global properties, use graph build (
/graph)
TreatAsLocalProperty
- Prevents property values from flowing to child projects via MSBuild task
- Overuse: declaring many TreatAsLocalProperty entries adds evaluation overhead
- Correct use: only when you genuinely need to override an inherited property
Property Function Cost
- Property functions execute during evaluation
- Most are cheap (string operations)
- Expensive:
$([System.IO.File]::ReadAllText(...))during evaluation — reads file on every evaluation - Expensive: network calls, heavy computation
- Rule: property functions should be fast and side-effect-free
Optimization Checklist
- Check preprocessed output size:
dotnet msbuild -pp:full.xml - Verify evaluation count: should be 1 per project per TFM
- Exclude large directories from globs
- Avoid file I/O in property functions during evaluation
- Minimize import depth
- Use graph build to reduce redundant evaluations
- Check for unnecessary UsingTask declarations
이 스킬의 파일
1eval-performance skill 질문
Claude Code에 eval-performance skill을 어떻게 설치하나요?
npx degit dotnet/skills/plugins/dotnet-msbuild/skills/eval-performance ~/.claude/skills/eval-performance를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
eval-performance skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
이 SKILL을 언제 사용해야 하나요?
전역 속성(global-property) 변형에 따른 평가 반복, 비용이 많이 드는 glob(node_modules 또는 .git 등), 깊은 import 체인 또는 대규모 전처리 파일을 진단할 때 사용합니다. 타겟 실행 병목이나 증분 빌드 문제 해결에는 사용하지 마십시오.