subzeroclaw-contribute

SubZeroClaw 开发:用于开发约单文件 550 行的 C 语言智能体运行时。在修改 src/subzeroclaw.c 或 src/test.c 之前应先加载此文件;它承载反框架理念、包含代码地图(主循环、配置、shell 工具、异步压缩)、说明哪些内容会或不会被合并,以及构建/测试流程。仅需运行或配置请使用 subzeroclaw-use。

仓库最近推送
GitHub Stars
140
Forks
18
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "subzeroclaw-contribute":https://skillpi.com/zh/skills/deepskill-6097a18fb70939720331e19adc1b91ceb99605d5ab2109c62a606de887ff33ea。安装前核对上游来源和版本:https://github.com/genlayerlabs/subzeroclaw。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

SubZeroClaw 开发:用于开发约单文件 550 行的 C 语言智能体运行时。在修改 src/subzeroclaw.c 或 src/test.c 之前应先加载此文件;它承载反框架理念、包含代码地图(主循环、配置、shell 工具、异步压缩)、说明哪些内容会或不会被合并,以及构建/测试流程。仅需运行或配置请使用 subzeroclaw-use。

0 下载

介绍来源: third_party · genlayerlabs · 0.0.1 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: subzeroclaw-contribute
description: >-
  Develop SubZeroClaw — the single-file ~550-line C agentic runtime. Load this
  before changing src/subzeroclaw.c or src/test.c: it carries the anti-framework
  thesis (the goal is NOT to grow), the code map (the loop, config, the shell
  tool, async compaction), what will and won't be merged, and the build/test
  loop. To merely run or configure SubZeroClaw, use subzeroclaw-use.

Contributing to SubZeroClaw

SubZeroClaw is an anti-framework: the goal is not to grow but to stay minimal, readable and correct. The whole runtime is one file, src/subzeroclaw.c (~550 lines). Before you add anything, read CONTRIBUTING.md — a PR that adds surface has to clear a high bar, and several categories are refused outright.

The two contributions that are welcome

  1. Reduce complexity — same behaviour with less code, fewer moving parts, or clearer logic: remove a function that doesn't earn its place, flatten a control path, drop a dependency or an allocation, replace a hand-rolled pattern with libc. A PR that removes lines while keeping tests green is probably good.
  2. Prove a runtime limitation — a task where "skill + shell + LLM loop" genuinely breaks down in the runtime, not the skill. The honest test: could a better .md skill fix it? If yes, it's a skill problem, not a SubZeroClaw one. If the limitation is structural (e.g. binary tool output can't round-trip through the JSON string protocol), that's worth discussing. Open an issue with the task, the skill you wrote, what happened, and why no skill can work around it.

Won't be merged: new tools (the shell is the only tool — the model runs git, tee, curl itself); plugin systems, hooks, event buses, middleware (multi-user platform problems SubZeroClaw doesn't have); backward-compatibility shims.

Code map (src/subzeroclaw.c)

The loop, top to bottom:

Function Role
config_parse_line / config_load parse the config keys; env overrides; scrub the four provider secrets (SUBZEROCLAW_API_KEY/_ENDPOINT/_REQUEST_EXTRA/_COMPACT_EXTRA) from the environment (wipe-in-place + unsetenv) so the model's shell never sees the key. SUBZEROCLAW_SKILLS is preserved on purpose.
main read config + skills, build the system prompt, seed the message array, drive the loop.
agent_run the turn loop: POST to endpoint, parse, dispatch tools, until a stop or max_turns.
parse_response pull assistant text / tool calls / errors out of the completion JSON.
process_tool_calls the one tool: run each shell command via popen() (stderr merged), append results as turns.
round_has_command guard: did this round actually request a shell command?
compact_fire / compact_splice / compact_url async context sealing: on the router's x_router.compact signal, fire /v1/compact in the background and splice the sealed block in ahead of intervening turns — no turn is ever blocked.
log_write, write_temp, mkdirp session logging + scratch files.

cJSON is vendored (src/cJSON.c/.h) and used automatically when system libcjson is absent (the Makefile detects it via pkg-config).

Build & test

make            # single-file build → subzeroclaw (needs gcc; -lm or -lcjson)
make test       # builds test_subzeroclaw and runs the suite → "31 passed, 0 failed"
make install    # → ~/.local/bin/
make clean

src/test.c #includes src/subzeroclaw.c directly and defines SZC_TEST to exclude main, so tests link against the real functions. All 31 tests must pass, and if you change subzeroclaw.c you must update test.c to match — the suite covers the shell tool, turn framing, request building + request_extra merge, response/error parsing, the compact flag + splice, tool dispatch, the system prompt, skill loading, and config (including the env scrub).

The bar, restated

Every line justifies its existence. The code that remains is the code that can't be removed. If your change grows the file, the burden is on you to show the runtime — not a skill — needed it. See CONTRIBUTING.md for the full policy.

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

亮点

  • 提供清晰的开源项目贡献规范与代码地图,帮助开发者高效参与 SubZeroClaw 开发
触发精准95/100

亮点

  • 触发词精准完整,覆盖 develop/contribute/build/test/modify 等多种变体,边界清晰
结构规范92/100

亮点

  • Phase/步骤清晰,含端到端示例与准入门槛说明,frontmatter 完整
执行可靠88/100

亮点

  • 工具来源明确,关键操作(如 env scrub)有安全确认机制,测试覆盖全面
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。