gitbyeos/open-part-skills · Archived

similar-judge

对比两份文本差异,输出相似度与词级差异 JSON。当 agent 需要量化产物与目标的文本差距时使用

First seen Jul 5, 2026

Installation

$ npx skills add gitbyeos/open-part-skills --skill similar-judge

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from gitbyeos/open-part-skills · top by installs.

npx skills add gitbyeos/open-part-skills

Browse all from gitbyeos/open-part-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 40
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,031 B
  • docs SUMMARY.md 147 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Similar Judge

量化两份文本的差异。输入产物与目标,输出 JSON:相似度 + 词级差异原文。

只量差异,不评质量。相似度高不等于内容正确(可能因果倒置、数量级错误),质量判断交给上层 LLM。

调用

# 默认输出 JSON
{skill}/bin/similar-judge 产物.txt 目标.txt

# 调试模式(人类可读)
{skill}/bin/similar-judge 产物.txt 目标.txt --text

参数顺序固定:先产物,后目标。目标为基准。默认忽略空白差异(git -w 口径)。

JSON 字段

{
  "line_sim_ratio": 0.5,
  "word_sim_ratio": 0.8103,
  "target_lines": 20,
  "product_lines": 20,
  "added_lines": 10,
  "deleted_lines": 10,
  "diff_chars": 386,
  "diff": "# 用户中心\n[-用户中心提供登录注册功能。-]{+用户中心负责身份认证与会话管理。+}\n..."
}
字段 含义
linesimratio 行级相似度,对行顺序错位敏感
wordsimratio 词级相似度,跟人眼感受一致,推荐主指标
targetlines / productlines 两侧行数
addedlines / deletedlines 产物冗余 / 产物遗漏的行数
diff_chars diff 字段字符长度,供 LLM 预判体量
diff git word-diff 内容,含 [-old-]{+new+} 词级标记

边界

能做:相似度计算、增删行数统计、词级差异原文输出

不做:质量评判、事实核查、优化建议、闭环决策,交给 LLM

硬性规则

  • 默认输出 JSON,--text 仅调试用
  • diff 字段剥掉 git 元数据 header,只留 word-diff 内容
  • 不输出评判语义文案("质量高/低"等),避免误导上层
  • 不修改产物与目标,只读