360 Secure SkillHub
360 安全技能中心

box-sdk-development

该 Skill 提供 Box 官方 Python 与 TypeScript/Node SDK 的开发指导,强调核对已安装版本与类型、正确选择内容/预览/元数据接口、分页与限流、文件传输、批量任务、重试与可观测性;要求实现后运行测试和类型检查,并报告变更、验证结果与设计取舍。

iskysun96
iskysun96
热度 15.99
最近更新 2026-10-15 13:05:54
分类:开发依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码生成 / 调试排错 / API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add iskysun96/box-sdk-development
Metadata
name
box-sdk-development
description
Build or debug application code using an official Box SDK, especially Python or TypeScript/Node. Covers SDK call correctness, file transfer, bulk work, rate limits, and observability; not one-off CLI or MCP content operations.

Box SDK development

Before coding

  1. Inspect the installed SDK version and types, runtime, authentication, Box actor, existing client wrapper, and expected workload. Keep the project's SDK major version unless migration is required or requested.
  2. Choose where the client, token management, rate limiter, retry policy, and logging live. Trace existing request paths for duplicate calls or bypassed controls. For repeated operations, estimate calls, request rate, transfer size, and restart needs before choosing an approach.
  3. Verify every Box method's arguments, return type, pagination, and errors against the installed SDK and current Box docs. Python and Node SDK major versions have incompatible interfaces; do not copy calls across versions.
  4. Implement and run focused tests plus the project's type check or build. Verify permissions and transfer behavior with an authorized test account when available; compilation alone cannot prove them.

Read the relevant SDK reference: Python or TypeScript/Node. For collection-wide jobs, read bulk operations. For uploads or downloads, read file transfer.

Design constraints

  • Choose the API for the requested result: original bytes, a preview, metadata, or a listing. Use the file-content endpoint for original bytes and representations for previews; a listing is discovery, not a download. Request needed fields and paginate to the endpoint's actual end, using markers when supported for large or changing collections.
  • Prefer Box-side copy, move, or metadata operations when content stays in Box. Use events or webhooks with catch-up instead of repeated full scans when tracking changes.
  • Reuse the SDK client and token cache. Include authentication, discovery, retries, and verification in API-call budgets; custom application calls count toward enterprise allocation even without 429s.
  • Bound concurrent requests by actor and endpoint. Current Box SDKs retry 429s with Retry-After; check the installed version and keep one retry owner. For older SDKs or custom HTTP, use bounded backoff that honors Retry-After. Reconcile uncertain writes before retrying; diagnose 401/403 rather than repeating them unchanged.
  • Keep client secrets and service-account keys server-side. Use the intended actor and least privilege; never log credentials.

Observability

Instrument the SDK client or wrapper once. Record successes and failures with operation, item ID, safe actor or tenant ID, status, Box request ID when available, duration, bytes when relevant, and job ID. Capture 429s and retry delay only if SDK hooks or transport instrumentation expose them; hidden retries are unknown, not zero. For bulk jobs, keep durable per-item outcomes and monitor throughput and calls against the plan. Surface throttling or unexpected usage during the run. Configure log volume and retention; omit content, credentials, and signed URLs.

Completion report

After every SDK task, briefly state what changed and what was verified; the material design choices and their reasons; and viable alternatives with their tradeoffs. For bulk work, include the call-budget assumptions. State any unverified behavior.

Official sources