← 返回 Skills 市场
hbkwong

Box

作者 Andrew · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
662
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install box-cli
功能描述
Box CLI skill for working with files, folders, metadata, search, and Box AI in headless environments.
使用说明 (SKILL.md)

box

Use the official box CLI to interact with the Box API from OpenClaw.

This skill is designed for headless deployments (e.g. Railway, CI, servers). It does not use OAuth login flows or short-lived developer tokens.

Instead, it expects Bring Your Own Credentials using:

  • Client Credentials Grant (CCG) --- recommended
  • JWT Server Auth --- optional

🔐 Authentication (Bring Your Own Credentials)

This skill does not manage authentication automatically.

You must provide credentials before using Box commands.

⚠️ Never commit credential files (CCG JSON or JWT JSON) to git.

Add the following to your .gitignore:

box-ccg.json
box-jwt.json
.secrets/

🔑 User-Provided JSON Configuration (Required)

Users must supply their own Box CCG configuration file.
The skill does not generate credentials or manage secrets.

Your file should look like:

{
  "boxAppSettings": {
    "clientID": "client_id_here",
    "clientSecret": "client_secret_here"
  },
  "enterpriseID": "enterprise_id_here"
}

This file can be named box-ccg.json and placed in your deployment environment before registering it with Box CLI.


Option A --- Provide a CCG Config File (Recommended)

Create a Box Custom App using:

Server Authentication (Client Credentials Grant)

You will need:

  • clientID
  • clientSecret
  • enterpriseID

Create your config file in a secure location outside the workspace, e.g.:

/data/.secrets/box-ccg.json

⚠️ Avoid storing credentials inside the workspace directory — it may be tracked by git or accessible to other tools.

With:

{ "boxAppSettings": { "clientID": "YOUR_CLIENT_ID", "clientSecret": "YOUR_CLIENT_SECRET" }, "enterpriseID": "YOUR_ENTERPRISE_ID" }

Secure it:

chmod 600 /data/.secrets/box-ccg.json

Register it:

box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --name ccg --set-as-current box configure:environments:set-current ccg

Optional: Run as a managed user instead of the service account:

box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --ccg-user "USER_ID" --name ccg-user --set-as-current


Option B --- Use Environment Variables (.env supported)

Set:

BOX_CLIENT_ID BOX_CLIENT_SECRET BOX_ENTERPRISE_ID

Generate config:

mkdir -p /data/.secrets

cat \x3C\x3CEOF > /data/.secrets/box-ccg.json { "boxAppSettings": { "clientID": "$BOX_CLIENT_ID", "clientSecret": "$BOX_CLIENT_SECRET" }, "enterpriseID": "$BOX_ENTERPRISE_ID" } EOF

chmod 600 /data/.secrets/box-ccg.json

Then register:

box configure:environments:add /data/.secrets/box-ccg.json --ccg-auth --name ccg --set-as-current


Option C --- JWT Server Auth (Alternative)

If using JWT:

box configure:environments:add /data/.secrets/box-jwt.json --name jwt --set-as-current


✅ Verify Authentication

box configure:environments:get --current box users:get me

Note: With CCG, you are authenticated as either: - The service account, or - A managed user (if --ccg-user is used)

Access depends on that identity's permissions.


📂 Common Operations

Browse Folders

box folders:get 0 box folders:list-items 0 --json

Upload

box files:upload ./report.pdf --parent-id 0

Download

box files:download 123456789 --destination ./downloads --create-path

Search

box search "quarterly plan" --type file

Metadata

box files:metadata:get-all 123456789 box files:metadata:add 123456789 --template-key employeeRecord --data "department=Sales"


🤖 Box AI Usage (No Local LLM Downloads)

This skill supports using Box AI directly via the Box platform.

AI operations run within Box, respecting: - File permissions - Enterprise security - Data governance - Audit controls

No file download + local LLM inference required.


Ask Questions About a File

box ai:ask --item-id 123456789 --item-type file --prompt "Summarize this document and identify risks."


Extract Structured Data

box ai:extract-structured --item-id 123456789 --item-type file --schema '{"fields":[{"name":"invoice_number","type":"string"},{"name":"total","type":"number"}]}'


Extract Text

box ai:extract --item-id 123456789 --item-type file


🧠 Tips for Agents & Automation

Use JSON output when parsing results:

box folders:list-items 0 --json

Prefer CCG for headless deployments because:

  • No browser required
  • No expiring developer tokens
  • Suitable for automation
  • Works cleanly in Railway

🔒 Security Notes

  • Do not commit credential files.
  • Restrict file permissions (chmod 600).
  • Use least-privilege app scopes.
  • Avoid granting broad enterprise-wide access to service accounts.
  • Prefer a dedicated demo folder when showcasing functionality.

🚀 Deployment Notes (Railway / CI)

  • Ensure /data/workspace is writable (for file operations).
  • Ensure /data/.secrets exists and is writable (for credential storage).
  • Box CLI stores environments in ~/.box.
  • If containers are ephemeral, re-run configure step on deploy.
  • Use Railway Variables instead of pasting secrets into chat.

This skill exposes the full surface area of the Box CLI.

Explore commands:

box --help box folders --help box files --help box ai --help

安全使用建议
This skill appears to be what it says: a wrapper for the official Box CLI in headless environments. Before installing, ensure you: (1) have the official 'box' CLI installed (the SKILL.md suggests the npm package @box/cli); (2) provide Box credentials yourself (CCG JSON or JWT JSON or env vars) and store them outside the workspace with restrictive permissions (e.g., /data/.secrets, chmod 600); (3) grant the least-privilege scopes to the service account (avoid enterprise-wide rights unless necessary); (4) do not commit credential files to source control; and (5) remember that any agent actions will act with the privileges of the provided credentials — review and limit those credentials accordingly.
功能分析
Type: OpenClaw Skill Name: box-cli Version: 1.0.0 The skill bundle provides instructions for installing and configuring the official Box CLI, enabling an OpenClaw agent to interact with the Box API. It explicitly guides the agent/user on how to provide credentials securely (e.g., via environment variables or a config file in `/data/.secrets/`), set file permissions (`chmod 600`), and register them with the Box CLI. While the skill involves reading environment variables and executing shell commands for configuration, these actions are standard for CLI setup and are directly aligned with the stated purpose. There is no evidence of data exfiltration to unauthorized endpoints, malicious execution, persistence mechanisms, or obfuscation. The skill also includes security best practices, advising against committing credential files and promoting least-privilege access.
能力评估
Purpose & Capability
Name/description (Box CLI for files, metadata, Box AI) match the SKILL.md instructions. The skill requires the 'box' binary and describes using Client Credentials Grant (CCG) or JWT — these are expected for headless Box CLI automation.
Instruction Scope
Instructions focus on configuring the Box CLI, creating credential JSON (or using env vars), registering environments with 'box configure', and running Box commands (upload, download, search, Box AI). It instructs creating credential files under /data/.secrets and setting file perms (chmod 600), which is reasonable for the stated purpose. No instructions request unrelated system data or external endpoints. Note: examples include shell heredocs with env var substitution — ensure env vars and files are kept secure and not accidentally logged or committed.
Install Mechanism
The skill is instruction-only (no install spec in registry), but SKILL.md metadata suggests installing the official @box/cli via npm (producing the 'box' binary). This is a low-risk, standard installation path; no arbitrary download URLs or extraction steps are present.
Credentials
The only secrets discussed are Box credentials (BOX_CLIENT_ID, BOX_CLIENT_SECRET, BOX_ENTERPRISE_ID) or JSON config files for CCG/JWT — these are directly required for Box CLI headless auth. No unrelated credentials or broad environment access are requested.
Persistence & Privilege
The skill does not request always:true, does not alter other skills' configs, and is user-invocable. It requires no persistent platform privileges beyond normal use of the Box CLI and provided credentials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install box-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /box-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
First public release
元数据
Slug box-cli
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Box 是什么?

Box CLI skill for working with files, folders, metadata, search, and Box AI in headless environments. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 662 次。

如何安装 Box?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install box-cli」即可一键安装,无需额外配置。

Box 是免费的吗?

是的,Box 完全免费(开源免费),可自由下载、安装和使用。

Box 支持哪些平台?

Box 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Box?

由 Andrew(@hbkwong)开发并维护,当前版本 v1.0.0。

💬 留言讨论