Pywayne Data Structure
Data structure toolkit for logical condition trees, union-find operations, and XML file I/O. Use when working with tree-based data structures, set operations, union-find algorithms, or XML parsing and serialization.
Install
npx skills add wangyendt/wayne-skills --skill pywayne-data-structuregit clone --depth 1 https://github.com/wangyendt/wayne-skills.git /tmp/wayne-skills
mkdir -p ~/.claude/skills
cp -r /tmp/wayne-skills/pywayne/data-structure ~/.claude/skills/pywayne-data-structurePersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Pywayne Data Structure
数据结构工具集,提供逻辑条件树、并查集和 XML 文件读写功能。
## Quick Start
```python
from pywayne.data_structure import ConditionTree, UnionFind, XmlIO
# 逻辑条件树
tree = ConditionTree("root")
tree.append_by_path([{'tag': 'if', 'attrib': {}, 'text': '条件1'}])
tree.append_by_path([{'tag': 'else', 'attrib': {}, 'text': '条件2'}])
# 并查集操作
uf = UnionFind(10)
rep = uf.find(3) # 返回集合标识
uf.union(1, 2) # 合并两个集合
# XML 读写
xml_io = XmlIO("config.xml", "output.xml")
tree = xml_io.read()
xml_io.write("root", tree)
```
## ConditionTree - 逻辑条件树
用于存储和管理条件表达式的树形结构。
### 初始化
```python
from pywayne.data_structure import ConditionTree
tree = ConditionTree("root")
```
### 添加节点
通过路径列表添加节点。
```python
# 根节点
tree.append_by_path([{'tag': 'if', 'attrib': {}, 'text': '条件1'}])
# 子节点
path = [{'tag': 'if', 'attrib': {}, 'text': '条件1-1'}]
tree.append_by_path(path)
```
**节点字典格式**:`{'tag': 标签名, 'attrib': 属性字典, 'text': 文本内容}`
### 查找节点
**按标签名查找**:`find(nick_name)` - 查找指定标签名的节点
```python
tree.find("if") # 返回 if 节点
```
**按路径查找**:`find_by_path(path)` - 沿给定路径查找节点
```python
node = tree.find_by_path(["root", "if", "条件1-1"])
```
### 打印树路径
打印从根到所有叶子的完整路径。
```python
tree.print_path()
```
## UnionFind - 并查集
并查集数据结构,支持按秩合并与路径压缩。
### 初始化
```python
from pywayne.data_structure import UnionFind
uf = UnionFind(10) # N 个元素
```
### 查找集合标识
```python
rep = uf.find(3) # 返回元素 3 所在集合的标识(整数)
```
### 合并集合
```python
uf.union(1, 2) # 合并集合 1 和 2
```
### 检查连接性Details
- Skill name
pywayne-data-structure- Repository
- wangyendt/wayne-skills
- Path
pywayne/data-structure/SKILL.md- License
- MIT
- Repo updated
- 23 October 2026
FAQ
What does the Pywayne Data Structure skill do?
Data structure toolkit for logical condition trees, union-find operations, and XML file I/O. Use when working with tree-based data structures, set operations, union-find algorithms, or XML parsing and serialization.
How do I install the Pywayne Data Structure skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add wangyendt/wayne-skills --skill pywayne-data-structure. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Pywayne Data Structure popular?
It lives in wangyendt/wayne-skills, which has 9 GitHub stars and 0 forks.
Related skills
Alapi
9wangyendt/wayne-skills
Comprehensive ALAPI skill covering the full bundled ALAPI OpenAPI catalog. Use when the user mentions ALAPI, alapi, ALAPI_TOKEN, openapi.json, or an ALAPI path like /api/..., or asks to find which ALAPI API matches a business need, choose between similar ALAPI endpoints, explain request fields, prepare or execute a request, or troubleshoot an ALAPI response. Covers inspirational content, articles, news and hotlists, AI chat/translation/NLP, OCR and document recognition, weather and calendar data, IP/phone/ID/domain/ICP/enterprise lookup and verification, finance/exchange/gold/oil/crypto market
Android App Publisher
9wangyendt/wayne-skills
Build or publish standalone Android APKs to an authenticated OSS distribution service, update the latest release, list published apps, and generate stable download links and QR codes. Use for Android app sharing and release management, not generic OSS operations or app-store uploads.
Awesome Docs
9wangyendt/wayne-skills
Use this skill whenever the user asks to record, organize, update, or maintain project documentation, including architecture overviews and decisions, technical books and derivations, API/protocol/configuration references, implementation plans, roadmaps, todos, risks, experiments, know-how, or common commands. Choose paths and naming by document purpose, preserve existing canonical locations, and check links when reorganizing. Defaults to the target project’s docs directory unless the user specifies another location. Covers reader-first technical explanations and interactive HTML documents as w
Pywayne Dsp
9wangyendt/wayne-skills
Digital signal processing toolkit for filtering, peak detection, detrending, and curve similarity. Use when working with sensor data, signal preprocessing, feature extraction, noise suppression, or time-series analysis. Includes Butterworth filter, One-Euro filter, signal detrending, DTW curve similarity, Welford standard deviation, and sliding window extrema detection.
Pywayne Calibration Magnetometer Calibration
9wangyendt/wayne-skills
Sensor calibration toolkit with magnetometer calibration using close-form method. Use when calibrating IMU sensors (accelerometer, gyroscope, magnetometer) to compute soft-iron matrix and hard-iron offset for magnetometer correction. Requires sensor fusion with VQF for orientation estimation.
Pywayne Helper
9wangyendt/wayne-skills
Project configuration management helper for YAML config files. Use when projects need cross-process/cross-file parameter sharing via a centralized config file. Supports automatic project root detection, nested config key management, and waiting mechanism for values set by other processes.
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.