About knbox
KN Box Skill guides agents through uploading files for preview or sharing with the knbox CLI. It covers access checks, file navigation, upload destinations, and conflict handling while prohibiting sensitive uploads.
Key features
- 01Upload files or directories with knbox
- 02Check account access before uploading
- 03List and open remote files
- 04Choose a remote upload directory
- 05Handle conflicts with rename or authorized overwrite
Use cases
- 01Share a file through a public URL
- 02Upload a directory for preview
- 03Browse uploaded files and directories
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ summic/ knbox-skills --skill knboxAfter installing, type/knboxin Claude Code to confirm it loaded.
Details
From the project READMEKN Box Skill
Use KN Box when you need to upload files for preview or sharing.
Requirements
- Use the
knboxCLI as the only upload mechanism. - Prefer non-interactive auth with
KNBOX_TOKENwhen available. - Default server is
https://box.kn.run. - Do not upload sensitive information.
Verify Access
Before uploading, verify the CLI can reach KN Box:
knbox auth whoami --json
If this fails because the user is not logged in, ask the user to run:
knbox auth login
In a non-interactive environment, ask the user for a KN Box CLI token and set:
export KNBOX_TOKEN=knbox_xxx
The default server is already https://box.kn.run. Set KNBOX_URL only when the user explicitly wants a different KN Box server.
Upload Files
Upload a file or directory:
knbox upload <file-or-dir> --json
Upload into a specific remote directory:
knbox upload <file-or-dir> --to /agent-output --json
Read the returned JSON:
data.entryUrlis the best URL to show for a webpage directory.data.uploaded[].urlcontains individual file URLs.summaryis a short human-readable result.breadcrumbscontains useful follow-up commands.
Navigation
List files:
knbox ls [path] --json
Change the saved remote directory:
knbox cd <path>
Open a file or directory:
knbox open <path> --json
For a file, open returns the public URL. For a directory, it returns a directory listing.
Conflict Handling
Uploads fail on conflicts by default.
Use --rename only when creating a distinct copy is acceptable:
knbox upload <path> --rename --json
Use --overwrite only when the user explicitly wants to replace existing files:
knbox upload <path> --overwrite --json
Failure Handling
If knbox exits non-zero, read stderr and report the failure. Do not assume the file was uploaded.