← 返回 Skills 市场
imcaptor

Count Go Black Stones

作者 imcaptor · GitHub ↗ · v0.1.2 · MIT-0
cross-platform ✓ 安全检测通过
37
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install count-go-black-stones
功能描述
Count black Go/Weiqi stones from source board photos, estimate black Chinese-area scoring, and render a clean static 19x19 result board image. Use when the u...
使用说明 (SKILL.md)

Count Go Black Stones

Workflow

  1. Use the source board photo as input. Do not require or depend on a scoring-app result screenshot.
  2. Run scripts/count_go_black_stones.py on the image to detect the 19x19 grid, classify intersections as black, white, or empty, and compute:
    • black_stones: visible black stones on the board.
    • black_territory: empty intersections surrounded only by black stones.
    • black_area_chinese: black stones plus empty regions bordered only by black stones.
    • area_total_ok: sanity check that black area plus white area equals 19*19.
  3. Generate a clean static board with --result-image when the user asks for a result image. Actual stones are circles; surrounded territory is marked with small squares; the footer shows the black Chinese-area result, e.g. 黑 197 子.
  4. Compare the script output with the image visually. Correct obvious misses before answering.
  5. State uncertainty when the board is blurry, cropped, obstructed, or has unsettled dead stones. Chinese-area scoring assumes dead stones have already been removed or are visually treated as alive.

Quick Start

Install script dependencies only if they are missing:

python3 -m pip install -r /path/to/count-go-black-stones/scripts/requirements.txt

Run the detector:

python3 /path/to/count-go-black-stones/scripts/count_go_black_stones.py /path/to/board.jpg \
  --result-image /tmp/go-result-board.jpg \
  --overlay /tmp/go-count-overlay.jpg

For JSON-only output:

python3 /path/to/count-go-black-stones/scripts/count_go_black_stones.py /path/to/board.jpg --json

If automatic board detection is wrong, pass the four board corners in image coordinates, ordered clockwise from top-left:

python3 /path/to/count-go-black-stones/scripts/count_go_black_stones.py board.jpg \
  --corners "74,76 1100,53 1118,1031 72,1034" \
  --result-image /tmp/go-result-board.jpg \
  --overlay /tmp/go-count-overlay.jpg

If the supplied corners are the four outer grid intersections rather than the wooden board corners, add --grid-corners.

Interpretation

  • Report black_stones when the user literally asks how many black stones are visible.
  • Report black_area_chinese when the user asks for 黑多少子, 数子, or 形势.
  • Treat area_total_ok: false as a sign that classification or life-and-death status needs review before trusting the result.
  • In the generated result image, circles are actual stones from the source photo; small squares are territory markers computed from surrounded empty intersections; the bottom score label uses black_area_chinese.
  • In JSON, board_ascii contains only stones (X black, O white), while result_ascii separates stones from territory (X/O stones, x/o territory).
  • Treat black_area_chinese as a rules-based estimate, not an AI life-and-death judgment. If dead groups remain on the board, tell the user manual confirmation is needed.
  • Use the overlay when available to inspect classification mistakes: black stones are marked B, white stones W, black territory b, and white territory w.
安全使用建议
Install only if you are comfortable running a local Python image-processing script and installing numpy, opencv-python-headless, and pillow if needed. The main risk is ordinary local file handling: provide only the board image you intend to analyze and choose output paths deliberately.
能力评估
Purpose & Capability
The skill purpose is coherent with its artifacts: SKILL.md describes counting Go/Weiqi stones and estimating Chinese-area scoring, and the Python script implements local image loading, grid detection, stone classification, scoring, JSON output, and optional overlay/result-board rendering.
Instruction Scope
Instructions are scoped to user-provided board photos and manual verification of uncertain results; there are no prompt overrides, hidden role changes, or unrelated agent-control instructions.
Install Mechanism
The skill asks to install Python dependencies only if missing. The declared packages are common image-processing libraries, and dependency registry analysis reported all packages present.
Credentials
File access is proportionate: the script reads the specified input image and writes only user-requested output files such as overlays or result images. No network calls, credential access, broad indexing, or unrelated local data collection were found.
Persistence & Privilege
No persistence, background workers, privilege escalation, credential/session use, destructive actions, or automatic execution were identified.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install count-go-black-stones
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /count-go-black-stones 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.2
Tighten white-stone classification to avoid bright wood false positives, add area_total_ok sanity check, and fix surrounded black territory marking in calibrated result boards.
v0.1.1
Add --grid-corners calibration for photos where the board frame interferes with automatic grid fitting.
v0.1.0
Initial release: detect source Go board photos, count black stones and territory, render result board with black area score.
元数据
Slug count-go-black-stones
版本 0.1.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Count Go Black Stones 是什么?

Count black Go/Weiqi stones from source board photos, estimate black Chinese-area scoring, and render a clean static 19x19 result board image. Use when the u... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 37 次。

如何安装 Count Go Black Stones?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install count-go-black-stones」即可一键安装,无需额外配置。

Count Go Black Stones 是免费的吗?

是的,Count Go Black Stones 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Count Go Black Stones 支持哪些平台?

Count Go Black Stones 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Count Go Black Stones?

由 imcaptor(@imcaptor)开发并维护,当前版本 v0.1.2。

💬 留言讨论