agentsclimarketplace

Content type info metadata embedding

Skill kjuhwa/skills-hub/skills/data/content-type-info-metadata-embedding

Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.

Install
npx -y skills add kjuhwa/skills-hub --skill content-type-info-metadata-embedding

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Embed structured metadata per content type (mime_type, group, description, extensions, is_text) at codegen time so callers can convert predictions to human output or filter by group without lookup tables.

SKILL.md

1.9 KB, as published. Nobody here has run it

Content Type Info Metadata Embedding

Trigger: Building a classifier whose output needs human-readable enrichment (MIME type, file extensions, broad category) at every call site.

Steps

  • Source metadata from a single canonical JSON (assets/content_types_kb.min.json).
  • Code generator emits a const TypeInfo struct per content type with all metadata fields.
  • Add an info() / get_info() method on the ContentType enum that returns the struct.
  • Standardize the group taxonomy (text, image, archive, executable, binary, …) and document it.
  • Allow filtering: content_types.filter(ct => ct.is_text) or ct.group == 'text'.
  • Test that every label has complete metadata at codegen time — missing fields fail the build.

Counter / Caveats

  • Metadata can be stale or wrong for obscure types; validate against real samples occasionally.
  • MIME type is not 1-to-1 with label (e.g. .txt vs text/markdown); use is_text for binary/text filtering.
  • Extensions list grows over time; document the preferred extension explicitly.
  • Custom group taxonomy may not align with IANA / file(1) groups; document the difference for integrators.

Source

Extracted from magika (https://github.com/google/magika.git @ main).

Files of interest:

  • rust/gen/src/main.rs:65-82
  • python/src/magika/types/content_type_info.py
  • js/src/content-type-info.ts
  • go/magika/content.go

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.