Add or clean temporary OneKey debug console logs with consistent prefixes and safe stringify. Excludes analytics and permanent server logs.
68
83%
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.d71e6b7
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.