围棋棋谱数据库 logo

围棋棋谱数据库

Community
jiaxiaojunQAQ
围棋棋谱数据库

weiqi-db 围棋棋谱数据库 - 本地棋谱管理工具,支持SGF导入、元数据编辑、标签管理、全文搜索。数据存储于单个JSON文件,AI友好的JSON接口设计。

Overview

PublisherjiaxiaojunQAQ
RepositorySkillCamo
Skill name围棋棋谱数据库
Stars
35
Forks
0
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jiaxiaojunQAQ on GitHub. Read the source before you install it.

Installation

Install the 围棋棋谱数据库 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jiaxiaojunQAQ/SkillCamo/tree/main/data/benchmark/benign_base_100/weiqi-db-1.0.1
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jiaxiaojunQAQ/SkillCamo.git /tmp/SkillCamo
mkdir -p .claude/skills
cp -r /tmp/SkillCamo/data/benchmark/benign_base_100/weiqi-db-1.0.1 .claude/skills/jiaxiaojunqaq-3
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 围棋棋谱数据库 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 围棋棋谱数据库 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 围棋棋谱数据库 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

围棋棋谱数据库 (weiqi-db)

🔒 安全说明: 本技能为纯本地工具,所有数据存储在用户主目录下的 ~/.weiqi-db/database.json,不涉及任何网络请求或外部服务。

本地围棋棋谱数据库,统一收纳来自野狐、本地SGF文件等来源的棋谱,支持全文搜索、标签管理、元数据编辑。

核心特性

  • 单文件存储: 所有数据(含SGF内容)存储在一个JSON文件中
  • AI友好接口: 默认JSON输出,便于程序解析
  • 灵活查询: JSON表达式查询语法,支持精确匹配和模糊搜索
  • 元数据编辑: 支持自动解析SGF + 手动覆盖补充
  • 标签系统: 多标签分类管理

安装依赖

bash
pip3 install tinydb

CLI 接口

初始化数据库

bash
python3 db.py init

创建 ~/.weiqi-db/database.json 空数据库。

添加棋谱

bash
# 添加单个SGF文件
python3 db.py add --file game.sgf --json

# 添加整个目录
python3 db.py add --dir <TEMP_DIR>/foxwq_downloads/2026-03-23/ --tag "野狐" --json

# 添加时补充/覆盖元数据
python3 db.py add --file game.sgf --black "棋手A" --white "棋手B" --event "示例赛事" --json

# 冲突处理策略
python3 db.py add --dir ./downloads/ --conflict skip     # 默认:跳过重复
python3 db.py add --dir ./downloads/ --conflict overwrite # 覆盖已有棋谱
python3 db.py add --dir ./downloads/ --conflict keep      # 保留两者

冲突检测类型:

  • hash: SGF内容完全相同(基于MD5哈希)
  • metadata: 元数据重复(同棋手+同日期+同手数/结果,可能是同一局棋的不同来源)

查询棋谱

bash
# 查询棋手(自动匹配黑棋或白棋)
python3 db.py query --where '{"player": "示例棋手"}' --json

# 查询赛事
python3 db.py query --where '{"event": "示例赛事"}' --json

# 模糊搜索赛事
python3 db.py query --where '{"event~": "联赛"}' --json

# 按标签查询
python3 db.py query --where '{"tags": "名局"}' --json

# 日期范围
python3 db.py query --where '{"date>=": "2026-01-01"}' --json

# 全字段模糊搜索
python3 db.py query --where '{"keyword": "中盘胜"}' --json

# 组合条件
python3 db.py query --where '{"player": "示例棋手", "tags": "名局"}' --json

# AND/OR 组合
python3 db.py query --where '{"$and": [{"player": "示例棋手"}, {"date": "2026-03-23"}]}' --json

列出所有棋谱

bash
python3 db.py list --json
python3 db.py list --limit 10 --json

更新元数据

bash
python3 db.py update --id "2026032383118500" --set '{"black": "修正名", "event": "测试赛事"}' --json

标签管理

bash
# 添加标签
python3 db.py tag --id "xxx" --add "名局" --json

# 移除标签
python3 db.py tag --id "xxx" --remove "测试" --json

删除棋谱

bash
python3 db.py delete --id "xxx" --json

统计信息

bash
python3 db.py stats --json

查询语法(--where 参数)

语法含义示例
{"player": "示例棋手"}棋手名(搜 black 或 white)找该棋手的所有对局
{"black": "黑方"}只搜执黑找黑方执黑的对局
{"white": "白方"}只搜执白找白方执白的对局
{"event": "示例赛事"}赛事精确匹配找特定比赛
{"event~": "示例"}赛事模糊匹配(~后缀)找含"示例"的比赛
{"tags": "名局"}包含标签找标为"名局"的棋
{"date": "2026-03-23"}日期精确匹配找特定日期
{"date>=": "2026-01-01"}日期大于等于日期范围查询
{"keyword": "中盘"}全字段模糊搜索任意字段含"中盘"
{"$and": [{}, {}]}AND 组合同时满足多个条件
{"$or": [{}, {}]}OR 组合满足任一条件

数据格式

数据库文件 ~/.weiqi-db/database.json 结构:

json
{
  "version": 1,
  "games": [
    {
      "id": "2026032383118500",
      "sgf": "(;GM[1]FF[4]...)",
      "black": "棋手A",
      "white": "棋手B",
      "black_rank": "九段",
      "white_rank": "九段",
      "date": "2026-03-23",
      "event": "示例围棋联赛",
      "result": "白中盘胜",
      "komi": "375",
      "movenum": 198,
      "tags": ["联赛", "AI讲解"],
      "hash": "a1b2c3d4...",
      "created": "2026-03-24T12:07:45"
    }
  ]
}

AI 使用示例

用户: "找某棋手的棋"

bash
python3 db.py query --where '{"player": "示例棋手"}' --json

用户: "某杯赛决赛的名局"

bash
python3 db.py query --where '{"event~": "杯赛", "tags": "名局"}' --json

用户: "昨天下的棋"

bash
python3 db.py query --where '{"date": "2026-03-23"}' --json

用户: "把刚才那盘棋标为名局"

bash
python3 db.py tag --id "xxx" --add "名局" --json

技术说明

  • 存储: TinyDB (JSON-based,单文件)
  • 去重: 基于 SGF 内容哈希值
  • 搜索: 内存索引 + 遍历过滤(适合 <10k 数据量)

相关技能

  • weiqi-foxwq - 野狐棋谱下载(棋谱来源)
  • weiqi-yunbisai - 云比赛网查询(比赛信息查询,不提供棋谱下载)

版本更新

v1.0.1 (2026-03-27)

  • ✅ 导入冲突检测功能
    • 支持哈希级重复检测(相同SGF内容)
    • 支持元数据级重复检测(同棋手+同日期)
    • 三种冲突处理策略:skip(跳过)、overwrite(覆盖)、keep(保留两者)

v1.0.0 (2026-03-24)

  • ✅ 初始版本发布
  • ✅ 支持 SGF 导入、元数据编辑、标签管理
  • ✅ JSON 查询语法,AI 友好接口

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the 围棋棋谱数据库 AI skill do?

weiqi-db 围棋棋谱数据库 - 本地棋谱管理工具,支持SGF导入、元数据编辑、标签管理、全文搜索。数据存储于单个JSON文件,AI友好的JSON接口设计。

Why use 围棋棋谱数据库 on TypingMind?

Because you install it once and use it with any model. 围棋棋谱数据库 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 围棋棋谱数据库 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jiaxiaojunQAQ/SkillCamo/tree/main/data/benchmark/benign_base_100/weiqi-db-1.0.1. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use 围棋棋谱数据库?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 围棋棋谱数据库?

As many as you like. As long as a model supports skills, you can use 围棋棋谱数据库 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 围棋棋谱数据库 AI skill free?

It is published on GitHub by jiaxiaojunQAQ. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇