Skip to content

Comments

Add Claude Code plugin for FinOps hubs and Azure Cost Management#2013

Merged
MSBrett merged 13 commits intodevfrom
features/agentskills
Feb 23, 2026
Merged

Add Claude Code plugin for FinOps hubs and Azure Cost Management#2013
MSBrett merged 13 commits intodevfrom
features/agentskills

Conversation

@MSBrett
Copy link
Contributor

@MSBrett MSBrett commented Feb 18, 2026

Summary

  • Added Claude Code plugin with 4 agents (CFO, FinOps practitioner, database query, hubs agent), 4 commands, 2 skills (finops-toolkit, azure-cost-management), and an output style
  • Skills include curated reference docs for Azure Advisor, savings plans, reservations, commitment discount decisions, budgets, cost exports, anomaly alerts, credits, and MACC
  • KQL query catalog with 17 pre-built queries for cost analysis, anomaly detection, forecasting, and rate optimization
  • Symlinked docs-mslearn and src/queries into the plugin for single-source-of-truth content
  • Plugin located in src/templates/claude-plugin for packaging via Package-Toolkit.ps1

Test plan

  • Verify plugin loads correctly in Claude Code (claude install-plugin)
  • Verify symlinks resolve correctly (queries, docs-mslearn)
  • Verify SKILL.md reference links are valid relative paths
  • Verify Package-Toolkit.ps1 packages the plugin into a zip
  • Test KQL queries against a FinOps hub ADX cluster

🤖 Generated with Claude Code

msbrett and others added 10 commits February 9, 2026 11:38
…oolkit

Introduces the Claude Code plugin structure under src/ai-tools/ with:
- Agents: finops-practitioner, chief-financial-officer, ftk-database-query, ftk-hubs-agent
- Skills: azure-cost-management and finops-toolkit with reference docs and KQL query catalog
- Commands: hubs-connect, hubs-healthCheck, mom-report, ytd-report
- Output style: fact-grounded financial analysis formatting with evidence requirements
- Plugin manifest and marketplace configuration

Moves KQL queries from src/queries/ into skill reference structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add .ftk/environments.local.md settings pattern for multi-environment config
- Rename command files from .prompt.md to .md for auto-discovery
- Replace all "project configuration" references with .ftk/environments.local.md
- Add settings-format.md reference documentation
- Update marketplace.json source to relative path
- Add docs publishing workflow to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorganize plugin components into the new src/claude-plugin directory
structure with updated plugin.json, README files, and marketplace config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Single source of truth for agent instructions across Claude Code,
GitHub Copilot, and other AI coding tools.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes verified against live Azure APIs and repo source docs:
- azure-advisor: remove fabricated GUID row, add dismiss vs postpone note
- azure-credits: update stale product names (Ubuntu Pro, Citrix Virtual Apps)
- azure-savings-plans: fix REST method, API version, default params, embed scripts
- azure-reservations: new reference file for reserved instance analysis
- azure-commitment-discount-decision: new decision framework reference
- finops-hubs: add Transactions() to function list
- finops-hub-database-guide: fix CostsPlus phantom reference to costs-enriched-base
- ftk-hubs-connect: fix daterange() typo to datestring()
- quarterly-cost-by-resource-group: fix description to match top N row semantics
- Remove azure-storage-cost-analysis (non-functional)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Relocated claude-plugin from src/claude-plugin to src/templates/claude-plugin
so it gets packaged by Package-Toolkit.ps1. Moved queries back to src/queries/
with symlink into plugin. Added docs-mslearn symlink and linked all 103
Microsoft Learn docs in finops-toolkit SKILL.md. Updated marketplace.json
path, reverted copilot-instructions.md and settings.json, added changelog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive Claude Code plugin for the FinOps Toolkit, enabling AI-powered cloud financial management through natural language queries. The plugin includes 4 specialized agents (CFO, FinOps practitioner, database query, hubs deployment), 17 pre-built KQL queries, and curated Azure Cost Management reference documentation.

Changes:

  • Added Claude Code plugin with agents, commands, skills, and output style in src/templates/claude-plugin/
  • Created symlinks to docs-mslearn and src/queries for single-source-of-truth content
  • Added changelog entry and marketplace configuration for plugin distribution

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/templates/claude-plugin/.claude-plugin/plugin.json Plugin manifest defining agents, skills, commands, MCP servers, and metadata
src/templates/claude-plugin/agents/*.md 4 agent definitions with specialized roles and expertise
src/templates/claude-plugin/commands/*.md 4 command workflows for hub connection, health checks, and reporting
src/templates/claude-plugin/skills/finops-toolkit/SKILL.md FinOps toolkit skill with query catalog and reference documentation
src/templates/claude-plugin/skills/azure-cost-management/SKILL.md Azure Cost Management skill for optimization and governance
src/templates/claude-plugin/skills/*/references/*.md Reference documentation for Azure services and FinOps operations
src/templates/claude-plugin/output-styles/ftk-output-style.md Financial analysis output formatting standards
src/templates/claude-plugin/README.md Plugin documentation and usage guide
CLAUDE.md Replaced with symlink to .github/copilot-instructions.md
AGENTS.md Replaced with symlink to .github/copilot-instructions.md
.claude-plugin/marketplace.json Marketplace configuration for plugin distribution
docs-mslearn/toolkit/changelog.md Added v14 changelog entry for Claude Code plugin
src/queries/finops-hub-database-guide.md Updated reference to canonical base query
src/queries/catalog/quarterly-cost-by-resource-group.kql Clarified query output description
src/queries/catalog/costs-enriched-base.kql Updated schema reference link
Comments suppressed due to low confidence (2)

src/templates/claude-plugin/skills/finops-toolkit/references/workflows/ftk-hubs-connect.md:1

  • Corrected spelling of 'subscriptioin' to 'subscription'.
    src/templates/claude-plugin/skills/azure-cost-management/references/azure-savings-plans.md:1
  • Variable reference uses incorrect casing. The parameter is defined as $LookBackPeriod (line 379) but referenced as $lookBackPeriod (lowercase 'l'). Similarly, $Term (line 384) is referenced as $term. PowerShell is case-insensitive, but consistency with the parameter definition is a best practice.

…nalysis

New reference files for orphaned resource detection (Resource Graph queries
for 8 resource types), Azure Retail Prices API (public pricing lookup), and
VM rightsizing workflow (Advisor + Monitor metrics + price validation). New
/ftk-cost-optimization command orchestrates all references into a structured
report. Updated SKILL.md with 3 new domains and trigger keywords. Added
cross-references from azure-advisor.md to rightsizing and orphaned resource
docs. Includes red/blue team remediation: fixed RI price calculation, VMSS
NIC exclusion, snapshot chain filtering, LB query null handling, bulk
cleanup error handling, BSD date syntax, Measure-Object scriptblock, and
Impact sort ordering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@flanakin flanakin added this to the v14 milestone Feb 23, 2026
MSBrett and others added 2 commits February 23, 2026 10:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Update ms.date in changelog.md to today's date so the "Update ms.date
in docs-mslearn" workflow has nothing to push, avoiding the branch
protection failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MSBrett MSBrett marked this pull request as ready for review February 23, 2026 19:00
@MSBrett MSBrett merged commit 4cb1acf into dev Feb 23, 2026
7 checks passed
Copy link
Collaborator

@flanakin flanakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should not have been merged. There seem to be a lot of significant issues.


## v14

### Claude Code plugin v1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the same version as everything else.

Suggested change
### Claude Code plugin v1.0
### Claude Code plugin v14

- **Added**
- Added Claude Code plugin with skills for FinOps hubs and Azure Cost Management.
- Added 4 agents (CFO, FinOps practitioner, database query, hubs agent), 4 commands, and an output style.
- Moved KQL query catalog from `src/queries/` into the plugin.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you update the finops-hub-copilot code?

@@ -0,0 +1,23 @@
{
"name": "finops-toolkit",
"version": "1.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be the same version as the toolkit. Update-Version.ps1 should change this whenever versions update.

{
"name": "finops-toolkit",
"version": "1.0.0",
"description": "Claude plugin for FinOps Toolkit, providing tools and integrations for financial operations management.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FinOps != "financial operations"

Suggested change
"description": "Claude plugin for FinOps Toolkit, providing tools and integrations for financial operations management.",
"description": "Claude plugin for FinOps toolkit, providing tools and integrations for FinOps practitioners.",


You are an elite FinOps Practitioner — a certified expert in cloud financial management embodying the complete FinOps Framework as defined by the FinOps Foundation. You possess deep expertise across all FinOps domains, capabilities, principles, and maturity models, combined with hands-on experience implementing FinOps practices in the Microsoft Cloud ecosystem using the FinOps Toolkit.

## Your Constitutional Foundation: The FinOps Principles
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are outdated


**Remember:** Ensure you've read everything in `research/`, then proceed to the next phase

## 2 - Plan Phase
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't all of the links be root-relative? Should they be in the .ftk folder?


Our fiscal year ends on June 30th.
The FinOps team needs a comprehensive analysis of the specified environment for the fiscal year to date and a forecast for the rest of the fiscal year.
You are responsible for `knowledge/`, `planning/` and interpreting `results/`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment re: folders being root-relative in the .ftk folder...


```powershell
# Basic usage with subscription scope
.\Get-BenefitRecommendations.ps1 `
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this script exist? I don't see it in the repo.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not symlink this file to Copilot instructions. We should symlink Copilot instructions here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you dropped a significant amount of useful information. I don't think this should be the right approach. The Copilot instructions aren't as good as what we have here. I haven't compared everything, so there may be room to merge, but we should keep the build and test guidance and more.

@@ -0,0 +1,28 @@
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not be at the repo root. It should be under src/ to follow the repo convention of keeping source files in src/. Root-level dotfiles/directories should be reserved for tool configuration that must be at root (like .github/, .vscode/).

@@ -1,182 +0,0 @@
# CLAUDE.md

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR deleted the original CLAUDE.md (182 lines of build commands, architecture docs, testing guidance, and development patterns for Claude Code) and replaced it with a symlink to .github/copilot-instructions.md. The symlink was later resolved to the Copilot instructions content, but the original Claude Code-specific content was never restored.

The current CLAUDE.md on dev has completely different content than the original. This needs to be reverted — CLAUDE.md and copilot-instructions.md serve different tools with different needs. CLAUDE.md should include build/test commands, architecture details, and development patterns that Claude Code uses.

@@ -0,0 +1 @@
../../../../../../docs-mslearn No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Package-Toolkit.ps1 does not currently follow symlinks when packaging. This script needs to be updated to resolve symlinks, or these will produce broken packages. Also note that symlinks require core.symlinks=true in git config on Windows, which may break for Windows contributors.


## Phase 2: Data collection

Run these data collection steps in parallel where possible. Save intermediate results as you go.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multi-phase autonomous commands (ftk-cost-optimization, ftk-mom-report, ftk-ytd-report) run extensive workflows without user confirmation gates between phases. Should we add guardrails — phase confirmations, iteration limits, or token budgets — to prevent runaway token consumption? Instructions like "Leave no stone unturned" (in ftk-mom-report) and "Use autonomous batch processing" could lead to significant, unbounded API calls and token usage.


## Safety and Best Practices

- **Never** deploy without showing the user what will change first (always use what-if).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is advisory only — nothing technically enforces the what-if step before deployment. Consider making the what-if preview a required gate in the workflow (e.g., a separate numbered step that must complete and be shown to the user before the deploy step can execute) rather than just guidance the agent may choose to skip.

param([string]$Sku, [string]$Region)
$response = Invoke-RestMethod "https://prices.azure.com/api/retail/prices?`$filter=armSkuName eq '$Sku' and armRegionName eq '$Region' and priceType eq 'Consumption'"
return ($response.Items | Where-Object { $_.isPrimaryMeterRegion -and $_.type -eq 'Consumption' -and $_.meterName -notmatch 'Spot|Low Priority' }).retailPrice
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get-VmSkuPrice can return an array if multiple pricing items match the filter (e.g., multiple meter types). The calling code on lines 185-187 assumes a scalar value ($currentPrice - $targetPrice), which would produce incorrect results or errors with array math. Should add | Select-Object -First 1 or validate a single result is returned.

flanakin added a commit that referenced this pull request Feb 25, 2026
@flanakin flanakin added the Breaking change 🚨 Change that breaks previous deployments and requires a new major version label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking change 🚨 Change that breaks previous deployments and requires a new major version Needs: Review 👀 PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants