wiki-bot: Skill for Claude Code

.agents/skills/pywikibot-update/SKILL.md

pywikibot-update is a skill for Claude Code, Codex from re0wiki/wiki-bot. It costs 36 tokens per session (2,349 once invoked), scanned A, original, MIT.

A maintenance procedure for rebasing a customized Pywikibot fork onto upstream changes while preserving the project's local patches. Pywikibot is a Python library for automating wiki edits and reads.

In plain words
What is it for?
It is for updating the Pywikibot submodule, reviewing fork-specific patches, and verifying changes to wiki text replacement and related tooling.
Why use it?
It provides a record of which custom changes must survive an update, reducing the chance that a rebase silently removes required behavior or performance fixes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is re0wiki/wiki-bot's own configuration. It tells Claude Code and Codex how to work on wiki-bot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything wiki-bot configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is uv run python src/tools/verify_wiki_access.py # 期望 ALL CHECKS PASSED.

Reuse

Borrowing it

Nothing to install: this file belongs to re0wiki/wiki-bot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/re0wiki/wiki-bot/main/.agents/skills/pywikibot-update/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/re0wiki/wiki-bot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

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

agentmods badge for pywikibot-update

README.md
[![agentmods](https://agentmods.dev/badge/skills/re0wiki/wiki-bot/pywikibot-update/github.svg)](https://agentmods.dev/skills/re0wiki/wiki-bot/pywikibot-update)
Your own site
<a href="https://agentmods.dev/skills/re0wiki/wiki-bot/pywikibot-update"><img src="https://agentmods.dev/badge/skills/re0wiki/wiki-bot/pywikibot-update/github.svg" alt="Measured on agentmods" height="20"></a>

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

agentmods 80×15 button for pywikibot-update

Your own site · 80×15
<a href="https://agentmods.dev/skills/re0wiki/wiki-bot/pywikibot-update"><img src="https://agentmods.dev/badge/skills/re0wiki/wiki-bot/pywikibot-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,349 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

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

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.02349
Opus 5.5 $0.00014 $0.00940
Sonnet 5.5 $0.00007 $0.00470
Haiku 4.5 $0.00004 $0.00235

Measured 13d ago against content hash 1dcac77248b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

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

Nothing flagged

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

.agents/skills/pywikibot-update/SKILL.md · 94 lines

How it starts

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

pywikibot submodule 更新流程

把 fork(re0wiki/pywikibot 的 main)rebase 到 upstream 最新版的完整流程。本 skill 同时是 fork 定制提交清单的唯一权威——rebase 时必须逐条保留。

fork 历史可任意重写(force push 常态化):只保留上游 → 定制终态的最短路径。补丁的演进中间态(加了又改、又删)一律重写抹平,不留在历史里;补丁「是什么、为什么」以本清单的当前描述为准。

定制提交清单(rebase 上游时必须保留)

每个定制一个独立提交:

  • 全库 import re → import regex as re(80 文件机械替换,setup.py 除外)+ requirements.txt 加 regex:译名合并 alternation(1000+ 分支)靠 regex 的 trie 优化(stdlib re 逐位置顺序试探,167KB 页 8.9s → 0.03s)。regex 默认 VERSION0 与 re 行为对齐。
  • replace.py:generate_summary 支持 callable 替换的 take_summary_pairs() 协议——回读本页实际命中的(原文, 目标)对并清空;合并 alternation 的编辑摘要打印真实转换(-菲爾歐蕾 +菲尔欧蕾)而非整条 pattern。
  • textlib.py:replaceExcept 加快速路径(marker 为空且不 allowoverlap 时):异常区间预计算一次(合并排序),编辑后区间随 delta 平移,替代原版「每个候选匹配 × 每个异常正则」的全文重扫——保护行密集的页面(NekoQuote 月表,200KB)上 10x+ 加速。行为锚点测试在主仓 tests/test_fork_replaceexcept.py。
  • textlib.py + fixes.py:新增 keep 标签 = <!--as-is-->...<!--/as-is--> 注释对,textlib 加 regex,HTML/syntax/isbn/specialpages fixes 的 exceptions 里加 keep —— wiki 上可以用这对注释保护内容不被 bot 改。注释零渲染、可行内使用,行内内容整词包裹即可(如 <!--as-is-->精灵<!--/as-is-->)。标记不配平时该区域失去保护(静默失效,扫描时可查配平)。
  • fixes.py:HTML fix 把 <br> 归一到不闭合形式(MediaWiki 渲染等价,不闭合是本 wiki 惯例)。
  • fixes.py:syntax fix 注释掉外链竖线规则(误报太多)。
  • textlib.py:replaceLanguageLinks 的 CategorySelect 分支加守卫,模板页(含子页)改走 noinclude 感知分支——否则 getCategoryLinks 不识别 <noinclude> 包裹,会把分类从 noinclude 里拽出来放到页尾(Fandom 有 CategorySelect 扩展,cosmetic_changes 的 standardizePageFooter 必踩)。
  • _filepage.py:下载 URL 加 &format=original,否则 Fandom API 返回 webp。同时必须去掉上游的 suffix 调整:它从 URL 路径取扩展名,而 Fandom URL 以 /revision/latest 结尾(无扩展名),留着会把下载文件的真扩展名剥掉(Wikimedia 的 URL 路径以文件名结尾,所以上游留着没事)。
  • noreferences.py:zh 参考资料段标题首选「注释」;预载带 pageprops——skip_page 对每页调 isDisambig()(use_disambigs=False)读 prop=pageprops,默认预载不含它导致每页一次查询(全扫 ~18 min),带上后随内容同批缓存(~25 s)。背景:本站按对齐 en 的策略不加 __DISAMBIG__(en 不加,zh 单加会破坏 interwiki;用户尝试给 en 加被回退),该检查恒为空——故选零成本的语义保留方案而非改 use_disambigs=None 的假设性跳过。
  • scripts/listpages.py:-notitle(含 -format: 空值)抑制标题后 treat() 不再 pop 空 output_list——上游 bug:非 preloading 且无 -tofile 时逐页 pop(),首页即 IndexError 崩溃。
  • pagegenerators/_factory.py:恢复多个 -start 的并集语义。上游 fa0c6f6c7(T425882,11.3 引入 -until)把 -start 改为惰性合并进单个 _allpages_args,导致多个 -start 只有第一个命名空间生效(jobs 的 starts.py 全依赖多 -start)。补丁在再遇 -start 时把挂起的参数实例化为独立 allpages 生成器,-start+-until 配对行为不变。
  • site/_decorators.py:need_right 权限检查失败且当前为匿名会话(user() is None)但配置了账号时,先 _relogin() 重登一次再复查,复查仍失败才抛 UserRightsError。覆盖「进程启动后首次取 userinfo 时会话已被服务端作废」的盲区——该场景下缓存里从未有过登录态,api._requests 的 userinfo 不符自愈(要求 user() is not None)不会触发,会直接以 User "None" 抛错退出。重登失败则 NoUsernameError 照常传播(响亮失败)。

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

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

  1. 13d ago Changed · +18 lines 1dcac77248b8
  2. 1mo ago Changed · +2 lines e4a630833a73
  3. 1mo ago First seen · 74 lines · 36 tokens per session scan A 203071a361f6

Subscribe to this mod's changes

pywikibot-update is a skill published in the GitHub repository re0wiki/wiki-bot (5 stars, last pushed 3d ago), licensed MIT. It adds 36 tokens to every session and 2,349 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

pywikibot-update compared with skills from other repositories

pywikibot-update next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pywikibot-updatere0wiki/wiki-botSkill53d agoMITA36Claude Code, Codex
project-graveyardShubhamsaboo/awesome-llm-appsSkill144kyesterdayApache-2.0A127Claude Code, Codex
mem0-test-integrationmem0ai/mem0Skill68k2d agoApache-2.0A207Claude Code, Codex
marimo-pairmarimo-team/marimoSkill23kyesterdayApache-2.0A57Claude Code, Codex
create-releasecocoindex-io/cocoindexSkill12kyesterdayApache-2.0A155Claude Code, Codex
cli-releaseComposioHQ/composioSkill31kyesterdayMITA95Claude Code, Codex
config-loading-precedencexberg-io/xbergSkill9.5kyesterdayMITA18Claude Code