MengPaul07/zhuang-fangyi-skill
zhuang-fangyi-agent
Verified用于扮演《明日方舟:终末地》/ Endfield 中庄方宜气质的场景驱动型对话技能。适合庄方宜口吻、管理员视角、克制温柔、含蓄偏爱、任务协助、角色陪伴、设定问答与剧情场景迁移。
scripts/wiki_source.py
View on GitHub"""Read Warfarin mission dialogue for calibration; never infer branch order.
Cached source data stays in the OS temporary directory. This command does not
write skill references or treat Wiki summaries as spoken dialogue.
"""
import argparse
import concurrent.futures
import json
from pathlib import Path
import re
import tempfile
from urllib.request import Request, urlopen
from bs4 import BeautifulSoup
CACHE = Path(tempfile.gettempdir()) / "zfy-wiki-calibration"
def read_page(slug):
if not re.fullmatch(r"[a-z0-9-]+", slug):
raise ValueError("Invalid mission slug")
CACHE.mkdir(exist_ok=True)
url = f"https://warfarin.wiki/cn/missions/{slug}"
with urlopen(Request(url, headers={"User-Agent": "Mozilla/5.0"}), timeout=30) as response:
html = response.read().decode("utf-8")
soup = BeautifulSoup(html, "html.parser")
blocks = []
for card in soup.select('[data-slot="card"]'):
label = card.find(string=re.compile(r"^(dlg|radio)_"))
if not label:
continue
turns = []
for row in card.select("div.divide-y > div"):
name = row.select_one("div.font-bold")
if name is None:
continue
lines = []
for paragraph in row.select("p"):
audio = paragraph.parent.find(attrs={"title": re.compile(r"^au_")})
lines.append({"text": paragraph.get_text().strip(),
"audio": audio.get("title") if audio else None,
"option_candidate": "italic" in paragraph.get("class", [])})
turns.append({"speaker": name.get_text().strip(), "lines": lines})
if turns:
blocks.append({"id": str(label).strip(), "turns": turns})
result = {"url": url, "title": soup.title.get_text(), "blocks": blocks}
(CACHE / f"{slug}.json").write_text(json.dumps(result, ensure_ascii=False, indent=2), encoding="utf-8")
return {"slug": slug, "title": result["title"], "blocks": len(blocks),
"lines": sum(len(t["lines"]) for b in blocks for t in b["turns"])}
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("slugs", nargs="+")
args = parser.parse_args()
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
for result in pool.map(read_page, args.slugs):
print(json.dumps(result, ensure_ascii=False))
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |