Use when adding logs, debugging, or working with the Logger across the SDK and container runtime. Covers the constructor-injection pattern, child loggers, env-var configuration, and test mocking. (project)
npx skills add https://github.com/cloudflare/sandbox-sdk --skill logging
Loggers are passed explicitly via constructor injection throughout the codebase. There is no global/ambient logger.
import type { Logger } from '@repo/shared';
class MyService {
constructor(private logger: Logger) {}
async doWork(context: WorkContext) {
const childLogger = this.logger.child({ operation: 'work' });
childLogger.info('Working', { context });
}
}
Use logger.child({ ... }) to attach structured context that will appear on every log line from that child. Prefer child loggers at the boundary of a unit of work (request, operation, session) rather than re-passing context on every call.
Two environment variables, both read once at startup:
| Var | Values | Purpose |
| -------------------- | -------------------------------------- | --------------------- |
| SANDBOX_LOG_LEVEL | debug \| info \| warn \| error | Minimum level emitted |
| SANDBOX_LOG_FORMAT | json \| pretty | Output format |
Use json in production (machine-parseable) and pretty for local dev.
Use createNoOpLogger() from @repo/shared to silence logging in tests:
import { createNoOpLogger } from '@repo/shared';
const service = new MyService(createNoOpLogger());
Don't construct real loggers in unit tests — they add noise and can mask real failures with log output.
logger.error('Failed', { err })Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Comprehensive GitHub release orchestration with AI swarm coordination for automated versioning, testing, deployment, and rollback management
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Modern JavaScript/TypeScript development with Bun runtime. Covers package management, bundling, testing, and migration from Node.js. Use when working with Bun, optimizing JS/TS development speed, or migrating from Node.js to Bun.
You are a dependency management expert specializing in safe, incremental upgrades of project dependencies. Plan and execute dependency updates with minimal risk, proper testing, and clear migration pa
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack. Use when investigating bugs, performance issues, or unexpected behavior.
Opinionated backend development standards for Node.js + Express + TypeScript microservices. Covers layered architecture, BaseController pattern, dependency injection, Prisma repositories, Zod validation, unifiedConfig, Sentry error tracking, async safety, and testing discipline.
Best practices for writing JavaScript/TypeScript tests using Jest, including mocking strategies, test structure, and common patterns.
Take cloudflare/logging from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.