mrdulasolutions/box-onprem/box-companion
Claude Code and agent skill by mrdulasolutions/box-onprem
- community
Checking that the SKILL.md file is still in the repository.
Generate a paired companion markdown file for a binary in the local Box Drive workspace. Describes the file contents, key facts, hash-anchored to the current SHA256 of the binary. No chunking, no embedding - the binary stays whole, the companion describes it. FS-only, no Box API. Use when the user references a binary file (PDF, CAD, image, Office doc) and asks to describe, remember, or review it.
Install
npx vskill@latest install mrdulasolutions/box-onprem/box-companionSKILL.md
/box-companion
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Produce a markdown companion describing a binary in the local Box Drive workspace. The binary stays whole — never chunked, never embedded. Hash anchoring detects when companions go stale because the underlying binary changed.
Usage
Examples:
/box-companion files/contract.pdf— companion by path relative to workspace root/box-companion files/drawing-A-127.dwg --tags=cad,turbine --team=engineering/box-companion files/contract.pdf --check— is the existing companion still current?
What to do
- Verify workspace + backend. Read
_box-memory.json; confirmbackend: local; confirmbox-drive-detectshows mount writable. - Resolve the binary. Construct absolute path:
<workspace_root>/<relative_path>. If file doesn't exist, surface clearly. - Read file metadata via local FS.
stat()for size andmtime. Mime type guessed from extension. - Check for existing companion. Look at the relevant
_index.jsonforby_companion_for[<file_relative_path>]. If present:
- Compute current SHA256 of the binary (stream-hash the local file)
- Compare to companion's stored hash
- Match → companion is current. Show its content. Stop unless
--force. - Differ → companion is stale. Continue to regenerate.
- Review the file via best-available local read:
- PDF/DOCX/XLSX → fetch text representation if a local tool exists (no Box API); if not, describe by filename + size and note the gap
- CAD/proprietary formats → describe by filename + extension; honest about what you couldn't parse
- Code/markdown → read raw content
- Images → describe based on filename + size; multimodal inspection if the agent supports it
- Generate companion IDs. ULID prefixed
mem_. Slug from binary filename. - Build frontmatter:
Note: in the on-prem variant, the canonical pointer is local_path, not file_id (Box assigns IDs only after sync). If Box file ID later becomes known via cloud-variant inspection, it can be added under companion_for.file_id non-destructively.
- Compose body. Sections: "What's in this file" (plain-English), "Key facts" (bulleted), "Structure" (page count / sheets / layers if relevant), "Classification / handling notes", "Related" (wikilinks), "Hash chain" (current sha256 + reviewed_at), "What the agent did NOT verify" (honest list of gaps).
- Acquire workspace lock (see lockfile protocol in
box-init). - Write the companion file.
- Sibling layout (default):
<binary-dir>/<binary-filename>.md(e.g.,files/contract.pdf→files/contract.pdf.md) - Folder layout:
<workspace>/companions/<binary-filename>.md(or under teams/<team>/companions/)
Atomic write: .tmp + fsync + rename.
- Update folder's `_index.json`. Entry with
companion_for: <relative_path>,sha256: <hash>. Updateby_id,by_slug,by_companion_for[<relative_path>]. - Release lock.
- Report. Companion path, hash, first ~500 chars of body, supersession info if applicable.
Hash mismatch handling
If step 4 detected a hash mismatch:
- Mention explicitly: "The existing companion was reviewed at sha256:<old> on <date>. The binary's current hash is sha256:<new>. The companion is stale; regenerating."
- Show what the old companion said (one-line summary).
- Generate the fresh companion.
- Mark old companion as
supersededand link viasuperseded_by.
If the user asked --check, just report the result of the check — don't regenerate.
Be honest about what you couldn't read
A small honest companion ("this is a 50 MB CAD file; I cannot extract layer info locally") beats a fabricated one. Always include the "What the agent did NOT verify" section.
Differences from cloud variant
- `local_path` instead of `file_id` as the binary's canonical pointer
- No metadata template instance application — that's a Box API operation
- No Box-side preview API — text extraction depends on what local tools the agent has access to (e.g.,
pdftotextif installed); be explicit when extraction wasn't possible
Errors
- File not found at relative path → "No file at
<workspace>/<path>. Check the path or run/box-statusto see what's in the workspace." - Hash computation failed → file too large to stream / I/O error; surface and stop
- Lock cannot be acquired → another writer is active; retry or investigate
- Preview extraction not possible → continue with a sparse companion documenting the gap
Don't
- Don't chunk or embed the file. The whole point is to NOT do that.
- Don't hallucinate contents you couldn't read.
- Don't skip the hash. Hash anchoring is what makes the companion auditable.
- Don't call any Box API. Don't read any URL.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/box-companion/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mrdulasolutions/box-onprem/box-companion)