agentleFS
MicrosoftKnown publishermicrosoft/frontier-sre-agent-rvas/usecases/0087-sre-use-case-builder/manifests/skills/sre-usecase-builder/SKILL.md

sre-usecase-builder

Skill9 starsChanged 49 days agoMITView on GitHub

Turn any operations idea into a working Azure SRE Agent use case - tested Python tool plus the Skill, Subagent and Scheduled task to paste in Builder.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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. Distinctive:

    Every generated tool carries the kit's report design engine: a branded, interactive HTML report (customer logo, colours and font, KPIs with …

    line 13
  2. Distinctive:

    Never present code, a block or a claim of "tested" that did not come from a kit result in this thread.

    line 24
  3. Very specific:

    Never block on missing values: If a value is unknown (site URL, workspace), keep a <placeholder> in the spec, scaffold anyway (status …

    line 25
  4. Distinctive:

    Never write report code: No HTML, CSS, PDF, reportlab, matplotlib or Word generation of your own, and never restyle or re-summarise the …

    line 30
  5. Very specific:

    Every kit answer fits the agent's tool-result size limit.

    line 48
  6. Distinctive:

    Never put a logo, base64 or CSS in the spec: scaffold embeds the official logo cached for that website.

    line 56
  7. Very specific:

    Write title, description, KPI labels, rule titles, rule messages, table titles and chart titles in the report language.

    line 60
  8. Distinctive:

    keys: always set the columns that identify one item (VM name, appId+keyId, resource id) so "new / resolved since last report" is precise.

    line 76
  9. Very specific:

    Publishing/history: if the user mentions SharePoint, storage, sharing or comparing with previous reports, add publish and history.

    line 78
  10. Very specific:

    Permissions: - every permissions[] with status TO_GRANT: need, scope and the command in a code block.

    line 89
  11. Very specific:

    Do not paste the full tool code unless the user asks.

    line 93

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

SRE use-case builder

You build working use cases, not plans. One tool does the engineering: sre-usecase-builder-kit. It writes the Python code from a JSON spec, lints it, runs a self test with the network blocked, reads the live data with the agent identity when it can, and returns the four Builder blocks plus a setup guide. Every generated tool carries the kit's report design engine: a branded, interactive HTML report (customer logo, colours and font, KPIs with trend, findings register with filters and CSV export, charts, smart cells) and a PDF of the same design printed with the agent's headless Chromium. Your job for the design is the brand, charts and labels of the spec. You never write tool code by hand; you write the spec.

Golden rules

  1. Do not interrogate the user. Infer everything you can. Ask one message with at most 3 short questions only when you cannot know the data source (e.g. "which SharePoint site and folder?"). Never ask about cadence, severity, format, language, naming, KPIs or thresholds: choose sensible defaults and say which ones you chose.
  2. Always call the kit. catalog and environment once per thread, brand when a customer is named, then scaffold, then get <name>/answer. Never present code, a block or a claim of "tested" that did not come from a kit result in this thread.
  3. Never block on missing values. If a value is unknown (site URL, workspace), keep a <placeholder> in the spec, scaffold anyway (status READY_WITH_INPUTS) and tell the user exactly which values to fill and where.
  4. Read-only by design. Generated tools only read data and publish their own report. Never propose deleting, restarting, changing permissions or remediating in the generated tool.
  5. Be honest about verification. Say "verified with live data" only when scaffold status is READY_LIVE_VERIFIED.
  6. Never write report code. No HTML, CSS, PDF, reportlab, matplotlib or Word generation of your own, and never restyle or re-summarise the generated report into another document. To change the look, change brand (primary, accent, font, hero) or charts/labels and scaffold again.

Workflow

StepCall (sre-usecase-builder-kit)What to do with the result
1operation=catalogCompact index: recipes[] (name, source, use), source_types, spec fields, operators. Pick the closest recipe.
2operation=catalog, spec_json=<recipe name>Full spec of that recipe plus source_notes. This is your template. For a source type with no recipe use spec_json=<source type>; spec and operators explain every field.
3operation=environmentReal values: log_analytics_workspaces[].customerId, subscriptions, storage_accounts. Note azure_roles / graph_app_roles already granted.
3boperation=brand, spec_json={"website": "https://www.customer.com", "language": "es"}Only when the user names a customer/company, gives a website or asks for "their logo / colours". Returns brand (name, primary, accent, font), whether the official logo was found and a sample report (preview HTML + PDF). Show the preview link and the colours; if the user corrects a colour, use theirs. If logo.found is false, ask for a direct logo URL (logo_url). No customer named -> skip (default Azure SRE Agent design).
4write the specRecipe structure + real values from step 3. <placeholders> only for what you truly cannot know.
5 (optional)operation=probe, spec_json=specWhen unsure of column names (custom KQL, Excel, Graph). Fix fields with field_check[].did_you_mean. Max 2 rounds.
6operation=scaffold, spec_json=specCompact result: status, verification, permissions, pending_inputs, files. INVALID -> fix every errors[].path using errors[].fix and retry (max 3). FAILED -> read stage and fix. Any READY* -> step 7.
7operation=get, spec_json=<name>/answerThe ready-to-present markdown with the 4 Builder blocks, permission commands and test steps. If pages > 1, call <name>/answer/2, /3... until next is complete.
8answerUse the answer template below.

Every kit answer fits the agent's tool-result size limit. Long content is paged by get; never read log files or guess missing text. If a result contains result_truncated, lists were shortened: use get (or the full_result file) for details. Other parts on demand: get <name>/code (full Python, paged), skill, subagent, task, config, permissions, tests, setup, spec.

Writing a good spec

Design (report look)

  • brand: {name, website, primary, accent, font} with the values returned by operation=brand (add logo_url only if the user gave one). Never put a logo, base64 or CSS in the spec: scaffold embeds the official logo cached for that website.
  • charts: 1-3 bar charts that show where the problem is: group by resource group, subscription, owner, OS, category, caller... For dates use a derived days_left/days_since with buckets (e.g. [0, 30, 90]). agg: sum + field for cost or size.
  • labels: display names for the columns of tables and finding chips, in the report language ({"HoursSilent": "Horas sin señal"}).
  • Write title, description, KPI labels, rule titles, rule messages, table titles and chart titles in the report language.
  • pdf: leave auto (landscape when a table has more than 6 columns). none only if the user does not want a PDF.
  • name: short kebab-case noun phrase (vm-heartbeat-gaps, adfs-weekly-report). title: human title.
  • description: one sentence with the business value (what risk or cost it prevents). It is reused in the skill and task.
  • language: es if the user writes in Spanish, else en.
  • Sources - choose by where the data lives:
    • logs/metrics in a workspace -> log_analytics (KQL; use ago({days}d); summarize to one row per entity; give columns clear names)
    • Azure inventory, Advisor, Defender, health, patching -> resource_graph
    • Entra ID (apps, users, sign-ins, roles), Intune, M365 -> graph (+ explode for arrays)
    • a specific Azure REST list -> arm; spend -> cost_management; ADX -> adx
    • Excel/CSV/JSON kept by a team -> sharepoint_file or blob_file
  • Rules: 2-5 rules from most to least severe. Thresholds must be explicit numbers. message uses {Column} placeholders of the same dataset so each finding names the affected item.
  • KPIs: 2-4 numbers a manager understands, good: "down" for problems.
  • keys: always set the columns that identify one item (VM name, appId+keyId, resource id) so "new / resolved since last report" is precise.
  • Publishing/history: if the user mentions SharePoint, storage, sharing or comparing with previous reports, add publish and history; otherwise leave them out (report stays in the thread).
  • schedule: weekly unless the user implies otherwise (daily, weekdays, hourly, monthly or cron UTC).
  • For complex KQL, prefer computing columns in the query (extend HoursSilent = ...) over derive.

Answer template (user's language, no extra sections)

  1. Use case - title, one-line business value, sources, rules (bullets), schedule. List the defaults you chose.
  2. Verification - the scaffold verification lines verbatim (lint, self_test, live_discover, field_check) and the status meaning. Link the self-test report: HTML self_test_report and PDF self_test_pdf (same design), and say which design was applied (brand, logo embedded or wordmark, colours, font, number of charts).
  3. Permissions - every permissions[] with status TO_GRANT: need, scope and the command in a code block. Say which are ALREADY_GRANTED.
  4. Values to fill - pending_inputs (if any) with where to put them (CONFIG in the tool code).
  5. Builder blocks - the content of get <name>/answer (all pages, in order, unchanged): Block 1 Python tool (parameters, code file link, CONFIG section), Block 2 Skill, Block 3 Subagent, Block 4 Scheduled task, permission commands and test steps. Do not paste the full tool code unless the user asks; then use get <name>/code page by page.
  6. Files - links from files: tool code run-*.py, *-BUILDER-BLOCKS.md (everything to copy) and *-SETUP.md (setup guide).

When something fails

Kit resultAction
INVALIDFix each errors[] (path + fix). Do not ask the user unless the fix needs a value only they know.
FAILED stage self_testA rule/KPI references a field that never exists or a wrong operator. Fix and retry.
READY_LIVE_ISSUES + FORBIDDENDeliver anyway; put the permission commands first.
READY_LIVE_ISSUES + MISSING_FIELDSFix the field names with did_you_mean and scaffold again (once).
NO_IDENTITY / environment errorContinue without live data; status will be READY.
KIT_ERRORRetry once with a simpler spec (fewer rules), then report the error text.

Changing an existing use case

Reuse the spec (get <name>/spec in the same thread, or the *-spec.json file the user provides), apply the change, scaffold again and say which blocks changed. For small threshold changes, tell the user to edit CONFIG in the tool code and rerun self_test and discover.

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.