用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/adam-s/volatio --skill debug-logging命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Market data integrity rules — gap filling, look-forward bias prevention, and stock split handling. Use when writing or reviewing code that loads prices, fills missing data, computes returns, backtests strategies, or makes trading decisions. Applies across Python, TypeScript, SQL, and TimescaleDB.
Analyze Volatio debug logs from /tmp/volatio-debug/. Use when the user asks to check debug logs, analyze problems, or diagnose simulation issues.
Apply bottom-up systematic testing to a multi-layer system. Use when asked to test, debug, or verify a pipeline that spans multiple layers (e.g., Python worker → bridge → processor → API → UI).
基于 SOC 职业分类
正在显示 SKILL.md
| name | debug-logging |
| description | Volatio debug logging convention with |
console.log(`[ClassName.methodName] description ${data} ${Date.now()} ######`);
[ClassName.methodName] - Exact location in code${Date.now()}###### marker for easy search/removalexport class EconomicEventsPersister {
async persist(events: Event[]): Promise<void> {
console.log(`[EconomicEventsPersister.persist] Starting with ${events.length} events ${Date.now()} ######`);
for (const event of events) {
console.log(`[EconomicEventsPersister.persist] Processing ${event.eventKey} ${Date.now()} ######`);
try {
await db.insert(economicEvents).values(event);
console.log(`[EconomicEventsPersister.persist] Inserted ${event.eventKey} ${Date.now()} ######`);
} catch (error) {
console.log(`[EconomicEventsPersister.persist] Failed ${event.eventKey}: ${error} ${Date.now()} ######`);
}
}
console.log(`[EconomicEventsPersister.persist] Complete ${Date.now()} ######`);
}
}
ALWAYS show ALL logs - never hide output:
# ✅ GOOD: Show everything
bun script.ts 2>&1
# ✅ GOOD: Show output AND save to file
bun script.ts 2>&1 | tee debug.log
# ❌ BAD: Hiding output
bun script.ts > /dev/null 2>&1
bun script.ts --silent
# Find all debug logs
grep '######' output.log
# Find specific class/method
grep '\[ClassName.methodName\]' output.log
# Find in real-time
bun script.ts 2>&1 | grep --line-buffered '######'
Remove ALL debug logs when done:
# Find all files with debug markers
grep -r '######' packages/
# Remove all lines with ######
grep -r '######' packages/ --files-with-matches | xargs sed -i '' '/######/d'
// ❌ BAD: Leaves empty blocks
try {
console.log(`[Class.method] debug ${Date.now()} ######`);
await someOperation();
} catch (error) {
console.log(`[Class.method] error ${Date.now()} ######`);
}
// ✅ GOOD: Remove empty blocks entirely
await someOperation();
Rules for cleanup:
| Type | Purpose | Format | Persistence |
|---|---|---|---|
| Debug Logs | Temporary debugging | console.log(...) ###### | Remove after fix |
| Production Logs | Permanent observability | logger.info(...) | Keep forever |
For permanent observability, use @volatio/shared/logger:
import { logger, createJobLogger, metrics } from '@volatio/shared/logger';
// Base logger
logger.info({ port: 3001 }, 'Server started');
// Job-specific logger
const log = createJobLogger(job.id, 'yahoo-discovery');
log.info({ articles: 50 }, 'Discovery complete');
// Metrics
metrics.discoveryComplete({
source: 'yahoo',
totalFound: 100,
durationMs: 3200,
});
###### logs - they're temporary only