holy-agents-kits 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -178,6 +178,12 @@ https://github.com/monsterbude123/holy-agents-kits/issues/new
178
178
  npx holy-agents-kits feedback
179
179
  ```
180
180
 
181
+ 这个入口跟着技能走,其他机器上的 agent 也能看到:
182
+
183
+ - 每个 `SKILL.md` 末尾有一行仓库级反馈入口,技能被复制到哪都带着它
184
+ - 安装器每次安装都会打印入口,并在安装目录根下写一份 `FEEDBACK.md`
185
+ - `list` 与 `feedback` 命令都会打印入口
186
+
181
187
  标题前缀写技能名(如 `[git-selective-branch-sync]`),跨技能问题写 `[kit]`。正文写清:哪份文件、任务原话、实际报错原文、期望结果、环境。不要贴凭据、token、内网地址或私有代码。
182
188
 
183
189
  完整说明见 [FEEDBACK.md](FEEDBACK.md)。
package/bin/cli.js CHANGED
@@ -109,6 +109,7 @@ function cmdList() {
109
109
  for (const name of names) {
110
110
  console.log(name.padEnd(width) + summarize(name));
111
111
  }
112
+ console.log("\n反馈:" + FEEDBACK_URL + "(技能写错、缺步骤、命令跑不通,直接开 issue)");
112
113
  return 0;
113
114
  }
114
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holy-agents-kits",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Agent Skills 合集:Jenkins 流水线、Jenkins 控制器、new-api 应用与 CLI、代码图谱分析、选择性分支同步、Skill 开发与校验。一条命令装进你的 agent。",
5
5
  "bin": {
6
6
  "holy-agents-kits": "bin/cli.js"
@@ -13,7 +13,9 @@
13
13
  "LICENSE"
14
14
  ],
15
15
  "scripts": {
16
- "test": "node bin/cli.js list"
16
+ "check": "python skills/skill-creator-v2/scripts/validate_skill.py --all --root .",
17
+ "test": "npm run check && node bin/cli.js list",
18
+ "prepublishOnly": "npm run check"
17
19
  },
18
20
  "engines": {
19
21
  "node": ">=16"
@@ -136,3 +136,5 @@ codegraph_explore({
136
136
 
137
137
  - GitHub:`https://github.com/colbymchenry/codegraph`
138
138
  - 索引:`.codegraph/codegraph.db`(SQLite 单文件,FTS5 全文索引 + 向量)
139
+
140
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -146,3 +146,5 @@ Non-negotiables: secrets stay server-side, `state` / PKCE are validated on callb
146
146
  | `api:write` | Non-read AI endpoints (chat, images, embeddings, ...) and plan/product/top-up checkout |
147
147
 
148
148
  These scopes belong to OAuth access tokens only. Dashboard PATs use a separate catalog (`profile:*`, `wallet:*`, `billing:*`, ...); list it with `GET /api/user/access_tokens/scopes`. Per-App model restriction (`ai_model_whitelist`) and scope details: `references/playbook.md` § Scopes Reference.
149
+
150
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -137,3 +137,5 @@ If `auth status` reports `not_logged_in`, run `auth login`. If a call returns
137
137
  | `references/commands.md` | need an exact flag, a plan/product/oauth-app example, or update semantics |
138
138
  | `references/scopes.md` | a call returns 403, or you need to know which scope a command needs |
139
139
  | `references/api.md` | the endpoint has no subcommand; OAuth-app raw calls; `self.id` vs `auth.users.id` |
140
+
141
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -147,7 +147,7 @@ python <skill-dir>/scripts/parity_check.py --help # 逐路径完整性核对
147
147
 
148
148
  - `references/decision-rules.md` —— 解冲突的判断依据:同一文件两边都改时谁做骨架、
149
149
  语义移植的标准做法、结构化文件怎么合、凭据怎么迁。**开始解冲突前读。**
150
- - `references/pitfalls.md` —— 实战踩坑集:每条是「现象 → 根因 → 判据 → 修法」。
151
- **动手前扫一遍,能省掉整轮返工。**
152
- - `references/verification.md` —— 五层验证清单与每层的判定标准。
153
- **声称「搬完了」之前读。**
150
+ - `references/pitfalls.md` —— 实战踩坑集:每条是「现象 → 根因 → 判据 → 修法」。**动手前扫一遍,能省掉整轮返工。**
151
+ - `references/verification.md` —— 五层验证清单与每层的判定标准。**声称「搬完了」之前读。**
152
+
153
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -64,3 +64,5 @@ python scripts/generate_shared_library.py --name <lib> --package <pkg>
64
64
  | `references/dood-and-gitlab.md` | 流水线要操作宿主 docker、接 GitLab 私有仓库或 webhook |
65
65
  | `references/lint-rules.md` | 判断一条 lint 规则该不该修、判级边界 |
66
66
  | `references/troubleshooting.md` | 流水线按症状排障;控制器问题转 `jenkins-controller` |
67
+
68
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -83,3 +83,5 @@ verify-controller.sh → 失败项落到具体分区 → 按 troubleshooting 修
83
83
  |---|---|
84
84
  | `references/controller-container.md` | 部署/迁移的完整做法:uid/gid 对齐、sudoers、systemd 与 pid:host、init.groovy.d 收敛、迁卷、切上游 |
85
85
  | `references/troubleshooting.md` | 按症状查控制器故障(sudo/systemd/匿名可读/nginx 502/脚本没生效) |
86
+
87
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -110,7 +110,7 @@ description: 创建、改造与评测 Agent Skill——生成技能骨架、把
110
110
  | 脚本 | 用途 |
111
111
  |---|---|
112
112
  | `scripts/skill_schema.py` | skill 定义的固有 schema:frontmatter 解析、章节切分、引用扫描、校验规则 |
113
- | `scripts/validate_skill.py` | 全量校验(行数、frontmatter、引用完整性、代码外泄) |
113
+ | `scripts/validate_skill.py` | 全量校验(行数、frontmatter、引用完整性、代码外泄、末尾反馈入口) |
114
114
  | `scripts/scaffold_skill.py` | 生成三段式技能骨架 |
115
115
  | `scripts/split_skill.py` | SKILL.md 超长时自动抽到 `references/`,原处留引用 |
116
116
  | `scripts/quick_validate.py` | 单技能快速校验(薄封装) |
@@ -123,8 +123,8 @@ description: 创建、改造与评测 Agent Skill——生成技能骨架、把
123
123
  | `scripts/utils.py` | 公共解析工具(内部模块) |
124
124
 
125
125
  ```bash
126
- # 校验仓库内全部技能
127
- python .agents/skills/skill-creator/scripts/validate_skill.py --all --root .
126
+ # 仓库门禁:校验全部技能,并检查每个 SKILL.md 末尾的反馈入口
127
+ python .agents/skills/skill-creator-v2/scripts/validate_skill.py --all --root .
128
128
 
129
129
  # 生成骨架
130
130
  python .agents/skills/skill-creator/scripts/scaffold_skill.py skills new-skill --description "一句话说明"
@@ -148,4 +148,6 @@ python .agents/skills/skill-creator/scripts/split_skill.py skills/new-skill --ma
148
148
  - `references/quality-gates.md` —— 全部校验项、错误含义与修法;**校验报错时查这里**。
149
149
  - `references/environments.md` —— Claude.ai / Cowork / 本仓的环境差异与降级路径。
150
150
  - `references/schemas.md` —— evals.json / grading.json / timing.json 的 JSON 结构。
151
- - `references/benchmark-schemas.md` —— benchmark.json / comparison.json / analysis.json 的 JSON 结构。
151
+ - `references/benchmark-schemas.md` —— benchmark.json / comparison.json / analysis.json 的 JSON 结构。
152
+
153
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:https://github.com/monsterbude123/holy-agents-kits/issues/new
@@ -22,7 +22,7 @@ def main(argv=None) -> int:
22
22
  return 2
23
23
 
24
24
  try:
25
- info = validate_skill(Path(argv[0]))
25
+ info = validate_skill(Path(argv[0]), require_feedback=True)
26
26
  except FileNotFoundError as exc:
27
27
  print(str(exc))
28
28
  return 1
@@ -16,6 +16,10 @@ import re
16
16
  import sys
17
17
  from pathlib import Path
18
18
 
19
+ sys.path.insert(0, str(Path(__file__).resolve().parent))
20
+
21
+ from skill_schema import FEEDBACK_URL # noqa: E402
22
+
19
23
  SKILL_MD_TEMPLATE = """---
20
24
  name: {name}
21
25
  description: {description}
@@ -66,6 +70,8 @@ python scripts/<name>.py --help
66
70
  <!-- 详细协议、错误码、参数表等按需读取;每条都要写清「什么时候读」。 -->
67
71
 
68
72
  - `references/<topic>.md` —— <何时读它>
73
+
74
+ > 反馈:本技能来自 [holy-agents-kits](https://github.com/monsterbude123/holy-agents-kits)。发现错误、缺步骤或命令跑不通,直接开 issue:{feedback_url}
69
75
  """
70
76
 
71
77
  REFERENCES_INDEX_TEMPLATE = """# references 索引
@@ -119,7 +125,8 @@ def main(argv=None) -> int:
119
125
  (skill_dir / "scripts").mkdir(exist_ok=True)
120
126
 
121
127
  skill_md.write_text(
122
- SKILL_MD_TEMPLATE.format(name=name, description=description, title=title),
128
+ SKILL_MD_TEMPLATE.format(name=name, description=description, title=title,
129
+ feedback_url=FEEDBACK_URL),
123
130
  encoding="utf-8",
124
131
  )
125
132
  (skill_dir / "references" / "INDEX.md").write_text(REFERENCES_INDEX_TEMPLATE, encoding="utf-8")
@@ -48,6 +48,10 @@ EXEMPT_REFERENCE_NAMES = frozenset({"INDEX.md", "README.md"})
48
48
  # scripts/ 下免于「必须被正文引用」检查的文件(包标记)
49
49
  EXEMPT_SCRIPT_NAMES = frozenset({"__init__.py"})
50
50
 
51
+ # 本仓约定:每个 SKILL.md 末尾必须带仓库级反馈入口,随技能分发到任何机器
52
+ FEEDBACK_URL = "https://github.com/monsterbude123/holy-agents-kits/issues/new"
53
+ FEEDBACK_FOOTER_PREFIX = "> 反馈:"
54
+
51
55
  # SKILL.md 正文里不允许内嵌可执行代码块——代码必须落在 scripts/
52
56
  CODE_FENCE_LANGUAGES = ("python", "py", "bash", "sh", "shell", "javascript", "ts", "typescript")
53
57
 
@@ -306,9 +310,14 @@ def load_skill(skill_dir: Path) -> SkillInfo:
306
310
 
307
311
 
308
312
  def validate_skill(
309
- skill_dir: Path, max_lines: int = DEFAULT_SKILL_MD_MAX_LINES
313
+ skill_dir: Path,
314
+ max_lines: int = DEFAULT_SKILL_MD_MAX_LINES,
315
+ require_feedback: bool = False,
310
316
  ) -> SkillInfo:
311
- """执行全部校验,返回带 issues 的 SkillInfo。"""
317
+ """执行全部校验,返回带 issues 的 SkillInfo。
318
+
319
+ require_feedback=True 时额外检查 SKILL.md 末尾的仓库级反馈入口(本仓门禁)。
320
+ """
312
321
  skill_dir = Path(skill_dir)
313
322
  info = load_skill(skill_dir)
314
323
 
@@ -417,6 +426,18 @@ def validate_skill(
417
426
  % (len(blocks), langs),
418
427
  )
419
428
 
429
+ # ---- 反馈入口(本仓门禁) ------------------------------------------
430
+ # 放在正文最后一行,技能被复制到任何机器的技能目录时都带着它。
431
+ if require_feedback:
432
+ tail = next((line for line in reversed(info.body_lines) if line.strip()), "")
433
+ if not tail.lstrip().startswith(FEEDBACK_FOOTER_PREFIX) or FEEDBACK_URL not in tail:
434
+ add(
435
+ "error",
436
+ "feedback.footer",
437
+ "SKILL.md 末尾缺少仓库级反馈入口:最后一行应为「%s本技能来自 ...,发现错误、缺步骤或命令跑不通,"
438
+ "直接开 issue:%s」" % (FEEDBACK_FOOTER_PREFIX, FEEDBACK_URL),
439
+ )
440
+
420
441
  return info
421
442
 
422
443
 
@@ -27,12 +27,15 @@ from skill_schema import ( # noqa: E402
27
27
  LEVEL_MARK = {"error": "[ERROR]", "warn": "[WARN] "}
28
28
 
29
29
 
30
- def format_report(info) -> str:
30
+ def format_report(info, require_feedback: bool = False) -> str:
31
31
  lines = ["技能:%s" % info.path.name]
32
32
  lines.append(" name: %s" % (info.name or "<缺失>"))
33
33
  lines.append(" 正文行数: %d(上限 %d)" % (info.body_line_count, DEFAULT_SKILL_MD_MAX_LINES))
34
34
  lines.append(" 引用: %d 个 references/,%d 个 scripts/" % (
35
35
  len(info.referenced_references), len(info.referenced_scripts)))
36
+ if require_feedback:
37
+ has_footer = any(i.code == "feedback.footer" for i in info.issues)
38
+ lines.append(" 反馈入口: %s" % ("缺失" if has_footer else "有"))
36
39
  if not info.issues:
37
40
  lines.append(" ✓ 通过")
38
41
  return "\n".join(lines)
@@ -51,6 +54,10 @@ def main(argv=None) -> int:
51
54
  parser.add_argument("--max-lines", type=int, default=DEFAULT_SKILL_MD_MAX_LINES,
52
55
  help="SKILL.md 正文行数上限(默认 %d)" % DEFAULT_SKILL_MD_MAX_LINES)
53
56
  parser.add_argument("--json", action="store_true", help="以 JSON 输出")
57
+ parser.add_argument("--require-feedback", action="store_true",
58
+ help="检查 SKILL.md 末尾的仓库级反馈入口(--all 时默认开启)")
59
+ parser.add_argument("--no-feedback-check", action="store_true",
60
+ help="跳过仓库级反馈入口检查(默认 --all 时开启)")
54
61
  args = parser.parse_args(argv)
55
62
 
56
63
  targets = [Path(t) for t in args.targets]
@@ -61,11 +68,14 @@ def main(argv=None) -> int:
61
68
  print("错误:需要指定技能目录,或使用 --all", file=sys.stderr)
62
69
  return 2
63
70
 
71
+ require_feedback = (args.all or args.require_feedback) and not args.no_feedback_check
72
+
64
73
  reports = []
65
74
  failed = False
66
75
  for target in targets:
67
76
  try:
68
- info = validate_skill(target, max_lines=args.max_lines)
77
+ info = validate_skill(target, max_lines=args.max_lines,
78
+ require_feedback=require_feedback)
69
79
  except FileNotFoundError as exc:
70
80
  reports.append({"skill": str(target), "error": str(exc)})
71
81
  failed = True
@@ -79,7 +89,7 @@ def main(argv=None) -> int:
79
89
  if any(i.level == "error" for i in info.issues):
80
90
  failed = True
81
91
  if not args.json:
82
- print(format_report(info))
92
+ print(format_report(info, require_feedback))
83
93
  print("")
84
94
 
85
95
  if args.json: