.local/skills/fetch-deployment-logs/SKILL.md
Fetch and analyze deployment logs for the current Repl. Use this skill to debug deployment issues, monitor application behavior, and troubleshoot errors in production.
npx skillsauth add akhil151/dtpapp fetch-deployment-logsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fetch and analyze deployment logs to debug issues and monitor your deployed application.
Use this skill when the user:
In the JavaScript notebook, call the fetchDeploymentLogs function:
const result = await fetchDeploymentLogs({
afterTimestamp: (Date.now() - 3600 * 1000), // Last hour
message: "ERROR"
});
if (result.found) {
console.log(result.logs);
} else {
console.log("No deployment logs found.");
}
afterTimestamp (float, optional): Only include logs after this Unix timestamp (milliseconds)beforeTimestamp (float, optional): Only include logs before this Unix timestamp (milliseconds)message (str, optional): RE2 regular expression to filter logs by message contentmessageContext (dict, optional): Context configuration for regex matches with:
lines (int, required): Number of lines before/after each match (0-100)limit (int, required): Max matches to fetch context for (1-10)Returns a dictionary with:
logs: String containing the formatted deployment logs (empty string if none found)found: Boolean indicating whether any logs were foundmessage: Optional message when no logs are foundmessage regex to narrow downafterTimestamp to focus on recent logs"ERROR" or "WARN" to find problematic entriesmessageContext to see surrounding log lines (similar to grep -C)const result = await fetchDeploymentLogs();
console.log(result.logs);
const oneHourAgo = Date.now() - 3600 * 1000; // Convert to milliseconds
const result = await fetchDeploymentLogs({ afterTimestamp: oneHourAgo });
if (result.found) {
console.log(result.logs);
}
const result = await fetchDeploymentLogs({ message: "ERROR" });
if (result.found) {
console.log(result.logs);
} else {
console.log("No error logs found");
}
const result = await fetchDeploymentLogs({
message: "(?i)(database|postgres|mysql|mongo|connection.*refused)"
});
console.log(result.logs);
const result = await fetchDeploymentLogs({
message: "(?i)(failed|crash|exception|traceback)"
});
console.log(result.logs);
// Get 10 lines of context before/after each error (up to 3 matches)
const result = await fetchDeploymentLogs({
message: "ERROR",
messageContext: { lines: 10, limit: 3 }
});
if (result.found) {
console.log(result.logs);
}
// Get logs from the last 30 minutes containing errors
const thirtyMinAgo = Date.now() - 1800 * 1000;
const result = await fetchDeploymentLogs({
afterTimestamp: thirtyMinAgo,
message: "(?i)(error|exception|failed)"
});
if (result.found) {
console.log(result.logs);
} else {
console.log("No matching logs in the last 30 minutes");
}
"ERROR""(WARN|ERROR)""(?i)database|postgres|mysql|connection""(?i)timeout|refused|unreachable""(?i)auth|token|unauthorized|forbidden""(?i)memory|heap|oom|killed""(?i)import|module|cannot find"message parameter to filter, or narrow the time range(?i) prefixtools
Manage application workflows including configuration, restart, and removal.
development
Search the web and fetch content from URLs. Use for real-time information, API documentation, and current events.
testing
Run automated UI tests against your application using a Playwright-based testing subagent. Use after implementing features to verify they work correctly.
data-ai
Create reusable skills that extend agent capabilities. Use when the user asks to create a skill, teach you something reusable, or save instructions for future tasks.