Skip to content

feat(zeroclaw): add native skills install support#1053

Open
Ayush7614 wants to merge 6 commits into
EveryInc:mainfrom
Ayush7614:feat/zeroclaw-native-skills-install
Open

feat(zeroclaw): add native skills install support#1053
Ayush7614 wants to merge 6 commits into
EveryInc:mainfrom
Ayush7614:feat/zeroclaw-native-skills-install

Conversation

@Ayush7614

@Ayush7614 Ayush7614 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add native ZeroClaw support via workspace skills discovery (no Bun --to zeroclaw converter), following the same strategy used for OpenCode, Pi, and Cline
  • Ship .zeroclaw/scripts/install-skills.sh to copy CE skills/ directories into ~/.zeroclaw/workspace/skills/ (ZeroClaw rejects symlinked skill dirs at audit time)
  • Document install, allow_scripts requirement, pinning, local dev, and uninstall in .zeroclaw/INSTALL.md and docs/specs/zeroclaw.md
  • Update README install sections and the native-plugin install strategy doc

Approach

ZeroClaw loads skills from SKILL.md directories under the agent workspace. This PR intentionally avoids a converter target. The installer copies each skill (using zeroclaw skills install when the CLI is available, with cp -R fallback) and skips manual-only skills by default, with --include-manual opt-in.

Users must set [skills] allow_scripts = true in ~/.zeroclaw/config.toml — many CE skills ship bundled shell/Python scripts that ZeroClaw blocks otherwise.

Test plan

  • ZEROCLAW_SKILLS_DIR=... ./.zeroclaw/scripts/install-skills.sh --global copies 20 invocable skills (smoke-tested locally)
  • bun run release:validate passes
  • bun test tests/release-components.test.ts passes

Ship ZeroClaw install docs, a copy-based skills installer, and release
component mapping so CE skills load through ZeroClaw workspace discovery
without a Bun converter target. ZeroClaw rejects symlinked skills; users
must enable [skills] allow_scripts for CE bundled scripts.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70d5be4cae

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .zeroclaw/scripts/install-skills.sh Outdated
ZeroClaw skills install always writes to config.data_dir, so returning
early after a successful CLI install left --dir and ZEROCLAW_SKILLS_DIR
destinations empty. Restrict zeroclaw CLI to default global path only.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9450143e5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .zeroclaw/scripts/install-skills.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5ef2d39b7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .zeroclaw/scripts/install-skills.sh Outdated
ZeroClaw agents load skills from agents/<alias>/workspace/skills, not the
legacy workspace/skills tree or data_dir/skills where the CLI installs.
Default --global now maps to the default agent workspace; add --agent and
--shared modes and drop zeroclaw skills install from the script.
@Ayush7614 Ayush7614 force-pushed the feat/zeroclaw-native-skills-install branch from f5ef2d3 to c87169a Compare July 1, 2026 09:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c87169aee5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .zeroclaw/scripts/install-skills.sh Outdated
exit 1
fi
else
DESTS+=("$INSTALL_ROOT/agents/$AGENT_ALIAS/workspace/skills")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refuse unknown agent aliases

When --global runs before quickstart has created default, or when --agent is misspelled, this still appends a destination and install_to_dest later mkdir -ps it and reports success. ZeroClaw's schema defines agents through the [agents.<alias>] map ("Aliased agents in this install" in crates/zeroclaw-config/src/schema.rs), so merely creating agents/<alias>/workspace/skills does not configure an agent to load those skills; these installs silently land in an unused tree instead of failing like --agent all already does when no agents exist.

Useful? React with 👍 / 👎.

Merge upstream main (Antigravity one-command install, skill updates).
Honor ZEROCLAW_CONFIG_DIR for install root resolution, refuse unknown
agent aliases, and document both in INSTALL.md and docs/specs/zeroclaw.md.
@Ayush7614

Copy link
Copy Markdown
Contributor Author

cc: @tmchow

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90a5757b68

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .zeroclaw/scripts/install-skills.sh Outdated
ZeroClaw skill bundle aliases must match [a-z0-9][a-z0-9_]{0,62};
hyphenated compound-engineering could not be referenced in config.toml.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f03ad3765f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +31 to +35
if [[ -n "${ZEROCLAW_CONFIG_DIR:-}" ]]; then
expand_path "$ZEROCLAW_CONFIG_DIR"
return
fi
printf '%s\n' "$HOME/.zeroclaw"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor ZeroClaw data-dir profiles

The fresh gap after the config-dir fix is that users who run ZeroClaw with ZEROCLAW_DATA_DIR (or the still-supported legacy ZEROCLAW_WORKSPACE) fall through to $HOME/.zeroclaw, so the installer can copy all CE skills into a different agent tree while reporting success. I checked ZeroClaw's resolve_runtime_config_dirs, which resolves ZEROCLAW_CONFIG_DIR first, then ZEROCLAW_DATA_DIR, then ZEROCLAW_WORKSPACE, before defaulting; a temp smoke test with ZEROCLAW_DATA_DIR=/tmp/profile/data installed 20 skills under $HOME/.zeroclaw and none under the profile. Mirror that precedence here unless ZEROCLAW_INSTALL_ROOT is set.

Useful? React with 👍 / 👎.

@tmchow

tmchow commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks for pushing this through the earlier path fixes. I think ZeroClaw support is worth having if it stays this shape: native skills install, docs, and release metadata only. Avoiding a converter target is the right call.

I would not merge this yet though. Two install path cases still look wrong:

  1. The installer only honors ZEROCLAW_CONFIG_DIR. ZeroClaw also resolves profiles through ZEROCLAW_DATA_DIR and the legacy ZEROCLAW_WORKSPACE before falling back to ~/.zeroclaw. With ZEROCLAW_DATA_DIR set, this script looks in the default home install instead of the active profile, so it can fail or install into the wrong tree.

  2. The installer always writes to <install>/agents/<alias>/workspace/skills. ZeroClaw's agent_workspace_dir() also honors [agents.<alias>.workspace.path]. If an agent has a custom workspace path, this script reports a successful install into the derived default path, but the agent will load skills from the custom path instead.

I reproduced both cases against the current PR script in temp roots. The custom workspace case installed 20 skills into the default derived path and 0 into the workspace path ZeroClaw would actually read.

Could you fix those two resolver cases and add a small script test around them? The rest of the shape looks fine to me: CI is green, release:validate passes, and mapping .zeroclaw/ to the root component is the right release behavior.

Match ZeroClaw env precedence (CONFIG_DIR > DATA_DIR > WORKSPACE),
resolve DATA_DIR through the same config-dir-for-data helper, install
into [agents.<alias>.workspace.path] when set, and add script tests.
@Ayush7614

Ayush7614 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both install-path cases from @tmchow's review in abbd338:

  1. Install root env precedence — the installer now mirrors ZeroClaw runtime resolution: ZEROCLAW_CONFIG_DIR > ZEROCLAW_DATA_DIR > ZEROCLAW_WORKSPACE > ~/.zeroclaw. For DATA_DIR / WORKSPACE, it uses the same resolve_config_dir_for_data helper (config at the data root, or legacy parent/.zeroclaw when data lives under .../data).

  2. Custom agent workspace paths — installs no longer always target <install>/agents/<alias>/workspace/skills. The script reads [agents.<alias>.workspace.path] from config.toml and copies into <that-path>/skills when set, matching agent_workspace_dir().

Added tests/zeroclaw-install-skills.test.ts covering both resolver paths (DATA_DIR layouts, CONFIG_DIR precedence, and custom workspace.path). Docs updated in .zeroclaw/INSTALL.md, docs/specs/zeroclaw.md, and the native install strategy doc.

CI and release:validate pass on the branch.

cc: @tmchow

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: abbd338545

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +176 to +179
/^\[agents\./ {
in_agent = ($0 == "[agents." alias "]" || $0 == "[agents.\"" alias "\"]")
in_workspace = ($0 == "[agents." alias ".workspace]" || $0 == "[agents.\"" alias "\".workspace]")
next

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset the TOML section state on all table headers

When a config has [agents.default.workspace] without its own path and a later unrelated table with a path key, this parser keeps in_workspace true because only [agents.*] headers reset the state. The installer then treats that unrelated path (for example a logging or identity path) as the agent workspace and copies all CE skills under <that>/skills, reporting success while the actual agent workspace remains unchanged.

Useful? React with 👍 / 👎.

Comment on lines +181 to +183
in_workspace && /^[ \t]*path[ \t]*=/ {
sub(/^[ \t]*path[ \t]*=[ \t]*/, "")
print unquote($0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip TOML comments before using workspace path

If the workspace override uses valid TOML with an inline comment, such as path = "/srv/zc/default" # workspace, this branch passes the whole remainder to unquote; because the value no longer matches a fully quoted string, the returned path still contains the quotes and comment. agent_skills_dir then appends /skills and installs into a bogus directory, so users with commented config lines get a successful install that ZeroClaw will not load.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants