Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Centralize skillify command list in SKILL.md via build-step generator

未关闭
#175 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
64/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
冷清
领域
documentation

调研方向

首先阅读 src/cli/skillify-spec.ts,确认 SKILLIFY_COMMANDS 的来源以及 renderSkillifyCommands() 的输出格式。查看 tests/pi/skillify-spec-drift.test.ts 和 package.json 中的构建脚本,以匹配现有的 drift-test 和 build-step 模式。然后在三个 SKILL.md 文件中添加/验证命令标记,实现 scripts/sync-md-commands.mjs,运行 npm run build,并确保 tests/ 下的测试能够捕获 SKILL.md 的任何手动 drift。

由索引模型根据 Issue 内容生成。

描述

Context

PR #129 introduced SKILLIFY_COMMANDS in src/cli/skillify-spec.ts — the single source of truth for the hivemind skillify ... command list. As part of #129 we centralized all TypeScript-side consumers of that list:

  • 4 per-agent SessionStart inject blocks (claude-code, codex, cursor, hermes) via renderSkillifyCommands()
  • The pi inline mirror in pi/extension-source/hivemind.ts (guarded by a drift test in tests/pi/skillify-spec-drift.test.ts)
  • hivemind --help top-level output in src/cli/index.ts (centralized in #129 as part of the kaghni feedback)
  • hivemind skillify --help usage() in src/commands/skillify.ts (centralized in #129)

What remains hand-typed are the 3 shipped SKILL.md files:

  • claude-code/skills/hivemind-memory/SKILL.md — ## Skill Management (skillify) section
  • codex/skills/deeplake-memory/SKILL.md — same block
  • openclaw/skills/SKILL.md — same block (pre-dates #129, on main since April)

These can't be solved the same way as the TS callers because SKILL.md is shipped Markdown — it can't import TypeScript at runtime. We need a build-step generator.

Proposed approach

  1. Markers in each SKILL.md — wrap the command block in HTML-comment markers so the generator can locate it deterministically without ambiguity:

    <!-- SKILLIFY_COMMANDS_START -->
    - `hivemind skillify` — show current scope...
    ...
    <!-- SKILLIFY_COMMANDS_END -->
    
  2. Generator script — add scripts/sync-md-commands.mjs that:

    • Imports the compiled SKILLIFY_COMMANDS from bundle/cli.js (or dist/skillify-spec.js)
    • Renders the block in the same bullet format the SKILL.md files use today
    • Rewrites the content between <!-- SKILLIFY_COMMANDS_START --> / END in all 3 files
  3. Wire into npm run build — append node scripts/sync-md-commands.mjs to the build pipeline so the markdown can't drift in CI.

  4. Drift detection test — under tests/, mirror the structure of tests/pi/skillify-spec-drift.test.ts: read each SKILL.md, parse the block between markers, assert it matches what renderSkillifyCommands() would produce. Fails CI if a developer edits the markdown by hand and skips the build.

  5. Same pattern for ORG_COMMANDS (optional, can be a separate sub-task) — the org/auth command list (hivemind login, whoami, org list, …) is hand-typed in the same 3 SKILL.md files plus the per-agent SessionStart hooks. Extracting an ORG_COMMANDS constant and applying the same generator closes the symmetric debt.

Why a separate PR

  • Scope: #129 ships the hivemind skillify mine-local user-facing feature. Wiring a Markdown generator + drift test would tangle the build pipeline with the feature work and expand the review surface significantly.
  • Risk surface: A scripts/sync-md-commands.mjs + npm run build change touches CI and can break the release flow. Worth landing on its own branch where it's the focus.
  • Independence: This change has zero behavior impact on the mine-local feature — it's pure documentation upkeep.

Acceptance criteria

  • All 3 SKILL.md files have the skillify command block generated from SKILLIFY_COMMANDS
  • npm run build regenerates the blocks deterministically
  • Drift test fails if a SKILL.md block is edited by hand and not regenerated
  • Optionally: same applied to org/auth commands via ORG_COMMANDS

Reference

主要语言
TypeScript
星标
1.6k
派生
112
平均合并
19 小时 9 分钟
30 天内合并 PR
11

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

activeloopai/hivemind 的其他 Issue

查看 activeloopai/hivemind 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。