[PR #56] feat(cli): support CLAWDHUB_DIR env var and config.json for skills directory #235

Open
opened 2026-02-15 17:16:24 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/clawhub/pull/56
Author: @shellbytherobot
Created: 1/27/2026
Status: 🔄 Open

Base: mainHead: feat/configurable-skills-dir


📝 Commits (1)

  • 49c6afe feat(cli): support CLAWDHUB_DIR env var and config.json for skills directory

📊 Changes

3 files changed (+6 additions, -3 deletions)

View changed files

📝 packages/clawdhub/README.md (+1 -1)
📝 packages/clawdhub/src/cli.ts (+4 -2)
📝 packages/clawdhub/src/schema/schemas.ts (+1 -0)

📄 Description

Summary

Add support for configuring the skills install directory via:

  • CLAWDHUB_DIR environment variable
  • dir field in config.json

Priority order: CLI flag (--dir) > ENV > config > default (skills)

Motivation

The current default of skills/ conflicts with hand-written local skills. Users can set dir: ".clawdhub/skills" in their config to keep installed skills alongside the lockfile, making it easy to gitignore the entire .clawdhub/ directory.

Changes

  • src/schema/schemas.ts: Add optional dir field to GlobalConfigSchema
  • src/cli.ts: Check env var and config when resolving skills directory
  • README.md: Document the new options

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/clawhub/pull/56 **Author:** [@shellbytherobot](https://github.com/shellbytherobot) **Created:** 1/27/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/configurable-skills-dir` --- ### 📝 Commits (1) - [`49c6afe`](https://github.com/openclaw/clawhub/commit/49c6afe764855519391bff27216f91bd56bb6e42) feat(cli): support CLAWDHUB_DIR env var and config.json for skills directory ### 📊 Changes **3 files changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/clawdhub/README.md` (+1 -1) 📝 `packages/clawdhub/src/cli.ts` (+4 -2) 📝 `packages/clawdhub/src/schema/schemas.ts` (+1 -0) </details> ### 📄 Description ## Summary Add support for configuring the skills install directory via: - `CLAWDHUB_DIR` environment variable - `dir` field in `config.json` **Priority order**: CLI flag (`--dir`) > ENV > config > default (`skills`) ## Motivation The current default of `skills/` conflicts with hand-written local skills. Users can set `dir: ".clawdhub/skills"` in their config to keep installed skills alongside the lockfile, making it easy to gitignore the entire `.clawdhub/` directory. ## Changes - `src/schema/schemas.ts`: Add optional `dir` field to GlobalConfigSchema - `src/cli.ts`: Check env var and config when resolving skills directory - `README.md`: Document the new options --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:16:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#235