Logo di Wikimedia Commons

Wikimedia Commons

Community
fuzheado
wikimedia-commons

Search, upload, and understand Wikimedia Commons — the free media repository. Browse categories, find reusable media, retrieve file metadata, and measure category impact

Panoramica

Pubblicato dafuzheado
RepositoryWikipedia-AI-Skills
Nome della skillwikimedia-commons
Stelle
27
Fork
10
File inclusi
5
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 5

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da fuzheado su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Wikimedia Commons in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-commons
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fuzheado/Wikipedia-AI-Skills.git /tmp/Wikipedia-AI-Skills
mkdir -p .claude/skills
cp -r /tmp/Wikipedia-AI-Skills/.claude/skills/wikimedia-commons .claude/skills/wikimedia-commons
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Wikimedia Commons in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Wikimedia Commons non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Wikimedia Commons non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

⚠️ User-Agent required: All curl and code examples in this skill access Wikimedia APIs. Requests without a descriptive User-Agent header will be blocked with HTTP 403 or 429. See the wikimedia-api-access skill for the correct format and rate-limiting patterns.

Wikimedia Commons (https://commons.wikimedia.org) is a free media repository — a central library of freely licensed images, audio, video, 3D models, PDF documents, and other media files. Media uploaded to Commons is available for use across all Wikimedia projects (Wikipedia, Wiktionary, Wikisource, etc.) and by the general public. As of 2026, Commons hosts over 100 million file uploads.

Related Commons Skills

This skill covers the generic Commons workflow (search, upload, licensing, categories). Specialized file types and subsystems have their own dedicated skills:

SkillCovers
wikimedia-commons-thumbnailsThumbnail generation, thumb URL scheme, iiurlwidth/iiurlheight, thumbmime format conversion, responsive/retina URLs, REST API thumbnails, SPARQL thumbnailUrl
wikimedia-commons-svgSVG source access and editing, W3C validation, creation/optimization tools, versioning/diffing, vector-specific categories and SDC
wikimedia-commons-pdfMulti-page PDF/DjVu model, page selection for thumbnails, Wikisource proofread integration, OCR, document metadata
wikimedia-commons-audio-videoAudio/video format policy (patent restrictions), upload + transcoding, metadata (duration, codecs, resolution), player widget, TimedText subtitles, derivatives
commons-file-resolutionResolve File: references to browser-usable HTTP URLs — origin URLs, thumbnails, Special:FilePath, cache-busting, CORS-aware serving
wikimedia-commons-sdcStructured Data on Commons — captions, depicts, copyright/license statements, batch editing
wikimedia-commons-sparqlCommons SPARQL queries via QLever and WCQS — MediaInfo entities, depicts/copyright/license graph, federated queries with Wikidata

What Commons Is — and Isn't

  • Is: A repository for educational media — photographs, diagrams, maps, charts, sound recordings, video clips, 3D models (.stl), PDF documents, and other materials that serve an educational purpose.
  • Is: A host for freely licensed content that anyone can reuse, adapt, and redistribute — including for commercial purposes.
  • Is: A project of the Wikimedia Foundation, governed by its own community policies.
  • Is not: A personal photo album, a social media platform, a web host, or a place for content that is only available under restrictive licenses.

File Types Accepted

Commons accepts uploads in many formats. The most common categories:

CategoryCommon FormatsSee Dedicated Skill
Images (raster)JPEG, PNG, GIF, TIFF, WebP, AVIF—
Images (vector)SVGsvg
AudioMP3, OGG (Vorbis/Opus), FLAC, WAVaudio-video
VideoWebM (VP8/VP9/AV1), OGV (Theora)audio-video
3D ModelsSTL (rendered via 3D viewer)—
DocumentsPDF, DjVupdf
AnimationsGIF, APNG, animated SVGsvg (animated SVG)

Quick Reference: What Do You Want to Find?

GoalBest MethodAPI / EndpointKey Parameters
Find images by keywordAction API search (srnamespace=6)https://commons.wikimedia.org/w/api.phpaction=query&list=search&srnamespace=6&srsearch=keyword&srlimit=50
Find images with visual browsingMediaSearch backendhttps://commons.wikimedia.org/w/api.phpaction=query&list=search&srnamespace=6&srbackend=MediaSearch&srsearch=keyword
Find files by structured data (e.g., "depicts human")haswbstatement: prefix in searchhttps://commons.wikimedia.org/w/api.phpsrsearch=haswbstatement:P180=Q5 (works in srsearch for Action API, or directly in the web search box)
Get file metadata (license, author, date)Action API (prop=imageinfo)https://commons.wikimedia.org/w/api.phpaction=query&prop=imageinfo&titles=File:Example.jpg&iiprop=extmetadata|user|timestamp
Check where a file is used across wikisAction API (prop=globalusage)https://commons.wikimedia.org/w/api.phpaction=query&prop=globalusage&titles=File:Example.jpg
Generate a thumbnailAction API iiurlwidth or URL constructionprop=imageinfo&iiurlwidth=800See thumbnails skill
Find files in a specific categoryAction API (list=categorymembers)https://commons.wikimedia.org/w/api.phpaction=query&list=categorymembers&cmtitle=Category:Bridges_in_Paris&cmnamespace=6
Get EXIF/camera dataAction API (prop=imageinfo) with iiprop=metadatahttps://commons.wikimedia.org/w/api.phpaction=query&prop=imageinfo&titles=File:Example.jpg&iiprop=metadata
Upload a single fileAction API (action=upload)https://commons.wikimedia.org/w/api.phpRequires authentication + bot password. See Uploading to Commons.
Check licensingAction API (prop=imageinfo) with iiprop=extmetadatahttps://commons.wikimedia.org/w/api.phpParse extmetadata.Credit.value and extmetadata.LicenseShortName.value for license info
Browser app: display imageUse Special:FilePath/ URLhttps://commons.wikimedia.org/wiki/Special:FilePath/Example.jpg?width=800CORS-friendly redirect; works for <img> tags
Browser app: Canvas/WebGLProxy through your serverYour server fetches from Commons, serves locallySee CORS Considerations section

⚠️ All API calls require a descriptive User-Agent header. See the wikimedia-api-access skill.


Searching Commons

Commons has two distinct search interfaces, each with different strengths. Choose based on your task.

1. MediaSearch — https://commons.wikimedia.org/wiki/Special:MediaSearch

The newer, media-first search interface, powered by a dedicated search index optimized for finding reusable media files.

🎯 Best for: Finding images, audio, or video files for reuse. Results are displayed as a visual grid with thumbnails and file-type badges. The interface is designed for quick visual browsing — scanning many results at a glance to find the right file.

Characteristics:

  • Returns primarily files (not category pages, galleries, or user pages)
  • Visual grid layout with large thumbnails
  • Fast, approximate matching (semantic search)
  • Built-in license filters (e.g., "Creative Commons only")
  • File-type facet filters (image, video, audio, document, 3D)
  • Ideal when you know roughly what you're looking for and want to browse

Example task: "Find a freely licensed photo of the Eiffel Tower at sunset."

2. Traditional Search (Special:Search) — https://commons.wikimedia.org/wiki/Special:Search

The older, full-text search interface, based on the same CirrusSearch engine used by Wikipedia. It searches all page text on Commons — file descriptions, category pages, galleries, user pages, help pages, and templates.

🎯 Best for: Finding specific files by metadata, navigating Commons's complex category structure, locating maintenance templates, or searching within file descriptions and captions.

Characteristics:

  • Searches the full text of all Commons pages (not just file metadata)
  • Returns a mix of files, categories, galleries, and help pages
  • Supports advanced CirrusSearch syntax (intitle, incategory, prefix, filetype, etc.)
  • More precise for structured queries with multiple filters
  • Integrates with Commons's extensive category tree (e.g., incategory:"Bridges_in_Paris")
  • Supports haswbstatement: for querying Wikibase structured data statements — a powerful way to filter files by their semantic annotations without writing SPARQL (see below)

Example task: "Find all PDF documents uploaded by User:Example in the 'Historical Documents' category from before 2020."

Structured Data Search via haswbstatement:

Commons files carry structured data statements (Wikibase annotations) that describe what a file depicts, who created it, when it was created, and more. These statements can be queried directly in the search box using the haswbstatement: prefix, providing a quick alternative to writing a full SPARQL query.

Syntax: haswbstatement:<property>=<value>

💡 Works in both search interfaces. While this section appears under Special:Search (CirrusSearch), haswbstatement: also works in the MediaSearch search box — just enter it directly. The key difference is that CirrusSearch supports advanced combinations with intitle:, incategory:, and other prefixes, while MediaSearch treats it as a plain search term alongside its semantic matching.

where <property> is a Wikidata property ID (e.g., P180 for "depicts", P170 for "creator", P571 for "inception") and <value> is a Wikidata item ID (e.g., Q5 for "human", Q30 for "United States").

Examples:

QueryWhat It Finds
haswbstatement:P180=Q5All files that have the structured data statement "depicts → human"
haswbstatement:P180=Q30All files that "depict → United States"
haswbstatement:P170=Q42All files whose "creator → [some artist/item Q42]"
haswbstatement:P180=Q5 Eiffel TowerAll files depicting a human and matching the text "Eiffel Tower"
haswbstatement:P180=Q5 -haswbstatement:P180=Q115All files depicting a human but not depicting a beard (Q115)

Why use this instead of SPARQL?

  • Instant results — haswbstatement: is backed by a search index, so results appear as fast as a text search (sub-second). SPARQL queries against the Wikidata Query Service can take multiple seconds.
  • No external service — The query runs against Commons's own search index, not the Wikidata SPARQL endpoint. No need for a separate connection or query language.
  • Composable — Combine haswbstatement: with regular text, incategory:, filetype:, and exclusion (-haswbstatement:...) in a single search box query.
  • Limitation: haswbstatement: only supports exact equality on single values. For numerical comparisons, date ranges, or aggregations, you still need SPARQL (see the wikimedia-api-access skill).

💡 Try it now: Open Special:Search on Commons to see all files that have a "depicts → human" structured data statement.

Quick Comparison

AspectMediaSearchSpecial:Search
Search scopeFile metadata + captionsFull page text (categories, galleries, templates, etc.)
LayoutVisual gridText results list
Best forBrowsing, finding reusable mediaPrecise queries, category navigation, advanced filters
Advanced syntaxLimitedFull CirrusSearch (intitle, incategory, filetype, haswbstatement, etc.)
Structured data searchSupported via haswbstatement: in search box (though without dedicated UI facets)haswbstatement:P180=Q5 — query Wikibase statements directly
License filtersBuilt-in UIVia search syntax or advanced parameters

3. Programmatic APIs (Action API & REST API)

Beyond the web interfaces, Commons can be searched and queried programmatically via the same MediaWiki APIs used by Wikipedia. These are covered in depth by the wikimedia-api-access skill, which covers User-Agent requirements, rate limiting, and error handling.

  • Action API (https://commons.wikimedia.org/w/api.php) — Search files, fetch metadata (license, author, EXIF, categories), and get file usage data across all wikis. Use srnamespace=6 to limit results to the File: namespace. The haswbstatement: search prefix works here too — just include it in the srsearch parameter value.
  • REST API (https://commons.wikimedia.org/api/rest_v1/) — Retrieve file metadata in JSON format, generate thumbnails at specific widths, and download PDF files.
  • MediaSearch backend — The Action API also supports srbackend=MediaSearch to use the newer search engine programmatically.

💡 When to reach for the API skill: Any time you need to write code that interacts with Commons — whether for metadata extraction, batch analysis, or automated uploads — first load the wikimedia-api-access skill for the mandatory User-Agent pattern, retry logic, and rate-limiting guardrails.



Commons Impact Metrics (precomputed category analytics)

The Commons Impact Metrics service (WMF Data Products team) precomputes monthly impact statistics for Commons category trees and exposes them via the Analytics Query Service (AQS) API. (The legacy {{Views from category}} template on category pages is a separate, older page-views system — it does not register or power CIM.)

⚠️ The allow-list gotcha (read this first)

Only categories on the allow-list have data. The dataset covers ~1,755 primary categories (GLAM institutions, Wikimedia affiliates, and campaigns such as Wiki Loves Monuments/Earth — not broad subjects, places, or formats), plus their subcategories up to 7 levels deep. Querying any other category returns HTTP 404 with "the category you asked for is not loaded yet" — this is the expected behavior, not an API bug.

Requesting a category (registration)

  1. Create/choose the umbrella Commons category for the institution, affiliate, or campaign (files may live in its subcategories).
  2. Check the allow-list TSV to confirm it is not already tracked.
  3. Open a Phabricator request — project Commons-Impact-Metrics-Requests via the pre-filled form, assigned GFontenelle_WMF, subscriber FRomeo_WMF. Category name = the URL slug after Category: (underscores, not spaces).
  4. The Culture & Heritage team adds qualifying categories to the allow-list at month-end (submit by the 20th for that month's processing).
  5. Data appears from the following month. No retroactive calculation by default. Renames/removals also go through the same monthly request cycle.

⚠️ Do NOT rely on {{Views from category}}. It is the legacy "category page views" table system (COM:VIEWS) and does not register a category for CIM — it merely correlates. (Re-verified Sep 2026: 886 categories transclude the template and 98.4% of them are allow-listed anyway, because GLAM categories usually have both; of the ~14 that are not allow-listed, a live CIM probe returns 404. The DPLA bot — not the template — adds some transcluding categories to the hidden tracking category "Category:Category requested for Commons Impact Metrics", whose 7 current members have never been allow-listed: a passive queue, not a registration path.)

API — AQS Commons endpoints

Base URL: https://wikimedia.org/api/rest_v1/metrics/commons-analytics/ · CORS-enabled (Access-Control-Allow-Origin: *) · dates in YYYYMM01 format (end exclusive) · category in URL form (underscores).

EndpointData
category-metrics-snapshot/{category}/{start}/{end}Headline stats: media-file-count, used-media-file-count, leveraging-wiki-count, pageviews, edits…
pageviews-per-category-monthly/{category}/{category-scope}/{wiki}/{start}/{end}Category pageview time series
edits-per-category-monthly/{category}/{category-scope}/{edit-type}/{start}/{end}Category edit time series
top-pages-per-category-monthly/{category}/{category-scope}/{wiki}/{year}/{month}Most-viewed pages using the category's files
top-viewed-media-files-monthly/{category}/{category-scope}/{wiki}/{year}/{month}Most-viewed files (filmstrip data)
top-wikis-per-category-monthly/{category}/{category-scope}/{year}/{month}Wiki breakdown
top-editors-monthly/{category}/{category-scope}/{edit-type}/{year}/{month}Top contributors
top-edited-categories-monthly/{category-scope}/{edit-type}/{year}/{month}Global ranking of most-edited categories/trees
top-viewed-categories-monthly/{category-scope}/{wiki}/{year}/{month}Global ranking of most-viewed categories/trees
media-file-metrics-snapshot/{media-file}/{start}/{end}Per-file headline metrics (leverage counts)
pageviews-per-media-file-monthly/{media-file}/{wiki}/{start}/{end}Per-file pageview time series
top-pages-per-media-file-monthly/{media-file}/{wiki}/{year}/{month}Pages using the file with most pageviews
top-wikis-per-media-file-monthly/{media-file}/{year}/{month}Wikis using the file, ranked
edits-per-user-monthly/{user-name}/{edit-type}/{start}/{end}Per-user edit counts

category-scope is shallow (plain category) or deep (whole category tree); edit-type is create, update, or all-edit-types; wiki takes a project domain (e.g. en.wikipedia) or all-wikis for the aggregate. Full parameter specs: api-spec.json.

When to use CIM vs. live queries

SituationUse
Category is on the allow-list; exact, large-scale numbers (up to 1M files)CIM API — instant, exact, official
Arbitrary/unregistered category, on-demand analysisLive computation — categorymembers walk + batched globalusage + per-page pageviews (bounded), or PetScan server-side, or GLAMorgan
Deep-dive shape analysis / samplingcatprobe-style CirrusSearch sampling

Measuring media usage — full method matrix

For the complete cross-method reference (transfers vs usage vs reach vs external reuse — mediacounts, mediarequests, GlobalUsage, pageviews, CIM, BaGLAMa, etc.) with verified API gotchas (mediarequests per-file leading-slash encoding, GlobalUsage is prop=globalusage not iiprop, CIM allow-list/404 semantics), see references/media-usage-metrics.md.

A robust pattern: try the CIM snapshot first; on 404 fall back to live computation (a 404 is the API's way of saying "not registered").

Resources


Navigating Commons

Categories vs. Galleries

Commons organizes files using two overlapping but distinct systems:

🏷️ Categories — The primary organizational system, based on the same MediaWiki category engine used by Wikipedia. Categories form a hierarchical tree (e.g., Eiffel Tower → Towers in Paris → Buildings in Paris). A file can belong to multiple categories. Categories are machine-readable and essential for API queries and structured navigation.

  • Used by the API (prop=categories), CirrusSearch (incategory:), and the category tree widget.
  • Automatically populated — files show up in a category when editors add [[Category:Name]] to the file description page.
  • Best for: Systematic browsing, API-driven discovery, and finding all files in a topic area.

🖼️ Galleries — Hand-curated, wiki-style pages that present selected files in a layout. Galleries are essentially ordinary wikitext pages (in the Gallery: namespace) that editors write by hand, selecting and arranging specific files for presentation.

  • Manually maintained — editors choose the layout, captions, and ordering of each file displayed.
  • Best for: Curated showcases — "Best of" collections, thematic exhibitions, or guided tours through a topic.
  • Not easily queried via the API since they are free-form wikitext.

How to choose: Use categories for exploration and API work. Use galleries when you want to see how human editors have curated and presented a selection of files on a topic.


Commons Namespaces

Like all MediaWiki sites, Commons organizes pages into namespaces — numbered buckets that distinguish different types of content. When searching via the --ns flag in the search tool or via the Action API (srnamespace), knowing the namespace IDs lets you target exactly what you need.

Namespace IDNameWhat Lives ThereExample
0Main (Gallery)Curated gallery pages — hand-written wikitext pages that present selected files on a topic. This is not the default for file uploads; it's for editorial pages.Toronto
2UserPersonal user pages and sandboxes.User:Jimbo Wales
4CommonsProject namespace — policies, guidelines, community discussions (named Commons: on this wiki).Commons:Volunteer_Response_Team
6FileMedia files themselves — the default namespace for most Commons work. Every uploaded image, video, audio file, PDF, and 3D model lives here.File:Eiffel_Tower_from_below.jpg
10TemplateReusable wiki templates (information boxes, license tags, maintenance notices).Template:CC-BY-SA-4.0
12HelpHelp pages explaining how to use Commons.Help:Contents
14CategoryCategory pages — the hierarchical classification system for organizing files and other pages.Category:Eiffel_Tower
100CreatorCreator pages — copyright/author metadata about photographers, artists, and other creators. Unique to Commons.Creator:Leonardo_da_Vinci
102TimedTextSubtitles and closed captions for video files.TimedText:Video.webm.en.srt
106JSON SchemaStructured data JSON schemas for Commons file annotations.—

Quick Rules of Thumb

  • Files are always in namespace 6. If you're looking for media you can use or download, search namespace 6.
  • Categories are always in namespace 14. Use incategory:"CategoryName" or srnamespace=14 to find category pages.
  • Don't confuse namespace 0 (Galleries) with Wikipedia articles. On Commons, namespace 0 is not encyclopedia articles — it's curated gallery pages that editors build by hand.
  • The --ns flag in the search tool (srnamespace in the API) accepts a single ID or comma-separated list: --ns 6 (files only), --ns 0,6 (galleries + files), --ns 14 (categories only).

Gallery Pages — Commons' Curated Layer

A Commons gallery page is a hand-curated presentation of selected files on a topic: someone chose the images, their order, and wrote a caption for each. It is the curated counterpart to a category, which is an unordered set with no captions.

What makes a gallery a gallery

There is no namespace, no prefix, and no page property for it. All of these are true:

  • It is an ordinary main-namespace (ns-0) page — The Venetian Macao, not Gallery:The Venetian Macao.
  • Gallery: is NOT a namespace alias on Commons. [[Gallery:The Venetian Macao]] is simply a page that does not exist (verified 2026-09-18: the API reports missing: true and ns: 0). Do not build anything that assumes the prefix.
  • What marks one is content: a literal <gallery> tag in the wikitext, usually alongside the {{Gallery page}} template (the tracking/boilerplate convention).
  • It is tracked in the Category:Gallery pages of … tree (Category:Gallery pages of Macao, …of buildings in China, …). Root: Category:Commons galleries.
  • Scale (2026-09-18): 87,315 pages carry {{Gallery page}}; 140,220 contain a <gallery> tag.

So a gallery is a convention detected by content, not by title — which means you find one by search:

https://commons.wikimedia.org/w/api.php?action=query&list=search
  &srsearch=hastemplate:"Gallery page"&srnamespace=0     # or: insource:"<gallery"

A prefix search (list=prefixsearch) cannot do this: nothing in the title says "gallery".

Reading a gallery's contents (there is no structured API)

prop=images gives titles only — no captions, no order, which is the whole point of a gallery. Read the page's wikitext and parse the <gallery> blocks:

https://commons.wikimedia.org/w/api.php?action=query&prop=revisions
  &titles=The%20Venetian%20Macao&rvslots=main&rvprop=content&formatversion=2
<gallery>
Macau-Venetian-01.jpg                                   ← no caption
File:The Venetian 05.jpg|The Great Hall                 ← caption after the first pipe
File:The Venetian 05.jpg|[[:Category:Marco Polo Canal|Marco Polo Canal]]   ← a LINKED caption
File:Some.jpg|A caption|link=File:Other.jpg             ← trailing key=value options are NOT caption text
</gallery>

Then batch prop=imageinfo&iiurlwidth=480 (50 titles per call) for thumbnails and dimensions.

⚠️ Wikitext beats the rendered HTML by 10×. On London (542 images in 62 sectioned blocks) the wikitext is 56 KB and action=parse&prop=text is 654 KB — for byte-identical item counts (measured 2026-09-18: London 542/542, New York City 246/246, The Venetian Macao 5/5, Berlin 0/0). The wikitext also carries the section headings between blocks, which the HTML flattens.

Gotchas

  • ⚠️ A page that looks like a gallery may have no gallery. Berlin is a 107 KB Commons page with zero <gallery> blocks (a hub or redirect). "It is a Commons page" ≠ "it is a gallery" — check the parse result, not the title.
  • ⚠️ Galleries can be huge. London has 542 images; Paris 470; New York City 246. Apply any cap before fetching thumbnails, or you pay 11 imageinfo calls nobody asked for.
  • ⚠️ Don't split a gallery line on every |. Split on the first pipe only: a linked caption ([[:Category:X|X]]) contains another one, and a naive split leaves [[:Category:X.
  • Galleries and categories are complements, not rivals. Galleries are curated, ordered and captioned; categories are complete, unordered and caption-less. A Commons gallery is usually paired with a same-named category (The Venetian Macao ↔ Category:The Venetian Macao).
  • A gallery can hold any media, not just images — audio, video and PDFs appear the same way.


Licensing on Commons

All files on Wikimedia Commons must be freely licensed or in the public domain. This is a strict, non-negotiable requirement. Content that does not meet this standard is deleted by the community.

The Three Pillars of Free Licensing

For a license to be acceptable on Commons, it must allow anyone to:

  1. Use the work for any purpose (including commercial)
  2. Study the work and apply the information
  3. Redistribute copies of the work
  4. Make and redistribute derivative works (modified versions)

Most Common Free Licenses

LicenseAbbrev.What It AllowsAttribution Required
Creative Commons ZeroCC0Waives all copyright; public domain equivalent. Does not require attribution, though it is good practice.No
Creative Commons AttributionCC BYFree use, modification, and commercial distribution — as long as credit is given to the creator.Yes
Creative Commons Attribution-ShareAlikeCC BY-SASame as CC BY, but derivative works must be released under the same (or compatible) license. Wikipedia uses CC BY-SA 4.0.Yes

Licenses That Are NOT Acceptable

Despite their names, the following Creative Commons licenses are not considered free enough for Commons because they restrict commercial use:

  • CC BY-NC (NonCommercial) — Prohibits commercial use
  • CC BY-NC-SA (NonCommercial-ShareAlike) — Prohibits commercial use
  • CC BY-NC-ND (NonCommercial-NoDerivatives) — Prohibits both commercial use and derivative works
  • CC BY-ND (NoDerivatives) — Prohibits derivative works

⚠️ Common misconception: "NonCommercial" sounds harmless, but it is fundamentally incompatible with Commons policy. Even if a creator explicitly grants permission for Commons to host their NC-licensed work, the license itself restricts downstream reusers from using it commercially — and Commons only hosts content that is free for any use.

Other Acceptable Licenses

  • Public Domain (various tags: {{PD-old}}, {{PD-US}}, {{PD-self}}, etc.)
  • GFDL (GNU Free Documentation License)
  • Free Art License (FAL)
  • Various government/specific free licenses (e.g., NASA images, US federal government works)

Copyrighted Material — Strict Prohibition

  • Do not upload copyrighted material unless the copyright holder has explicitly released it under an acceptable free license.
  • Fair use does not apply on Commons. Unlike English Wikipedia, Commons does not accept any content under fair use / fair dealing claims. All content must be free in the copyright sense.
  • Screenshots of copyrighted software, websites, or video games may be acceptable only if they depict solely freely licensed elements. Most screenshots are not acceptable.
  • Logos are generally not acceptable unless they are simple enough (e.g., text only) to fall below the threshold of originality.

Uploading to Commons

To upload files to Commons, you need a registered user account and an understanding of the licensing rules above (all uploads must be freely licensed or public domain).

⚠️ Important: AI-generated content on Wikimedia projects

Most Wikimedia projects have community policies that restrict or ban the direct posting of content generated by large language models (LLMs). This includes articles, sections, discussion comments, or any other substantial prose drafted by AI assistants, as well as images and other media files, whether uploaded to Wikimedia Commons or directly to a single Wikipedia edition. Before using AI to generate content, you must consult all relevant AI policies. These are summarised on Meta-Wiki at AI policies by project § Images and media. You must read the full policies and guidelines, not just the summaries.

Allowed Formats (with caveats)

See the File Types Accepted table above for the full list. A few important notes:

✅ Allowed: JPEG, PNG, GIF, SVG, TIFF, WebP, AVIF, MP3, OGG, FLAC, WAV, WebM, OGV, STL, PDF, DjVu

Explicitly Disallowed Formats

Some formats are blocked from upload because of patent encumbrances, poor compression, or lack of free tools:

  • ❌ MP4 / H.264 / H.265 — Blocked due to software patent concerns. Convert to WebM (VP9/AV1) or OGV (Theora) before uploading.
  • ❌ MPEG, AVI, MOV, WMV, FLV — These container formats are not accepted.
  • ❌ MP2, AAC — Audio formats with similar patent issues.
  • ❌ EXE, ZIP, RAR — Executables and archives are not permitted.
  • ❌ DRM-protected files — Any file with digital rights management is prohibited regardless of format.

⚠️ Conversion tip: Use ffmpeg to convert video to WebM: ffmpeg -i input.mp4 -c:v libvpx-vp9 -c:a libopus output.webm. Audio can be converted to OGG (Vorbis/Opus) or FLAC.

Upload Methods

🖱️ Upload Wizard (web-based) — The default upload interface at https://commons.wikimedia.org/wiki/Special:UploadWizard. Best for small numbers of files (1–10) with step-by-step guidance on license selection, description, and categorization.

📦 Bulk Upload Tools — For larger batches or automated workflows:

ToolPurposeBest For
PattypanSpreadsheet-based bulk uploaderUploading many files with structured metadata from a .xlsx template; supports custom categories, descriptions, and licenses per row. See the pattypan skill
flickr2commonsImports from FlickrTransferring freely licensed (CC BY, CC BY-SA, CC0, PD) photos from Flickr to Commons with attribution preserved
url2commonsUploads from a list of URLsSupply a list of direct image URLs and upload them in batch; useful for migration from other open repositories
video2commonsUploads/converts videoHandles transcoding (e.g., MP4 → WebM) during upload; ideal for migrating video from YouTube or other sources under free licenses
PywikibotPython bot framework for scripted uploadsProgrammatic bulk uploads via Site.upload() or pwb.py upload; pwb.py imagetransfer moves files between wikis (e.g. enwiki → Commons) with attribution history. See the pywikibot skill
CommonistDesktop bulk uploader (Java)Legacy tool for batch uploads with a GUI; lighter than Pattypan for simple batches

📖 Mass-upload tooling landscape & gaps: For analyzing Commons mass-upload tools (which are unmaintained/dead, the ETL-vs-ELT framing, user-rights asymmetries, and the no-code filename/metadata transform gap — plus a reusable fetch technique), see references/upload-tools-landscape.md. Compiled from the GLAM CSI report, Commons:Upload_tools, and the Flickypedia failure log.

Upload Checklist

Before uploading, verify:

  1. ✅ The file is your own original work, OR the copyright holder has explicitly released it under an acceptable free license (CC0, CC BY, CC BY-SA, or PD-equivalent).
  2. ✅ The file is educational — it serves a realistic educational purpose, not just personal or decorative use.
  3. ✅ The file is in an allowed format (convert MP4/H.264 to WebM if needed).
  4. ✅ The file has a meaningful name (not IMG_1234.jpg).
  5. ✅ You have identified the correct categories for discoverability.
  6. ✅ The date is honest — never fabricate a capture date. If only the year is reliably known (e.g. from the photographer's own Flickr tag/album classification), write date=YYYY or date=YYYY-MM and no invented day. A migration upload is a common case: the source platform's "date taken" is often just the upload date for old scans, and the downloaded file's EXIF may be missing entirely (no DateTimeOriginal) — verify before asserting a date.

Volunteer Response Team (VRT) — Verifying Permissions

If you are uploading a file that comes from a source where the license cannot be independently verified online — such as a personal website, email correspondence, or a non-Flickr source where the copyright holder's identity isn't public — you (or the copyright holder) must go through the Volunteer Response Team (VRT) process.

VRT (formerly known as OTRS) is a team of trusted volunteers who handle permission emails and confirm that the copyright holder has genuinely released their work under a free license.

How it works:

  1. The copyright holder sends an email to permissions-commons@wikimedia.org (or uses the online release generator) explicitly stating that they release the work under an acceptable free license.
  2. The email must come from a verifiable address connected to the copyright holder (e.g., the domain of the website where the work is published, or a known email of the creator).
  3. A VRT volunteer reviews the email, and if everything checks out, a VRT ticket number is added to the file's description page via the {{PermissionTicket|id=...}} template.
  4. Until the ticket is confirmed, the file may be flagged for deletion. Once confirmed, it is protected against deletion on copyright grounds.

When VRT is needed:

ScenarioVRT Required?
File is your own original work, uploaded by you❌ No (your account is the verification)
File from Flickr under a clear CC/PD mark❌ No (Flickr license is publicly visible)
File from a personal website with no license info✅ Yes
File from a publication where you contacted the author who agreed by email✅ Yes
File posted on social media, repurposed with permission✅ Yes
File whose author is unknown or unverifiable⛔ Cannot be uploaded — VRT cannot help without a clearly identified copyright holder

💡 Tip: When reaching out to a copyright holder to request a free license, point them to the VRT release generator which walks them through the process in plain language.


Browser Applications: CORS Considerations

When building browser-based tools that display or process Commons media, you may encounter CORS (Cross-Origin Resource Sharing) restrictions. This is a common gotcha for developers new to Commons.

The Issue

Media files served from upload.wikimedia.org do not include CORS headers. This is intentional — it prevents third-party sites from reading pixel data or using files in certain browser contexts.

# This works fine in server-side code:
resp = requests.get('https://upload.wikimedia.org/wikipedia/commons/a/ab/Example.jpg')

# But in browser JavaScript, this may fail:
const img = new Image();
img.src = 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Example.jpg/800px-Example.jpg';
// Works for display, but Canvas/WebGL access is blocked

What Works, What Doesn't

Use CaseDirect URL from upload.wikimedia.org
Server-side download (Python, Node.js)✅ Works
Display in <img> tag✅ Works
CSS background-image⚠️ May fail in some browsers
Canvas pixel access (getImageData)❌ Blocked (tainted canvas)
WebGL textures❌ Blocked
Audio/video processing⚠️ Limited

Solutions

1. For simple display: Use the file page redirect URL, which includes CORS headers:

javascript
// Instead of:
// https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Example.jpg/800px-Example.jpg

// Use:
const displayUrl = 'https://commons.wikimedia.org/wiki/Special:FilePath/Example.jpg?width=800';

2. For Canvas/WebGL/processing: Proxy through your server:

javascript
// Browser requests from your origin
const proxiedUrl = '/api/media?url=https://upload.wikimedia.org/...';

// Your server fetches from Commons and caches locally
// Browser sees same-origin response → no CORS restrictions

Quick Decision Guide

Are you building a browser app?
├── NO (server-side) → Fetch directly, no CORS issues
└── YES
    └── Just displaying images (<img>)?
        ├── YES → Direct URL works, or use Special:FilePath
        └── NO (Canvas, WebGL, processing)?
            └── Proxy through your server

📖 Full details: See wikimedia-commons-thumbnails Section 10 for in-depth CORS handling, code examples, and the proxy pattern used by production tools.


Tooling

Skills in This Family

SkillPurpose
wikimedia-commons (this skill)Generic Commons — search, upload, licensing, categories, namespaces
wikimedia-commons-thumbnailsThumbnail generation, thumb URL scheme, iiurlwidth, thumbmime
wikimedia-commons-svgSVG files — editing, validation, optimization, versioning
wikimedia-commons-pdfPDF/DjVu documents — page selection, Wikisource integration, OCR
wikimedia-commons-audio-videoAudio/video — format policy, transcoding, TimedText, player
wikimedia-commons-sdcStructured Data on Commons — captions, depicts, copyright, batch editing
wikimedia-commons-sparqlCommons SPARQL — MediaInfo entities, QLever, federated queries

Scripts and Assets

This skill includes helper scripts and reference docs:

🔧 Quick Search Demo (scripts/commons-search.sh)

Demonstrates searching Commons via the MediaSearch API and the Action API (traditional search).

bash
./scripts/commons-search.sh "Eiffel Tower"
./scripts/commons-search.sh --media "Mona Lisa"
📚 Commons API Reference (references/commons-api.md)

Deep reference for the Commons-specific API endpoints:

  • https://commons.wikimedia.org/w/api.php — Action API for Commons (upload, search, file info, categories)
  • https://commons.wikimedia.org/api/rest_v1/ — REST API endpoints (file metadata, image scaling)
  • MediaSearch API (Special:MediaSearch underlying endpoint)
  • File metadata extraction patterns (EXIF, categories, usage across wikis)
🐍 Commons File Inspector (assets/commons-file-inspector.py)

A Python tool to inspect a Commons file's metadata — license, author, categories, usage, and EXIF data — using the Action and REST APIs.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Wikimedia Commons?

Search, upload, and understand Wikimedia Commons — the free media repository. Browse categories, find reusable media, retrieve file metadata, and measure category impact

Perché usare Wikimedia Commons su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Wikimedia Commons è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Wikimedia Commons in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/fuzheado/Wikipedia-AI-Skills/tree/main/.claude/skills/wikimedia-commons. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Wikimedia Commons?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Wikimedia Commons?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Wikimedia Commons: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Wikimedia Commons è gratuita?

Sì. È pubblicata su GitHub da fuzheado con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇