-
Notifications
You must be signed in to change notification settings - Fork 206
Add Claude Code plugin for FinOps hubs and Azure Cost Management #2043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MSBrett
wants to merge
32
commits into
dev
Choose a base branch
from
features/agentskills
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
728db88
Add AI tools: agents, skills, commands, and output style for FinOps T…
7664a38
Update plugin settings, paths, and command extensions
d1887fa
Move AI tools from src/ai-tools to src/claude-plugin
e1ee1a5
Symlink CLAUDE.md and AGENTS.md to .github/copilot-instructions.md
b834fe9
Add reservations and commitment discount decision references
a33f72f
Merge branch 'dev' into features/agentskills
8a822a6
Add storage cost analysis reference and update savings plans
aaa39f5
Update azure-cost-management skill definition
f0fdaf7
Fix skill reference errors found during TDD evaluation sprint
38952ed
Move plugin to src/templates/, add docs-mslearn links to SKILL.md
631a62a
Add cost optimization references and command from Azure Copilot gap a…
5799afd
Update src/templates/claude-plugin/commands/ftk-mom-report.md
MSBrett 9b15fac
chore: Update ms.date to fix CI workflow
735887f
Consolidate agent instructions into CLAUDE.md as single source of truth
6455064
Remove query catalog and coding standards from ftk-database-query agent
3a44819
Rename CLAUDE.md to AGENTS.md and update symlinks
63ae144
Address all PR #2013 review feedback
0ef609e
Fix copyright header casing in Get-BenefitRecommendations.ps1
ce3eb50
Remove all azcapman references from finops-toolkit
fe89930
Refine Claude Code plugin: improve skills, commands, versioning, and …
96ae42a
Merge dev into features/agentskills
64e3f94
chore: Update ms.date in changelog
e4299af
feat(agent-skills): consolidate skills into agent-skills/ with symlin…
a05e729
fix(agent-skills): tighten finops toolkit references
17ef5e4
fix: address PR #2043 review comments
2a945a6
Merge origin/dev into features/agentskills
8b98588
fix: resolve test failures from symlink paths on CI
da19749
fix: resolve remaining CI test failures
26e5363
fix: remove brittle Foundation reference content-policing test
b28ef1c
fix: remove brittle ClaudePlugin content-policing tests
5929844
chore: update ms.date in changed docs-mslearn files
a3b2445
refactor: remove mode:subagent and add subagent team to finops-practi…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "$schema": "https://anthropic.com/claude-code/marketplace.schema.json", | ||
| "name": "finops-toolkit", | ||
| "description": "Microsoft FinOps Toolkit plugins for AI-powered cloud financial management.", | ||
| "owner": { | ||
| "name": "Microsoft" | ||
| }, | ||
| "plugins": [ | ||
| { | ||
| "name": "microsoft-finops-toolkit", | ||
| "version": "13.0.0", | ||
| "source": "./src/templates/claude-plugin", | ||
| "description": "AI-powered cloud financial management for Azure. Analyze costs with KQL queries against FinOps hubs, get CFO-level reporting, and access Azure Cost Management insights.", | ||
| "category": "finops", | ||
| "homepage": "https://learn.microsoft.com/en-us/cloud-computing/finops/toolkit/finops-toolkit-overview" | ||
| }, | ||
| { | ||
| "name": "microsoft-learn", | ||
| "source": { | ||
| "source": "url", | ||
| "url": "https://github.com/microsoftdocs/mcp.git" | ||
| }, | ||
| "description": "Access official Microsoft documentation, API references, and code samples for Azure, .NET, Windows, and more.", | ||
| "category": "documentation", | ||
| "homepage": "https://learn.microsoft.com" | ||
| } | ||
| ] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -370,3 +370,9 @@ env/ | |
|
|
||
| # AI | ||
| .claude/settings.local.json | ||
|
|
||
| # Internal planning docs | ||
| TODO.md | ||
| PRD.md | ||
| RTM.md | ||
| RETROSPECTIVES.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,182 @@ | ||
| # Agent Instructions | ||
|
|
||
| This file provides guidance to AI Agents when working with code in this repository. | ||
|
|
||
| ## Repository Overview | ||
|
|
||
| The FinOps Toolkit is an open-source collection of tools for adopting and implementing FinOps capabilities in the Microsoft Cloud. It contains templates, PowerShell modules, workbooks, optimization engines, and supporting documentation organized in a modular architecture. | ||
|
|
||
| ## Common Commands | ||
|
|
||
| ### Building and Development | ||
|
|
||
| ```bash | ||
| # Build entire toolkit | ||
| npm run build | ||
| # or | ||
| pwsh -Command ./src/scripts/Build-Toolkit | ||
|
|
||
| # Build FinOps hubs | ||
| pwsh -Command ./src/scripts/Build-Toolkit finops-hub | ||
|
|
||
| # Build specific components | ||
| npm run build-ps # PowerShell module only | ||
| pwsh -Command ./src/scripts/Build-Bicep # Bicep templates | ||
| pwsh -Command ./src/scripts/Build-Workbook # Azure Monitor workbooks | ||
| pwsh -Command ./src/scripts/Build-OpenData # Open data files | ||
|
|
||
| # Deploy for testing | ||
| npm run deploy-test | ||
| # or | ||
| pwsh -Command ./src/scripts/Deploy-Toolkit -Build -Test | ||
|
|
||
| # Package for release | ||
| npm run package | ||
| # or | ||
| pwsh -Command ./src/scripts/Package-Toolkit -Build | ||
| ``` | ||
|
|
||
| ### Testing | ||
|
|
||
| ```bash | ||
| # Run PowerShell unit tests | ||
| npm run pester | ||
| # or | ||
| pwsh -Command Invoke-Pester -Output Detailed -Path ./src/powershell/Tests/Unit/* | ||
|
|
||
| # Run integration tests | ||
| pwsh -Command ./src/scripts/Test-PowerShell -Integration | ||
|
|
||
| # Run specific test categories | ||
| pwsh -Command ./src/scripts/Test-PowerShell -Hubs -Exports | ||
|
|
||
| # Lint PowerShell code | ||
| pwsh -Command ./src/scripts/Test-PowerShell -Lint | ||
| ``` | ||
|
|
||
| ### Bicep Development | ||
|
|
||
| ```bash | ||
| # Validate Bicep templates | ||
| bicep build path/to/template.bicep --stdout | ||
|
|
||
| # Test template deployment | ||
| az deployment group what-if --resource-group myRG --template-file template.bicep | ||
| ``` | ||
|
|
||
| ## Architecture and Code Organization | ||
|
|
||
| ### High-Level Structure | ||
|
|
||
| - **`/src/templates/`** - ARM/Bicep infrastructure templates with modular namespace organization | ||
| - **`/src/powershell/`** - PowerShell module with public/private functions and comprehensive tests | ||
| - **`/src/optimization-engine/`** - Azure Optimization Engine for cost recommendations | ||
| - **`/src/workbooks/`** - Azure Monitor workbooks for governance and optimization | ||
| - **`/src/open-data/`** - Reference data (pricing, regions, services) with utilities | ||
| - **`/src/scripts/`** - Build automation and development tools | ||
| - **`/docs/`** - Jekyll documentation website | ||
| - **`/docs-mslearn/`** - Microsoft Learn documentation website | ||
| - **`/docs-wiki/`** - GitHub wiki documentation | ||
|
|
||
| ### Current Architectural Reorganization | ||
|
|
||
| The FinOps hubs solution is actively migrating to a namespace-based modular structure: | ||
|
|
||
| - **`Microsoft.FinOpsHubs/`** - Core FinOps Hub infrastructure modules | ||
| - **`Microsoft.CostManagement/`** - Cost management exports and schemas | ||
| - **`fx/`** - Shared foundation components (hub-types, scripts, utilities) | ||
|
|
||
| ### Template Architecture | ||
|
|
||
| Templates use a multi-target build system that generates: | ||
|
|
||
| - Azure Quickstart Templates (ARM JSON) | ||
| - Bicep Registry modules | ||
| - Standalone deployments | ||
| - Azure portal UI definitions | ||
|
|
||
| Key patterns: | ||
|
|
||
| - **`.build.config`** files control build behavior per template | ||
| - **`settings.json`** contains component-specific configuration | ||
| - **`ftkver.txt`** files maintain version synchronization | ||
| - **Conditional resource deployment** based on parameters | ||
|
|
||
| ### PowerShell Module Structure | ||
|
|
||
| - **`Public/`** - User-facing cmdlets (Get-_, Set-_, New-\*, etc.) | ||
| - **`Private/`** - Internal utilities and helpers | ||
| - **`Tests/Unit/`** - Pester unit tests with mocking | ||
| - **`Tests/Integration/`** - End-to-end Azure integration tests | ||
| - **Module manifest** defines exports and dependencies | ||
|
|
||
| ### Data Flow and Integration | ||
|
|
||
| - **Open data** provides reference information consumed by templates and PowerShell | ||
| - **Build scripts** orchestrate compilation across all components | ||
| - **Version management** is centralized through `Update-Version.ps1` | ||
| - **Templates reference** shared schemas and types from `fx/` namespace | ||
|
|
||
| ## Key Development Patterns | ||
|
|
||
| ### Template Development | ||
|
|
||
| - Use `newApp()` and `newHub()` functions from `fx/hub-types.bicep` for consistent resource naming | ||
| - Follow the conditional deployment pattern: `resource foo 'type' = if (condition) { ... }` | ||
| - Implement proper parameter validation with `@allowed`, `@minValue`, `@maxValue` | ||
| - Include telemetry tracking via `defaultTelemetry` parameter | ||
|
|
||
| ### PowerShell Development | ||
|
|
||
| - All public functions must have comment-based help | ||
| - Use approved verbs from `Get-Verb` | ||
| - Implement comprehensive parameter validation | ||
| - Support `-WhatIf` and `-Confirm` for destructive operations | ||
| - Include Pester tests for all functions | ||
|
|
||
| ### Testing Strategy | ||
|
|
||
| - **Lint tests** validate syntax and coding standards | ||
| - **Unit tests** test isolated function behavior with mocks | ||
| - **Integration tests** perform end-to-end validation against Azure | ||
| - **Template validation** uses `bicep build` and ARM what-if deployments | ||
|
|
||
| ### Build System Integration | ||
|
|
||
| The PowerShell-based build system: | ||
|
|
||
| - Compiles templates to multiple target formats | ||
| - Validates all code before packaging | ||
| - Maintains version consistency across components | ||
| - Generates release artifacts automatically | ||
|
|
||
| ### Version Management | ||
|
|
||
| - Central version in `package.json` (currently 12.0.0) | ||
| - Synchronized across all components via build scripts | ||
| - Individual `ftkver.txt` files distributed to modules | ||
| - Git tags correspond to release versions | ||
|
|
||
| ## Repository Conventions | ||
|
|
||
| ### Branch Strategy | ||
|
|
||
| - **`dev`** - Main integration branch | ||
| - Feature branches merge into `dev` | ||
| - Releases are tagged from `dev` | ||
|
|
||
| ### File Organization | ||
|
|
||
| - Templates follow namespace/module/component structure | ||
| - PowerShell follows standard module layout | ||
| - Documentation uses Jekyll conventions | ||
| - Build artifacts are generated, not checked in | ||
|
|
||
| ### Coding Standards | ||
|
|
||
| - Always follow the content and coding standards defined in `docs-wiki/Coding-guidelines.md` | ||
| - Content (text strings): Follow the Microsoft style guide and always use sentence casing except for proper nouns | ||
| - Bicep: Follow Azure Bicep style guide | ||
| - PowerShell: Use PowerShell best practices and approved verbs | ||
| - Documentation: Use markdown with consistent formatting | ||
| - Commit messages: Use conventional commit format |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are very generic filenames. As written, they'll be ignored anywhere in the repo tree — if someone legitimately adds a
TODO.mdin a subdirectory, it would be silently excluded.Consider scoping to the repo root: