wiki-bot: Skill for Claude Code

.agents/skills/wiki-access/SKILL.md

wiki-access is a skill for Claude Code, Codex from re0wiki/wiki-bot. It costs 42 tokens per session (6,847 once invoked), scanned A, original, MIT.

A guide and audit workflow for checking whether templates on a Fandom wiki are really used before removing them. A template is reusable wiki text inserted into other pages.

In plain words
What is it for?
It is for auditing template references, distinguishing real uses from syntax or dead code, and deciding whether a template can be safely deleted.
Why use it?
It accounts for cases where the wiki's usage report or a simple text search can give a misleading result, reducing the risk of deleting needed templates.

Skill for Claude CodeCodex

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

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.

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/wiki-access/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 wiki-access

README.md
[![agentmods](https://agentmods.dev/badge/skills/re0wiki/wiki-bot/wiki-access/github.svg)](https://agentmods.dev/skills/re0wiki/wiki-bot/wiki-access)
Your own site
<a href="https://agentmods.dev/skills/re0wiki/wiki-bot/wiki-access"><img src="https://agentmods.dev/badge/skills/re0wiki/wiki-bot/wiki-access/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 wiki-access

Your own site · 80×15
<a href="https://agentmods.dev/skills/re0wiki/wiki-bot/wiki-access"><img src="https://agentmods.dev/badge/skills/re0wiki/wiki-bot/wiki-access.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,847 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00042 $0.06847
Opus 5.5 $0.00017 $0.02739
Sonnet 5.5 $0.00008 $0.01369
Haiku 4.5 $0.00004 $0.00685

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

Security

Grade A, and why

wiki-access scanned grade A with 1 finding 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 3d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

裸调(curl / urllib / requests)**必须显式带 User-Agent**,否则 Fandom 直接 403(2026-08-18 实测 urllib 默认 UA 被拒,curl 加 `-A` 即通)。
.agents/skills/wiki-access/SKILL.md · 227 lines

How it starts

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

wiki 读写配方(pywikibot 库方式 + 裸 API)

读写 rezero.fandom.com(re0 family,12 个语言子站)的实测用法与坑。 安全红线、环境要求和最小用法见 AGENTS.md「读写 wiki」一节;本文档是完整配方。

读

import pywikibot

site = pywikibot.Site("zh", "re0")   # 其他语言站: Site("en", "re0") 等

p = pywikibot.Page(site, "角色:菜月·昴")
p.exists()            # bool
p.text                # wikitext 全文
p.isRedirectPage()    # bool
p.getRedirectTarget() # 重定向目标 Page(注意: 本 wiki 重定向写作 #REDIRECT 而非 #重定向)
p.namespace()         # 命名空间对象,str() 得到名字(主命名空间是空串)

# 历史版本
for rev in p.revisions(total=2):
    rev.timestamp, rev.user, rev.comment, rev.text  # rev.text 是该版本全文

pywikibot.Page(site, title) 构造本身不发请求,访问 .text 才发。

写

site.login()  # 写入前必须;纯读取可以不登录
assert site.user() == "IchiSanNi"

p = pywikibot.Page(site, "User:IchiSanNi/沙盒")
p.text = p.text + "\n追加内容\n"
p.save(summary="编辑摘要", bot=False, minor=False)  # 手动编辑:bot/minor 都必须显式关
p.save(summary="编辑摘要", bot=True)                # 批量脚本:加 bot=True(或 p.put(...))
  • bot flag 的取舍:bot flag 会阻止常规通知机制(避免批量编辑刷屏)。跑批量脚本时用 bot=True 没问题;但手动编辑特定页面时,操作更接近需人工审查的常规编辑,不要加 bot flag。
  • pywikibot ≥9.4 起 save() 默认 bot=True, minor=True(None 选项已移除)——手动编辑不显式传 bot=False, minor=False 就会被标成 bot 小编辑,且 bot/minor 标记事后无法摘除(只能等滚出 recentchanges)。
  • 验证 bot flag 要查 list=recentchanges(rcprop=flags);usercontribs 的 ucprop=flags 不返回 bot 键(即使编辑带 bot flag),会漏报。
  • botflag= 参数已废弃,用 bot=;传了 botflag 只会触发 FutureWarning,不影响保存。
  • save 有内置异常保护;批量写建议 try pywikibot.exceptions.PageSaveError。
  • baserevid 冲突验证必须用不同账号的修订:MediaWiki 会抑制同一账号的自我编辑冲突(2026-10-26 沙盒实证:同账号持旧 baserevid 仍可保存;改用最近编辑者为另一账号的 Sandbox 后,旧 baserevid + basetimestamp 正确返回 EditConflictError)。构造反例时先核对 latest_revision.user,不能用 bot 自己连续两次编辑充当并发用户。

生成器(pagegenerators)

from itertools import islice
from pywikibot import pagegenerators

# 全文搜索 —— 注意 Fandom 不支持 intitle: 前缀语法(实测返回空),用普通关键词
pagegenerators.SearchPageGenerator("菜月昴", site=site, total=5)

# 分类成员(含子分类用 cat.subcategories())
cat = pywikibot.Category(site, "Category:新搬运待整理")
cat.articles(total=10)            # total= 在这里生效
cat.categoryinfo["size"]          # 成员数

# 最近更改(注意大小写: RecentChangesPageGenerator)
pagegenerators.RecentChangesPageGenerator(site=site, total=10)

# 链入页面 —— 坑: backlinks(total=N) 的 total 不生效(实测 total=3 返回 31 条),用 islice
list(islice(pywikibot.Page(site, "角色:菜月·昴").backlinks(), 10))

# 模板引用页(embeddedin 的 total= 生效)
list(pywikibot.Page(site, "Template:Init").embeddedin(total=10))

# 按前缀枚举 —— 用 PrefixingPageGenerator(内部走 apprefix,严格限定前缀)
pagegenerators.PrefixingPageGenerator(prefix="小说:", namespace=0, site=site, filterredir=False)

Read the full file on GitHub · 227 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago Changed · +8 lines 14c628cd0888
  2. 9d ago Changed · +1 lines 84a313e3ad72
  3. 13d ago Changed · +1 lines e9ed29b96194
  4. 1mo ago Changed · +2 lines 714b79d0a408
  5. 1mo ago Changed f25f1e32115f
  6. 1mo ago First seen · 215 lines · 42 tokens per session scan A ab2cba07e75d

Subscribe to this mod's changes

wiki-access is a skill published in the GitHub repository re0wiki/wiki-bot (5 stars, last pushed 3d ago), licensed MIT. It adds 42 tokens to every session and 6,847 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

wiki-access compared with skills from other repositories

wiki-access next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
wiki-accessre0wiki/wiki-botSkill53d agoMITA42Claude Code, Codex
schema-explorationlangchain-ai/deepagentsSkill31kyesterdayMITA57Claude Code, Codex
matlabK-Dense-AI/scientific-agent-skillsSkill56k4d agoMITA44Claude Code
mem0-oss-to-platformmem0ai/mem0Skill68k2d agoApache-2.0A217Claude Code, Codex
mempalace-recallMemPalace/mempalaceSkill60kyesterdayMITA94Claude Code
analyze-marketlangchain-ai/deepagentsSkill31kyesterdayMITA34Claude Code, Codex
haikuagno-agi/agnoSkill43kyesterdayApache-2.0A0Claude Code, Codex