agentleFS
Microsoft AzureKnown publisherAzure/bicep/.github/skills/bicep-perf-profiling/SKILL.md

bicep-perf-profiling

Skill3.6k starsChanged 2 months agoMITView on GitHub

Capture and analyze .NET traces for Bicep CLI compilation. Use when profiling Bicep builds, batch compilation, CPU hotspots, allocations, GC pressure, contention, or compiler performance with dotnet-trace and filtrace.

Trending

Quiet since March.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Azure/bicep repository that our weekly crawl found: only 8 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about Azure/bicep

The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 8

Talked about on GitHub, Hacker News and Bluesky (8 times).

On GitHub · 6

1 more on GitHub

On Bluesky · 1

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 3 are distinctive, and 8 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.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run commands from the Bicep repository root.

    line 13
  2. Very specific:

    Ensure pwsh, the SDK pinned by global.json, and dotnet-trace are available.

    line 14
  3. Very specific:

    If needed, install dotnet-trace with dotnet tool install --global dotnet-trace.

    line 15
  4. Distinctive:

    Run the bundled profile script:

    line 19
  5. Distinctive:

    Use filtrace in this order:

    line 34
  6. Very specific:

    Run trace_info with the trace path and symbols=src/Bicep.Cli/bin/profile/Release.

    line 36
  7. Very specific:

    Run CPU trace_rank with both self and inclusive measures.

    line 38
  8. Very specific:

    Run allocation trace_rank with both measures and run trace_gc for collection count, pause time, peak heap, and promoted bytes.

    line 40
  9. Very specific:

    Use trace_callers on hot framework leaves such as file I/O, JSON serialization, array growth, boxing, or locks until reaching the …

    line 41
  10. Very specific:

    Use trace_tree for major Bicep phases and trace_lines or trace_heatmap only when matching PDBs provide sufficient source attribution.

    line 42
  11. Distinctive:

    Call out capture limitations.

    line 64

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bicep Performance Profiling

Capture a Release trace of bicep build --pattern, then use the filtrace MCP server to identify actionable compiler hotspots.

Prerequisites

  • Run commands from the Bicep repository root.
  • Ensure pwsh, the SDK pinned by global.json, and dotnet-trace are available.
  • If needed, install dotnet-trace with dotnet tool install --global dotnet-trace.

Capture

Run the bundled profile script:

pwsh ./.github/skills/bicep-trace-analysis/scripts/BuildAndProfile.ps1 src/Bicep.Core.Samples/Files/user_submitted

The script:

  1. Builds Bicep.Cli in Release mode under src/Bicep.Cli/bin/profile/Release.
  2. Runs bicep build --pattern <folder>/**/*.bicep.
  3. Writes profile-<UTC timestamp>.nettrace to the current directory.
  4. Captures sampled thread stacks, common runtime events, verbose GC events, and sampled allocations.

Analyze

Use filtrace in this order:

  1. Run trace_info with the trace path and symbols=src/Bicep.Cli/bin/profile/Release.
  2. Require strong method-name resolution before interpreting rankings. Source mapping may be lower because framework PDBs are unavailable; ensure there are no PDB identity mismatches for Bicep assemblies.
  3. Run CPU trace_rank with both self and inclusive measures.
  4. Scope compiler rankings with root=Bicep.Cli.Commands.BuildCommand.Compile. Whole-process rankings include runtime service threads and sampled waits that can obscure compiler work.
  5. Run allocation trace_rank with both measures and run trace_gc for collection count, pause time, peak heap, and promoted bytes.
  6. Use trace_callers on hot framework leaves such as file I/O, JSON serialization, array growth, boxing, or locks until reaching the Bicep-owned caller.
  7. Use trace_tree for major Bicep phases and trace_lines or trace_heatmap only when matching PDBs provide sufficient source attribution.

Useful first-pass analyses:

trace_info(path, symbols)
trace_rank(path, metric=cpu, measure=self, root=Bicep.Cli.Commands.BuildCommand.Compile, symbols=symbols)
trace_rank(path, metric=cpu, measure=inclusive, root=Bicep.Cli.Commands.BuildCommand.Compile, symbols=symbols)
trace_rank(path, metric=alloc, measure=self)
trace_rank(path, metric=alloc, measure=inclusive)
trace_gc(path)

Report

Report the top five optimization areas. For each area include:

  • The inclusive or self weight and percentage of the scoped compile workload.
  • The Bicep-owned method or phase responsible for the cost.
  • A concrete optimization hypothesis and the smallest experiment that could falsify it.
  • Any overlap with another finding; inclusive percentages are not additive.

Call out capture limitations. Prefer a longer trace when a result has fewer than 200 samples, and do not claim allocation absence unless allocation capture is known to be enabled. Re-capture and compare like-for-like traces after any optimization.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.