Agent skill

Mcaf Dotnet Complexity

by managedcode in managedcode/Storage

Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code.

MITAuto-check passedDevelopment

Install Mcaf Dotnet Complexity

skills CLI
$ npx skills add managedcode/Storage --skill mcaf-dotnet-complexity -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install managedcode/Storage mcaf-dotnet-complexity --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/managedcode/Storage.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/mcaf-dotnet-complexity .claude/skills/mcaf-dotnet-complexity && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcaf-dotnet-complexity
GitHub stars
138
Token cost
~1.1k tokens
SKILL.md length
530 words
Files
2 (incl. references)
Skills in repo
41
Repo updated
First seen
Licence
MIT

At a glance

Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code.

  • Works in 3 steps: Read the nearest AGENTS.md and confirm… → Run this skill's Workflow through the… → Return the Required Result Format with…
  • A repo needs cyclomatic complexity checks
  • SKILL.md covers Trigger On, Value, Do Not Use For and Inputs, plus 8 more sections
  • Calls rg and dotnet

What it does

Mcaf Dotnet Complexity is an agent skill from managedcode/Storage. Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code. Use when a repo needs cyclomatic complexity checks, maintainability thresholds, or complexity-driven refactoring gates.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/complexity.md`). Compatibility notes: Requires a .NET SDK-based repository; respects the repo's AGENTS.md commands first.

It sits in Development, covering Refactoring. It works with .NET. The repository describes itself as: Storage library provides a universal interface for accessing and manipulating data in different cloud blob storage providers. The licence is MIT.

When your agent uses it

  • A repo needs cyclomatic complexity checks
  • Maintainability thresholds
  • Complexity-driven refactoring gates

Example prompts

  • “/mcaf-dotnet-complexity”

Requirements

  • Compatibility (from SKILL.md): Requires a .NET SDK-based repository; respects the repo's `AGENTS.md` commands first.

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Read the nearest AGENTS.md and confirm scope and constraints.
  2. Run this skill's Workflow through the Ralph Loop until outcomes are acceptable.
  3. Return the Required Result Format with concrete artifacts and verification evidence.

What it can do on your machine

Read from SKILL.md and the folder at commit 5d32121. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg
    • dotnet

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires a .NET SDK-based repository; respects the repo's `AGENTS.md` commands first.

    From compatibility in the SKILL.md frontmatter.

Context cost

Mcaf Dotnet Complexity loads about 1.1k tokens when it runs, and up to ~1.7k if it reads all its reference files. Until then it costs about 68 tokens; SKILL.md has 530 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from managedcode/Storage at commit 5d32121, republished under its MIT licence (© managedcode). 530 words, ~1,114 tokens.

Download SKILL.mdSave it as .claude/skills/mcaf-dotnet-complexity/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
mcaf-dotnet-complexity
description
Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code. Use when a repo needs cyclomatic complexity checks, maintainability thresholds, or complexity-driven refactoring gates.
compatibility
Requires a .NET SDK-based repository; respects the repo's `AGENTS.md` commands first.

MCAF: .NET Complexity

Trigger On

  • the team wants to find overly complex methods
  • cyclomatic complexity thresholds are needed in CI
  • maintainability metrics or coupling thresholds need to be configured

Value

  • produce a concrete project delta: code, docs, config, tests, CI, or review artifact
  • reduce ambiguity through explicit planning, verification, and final validation skills
  • leave reusable project context so future tasks are faster and safer

Do Not Use For

  • formatting-only work
  • generic analyzer setup with no complexity policy change

Inputs

  • the nearest AGENTS.md
  • current analyzer settings
  • current maintainability limits

Quick Start

  1. Read the nearest AGENTS.md and confirm scope and constraints.
  2. Run this skill's Workflow through the Ralph Loop until outcomes are acceptable.
  3. Return the Required Result Format with concrete artifacts and verification evidence.

Workflow

  1. Start with the built-in maintainability analyzers before reaching for non-standard tooling.
  2. Use these rules deliberately:
    • CA1502 for excessive cyclomatic complexity in methods
    • CA1505 for low maintainability index
    • CA1506 for excessive class coupling
    • CA1501 when inheritance depth is also part of the design problem
  3. Keep rule severity in the root .editorconfig.
  4. Keep metric thresholds in a checked-in CodeMetricsConfig.txt added as AdditionalFiles.
  5. Pair analyzer findings with MCAF maintainability limits in AGENTS.md.

Bootstrap When Missing

If complexity thresholds are not configured yet:

  1. Detect current state:
    • rg -n "CA1501|CA1502|CA1505|CA1506|CodeMetricsConfig" -g '.editorconfig' -g '*.csproj' -g 'Directory.Build.*' .
    • rg --files -g 'CodeMetricsConfig.txt'
  2. Add severity entries for CA1502, CA1505, CA1506, and CA1501 in root .editorconfig.
  3. Add checked-in CodeMetricsConfig.txt and include it as AdditionalFiles in project props.
  4. Keep maintainability limits aligned with AGENTS.md.
  5. Run dotnet build SOLUTION_OR_PROJECT and return status: configured or status: improved.
  6. If policy relies only on AGENTS.md limits with no analyzer gate by design, return status: not_applicable.

Deliver

  • explicit complexity and maintainability policy
  • checked-in metric thresholds
  • CI commands that surface complex methods early

Validate

  • method-complexity checks are enabled where the repo wants them
  • thresholds are versioned in repo, not held in IDE memory
  • complexity findings map to real refactoring decisions
Show full SKILL.md (199 more words)Show less

Ralph Loop

Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.

  1. Plan first (mandatory):
    • analyze current state
    • define target outcome, constraints, and risks
    • write a detailed execution plan
    • list final validation skills to run at the end, with order and reason
  2. Execute one planned step and produce a concrete delta.
  3. Review the result and capture findings with actionable next fixes.
  4. Apply fixes in small batches and rerun the relevant checks or review steps.
  5. Update the plan after each iteration.
  6. Repeat until outcomes are acceptable or only explicit exceptions remain.
  7. If a dependency is missing, bootstrap it or return status: not_applicable with explicit reason and fallback path.
Required Result Format
  • status: complete | clean | improved | configured | not_applicable | blocked
  • plan: concise plan and current iteration step
  • actions_taken: concrete changes made
  • validation_skills: final skills run, or skipped with reasons
  • verification: commands, checks, or review evidence summary
  • remaining: top unresolved items or none

For setup-only requests with no execution, return status: configured and exact next commands.

Load References

  • read references/complexity.md first

Example Requests

  • "Which analyzer finds complex methods in .NET?"
  • "Add a complexity gate for our C# code."
  • "Configure cyclomatic complexity thresholds."

© managedcode, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .codex/skills/mcaf-dotnet-complexity of managedcode/Storage.

  • SKILL.md
  • references/complexity.md

Open the folder on GitHubat commit 5d32121

Compare with similar skills

Mcaf Dotnet Complexity next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mcaf Dotnet Complexity compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mcaf Dotnet Complexity this skillmanagedcode/Storage138—~1.1kAutomated safety check: PassMIT
Roslynkmrpmorris/Roslynk122—~3kAutomated safety check: PassMIT
Build Fixcodewithmukesh/dotnet-claude-kit751—~1.8kAutomated safety check: PassMIT
Add Refactoringdotnet/roslynator3.5k—~946Automated safety check: PassCustom licence
.NET Native AOT Compatibilitydotnet/skills5.6k2 repos~4.2kAutomated safety check: PassMIT
Dynamo Dotnet ExpertDynamoDS/Dynamo2k—~909Automated safety check: PassApache-2.0

Similar skills

  • Roslynk

    mrpmorris/Roslynk

    How to use the Roslynk MCP tools (mcproslynk) effectively for .NET work.

    122 GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Build Fix

    codewithmukesh/dotnet-claude-kit

    Autonomous iteration loops for .NET: drive a broken build or failing test suite to green with bounded iterations, progress detection, and fail-safe guards that prevent infinite retries and wasted…

    751 GitHub stars~1.8k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Add Refactoring

    dotnet/roslynator

    Official

    A skill your agent uses when adding a new RR refactoring in roslynator, editing Refactorings.xml, registering in RefactoringContext, or when refactorings-testing.md shows XunitRefactoringVerifier —…

    3.5k GitHub stars~946 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Official

    Makes .NET projects compatible with Native AOT and trimming by resolving IL trim and AOT analyzer warnings through annotations rather than suppressions.

    5.6k GitHub starsUsed in 2 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Dynamo Dotnet Expert

    DynamoDS/Dynamo

    Write and review C/.NET code in Dynamo following Dynamo coding standards, modern C patterns, and repo conventions.

    2k GitHub stars~909 tokensUpdated today
    DevelopmentAuto-check passed
  • Official

    A skill your agent uses when obsoleting or retiring RCS, RR, or RCF in roslynator, replacing an analyzer with another id, or when tempted to use IsObsolete on an Analyzer entry — analyzers use…

    3.5k GitHub stars~511 tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from managedcode/Storage

All 41 skills in this repo
  • Mcaf Adr Writing

    managedcode/Storage

    Create or update an ADR under docs/ADR/ for architectural decisions, dependency changes, data-model changes, or cross-cutting policy shifts.

    138 GitHub stars~951 tokensUpdated today
    Auto-check passed
  • Mcaf Agile Delivery

    managedcode/Storage

    Shape delivery workflow around backlog quality, roles, ceremonies, and engineering feedback.

    138 GitHub stars~883 tokensUpdated today
    Auto-check passed
  • Mcaf Architecture Overview

    managedcode/Storage

    Create or update docs/Architecture.md as the global architecture map for a solution.

    138 GitHub stars~950 tokensUpdated today
    Auto-check passed
  • Mcaf CI CD

    managedcode/Storage

    Design or refine CI/CD workflows, quality gates, release flow, and safe AI-assisted pipeline authoring.

    138 GitHub stars~981 tokensUpdated today
    Auto-check passed
  • Mcaf Code Review

    managedcode/Storage

    Prepare for, perform, or tighten code review workflow: PR scope, review checklist, reviewer expectations, and merge hygiene.

    138 GitHub stars~957 tokensUpdated today
    Auto-check passed
  • Mcaf Devex

    managedcode/Storage

    Improve developer experience for multi-component solutions: onboarding, F5 contract, cross-platform tasks, local inner loop, and reproducible setup.

    138 GitHub stars~911 tokensUpdated today
    Auto-check passed

Works with

Questions about Mcaf Dotnet Complexity

What does Mcaf Dotnet Complexity do?

Use free built-in .NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code. Mcaf Dotnet Complexity is an agent skill from managedcode/Storage.NET maintainability analyzers and code metrics configuration to find overly complex methods and coupled code.

When should I use Mcaf Dotnet Complexity?

Mcaf Dotnet Complexity fits situations like: A repo needs cyclomatic complexity checks; maintainability thresholds; complexity-driven refactoring gates.

How do I install Mcaf Dotnet Complexity in Claude Code?

Run `npx skills add managedcode/Storage --skill mcaf-dotnet-complexity -a claude-code`. Or copy the skill folder (.codex/skills/mcaf-dotnet-complexity in managedcode/Storage) into .claude/skills/mcaf-dotnet-complexity in your project. Claude Code loads it when a task matches its description.

How do I install Mcaf Dotnet Complexity in Codex?

Run `npx skills add managedcode/Storage --skill mcaf-dotnet-complexity -a codex`. Or copy the skill folder (.codex/skills/mcaf-dotnet-complexity in managedcode/Storage) into .agents/skills/mcaf-dotnet-complexity in your project. Codex loads it when a task matches its description.

Can I use Mcaf Dotnet Complexity in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add managedcode/Storage --skill mcaf-dotnet-complexity -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcaf-dotnet-complexity, .gemini/skills/mcaf-dotnet-complexity, .github/skills/mcaf-dotnet-complexity and .opencode/skills/mcaf-dotnet-complexity in your project.

What does Mcaf Dotnet Complexity need to run?

Going by SKILL.md and its folder, Mcaf Dotnet Complexity needs the command-line tools its instructions call (rg and dotnet). Compatibility (from SKILL.md): Requires a .NET SDK-based repository; respects the repo's `AGENTS.md` commands first..

Does Mcaf Dotnet Complexity access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mcaf Dotnet Complexity safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mcaf Dotnet Complexity use?

Mcaf Dotnet Complexity is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mcaf Dotnet Complexity use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 586 tokens, read only when the agent opens those files.

What are the alternatives to Mcaf Dotnet Complexity?

Skills that share tags, products or a category with Mcaf Dotnet Complexity: Roslynk (mrpmorris/Roslynk, 122 stars), Build Fix (codewithmukesh/dotnet-claude-kit, 751 stars), Add Refactoring (dotnet/roslynator, 3.5k stars) and .NET Native AOT Compatibility (dotnet/skills, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mcaf Dotnet Complexity?

managedcode (a GitHub organization) maintains it in managedcode/Storage, which has 138 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 7, 2026.

Source: managedcode/Storage on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.