/azure-graph-dotnet:add-graph-operation <operation> [--project-path ./] [--namespace MyApp.Services]from azure-graph-dotnet
Generates a fully implemented Microsoft Graph API operation in an existing C# project — creates service classes, interfaces, model records, and DI registration for operations like delta scan, metadata PATCH, file moves, and site discovery.
Ships in azure-graph-dotnet. Installing the plugin adds it to Claude Code.
Add a fully implemented Graph API operation to an existing C# project.
*.csproj files in the current directory treeProgram.cs to understand DI registrations and namespaceServices/ for existing service files to avoid duplicationIf no project found, ask the user to specify the project path or run dotnet-setup first.
If <operation> not provided, present options:
IDeltaScanService / DeltaScanService + FileInventoryRecord, ScanResultIDuplicateDetectionService / DuplicateDetectionService + DuplicateGroup, DuplicateReportIMetadataService / MetadataService + CategoryRule, ApplyResultIFileMoveService / FileMoveService + MoveMapping, MoveResultISiteDiscoveryService — enumerate all sites and drives in tenantFor each operation, generate the following files (using exact C# from skill references):
delta-scan:
Services/IDeltaScanService.csServices/DeltaScanService.cs — full delta loop with paging, depth filter, hash captureServices/IDeltaStateStore.csServices/FileDeltaStateStore.cs — file-based state (for local/console)Services/BlobDeltaStateStore.cs — Blob Storage state (for Azure)Models/FileInventoryRecord.csModels/ScanResult.csduplicate-detection:
Services/IDuplicateDetectionService.csServices/DuplicateDetectionService.cs — exact (hash) + near-dup (name+size)Models/DuplicateGroup.csModels/DuplicateReport.csapply-metadata:
Services/IMetadataService.csServices/MetadataService.cs — single PATCH + batch (20 per batch)Services/CategorizationEngine.cs — rule matchingServices/TermStoreService.cs — term GUID lookup with cachingModels/CategoryRule.csModels/ApplyResult.csfile-move:
Services/IFileMoveService.csServices/FileMoveService.cs — same-drive PATCH parentReference + cross-site copy+deleteModels/MoveMapping.csModels/MoveResult.cssite-discovery:
Services/ISiteDiscoveryService.csServices/SiteDiscoveryService.cs — paginated /sites?search=* + drives per siteRead Program.cs and add the required service registrations if not already present.
For delta-scan:
// Add after existing service registrations
services.AddScoped<IDeltaScanService, DeltaScanService>();
services.AddSingleton<IDeltaStateStore>(sp =>
{
var config = sp.GetRequiredService<IConfiguration>();
var storageConn = config["AZURE_STORAGE_CONNECTION"];
if (!string.IsNullOrEmpty(storageConn))
{
var container = new BlobContainerClient(storageConn, "sp-reports");
container.CreateIfNotExists();
return new BlobDeltaStateStore(container);
}
return new FileDeltaStateStore("./sp-reports/.delta-state.json");
});
Show the exact lines added.
Check .csproj for missing packages and add them:
dotnet add package CsvHelper --version "33.*"
dotnet add package Azure.Storage.Blobs --version "12.*"
dotnet build
Fix any compilation errors before completing.
List every file created or modified, with a one-line description of what was added. Include a quick usage snippet showing how to inject and call the new service.
<operation>: delta-scan, duplicate-detection, apply-metadata, file-move, site-discovery, or a natural-language description--project-path <path>: Root of the C# project (default: current directory)--namespace <ns>: C# namespace to use (default: inferred from .csproj)--no-di-update: Skip updating Program.cs with DI registrationsWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
5 commands in this plugin
/deploy-azureazure-graph-dotnet:deploy-azureDeploy a C# Azure Functions or Container Job project to Azure — provision infrastructure with Bicep, push image to ACR, assign Managed Identity Graph permissions, and generate or update GitHub Actions or Azure DevOps CI/CD pipelines./dotnet-setupazure-graph-dotnet:dotnet-setupInteractive setup wizard for C# / .NET Azure Graph projects — checks prerequisites, selects hosting model, configures Azure Identity, validates toolchain, and writes appsettings / local.settings files./scaffold-consoleazure-graph-dotnet:scaffold-consoleScaffold a .NET 8 console app / Azure Container Job for long-running batch Graph operations — generic host, BackgroundService worker, Dockerfile, ACA Job Bicep, and Managed Identity role assignment script./scaffold-functionazure-graph-dotnet:scaffold-functionScaffold a new Azure Function class for a specific Graph operation — timer, HTTP, or Durable trigger — with DI wiring, resilience pipeline, logging, and cancellation token support.npx claudepluginhub thelobbi/claude-m --plugin azure-graph-dotnetOther plugins' commands for the same job