maf-anti-pattern-scanner

maf-anti-pattern-scanner is a skill for Claude Code, Codex from joslat/maf-doctor. It costs 130 tokens per session (1,680 once invoked), scanned A, original, MIT.

A code scanner for finding known security, configuration, and style problems in applications using MAF 1.3.0. It checks whether already-migrated code follows the framework's recommended patterns.

In plain words
What is it for?
Use it after a migration, during periodic audits, or in pull-request checks to find issues such as unsafe credential handling and other defined MAF anti-patterns.
Why use it?
It separates best-practice checks from migration checks, so code is reviewed for unsafe or unsuitable patterns even after it compiles on the new version.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it after a migration, during periodic audits, or in pull-request checks to find issues such as unsafe credential handling and other defined MAF anti-patterns.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joslat/maf-doctor/maf-anti-pattern-scanner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add joslat/maf-doctor --skill maf-anti-pattern-scanner
Clone the repo
git clone --depth 1 https://github.com/joslat/maf-doctor

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for maf-anti-pattern-scanner

README.md
[![agentmods](https://agentmods.dev/badge/skills/joslat/maf-doctor/maf-anti-pattern-scanner/github.svg)](https://agentmods.dev/skills/joslat/maf-doctor/maf-anti-pattern-scanner)
Your own site
<a href="https://agentmods.dev/skills/joslat/maf-doctor/maf-anti-pattern-scanner"><img src="https://agentmods.dev/badge/skills/joslat/maf-doctor/maf-anti-pattern-scanner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for maf-anti-pattern-scanner

Your own site · 80×15
<a href="https://agentmods.dev/skills/joslat/maf-doctor/maf-anti-pattern-scanner"><img src="https://agentmods.dev/badge/skills/joslat/maf-doctor/maf-anti-pattern-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,680 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00130 $0.01680
Opus 5 $0.00065 $0.00840
Sonnet 5 $0.00026 $0.00336
Haiku 4.5 $0.00013 $0.00168

Measured 11d ago against content hash e418817886f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

maf-anti-pattern-scanner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/maf-anti-pattern-scanner/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

maf-anti-pattern-scanner

The migration tooling answers "is this code on MAF 1.3.0?" This skill answers a different question: "is this MAF 1.3.0 code following best practices?" Same codebase, different lens.

When to use

  • After a migration plan finishes — verify the converted code isn't merely compiling, it's idiomatic.
  • On any clean 1.3.0 codebase as a periodic audit.
  • In CI on PRs touching MAF agent/workflow code, scoped to the diff.

When NOT to use

  • For migration discovery — that's maf-obsolete-api-registry + cs0618-hunter. This skill assumes you're already on 1.3.0.
  • For runtime correctness checks — that's maf-fan-out-validator. This skill checks idiom and configuration, not topology correctness.

Anti-patterns covered

Each is a "rule" with a unique ID, a severity, and a deterministic search pattern. The MCP tool MafScanAntiPatterns ingests this list.

Security

MAF-AP-SEC-001DefaultAzureCredential in production code (severity: error)

Pattern: new DefaultAzureCredential() anywhere outside a test project (*Tests.csproj). Why: DefaultAzureCredential walks an authentication chain that includes developer credentials, environment variables, and managed identity. The chain order can change between SDK versions; production deployments should NEVER tolerate that surprise. Pin to the specific credential type your environment uses. Fix: Replace with ManagedIdentityCredential (Azure-hosted) or WorkloadIdentityCredential (Kubernetes), or ClientSecretCredential / ClientCertificateCredential for explicit service principals. Source: maf-constraints.instructions.md hard rule #4.

MAF-AP-SEC-002 — Hard-coded API keys (severity: error)

Pattern: String literal matching (sk-|api[-_]?key)[A-Za-z0-9_-]{16,} anywhere in .cs files. Why: Keys in source land in git history forever. Fix: Read from IConfiguration / Azure.Identity / Microsoft.Extensions.Configuration.UserSecrets.

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 111 lines · 130 tokens per session scan A e418817886f4

Subscribe to this mod's changes

maf-anti-pattern-scanner is a skill published in the GitHub repository joslat/maf-doctor (14 stars, last pushed 24d ago), licensed MIT. It adds 130 tokens to every session and 1,680 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

pr-review

Multi-dimensional review of a PR or feature branch in microsoft/win-dev-skills. Activate on "review my PR / changes / branch", "vet before pushing", "PR review", "is this ready to merge". Fans out parallel sub-agents over skill content, the skill-vs-tool boundary (solution hierarchy), tool correctness…

microsoft/win-dev-skills · 98 tokens

Smart Code Review

Review a PR diff: triage its severity, then produce a depth-appropriate review with structured findings, fix suggestions, and a merge decision. Use for code review, review PR, and severity triage requests.

AgentEra/Agently · 47 tokens

code-analysis

Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion. USE FOR: the repo wants first-party .NET analyzers; CI should fail on analyzer warnings; the team needs AnalysisLevel or AnalysisMode guidance. DO NOT USE FOR: third-party analyzer selection by itself; formatting-only…

managedcode/dotnet-skills · 99 tokens

graphify-dotnet

Use graphify-dotnet to generate codebase knowledge graphs, architecture snapshots, and exportable repository maps from .NET or polyglot source trees, with optional AI-enriched semantic relationships. USE FOR: graphify commands; graph JSON, HTML, SVG, Cypher, Markdown, and Obsidian exports; repository map and…

managedcode/dotnet-skills · 125 tokens

sonarjs

Use SonarJS-derived rules in .NET repositories that ship JavaScript or TypeScript frontends and need deeper bug-risk, code-smell, or cognitive-complexity checks than a minimal ESLint baseline. USE FOR: SonarQube, SonarCloud, or eslint-plugin-sonarjs setups; frontend code smells; cognitive complexity and deeper…

managedcode/dotnet-skills · 132 tokens

winui-code-review

Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch issues that the compiler and UI tests won't find.

microsoft/win-dev-skills · 49 tokens