Skip to content

Repository files navigation

Wikipedia AI Skills

A curated collection of skill files for AI coding agents - Pi, OpenCode, Claude Code, and any agent that supports the .claude/<name>/SKILL.md convention - to help with Wikipedia, Wikimedia, and Wikidata-related tasks.

Whether you're editing a Wikipedia article, researching a topic, or building a Toolforge tool, these skills give your AI assistant expert guidance on Wikimedia's systems, policies, and data.

Each skill is a self-contained set of instructions, policy knowledge, code examples, and executable tooling that an agent loads on demand. This means agents get expert-level guidance without bloating their system prompt.

Why skills matter: measured impact

These skills are not just reference docs — they measurably improve AI agent performance on Wikimedia tasks. In controlled benchmarks comparing agents with and without skills loaded:

  • 2.8× average speedup — agents with skills completed tasks faster (2.2× for simple tasks → 3.1× for complex cross-domain tasks)
  • 50% silent failure rate → 0% — without skills, agents produced plausible-looking but wrong answers in half of all tasks. With skills, this dropped to zero.
  • The gap widens with complexity — the most complex, cross-domain tasks showed the largest advantage. Skills help most where the agent needs to navigate multiple Wikimedia systems (API + policy + wikitext + Wikidata) in a single task.

In short: skills make agents faster, cheaper (fewer tokens wasted on wrong paths), and dramatically more reliable.


⚠️ Important: AI-generated content on Wikimedia projects

Most language editions of Wikipedia and other 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. You must read the full policies and guidelines, not just the summaries.

These skills are designed to help you research, understand, and prepare content - not to produce final text for direct submission. If you use the biography-writing skill to draft an article, treat the output as a research aid and starting point, not a finished product. Any Wikipedia edit you make remains your own responsibility and must comply with Wikipedia's policies on verifiability, neutral point of view, and no original research.

Do not copy-paste AI-generated text directly into Wikipedia. Always rewrite, verify every claim against reliable sources, and ensure the result reflects your own editorial judgment.


Skills

This repository contains 58 skills organized into two groups.

💡 Explore the interactive skills network → — see how all 58 skills connect to each other in a force-directed graph. Drag nodes, zoom, and hover to discover cross-references between skills.

Skills network preview

📝 For editors and contributors

Skills are arranged from foundational (understanding how Wikipedia works) to specialized (analyzing and creating content).

Skill What it helps with
▸ Understanding Wikipedia
wikipedia-page-anatomy Navigate and understand the structure of a Wikipedia article — infoboxes, categories, references, templates, navboxes, redirects, disambiguation, and protection levels
wikipedia-templates Create, design, and understand MediaWiki templates — template syntax, parser functions, magic words, transclusion vs substitution, Lua modules, template types taxonomy, API detection, and maintenance workflows
wikipedia-categories Understand and work with Wikipedia's category system — category trees, the three tests for valid categories (Verifiable/Neutral/Defining), topic vs. set categories, sort keys and DEFAULTSORT, API query patterns, Pywikibot generators, PetScan, overcategorization rules, and category maintenance
wikipedia-edit-history Read and analyze Wikipedia's page revision history — diffs, edit summaries, user contributions, byte changes, rollback, and understanding how a page evolved over time
wikimedia-diffs Fetch, compare, and interpret diffs between Wikipedia page revisions — wikitext changes, visual differences, and diff statistics via the Action API and REST API
wikiwho Token-level authorship attribution via the WikiWho API — who wrote, removed, or reinserted each word, with content-persistence and editor attribution analysis
wikipedia-talk-page Navigate and participate in Wikipedia talk pages — modern DiscussionTools (Reply Tool, Topic Subscriptions, Permalinks), Usability Improvements, community gadgets, wikitext conventions, WikiProject banners, archives, and talk page etiquette
wikipedia-wikiprojects Understand and work with English Wikipedia's WikiProject system — finding relevant projects, interpreting assessment tables, using Popular pages and work lists, and navigating project directories
▸ Working with Content
wikimedia-wikitext Parse, extract, and manipulate Wikipedia and MediaWiki wikitext (templates, infoboxes, citations, links) using proper AST-based tooling instead of fragile regex patterns
wikidata Understand and query Wikidata — the free, collaborative, multilingual knowledge graph that underpins Wikipedia's inter-language links, Commons structured data, and semantic facts across all Wikimedia projects. Covers SPARQL, the Wikibase REST/Action APIs, RDF data dumps, and semantic web concepts
wikiportraits-event-series Create Wikidata edition items and Commons year categories for recurring events — P155/P156 follows/followed-by chains, cancelled-year numbering, edition claims, and the category scheme
wikidata-vector-search Query Wikidata by meaning, concept, or natural-language description using semantic embeddings — fuzzy semantic search, concept matching, similarity lookups, cross-lingual retrieval, and "find like this" when you don't know the exact QID or label
quickstatements Build and run QuickStatements batches for Wikidata and Commons — the V1 command grammar (statements, qualifiers, references, ranks, item creation), value formatting, multilingual labels/descriptions/aliases, QS 2.0 vs 3.0, and a bundled validator/generator script
wikipedia-citations Master Wikipedia citations — CS1/CS2 templates, Wayback Machine archiving, dead link detection, bare URL expansion, citation maintenance, and reference validation
wikipedia-wikitables Create, parse, style, and fix MediaWiki wikitable syntax — delimiters, header/data cells, CSS classes, inline styling, rowspan/colspan, accessibility attributes, sortable and collapsible tables, and programmatic table generation from data
wikimedia-page-styling Use TemplateStyles to load custom CSS on wiki pages — build responsive grid/flexbox layouts, card-based tile systems, color themes, button systems, and full visual design systems that transform plain MediaWiki pages into rich, interactive-looking interfaces
mediawiki-page-navigation Build navigation systems in MediaWiki — menu bars, subpage hierarchies, breadcrumbs, tabs, and the template logic that powers them
mediawiki-translate-extension Work with the Translate extension for multilingual wiki content — marking pages for translation, writing translatable templates, and building i18n-aware navigation
mint Translate text and rich content via MinT — the Wikimedia machine translation service: 200+ languages, open NMT models (NLLB-200, OpusMT, IndicTrans2), plain/HTML/JSON/markdown formats
▸ Commons & Media
wikimedia-commons Search, upload, and understand Wikimedia Commons — the free media repository of images, video, sound, 3D files, PDFs, and other media used across Wikipedia and its sister projects. Browse categories, find reusable media, and retrieve file metadata
commons-file-resolution Resolve Wikimedia Commons file references to browser-usable HTTP URLs — direct origin URLs, thumbnails, Special:FilePath redirects, cache-busting with timestamps, Action API imageinfo queries, and CORS-aware serving patterns for web applications
wikimedia-commons-thumbnails Generate, construct, and retrieve raster thumbnail previews for any Wikimedia Commons file — thumb URL scheme, iiurlwidth/iiurlheight API pattern, thumbmime format conversion matrix, responsive/retina URLs, REST API thumbnails, and SPARQL thumbnailUrl
wikimedia-commons-svg Work with SVG files on Wikimedia Commons — viewing and retrieving raw SVG source vs PNG preview, W3C validation badges, creation tools (Inkscape, Illustrator), optimization (scour, SVGO), versioning and diffing SVG revisions, and SVG-specific templates and categories
wikimedia-commons-pdf Work with PDF and DjVu documents on Wikimedia Commons — multi-page document model, page selection for thumbnails, page dimensions, uploading large documents, Wikisource proofread integration, OCR text extraction, and document metadata
wikimedia-commons-audio-video Work with audio and video files on Wikimedia Commons — format policies and patent restrictions, uploading and transcoding, metadata via the Action API, keyframe thumbnails for video, the TimedMediaHandler player widget, TimedText subtitles, and creating derivative clips
wikimedia-commons-sdc Add, edit, and manage Structured Data on Commons (SDC) — MediaInfo captions, depicts statements, copyright and license metadata, qualifiers, references, and batch/GLAM workflows via the Wikibase Action API, web UI, and community tooling
wikimedia-commons-sparql Query Wikimedia Commons structured data via SPARQL — MediaInfo entities (M IDs), the depicts/copyright/licensing graph, Schema.org media metadata, and federated queries with Wikidata. Covers both the official WCQS endpoint and the QLever third-party endpoint
wikimedia-commons-categories Create and disambiguate Wikimedia Commons categories from Wikidata data — the occupation-from-country pattern, by name people categories, definite-article country phrases, pluralization, existence probing, and homonym disambiguation, distilled from the production Catapult gadget
pattypan Build pattypan upload spreadsheets (.xls) for batch Wikimedia Commons uploads — the two-sheet Data/Template format, path/name headers, template-variable matching, filename validation, and a bundled generator/validator script
flickr Fetch photos from Flickr's read-only REST API (photosets, search, metadata, tags, geo) and prepare pattypan upload manifests for batch Wikimedia Commons uploads - license filtering, flickr2commons-style descriptions, and attribution
flickr-wayback-recovery Recover a deleted or offline Flickr account from the Wayback Machine (CDX enumeration, metadata scraping, image download) and batch-upload the photos missing from Wikimedia Commons via pattypan — matched by Flickr ID
▸ Analyzing Articles
wikimedia-pageviews Retrieve traffic and popularity statistics for Wikipedia articles using cached SQL properties (sorting/filtering) or the REST API (precise historical data)
xtools Query XTools — the canonical Wikimedia statistics API: page info, top editors, edit counts, prose stats, and admin/patroller metrics for any wiki
wikimedia-media-usage-metrics Measure and count the use of Wikimedia media files — transfers (mediacounts/mediarequests), embeds (GlobalUsage), reach (pageviews/CIM), external reuse — with verified gotchas, a decision tree, and a live report pipeline
wikimedia-page-assessment Query Wikipedia article quality (FA/GA/B/C/Start/Stub) and importance ratings from WikiProject assessment banners on any Wikimedia wiki with the PageAssessments extension
wikimedia-ml-services Score article quality, revert risk, edit quality (goodfaith/damaging), readability, topic classification, reference quality, language identification, content translation recommendations, article descriptions, and article country using Wikimedia ML inference APIs (Lift Wing and legacy ORES)
wikipedia-reference-verifiability Analyze whether a Wikipedia page's references contain URLs — detect bare plain-text citations, template-based citations without url= parameters, shortened footnotes, and named ref reuse. Useful for article quality assessment, NPP triage, and citation maintenance
▸ Writing & Improving
wikipedia-en-biography-writing Draft and edit English Wikipedia biographies following NPOV, verifiability, no original research, and biographies of living persons (BLP) policies
wikipedia-en-article-audit Audit an English Wikipedia article for structural issues, factual errors, and NPOV violations, then produce a machine-readable task graph (DAG) that another agent can execute to fix all identified problems
wikipedia-notability-assessment Evaluate whether a subject meets Wikipedia notability guidelines — the General Notability Guideline (GNG), all 13 subject-specific SNGs with decision trees, source quality evaluation, structured report generation, AfD-ready summaries, and common invalid arguments
▸ Other Wikimedia Projects
wikimedia-url-shortener Create and expand w.wiki short URLs (Wikimedia's URL shortener) — 301 redirect behavior, the missing expansion API, the browser CORS trap, server-side resolution patterns, and creation via the meta.wikimedia.org action=shortenurl API
wiktionary-and-wikisource Work with Wiktionary (dictionary entries, translation tables, etymologies, audio pronunciations, lexemes) and Wikisource (proofread page workflow, OCR text extraction, quality validation, compiled works) — the two largest Wikimedia content projects after Wikipedia
wikivoyage Work with Wikivoyage — the free, collaborative, multilingual travel guide. Covers listing templates (See/Do/Buy/Eat/Drink/Sleep), the geographical hierarchy (continent → country → region → city), dynamic OSM maps via Kartographer, article status (stub/outline/usable/guide/star), the mobile-friendly image policy, Wikidata integration for coordinates, and batch operations

🛠 For tool developers

Skills for building bots, web apps, and data pipelines on Wikimedia infrastructure.

Skill What it helps with
wikimedia-api-access Access Wikipedia and Wikimedia APIs (REST, Action, SPARQL) with correct User-Agent headers, rate limiting, and 429/403 error handling
wikimedia-api-strategy Choose the right Wikimedia API or tool for the task — decision framework covering REST API, Action API, SPARQL, SQL replicas, EventStreams, and Pywikibot, with latency/complexity/authentication trade-offs
wikimedia-auth-oauth Authenticate Wikimedia API clients for editing, patrol, upload, and user-specific operations — OAuth 1.0a/2.0 flows, bot passwords, CSRF tokens, and permission checks
wikipedia-error-handling Handle HTTP errors, rate limits, and API failures across all Wikimedia services — retry strategies, backoff patterns, error response formats, and recovery procedures for the Action API, REST API, SPARQL, Lift Wing ML, and EventStreams
wikimedia-security-and-privacy Build tools that respect Wikimedia user privacy and security — data minimization, suppressed/deleted revision handling, deanonymization risks, AbuseFilter and block awareness, XSS prevention, and data retention policies for Toolforge tools
wikimedia-database Execute SQL queries against Wikipedia database replicas (enwiki, wikidata, commonswiki) via an SSH tunnel to Toolforge, with connection management and data handling guardrails
wikimedia-toolforge Manage Toolforge accounts, web services, Kubernetes pods, cron jobs, file deployment, and privacy-preserving CDN assets for Wikimedia tools
toolforge-nodejs Deploy and manage Node.js web services on Wikimedia Toolforge Kubernetes — zero-dependency server patterns, webservice commands, PORT configuration, static file serving with caching headers, npm on NFS, environment variables, logging, and common pitfalls
toolforge-python Deploy and manage Python web services on Wikimedia Toolforge Kubernetes — Flask and gunicorn setup, webservice commands, virtual environments on NFS, pip caching, PORT configuration, static file serving, logging, and cron jobs
wikimedia-phabricator Navigate Wikimedia's Phabricator instance — search tasks, interpret task status and project tags, file bug reports, and track WMF development priorities
wikimedia-i18n-l10n-for-tools Design multilingual Toolforge tools — message files and ICU plurals, language detection and fallback chains, RTL/bidi layout, Unicode normalization, cross-wiki domain mapping, batch Wikidata label fetching, and avoiding English Wikipedia assumptions
wikimedia-codex Build Wikimedia-consistent web interfaces with the Codex design system — Vue 3 components, CSS-only components, design tokens, icons, and composables. For Toolforge tools, MediaWiki gadgets, and Wikimedia-adjacent frontends
▸ Search & Data
wikimedia-search-cirrussearch Search Wikimedia wikis using CirrusSearch — syntax cheat sheet (insource, hastemplate, linksto, deepcategory, haswbstatement), API parameters, prefix vs full-text vs title search, ranking caveats, maintenance queries, and combining search with PetScan, SPARQL, and categories
wikimedia-petscan Query Wikimedia projects with PetScan — multi-source category intersections, template filtering, SPARQL integration, Wikidata item filters, bulk data export, and the PSID stable query ID system
wikimedia-pageviews Retrieve traffic and popularity statistics for Wikipedia articles using cached SQL properties (sorting/filtering) or the REST API (precise historical data)
wikimedia-page-assessment Query Wikipedia article quality (FA/GA/B/C/Start/Stub) and importance ratings from WikiProject assessment banners
wikimedia-ml-services Score articles and revisions using Lift Wing ML models — revert risk, article quality, topic classification, readability, language identification, and more. Includes ORES migration guidance
▸ Automation
pywikibot Use Pywikibot — the Python library and CLI tool suite for automating work on MediaWiki sites. Covers installation, the core object model, page generators, the bot framework, built-in scripts, and Wikidata/Commons integration
wikimedia-eventstreams Consume real-time streams of Wikimedia events (edits, page creations, deletions, moves, log entries) via Server-Sent Events (SSE). Covers stream schemas, client libraries, filtering, historical replay, and building live dashboards

What can I do with these?

If you want to... Use this skill
▸ Understanding Wikipedia
Understand the structure of a Wikipedia article (infobox, categories, templates, navboxes) wikipedia-page-anatomy
Understand how MediaWiki templates work — syntax, parser functions, magic words, Lua modules wikipedia-templates
Create, inspect, or design a new template for a Wikipedia article wikipedia-templates
Understand the category system — valid categories, sort keys, tree structure, and querying wikipedia-categories
Evaluate whether a proposed category is valid (Verifiable/Neutral/Defining test) wikipedia-categories
Find all pages in a category or category tree via API wikipedia-categories
Find the intersection of two categories bash .claude/skills/wikipedia-categories/assets/category-intersect.py "Physicists" "German scientists"
Inspect all categories assigned to an article with metadata python3 .claude/skills/wikipedia-categories/assets/category-inspector.py Albert_Einstein
Explore a category hierarchy interactively from the CLI bash .claude/skills/wikipedia-categories/scripts/category-tree.sh Physics 3 pages
Analyze page revision history, diffs, user contributions, and detect vandalism wikipedia-edit-history
Compare two revisions and understand what changed wikimedia-diffs
Find out who wrote specific sentences or tokens in an article, and each editor's share wikiwho
Measure content persistence — which edits survived, or which text keeps getting reverted wikiwho
Participate in talk page discussions, sign comments, and find WikiProject assessments wikipedia-talk-page
Find the right WikiProject for an article topic wikipedia-wikiprojects
▸ Working with Content
Translate text or article content between languages (200+ languages, open NMT models) mint
Translate rich content while preserving HTML/JSON/markdown markup mint
Extract infobox data, citations, or internal links from an article's wikitext wikimedia-wikitext
Query Wikidata with SPARQL — find items, traverse properties, filter by value wikidata
Find Wikipedia articles that lack a Wikidata item wikidata
Search Wikidata by meaning (not exact name) — fuzzy cross-lingual concept search wikidata-vector-search
Set up event series: Wikidata edition items, P155/P156 chains, and Commons year categories wikiportraits-event-series
Check if a URL is archived on the Wayback Machine bash .claude/skills/wikipedia-citations/scripts/archive-check.sh https://example.com
Inspect a summary of all citations on a Wikipedia page bash .claude/skills/wikipedia-citations/scripts/citation-inspector.sh Albert_Einstein
Expand a bare URL into a proper citation template bash .claude/skills/wikipedia-citations/scripts/expand-bare-url.sh https://example.com
Auto-generate a full citation from a URL, DOI, or ISBN bash .claude/skills/wikipedia-citations/scripts/citoid-expand.sh 10.7554/eLife.32259
Check a Wikipedia page for dead links and suggest archives bash .claude/skills/wikipedia-citations/scripts/check-dead-links.sh Albert_Einstein
Create a wikitable from Python data python3 .claude/skills/wikipedia-wikitables/assets/wikitable_tools.py
▸ Commons & Media
Search Commons for freely licensed images, audio, video, and documents wikimedia-commons
Generate thumbnail URLs for any Commons file at any size wikimedia-commons-thumbnails
Create responsive/retina image URLs from Commons files wikimedia-commons-thumbnails
Serve Commons images in a browser app (handle CORS issues) commons-file-resolution
Query Commons structured data via SPARQL (find files by license, depicts, camera) wikimedia-commons-sparql
Add depicts/captions/copyright statements to Commons files wikimedia-commons-sdc
Build a pattypan .xls spreadsheet for a batch Commons upload python3 .claude/skills/pattypan/scripts/build_pattypan_spreadsheet.py --manifest files.csv --template template.wikitext --output upload.xls
Fetch Flickr photos into a pattypan manifest for a batch Commons upload python3 .claude/skills/flickr/scripts/fetch_flickr.py --photoset <id> --user <nsid> --out files.csv then python3 .claude/skills/pattypan/scripts/build_pattypan_spreadsheet.py --manifest files.csv --template template.wikitext --output upload.xls
Recover photos from a deleted Flickr account via the Wayback Machine and upload them to Commons flickr-wayback-recoverypython3 .claude/skills/flickr-wayback-recovery/scripts/cdx-photo-ids.py <nsid> <alias> then the rest of the pipeline
▸ Analyzing Articles
Get pageview statistics — how many people read an article? wikimedia-pageviews
Get editor & page statistics — edit counts, top editors, article info, prose stats xtools
See admin/patroller activity or batch page assessments on a wiki xtools
Check article quality and WikiProject ratings (FA, GA, B, C, Start, Stub) wikimedia-page-assessment
Score an article for quality and readability with ML wikimedia-ml-services
Get a full article quality report (quality + readability + topics + reference risk) python3 .claude/skills/wikimedia-ml-services/assets/article_quality_report.py Albert_Einstein en
Check if a Wikipedia page has URL-based references wikipedia-reference-verifiability
▸ Writing & Improving
Draft a biography article with proper structure, citations, and NPOV wikipedia-en-biography-writing
Audit an article for structural issues and generate a fix-it task plan wikipedia-en-article-audit
Evaluate whether a subject is notable enough for Wikipedia wikipedia-notability-assessment
Assess notability from the CLI python3 .claude/skills/wikipedia-notability-assessment/assets/notability_checker.py "Jane Smith" --description "Professor at MIT, Nobel Prize winner"
Generate an AfD-ready notability summary python3 .claude/skills/wikipedia-notability-assessment/assets/notability_checker.py "Test" --description "desc" --json
Parse a Wiktionary entry for definitions, translations, and pronunciations wiktionary-and-wikisource
Check proofreading progress for a Wikisource work bash .claude/skills/wiktionary-and-wikisource/scripts/ws-page-status.sh en "Index:Pride and Prejudice"
Extract listings from a Wikivoyage travel guide article wikivoyage
Check the quality status of a Wikivoyage article (stub/outline/usable/guide/star) wikivoyage
Extract all POI listings from a Wikivoyage article as JSON bash .claude/skills/wikivoyage/scripts/extract-listings.sh "Tokyo"
▸ Building Tools
Call any Wikimedia API with correct User-Agent and rate limiting wikimedia-api-access
Choose the right API for the task (REST vs Action vs SPARQL vs SQL vs EventStreams) wikimedia-api-strategy
Authenticate tool users with OAuth or bot passwords for editing/uploading wikimedia-auth-oauth
Handle API errors gracefully with retry and backoff wikipedia-error-handling
Query Wikipedia SQL replicas from Toolforge wikimedia-database
Deploy a web service, cron job, or bot on Toolforge wikimedia-toolforge
Deploy a Node.js app on Toolforge toolforge-nodejs
Deploy a Python app on Toolforge (Flask + gunicorn) toolforge-python
Run Python bots at scale (edit 10K pages, harvest templates, transfer files) pywikibot
Watch Wikipedia edits in real time and build live dashboards wikimedia-eventstreams
Search wikis with advanced CirrusSearch syntax wikimedia-search-cirrussearch
Run complex multi-source queries (categories + SPARQL + templates + Wikidata) wikimedia-petscan
Build a multilingual Toolforge tool with i18n support wikimedia-i18n-l10n-for-tools
Build custom wiki pages with CSS layouts (grid, flexbox, cards) wikimedia-page-styling
Build a Wikimedia-consistent UI for your tool with the Codex design system wikimedia-codex

Quick start

Install all skills into your project

git clone https://github.com/fuzheado/Wikipedia-AI-Skills.git
cp -r Wikipedia-AI-Skills/.claude /path/to/your/project/

Install a single skill

cp -r Wikipedia-AI-Skills/.claude/skills/wikimedia-pageviews /path/to/your/project/.claude/skills/

Once installed, your AI coding agent will discover the skill automatically through the skill tool. You can also open any SKILL.md file and paste its contents directly into an agent's instructions.

Pi agent setup

Pi discovers skills from anywhere on the filesystem via settings.json.

Step 1: Clone the repo

mkdir -p ~/.pi/repos
git clone https://github.com/fuzheado/Wikipedia-AI-Skills.git ~/.pi/repos/Wikipedia-AI-Skills

Step 2: Add skills and extension to pi's settings

Edit ~/.pi/agent/settings.json:

{
  "skills": [
    "~/.pi/repos/Wikipedia-AI-Skills/.claude/skills"
  ],
  "extensions": [
    "~/.pi/repos/Wikipedia-AI-Skills/.pi/extensions/wikimedia-skills"
  ]
}

Step 3: Set your own contact info in the User-Agent (required)

The extension ships with a placeholder User-Agent. You must replace the contact information with your own — Wikimedia uses this to reach you if your requests cause issues.

Choose one of these methods:

Option A (recommended) — Persistent config that survives git pull

Copy the template to your home config directory, then edit the copy:

# 1. Create the user config directory
mkdir -p ~/.config/wikimedia-skills

# 2. Copy the template (this is a one-time copy)
cp ~/.pi/repos/Wikipedia-AI-Skills/.pi/extensions/wikimedia-skills/config.json \
   ~/.config/wikimedia-skills/config.json

# 3. Open the copy and replace the userAgent value with your own info
$EDITOR ~/.config/wikimedia-skills/config.json

In that file, change the "userAgent" value to your own contact info. The format is:

<client>/<version> (<contact URL or email>) <project>

For example:

{
  "userAgent": "MyBot/1.0 (https://github.com/yourname; yourname@example.com) SkillsDemo"
}

Option B — Quick override (lasts one shell session)

export WIKIMEDIA_USER_AGENT="MyBot/1.0 (https://github.com/yourname; yourname@example.com) SkillsDemo"

Step 4: Reload pi

/reload

After reloading, the User-Agent injection extension is active: every curl, wget, python, and node command targeting a Wikimedia server automatically gets a compliant User-Agent — no 403 errors, no manual intervention needed.

How the User-Agent is resolved

The extension checks these locations in order (first match wins):

  1. WIKIMEDIA_USER_AGENT environment variable
  2. ~/.config/wikimedia-skills/config.json (your personal config — survives git pull)
  3. The repo's .pi/extensions/wikimedia-skills/config.json (shipped default — do not edit, git pull overwrites it)

⚠️ Do not edit the repo's config.json directly. It is a template and git pull will overwrite your changes. Always use ~/.config/wikimedia-skills/config.json or the WIKIMEDIA_USER_AGENT environment variable.


Script compliance

All shell and Python scripts in this repository follow a script compliance standard defined in .claude/guidelines/script-audit-guidelines.md:

  • Zero-argument guard — every script prints a helpful usage message when invoked with no arguments
  • Portable bash — no bash 4+ features (declare -A, ${var,,}) that break on macOS's default bash 3.2
  • Safe piped outputcurl | python3 patterns use temp files with HTTP status checks instead of silently passing empty/invalid input
  • --help support — every script responds to --help with full documentation
  • Deferred imports — Python scripts with optional dependencies show help before crashing on missing imports

See the full guidelines for the pre-commit hook, CI workflow templates, and checklist for new scripts.

Ground-truth verification suite

Skills document many CLI commands, API calls, URLs, and code snippets. To guard against hallucinated content — plausible-looking commands/modules/URLs that do not exist (e.g. toolforge tools create, action=templatestyles, prop=translationinfo) — this repo keeps ground-truth registries captured from live systems, and every skill is verified against them in CI (.github/workflows/skill-verification.yml):

Check Registry (generated) Refresher
CLI commands (toolforge, pwb.py, webservice, sql, become) scripts/command-registry.json scripts/refresh-command-registry.py (SSH to bastion + pywikibot repo)
Action API modules (action=/prop=/list=/meta=) scripts/api-surface.json scripts/refresh-api-surface.py (live paraminfo, enwiki+wikidata+commons)
External URLs (status checked) scripts/url-registry.json scripts/refresh-url-registry.py (incremental HEAD sweep, freshness rotation)
Links/depends_on/wikilinks — (offline) scripts/verify-links.py
Code snippet syntax (python/bash/json/js) — (offline) scripts/verify-snippets.py
last_verified freshness — (offline) scripts/verify-freshness.py

Run all checks locally:

python3 scripts/verify-commands.py
python3 scripts/verify-api.py
python3 scripts/verify-links.py
python3 scripts/verify-snippets.py
python3 scripts/verify-freshness.py

Refresh the registries when the underlying systems change (or every few months):

TOOLFORGE_USER=<your-ldap-username> python3 scripts/refresh-command-registry.py
python3 scripts/refresh-api-surface.py
python3 scripts/refresh-url-registry.py   # incremental: new + stale (>90d) + broken (>30d)
python3 scripts/refresh-url-registry.py --new-only  # fast pre-push check after adding URLs
python3 scripts/refresh-url-registry.py --full      # rare full audit of every URL

URL refresh is incremental by default: a URL is only live-checked if it is new, outside the ~3-month freshness window (--max-age-days), or a known-broken URL due for a retry (--retry-after-days). Known-good URLs are skipped, so normal runs check only the handful that rotated in — no more multi-minute sweeps on every change. CI's verify-links.py is fully offline; a scheduled workflow (.github/workflows/url-registry-refresh.yml, weekly) keeps the registry fresh automatically.

Prose that documents removed commands ("the toolforge tools... family was removed"), error demos, illustrative placeholder URLs, and POST-only endpoints is automatically recognized and skipped.

Testing

New contributions should include tests. The project uses pytest with a test suite in tests/ covering:

  • YAML frontmatter validation - every SKILL.md must have valid name, description, license, and compatibility fields
  • Content accuracy - key SOP claims, code examples, and guardrails are verified against the actual markdown
  • Code execution - runnable Python assets (like the cross-API pipeline script and the Pywikibot quick reference) have mock-based unit tests

Research & Validation

The skills in this repository were validated through a systematic A/B test — 24 parallel agent runs across 12 tasks in 3 rounds of escalating complexity — comparing agent performance with and without skill injection.

Key findings:

  • 2.8× average speedup with skills loaded (2.2× for simple tasks → 3.1× for complex cross-domain tasks)
  • 50% silent failure rate without skills vs. 0% with skills — the no-skills agents produced plausible-looking wrong answers in half of all tasks
  • The gap widens with task complexity: the most complex tasks showed the largest advantage

See research/ab-testing/ for the full reports, including:

  • Round-by-round results (R1: simple APIs, R2: multi-step workflows, R3: cross-domain orchestration)
  • Meta-analysis synthesizing all 12 comparisons
  • Skills improvement recommendations derived from test findings
  • Code example consistency audit
pip install pytest pyyaml requests
python -m pytest tests/

Skill format

Every skill lives in .claude/skills/<name>/ with this structure:

my-skill/
├── SKILL.md              # Agent-facing instructions with SOPs
├── scripts/              # Executable helpers (bash, python, etc.)
├── references/           # Deep reference docs loaded on-demand
└── assets/               # Templates, config files, sample data

The SKILL.md file includes YAML frontmatter for agent discovery:

---
name: skill-name
description: Short description for agent discovery
license: MIT
compatibility: opencode
---
## SOP: ...
...agent-facing instructions...

Design context

For background on the design motivations and community tools that inspired this project, see PAWS, Quarry, and the Wikimedia AI Facility — a presentation covering the origins of PAWS (hosted Jupyter notebooks for Wikimedia) and Quarry (public SQL query interface for wiki databases), and what they suggest about designing an AI-assisted editing facility for the Wikimedia community.

Contributing

See CONTRIBUTING.md for detailed guidelines on adding new skills, improving existing ones, and the pull request process. All skills must follow the YAML frontmatter format and pass the content accuracy checklist.

For the rationale behind skill sizing, tier assignments, and the split-vs-merge philosophy, see docs/design-philosophy.md.

License

MIT

About

Experiments and files related to creating skills for AI in Wikipedia work

Resources

Contributing

Stars

17 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages