Standardize temporary debug console logs in OneKey code with a consistent prefix and safe stringify helper. Use when adding, reviewing, or cleaning local debug logs, temporary console.log output, debug helpers, or troubleshooting-only logging. Do not use for analytics, server logs, LogToServer, or permanent business metrics.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill for temporary local debug logs. Keep the convention to one filterable prefix and one safe stringify helper.
Create one local helper near the debug area. Rename the prefix and exported helper for the domain:
const LOG_PREFIX = '[MKT-TAB]';
function stringifyLogValue(value: unknown) {
try {
return JSON.stringify(value);
} catch (error) {
return JSON.stringify({
stringifyError: error instanceof Error ? error.message : String(error),
});
}
}
export function debugMarketTabsLog(label: string, value?: unknown) {
if (process.env.NODE_ENV === 'production') {
return;
}
const valueText = value === undefined ? '' : ` ${stringifyLogValue(value)}`;
// eslint-disable-next-line no-console
console.log(`${LOG_PREFIX} ${label}${valueText}`);
}Use the helper at call sites instead of raw console.log:
debugMarketTabsLog('tab-change', {
activeTab,
itemCount: items.length,
});console.log; keep it inside the helper./1k-analytics - Use for server analytics and permanent business metrics instead of temporary debug logs./1k-code-quality - Use when lint or type checks are part of the cleanup.3cff1b4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.