Agent skill

Managedcode Mimetypes

by managedcode in managedcode/dotnet-skills

Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.

MITAuto-check passedAgent Workflows

Install Managedcode Mimetypes

skills CLI
$ npx skills add managedcode/dotnet-skills --skill managedcode-mimetypes -a claude-code

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

GitHub CLI
$ gh skill install managedcode/dotnet-skills managedcode-mimetypes --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/dotnet-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/catalog/Libraries/ManagedCode-MimeTypes/skills/managedcode-mimetypes .claude/skills/managedcode-mimetypes && 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
managedcode-mimetypes
GitHub stars
486
Token cost
~1.5k tokens
SKILL.md length
463 words
Files
2
Skills in repo
81
Repo updated
First seen
Licence
MIT

At a glance

Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.

  • Works in 5 steps: Identify where the application needs… → Centralize content-type mapping instead… → Use one library boundary for extension… → …
  • : integrating ManagedCode.MimeTypes into upload
  • SKILL.md covers Trigger On, Install, Workflow and Read MIME Metadata, plus 6 more sections
  • Calls dotnet

What it does

Managedcode Mimetypes is an agent skill from managedcode/dotnet-skills. Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses. USE FOR: integrating ManagedCode.MimeTypes into upload or download flows; mapping file extensions to content types in APIs or background processing; reviewing content-type. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant…

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `manifest.json`). Compatibility notes: Requires a .NET application that integrates ManagedCode.MimeTypes or evaluates MIME type mapping behavior.

It sits in Agent Workflows, covering Codebase knowledge for agents. It works with .NET. The repository describes itself as: Installable .NET skill catalog and CLI for Codex, Claude Code, GitHub Copilot, and Gemini. The licence is MIT.

When your agent uses it

  • : integrating ManagedCode.MimeTypes into upload
  • Mapping file extensions to content types in APIs
  • Background processing
  • Reviewing content-type

Example prompts

  • “/managedcode-mimetypes”

Requirements

  • Compatibility (from SKILL.md): Requires a .NET application that integrates ManagedCode.MimeTypes or evaluates MIME type mapping behavior.

Workflow steps

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

  1. Identify where the application needs stable MIME-type decisions
  2. Centralize content-type mapping instead of scattering ad-hoc string tables across the codebase.
  3. Use one library boundary for extension and MIME lookups.
  4. Validate the extensions and media types that matter to the product.
  5. Document any product-specific overrides separately from the library defaults.

What it can do on your machine

Read from SKILL.md and the folder at commit 535dd55. 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:

    • dotnet

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

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    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 application that integrates ManagedCode.MimeTypes or evaluates MIME type mapping behavior.

    From compatibility in the SKILL.md frontmatter.

Context cost

Managedcode Mimetypes loads about 1.5k tokens when it runs. Until then it costs about 151 tokens; SKILL.md has 463 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~151
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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/dotnet-skills at commit 535dd55, republished under its MIT licence (© managedcode). 463 words, ~1,473 tokens.

Download SKILL.mdSave it as .claude/skills/managedcode-mimetypes/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
managedcode-mimetypes
description
Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses. USE FOR: integrating ManagedCode.MimeTypes into upload or download flows; mapping file extensions to content types in APIs or background processing; reviewing content-type. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
compatibility
Requires a .NET application that integrates ManagedCode.MimeTypes or evaluates MIME type mapping behavior.

ManagedCode.MimeTypes

Trigger On

  • integrating ManagedCode.MimeTypes into upload or download flows
  • mapping file extensions to content types in APIs or background processing
  • reviewing content-type handling for files, blobs, or attachments
  • documenting a reusable MIME-type decision point in a .NET application

Install

bash
dotnet add package ManagedCode.MimeTypes --version 10.1.1

Use PackageReference when the repository centralizes dependency versions:

xml
<PackageReference Include="ManagedCode.MimeTypes" Version="10.1.1" />

The current package targets .NET 8, 9, and 10. Keep the version in the repository's existing central package-management file when one is present.

Workflow

  1. Identify where the application needs stable MIME-type decisions:
    • upload validation
    • download response headers
    • storage metadata
    • attachment processing
  2. Centralize content-type mapping instead of scattering ad-hoc string tables across the codebase.
  3. Use one library boundary for extension and MIME lookups.
  4. Validate the extensions and media types that matter to the product.
  5. Document any product-specific overrides separately from the library defaults.

Read MIME Metadata

Map file names, URLs, and compound extensions through the generated catalog:

csharp
using ManagedCode.MimeTypes;

var reportType = MimeHelper.GetMimeType("report.pdf");
var archiveType = MimeHelper.GetMimeType("archive.tar.gz");
var imageType = MimeHelper.GetMimeType("https://cdn.example.test/avatar.png?v=2");
var jpegExtensions = MimeHelper.GetExtensions("image/jpeg");

Use registry metadata when the application needs provenance or registration details:

csharp
if (MimeHelper.TryGetMimeTypeInfoByExtension("report.pdf", out var info))
{
    Console.WriteLine($"{info.Mime} registered={info.IsIanaRegistered}");
}

Write Application Mappings

Register product-specific mappings at startup and remove them only when the owning application lifecycle requires it:

csharp
MimeHelper.RegisterMimeType("acme", "application/x-acme");
var customType = MimeHelper.GetMimeType("invoice.acme");

MimeHelper.UnregisterMimeType("acme");

Runtime registrations affect extension and reverse lookup, but do not synthesize full IANA registry metadata.

Validate Upload Content

Treat the extension and declared content type as claims. Inspect the signature before accepting security-sensitive uploads:

csharp
using var stream = upload.OpenReadStream();

if (!MimeHelper.MatchesMimeTypeByContent(stream, upload.ContentType) ||
    !MimeHelper.MatchesExtensionByContent(upload.FileName, stream))
{
    throw new InvalidOperationException("Upload content does not match its declared type.");
}

GetMimeTypeByContent and the Matches*ByContent helpers inspect known prefixes and restore the position of seekable streams. They are not full document parsers, malware scanners, or proof that the remainder of a file is valid.

Show full SKILL.md (217 more words)Show less

Settings and Tradeoffs

  • Unknown extensions resolve to MimeHelper.DefaultMimeType, initially application/octet-stream; use SetDefaultMimeType only when the whole application owns a different fallback contract.
  • Prefer MimeHelper.Instance through IMimeHelper when dependency injection and test substitution are useful; use static calls for small, deterministic mapping boundaries.
  • In 10.1.1, catalog JSON is processed by the source generator at build time; generated MIME constants do not initialize the registry. The first lookup initializes frozen/immutable indexes, and reverse lookups reuse cached collections. Use MimeHelper.WarmUp() at application startup when predictable first-request latency matters; measure cold initialization separately from steady-state lookups.
  • Re-run product-specific mapping tests after catalog updates; preferred mappings can change without an API change.
  • Never trust MIME classification alone for authorization, file execution, archive extraction, or active-content rendering.
mermaid
flowchart LR
  A["File name or extension"] --> B["ManagedCode.MimeTypes lookup"]
  B --> C["Resolved MIME type"]
  C --> D["Upload validation, storage metadata, or HTTP response"]

Deliver

  • guidance on where MIME lookup belongs in application code
  • recommendations for centralized content-type decisions
  • validation expectations for real file types used by the product

Validate

  • MIME mapping is not duplicated across multiple services or controllers
  • important file types are verified explicitly
  • response or storage code uses the resolved type consistently
  • dotnet restore resolves ManagedCode.MimeTypes 10.1.1 or the repository-approved newer version
  • focused tests cover known extensions, unknown fallbacks, reverse lookup, upload signature mismatches, and any runtime registrations
  • dotnet test passes for the projects that own upload, download, or storage behavior

Sources

© 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 in catalog/Libraries/ManagedCode-MimeTypes/skills/managedcode-mimetypes of managedcode/dotnet-skills.

  • SKILL.md
  • manifest.json

Open the folder on GitHubat commit 535dd55

Compare with similar skills

Managedcode Mimetypes 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.

Managedcode Mimetypes compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Managedcode Mimetypes this skillmanagedcode/dotnet-skills486—~1.5kAutomated safety check: PassMIT
Microsoft Skill CreatorMicrosoftDocs/mcp1.9k3 repos~2.1kAutomated safety check: PassCC-BY-4.0
Copilot Session Failure Analysisdotnet/maui23k—~3.4kAutomated safety check: PassMIT
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.7k—~938Automated safety check: PassApache-2.0
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0
Repomix Codebase Packeryamadashy/repomix29k—~1.3kAutomated safety check: NotesMIT

Similar skills

  • Microsoft Skill Creator

    MicrosoftDocs/mcp

    Official

    Create agent skills for Microsoft technologies using official documentation.

    1.9k GitHub starsUsed in 3 repos~2.1k tokens
    Agent WorkflowsAuto-check passed
  • Mines local Copilot CLI session logs for dotnet/maui to rank costly or failing runs, tag recurring failure modes, propose repo edits and emit guard evals.

    23k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.7k GitHub stars~938 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Repomix Codebase Packer

    yamadashy/repomix

    Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens.

    29k GitHub stars~1.3k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check: notes
  • Microsoft Docs

    MicrosoftDocs/mcp

    Official

    Understand Microsoft technologies by querying official documentation.

    1.9k GitHub starsUsed in 1 repo~723 tokens
    Agent WorkflowsAuto-check passed

More from managedcode/dotnet-skills

All 81 skills in this repo
  • Analyzer Config

    managedcode/dotnet-skills

    Use a repo-root .editorconfig to configure free .NET analyzer and style rules.

    486 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Archunitnet

    managedcode/dotnet-skills

    Use the open-source free ArchUnitNET library for architecture rules in .NET tests.

    486 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Aspire

    managedcode/dotnet-skills

    Build, upgrade, and operate Aspire 13.5.x C or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults, integrations, dashboard, testing, MCP, and deployment patterns for…

    486 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Aspnet Core

    managedcode/dotnet-skills

    Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging, and deployment patterns on current .NET.

    486 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Asynkron Profiler

    managedcode/dotnet-skills

    Use the open-source free Asynkron.Profiler dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts.

    486 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Azure Functions

    managedcode/dotnet-skills

    Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable Functions patterns.

    486 GitHub stars~2.6k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Managedcode Mimetypes

What does Managedcode Mimetypes do?

Use ManagedCode.MimeTypes when a .NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses. Managedcode Mimetypes is an agent skill from managedcode/dotnet-skills.NET application needs consistent MIME type detection, extension mapping, and content-type decisions for uploads, downloads, or HTTP responses.

When should I use Managedcode Mimetypes?

Managedcode Mimetypes fits situations like: : integrating ManagedCode.MimeTypes into upload; mapping file extensions to content types in APIs; background processing; reviewing content-type.

How do I install Managedcode Mimetypes in Claude Code?

Run `npx skills add managedcode/dotnet-skills --skill managedcode-mimetypes -a claude-code`. Or copy the skill folder (catalog/Libraries/ManagedCode-MimeTypes/skills/managedcode-mimetypes in managedcode/dotnet-skills) into .claude/skills/managedcode-mimetypes in your project. Claude Code loads it when a task matches its description.

How do I install Managedcode Mimetypes in Codex?

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

Can I use Managedcode Mimetypes 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/dotnet-skills --skill managedcode-mimetypes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/managedcode-mimetypes, .gemini/skills/managedcode-mimetypes, .github/skills/managedcode-mimetypes and .opencode/skills/managedcode-mimetypes in your project.

What does Managedcode Mimetypes need to run?

Going by SKILL.md and its folder, Managedcode Mimetypes needs the command-line tools its instructions call (dotnet). Compatibility (from SKILL.md): Requires a .NET application that integrates ManagedCode.MimeTypes or evaluates MIME type mapping behavior..

Does Managedcode Mimetypes access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Managedcode Mimetypes 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 Managedcode Mimetypes use?

Managedcode Mimetypes 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 Managedcode Mimetypes use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Managedcode Mimetypes?

Skills that share tags, products or a category with Managedcode Mimetypes: Microsoft Skill Creator (MicrosoftDocs/mcp, 1.9k stars), Copilot Session Failure Analysis (dotnet/maui, 23k stars), ccc Semantic Code Search (cocoindex-io/cocoindex-code, 2.7k stars) and Context Engineering (abashev/vfs-s3, 106 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Managedcode Mimetypes?

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

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