agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-net/.github/skills/auto-build-repair/SKILL.md

auto-build-repair

Skill6.1k starsChanged 8 months agoMITView on GitHub

Repair custom-code build failures in generated Azure SDK pull requests with one bounded customized-update invocation. WHEN: an eligible release-planner Auto SDK PR labeled auto-sdk-build-fix needs repair, or requests mention auto build repair, custom-code build repair, or fixing the SDK PR build. Not for migrations, TypeSpec authoring, or API review.

Trending

Quiet this year.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the Azure/azure-sdk-for-net repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about Azure/azure-sdk-for-net

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

See all 9

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

On GitHub · 4

On Bluesky · 4

On Hacker News · 1

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Read the co-located repair-config.yml.

    line 14
  2. Distinctive:

    Do not introduce a repair-mode, timeout, or artifact option.

    line 49
  3. Very specific:

    Only the selected package's custom code may be patched.

    line 63
  4. Distinctive:

    Stop when the single invocation finishes.

    line 68
  5. Very specific:

    Commit custom-code edits and regenerated output through the workflow's existing safe output only after the final package build is green and …

    line 73
  6. Very specific:

    Run emit-repair-report.ps1, then post its output verbatim through the existing add-comment safe output.

    line 82
  7. Very specific:

    Use -Eligible:$false only when the PR fails eligibility checks.

    line 97
  8. Very specific:

    Use -ForcedStatus skipped_already_green only when the baseline package build was green and no engine attempt ran.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Auto Build Repair

Repair an already-generated, eligible Auto SDK PR headlessly. Use only the shared azsdk tsp client customized-update engine, also exposed as azure-sdk-mcp:azsdk_customized_code_update. Never hand-edit source, prompt for input, switch repair engines, or auto-merge.

Configuration and capability

Read the co-located repair-config.yml. Its maxIterations value is the bound passed into the engine, not a number of tool invocations. Preserve the cross-language default of 3 when the file or key is absent; reject values outside the engine's integer range 1..10.

The CLI must advertise --max-attempts in azsdk tsp client customized-update --help. For MCP, the tool must expose the typed maxAttempts parameter. If unavailable, stop and report the unsupported capability; do not fall back to an outer retry loop.

This requires the engine change in Azure/azure-sdk-tools#17068, available in azsdk_0.6.50. The latest-release installer alone does not prove the capability exists; still check the installed CLI or MCP tool as described above.

Invoke once

Identify the single failing package and collect its build-error output. Preserve that raw output as pre-repair-errors.txt for reporting. If the package is already green, skip the engine and report skipped_already_green.

Invoke exactly once, passing the configured bound:

azsdk -o json tsp client customized-update
  --edit-scope CustomCode
  --package-path <single failing SDK package directory>
  --customization-request <build errors and failure context>
  --max-attempts <maxIterations from repair-config.yml>

The equivalent MCP arguments are editScope: "CustomCode", packagePath, customizationRequest, and maxAttempts: <configured maxIterations>. Omit tspProjectPath so regeneration uses the pinned tsp-location.yaml. Do not introduce a repair-mode, timeout, or artifact option.

The engine owns patching, regeneration/build validation, and retries. Its iterations reuse one conversation with validation feedback and retain earlier source edits. Separate CLI/MCP invocations do not retain that conversation. There is no outer retry loop, even if errors shrink or attempts remain.

Capture the complete final JSON response as result.json in the results directory. Do not manufacture responses, diagnostics, or build evidence. If the process fails, retain its actual output/error for the failure report; do not substitute an earlier successful result.

Scope and stopping

Only the selected package's custom code may be patched. Only the generator may update Generated/, from unchanged pinned inputs. Never change TypeSpec, tsp-location.yaml, package metadata, tests, other packages, .github, eng, shared build files, dependencies, or secrets.

Stop when the single invocation finishes. Surface its final build diagnostics and guidance for spec changes, manual intervention, regeneration/build failure, exhausted iterations, cancellation, or infrastructure failure. Do not retry the command or finish the repair manually.

Commit custom-code edits and regenerated output through the workflow's existing safe output only after the final package build is green and the final response has Boolean success: true. Tool completion, applied patches, fewer errors, or reaching the bound do not establish a green build. Missing, malformed, or failing final results never authorize a push. Failed changes stay uncommitted; successful changes still require human review.

Deterministic reporting

Run emit-repair-report.ps1, then post its output verbatim through the existing add-comment safe output. Do not author the comment or telemetry yourself.

  • Pass -ResultsDir containing the single result.json, the captured -PreRepairErrorsFile, package/PR identity, and configured -MaxIterations.
  • Iterations come from attemptsUsed: completed patch proposals reaching host validation, including a no-progress proposal. Baseline/classifier-only builds and tool/Exit reminders do not count. Never count JSON files or infer attempts from patches or prose; a missing count is unknown, not a fabricated number.
  • Explain why repair failed using final buildResult, response_error, errorCode, and available spec/manual guidance. Include attempted file changes, the stop reason/count, next action, and workflow logs—not just exit 1.
  • Preserve the existing generated/custom file attribution and eight telemetry fields in telemetry-schema.v1.json.
  • Use -Eligible:$false only when the PR fails eligibility checks.
  • Use -ForcedStatus skipped_already_green only when the baseline package build was green and no engine attempt ran.
  • For capability or process failures, do not pass either override. Pass -EngineErrorsFile with the captured stderr and retain -PreRepairErrorsFile; a missing result must render as failed/NoEngineResult, not a skipped run.

The renderer appends --generated by Copilot. Request a report on every terminal outcome; infrastructure failures that prevent reporting remain visible in Actions status/logs.

Existing workflow environment

Work in the existing checkout at $GITHUB_WORKSPACE; do not clone or create a second working copy. Keep scratch under $RUNNER_TEMP as prescribed by the workflow. Preserve its eligibility checks, authentication, network restrictions, protected-file rules, and existing success-only safe-output publisher.

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.