SGF Weiqi Replay Tool for Openclaw

A local-first Python tool that transforms SGF Weiqi records into fully interactive, responsive HTML replay pages.

zhangbin2025
v2.0.2
Apr 22, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install weiqi-sgf

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install weiqi-sgf using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is SGF Weiqi Replay Tool?

The SGF Weiqi Replay Tool is a specialized utility designed to convert Smart Game Format (SGF) files into high-quality, single-file HTML web pages. Built for the Weiqi (Go) community, it allows users to study professional games, review personal matches, and explore complex variations directly within any modern web browser.

By leveraging the power of Openclaw Skills, this tool ensures a seamless transition from raw data to an interactive learning environment. It features a robust SGF tree parser that handles nested variations, AI-generated move suggestions, and win-rate data, all while maintaining a 100% offline, privacy-focused architecture with zero external dependencies.

SGF Weiqi Replay Tool Use Cases

  • Creating interactive Weiqi study materials from SGF game records.
  • Visualizing complex AI variations and branching paths from platforms like Fox Weiqi.
  • Generating portable, responsive game reviews that work on mobile, tablet, and desktop.
  • Practicing board positions using the built-in trial-play mode with capture logic.

How SGF Weiqi Replay Tool Works

  1. The user provides an SGF file as input to the Python-based conversion script.
  2. The sgf_parser.py module analyzes the file, building a complete tree structure of moves and variations.
  3. The script injects the parsed game data into a pre-defined HTML template (replay.html).
  4. The tool outputs a single HTML file containing all necessary CSS, JavaScript, and Web Audio logic.
  5. The user opens the resulting file in a browser to interact with the board, navigate moves, and toggle variations.

SGF Weiqi Replay Tool Setup

This skill requires Python 3.x and relies strictly on the standard library. No pip installations are necessary.

# Basic usage: output to default directory
python3 scripts/replay.py <input.sgf>

# Specify a custom output filename
python3 scripts/replay.py game.sgf my_replay.html

# Specify a custom output directory
python3 scripts/replay.py game.sgf -o /path/to/directory

SGF Weiqi Replay Tool Data Schema & Taxonomy

The tool organizes data into a structured JSON object embedded within the HTML. The schema includes:

Field Description
game_info Metadata including player names, ranks, komi, and result.
tree A recursive structure representing the move hierarchy and branches.
stats Quantitative data about the game (move count, prisoner count).
errors A log of any SGF syntax issues encountered during parsing.

SGF Weiqi Replay Tool Advanced Features

  • Multi-level nested variations support for deep joseki or AI analysis.
  • Real-time sound engine using Web Audio API for stone placement and captures.
  • Trial-play mode allowing users to test sequences on any board position without altering the original record.
  • Responsive touch-gesture support (swipe left/right) for mobile-friendly navigation.
  • Secure data handling with HTML escaping and triple-layer JSON protection against injection.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*