logging — for Claude Code logging, BrainBox_v2, community, for Claude Code, ide skills, logger.ts, DEBUG_MODE=false, check-env.js, logger.error, check-shared-ui

v1.0.0

关于此技能

适用场景: Ideal for AI agents that need rules (non-negotiable). 本地化技能摘要: logging helps AI agents handle repository-specific developer workflows with documented implementation details.

功能特性

Rules (non-negotiable)
Zero console.log/error/warn/debug in source code — use logger.ts only
DEBUG MODE=false in production — enforced by check-env.js
Every phase MUST create an INDEX.json entry before starting
Every async error path MUST log via logger.error

# 核心主题

HackamViGo HackamViGo
[0]
[0]
更新于: 3/27/2026

技能概览

先看适用场景、限制条件和安装路径,再决定是否继续深入。

适用场景: Ideal for AI agents that need rules (non-negotiable). 本地化技能摘要: logging helps AI agents handle repository-specific developer workflows with documented implementation details.

核心价值

推荐说明: logging helps agents rules (non-negotiable). logging helps AI agents handle repository-specific developer workflows with documented implementation details.

适用 Agent 类型

适用场景: Ideal for AI agents that need rules (non-negotiable).

赋予的主要能力 · logging

适用任务: Applying Rules (non-negotiable)
适用任务: Applying Zero console.log/error/warn/debug in source code — use logger.ts only
适用任务: Applying DEBUG MODE=false in production — enforced by check-env.js

! 使用限制与门槛

  • 限制说明: Zero console.log/error/warn/debug in source code — use logger.ts only
  • 限制说明: Every phase MUST create an INDEX.json entry before starting
  • 限制说明: Every async error path MUST log via logger.error

关于来源内容

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

logging 是什么?

适用场景: Ideal for AI agents that need rules (non-negotiable). 本地化技能摘要: logging helps AI agents handle repository-specific developer workflows with documented implementation details.

如何安装 logging?

运行命令:npx killer-skills add HackamViGo/BrainBox_v2。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

logging 适用于哪些场景?

典型场景包括:适用任务: Applying Rules (non-negotiable)、适用任务: Applying Zero console.log/error/warn/debug in source code — use logger.ts only、适用任务: Applying DEBUG MODE=false in production — enforced by check-env.js。

logging 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

logging 有哪些限制?

限制说明: Zero console.log/error/warn/debug in source code — use logger.ts only;限制说明: Every phase MUST create an INDEX.json entry before starting;限制说明: Every async error path MUST log via logger.error。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add HackamViGo/BrainBox_v2。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    logging 已启用,可立即在当前项目中调用。

! 来源说明

此页面仍可作为安装与查阅参考。继续使用前,请结合上方适用场景、限制条件和上游仓库说明一起判断。

Upstream Repository Material

The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.

Upstream Source

logging

安装 logging,这是一款面向AI agent workflows and automation的 AI Agent Skill。查看功能、使用场景、限制条件与安装命令。

SKILL.md
Readonly
Upstream Repository Material
The section below comes from the upstream repository. Use it as supporting material alongside the fit, use-case, and installation summary on this page.
Upstream Source

Rules (non-negotiable)

  • Zero console.log/error/warn/debug in source code — use logger.ts only
  • DEBUG_MODE=false in production — enforced by check-env.js
  • Every phase MUST create an INDEX.json entry before starting
  • Every async error path MUST log via logger.error
  • Log files are append-only — never overwrite
  • Filesystem MCP MUST be used for running enforcement scripts (like check-shared-ui or check-boundaries) and to perform log file writes in ops/logs.

Patterns

logger.ts API (packages/shared/src/utils/logger.ts)

typescript
1import { logger } from '@/lib/logger' // web-app 2import { logger } from '@/lib/logger' // extension (re-export from shared) 3 4logger.debug('ModuleName', 'Short message', { context: data }) 5logger.info('ModuleName', 'Something happened') 6logger.warn('ModuleName', 'Possible issue', details) 7logger.error('ModuleName', 'Failed to do X', error)

logger.ts implementation

typescript
1// packages/shared/src/utils/logger.ts 2const DEBUG = typeof process !== 'undefined' 3 ? process.env['DEBUG_MODE'] === 'true' 4 : false 5 6type Level = 'debug' | 'info' | 'warn' | 'error' 7 8function log(level: Level, module: string, message: string, data?: unknown): void { 9 if (level === 'debug' && !DEBUG) return 10 const entry = { ts: new Date().toISOString(), level, module, message, ...(data ? { data } : {}) } 11 if (level === 'error') { 12 // In production: send to telemetry (Sentry etc.) 13 // In development: console.error is allowed only here 14 if (DEBUG) console.error(JSON.stringify(entry)) 15 } else { 16 if (DEBUG) console.log(JSON.stringify(entry)) 17 } 18} 19 20export const logger = { 21 debug: (m: string, msg: string, d?: unknown) => log('debug', m, msg, d), 22 info: (m: string, msg: string, d?: unknown) => log('info', m, msg, d), 23 warn: (m: string, msg: string, d?: unknown) => log('warn', m, msg, d), 24 error: (m: string, msg: string, d?: unknown) => log('error', m, msg, d), 25}

Phase logging — ops/logs/INDEX.json schema

json
1{ 2 "version": "1.0", 3 "last_updated": "ISO timestamp", 4 "logs": [ 5 { 6 "id": "LOG-001", 7 "name": "monorepo-scaffold", 8 "phase": "PHASE-1", 9 "file": "ops/logs/LOG-001-monorepo-scaffold.log", 10 "status": "running", 11 "started_at": "ISO timestamp", 12 "completed_at": null, 13 "summary": null, 14 "mcp_gate": null 15 } 16 ] 17}

mcp_gate when applicable:

json
1"mcp_gate": { "result": "pass", "notes": "Extension syncs to Web App", "timestamp": "ISO" }

update-log.js commands

bash
1node scripts/update-log.js start LOG-001 "monorepo-scaffold" "PHASE-1" 2node scripts/update-log.js log LOG-001 info "Creating pnpm-workspace.yaml" 3node scripts/update-log.js log LOG-001 warn "Node version mismatch, continuing" 4node scripts/update-log.js finish LOG-001 "7 packages created, 0 errors" 5node scripts/update-log.js fail LOG-001 "pnpm install failed — missing peer dep" 6node scripts/update-log.js mcp-gate LOG-001 "pass" "Auth verified in real browser" 7node scripts/update-log.js status # human-readable phase overview

Log file format

[2026-03-18T10:00:00Z] [START] PHASE-1 monorepo-scaffold
[2026-03-18T10:00:01Z] [INFO] Creating pnpm-workspace.yaml
[2026-03-18T10:00:05Z] [WARN] Node version mismatch — continuing
[2026-03-18T10:00:08Z] [SUCCESS] pnpm install — 0 errors
[2026-03-18T10:00:11Z] [COMPLETE] monorepo-scaffold — 7 packages, 0 errors

Levels: START INFO WARN ERROR SUCCESS COMPLETE SKIP

Anti-patterns (forbidden)

typescript
1console.log('data:', data) // use logger.info 2console.error('failed:', err) // use logger.error 3console.debug(...) // use logger.debug 4// skipping log entry for a phase // always update-log.js start first 5catch (_) {} // always logger.error in catch

Verification checklist

  • Zero console.* calls in source (run pnpm check:boundaries)
  • logger.ts imported from @brainbox/shared or @/lib/logger
  • Every phase has update-log.js start called before work begins
  • Every async error path has logger.error call
  • DEBUG_MODE=false in .env.production

相关技能

寻找 logging 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

本地化技能摘要: 🦞 # OpenClaw Release Maintainer Use this skill for release and publish-time workflow. It covers ai, assistant, crustacean workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

333.8k
0
AI

widget-generator

Logo of f
f

本地化技能摘要: Generate customizable widget plugins for the prompts.chat feed system # Widget Generator Skill This skill guides creation of widget plugins for prompts.chat . It covers ai, artificial-intelligence, awesome-list workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf

149.6k
0
AI

flags

Logo of vercel
vercel

本地化技能摘要: The React Framework # Feature Flags Use this skill when adding or changing framework feature flags in Next.js internals. It covers blog, browser, compiler workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

本地化技能摘要: Usage Modes No Argument If the user invokes /pr-review with no arguments, do not perform a review . It covers autograd, deep-learning, gpu workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

98.6k
0
开发者工具