skill-system-diagnostics
Skill0 starsChanged 3 months agoMITView on GitHub
Hardware/OS/driver/kernel diagnostics, log analysis, and root-cause system debugging. MUST ACTIVATE when diagnosing system-level failures, hardware issues, driver incompatibilities, kernel logs (dmesg/journalctl), or memory/CPU bottlenecks.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- core/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- avoid-ai-writingSkill
- c-cpp-systemsSkill
- doubt-driven-developmentSkill
- marketing-copywritingSkill
- mempalace-recallSkill
- mempalaceSkill
- mempalace-taskSkill
- retro-emulation-engineeringSkill
- seo-optimization-and-auditSkill
- skill-ai-mlSkill
- skill-backend-architectSkill
- skill-codebase-onboardingSkill
- skill-code-reviewSkill
- skill-context-engineeringSkill
- skill-creative-designSkill
- skill-data-analysisSkill
- skill-data-scienceSkill
- skill-design-engineeringSkill
- skill-devops-cloudSkill
- skill-emulator-wasmSkill
- skill-frontend-architectSkill
- skill-graph-analyticsSkill
- skill-graphics-webglSkill
- skill-low-level-programmingSkill
- skill-master-orchestratorSkill
- skill-mcp-builderSkill
- skill-monorepo-architectSkill
- skill-osint-engineeringSkill
- skill-plugin-architectureSkill
- skill-qa-engineerSkill
- skill-researchSkill
- skill-resume-tailorSkill
- skill-stealth-scrapingSkill
- skill-web-architectureSkill
- skill-web-performanceSkill
- spec-driven-developmentSkill
- spec-minerSkill
- wasm-emscriptenSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 101
Follow this sequence EXACTLY when analyzing logs:
- Distinctive: line 113
Look for timestamp clusters (multiple errors within seconds = cascade)
- Distinctive: line 116
Check for patterns: repeated errors, periodic failures, growing intervals
- Distinctive: line 122
Check if the error matches known patterns (search_web for error codes)
- Distinctive: line 125
Create minimal reproduction steps
- Distinctive: line 140
Ingest: all available evidence (stack traces, logs, error codes, user observations)
- Distinctive: line 161
When reporting diagnostics, use this structure:
- Distinctive: line 213
Evidence Gate: Every diagnosis MUST cite at least one specific log line, error code, or command output
- Distinctive: line 215
Fix Verification Gate: After applying a fix, the ORIGINAL failing operation MUST be re-run to confirm resolution
- Distinctive: line 216
No Regression Gate: Verify that the fix does not introduce new errors in related components (check logs post-fix)
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
System Diagnostics & Root Cause Analysis
Overview
This skill governs all hardware, OS, driver, and kernel-level debugging. It enforces a rigorous diagnostic methodology that prevents speculative fixes and ensures root causes are identified through hard evidence.
When to Use
- Hardware/OS/driver/kernel debugging
- System performance degradation investigation
- Log analysis (syslog, journalctl, dmesg, application logs)
- Network connectivity or firewall issues
- Disk/filesystem errors or storage failures
- Boot failures, kernel panics, system hangs
- Service failures (systemd units)
- GPU/driver compatibility issues
When NOT to Use
- Application-level bugs (use
skill-qa-engineerorskill-code-review) - Cloud infrastructure provisioning (use
skill-devops-cloud) - Pure data analysis without system context (use
skill-data-analysis)
1. Diagnostic Command Cheatsheet
System Identity (ALWAYS run first)
# Hardware baseline
uname -a # Kernel version, architecture
cat /proc/cpuinfo | head -20 # CPU model, cores, flags
free -h # RAM total/used/available
lsblk -f # Block devices, filesystems, mount points
lspci -nn # PCI devices (GPU, NIC, controllers)
lsusb # USB devices
# GPU & Display
lspci -nn | grep -iE 'vga|3d|display' # GPU identification
nvidia-smi 2>/dev/null || echo "No NVIDIA driver" # NVIDIA status
cat /proc/driver/nvidia/version 2>/dev/null # NVIDIA driver version
# OS & Package Manager
cat /etc/os-release # Distribution info
dpkg --list | wc -l # Package count (Debian/Ubuntu)Log Analysis Commands
# Kernel & hardware logs
dmesg --level=err,warn -T | tail -50 # Recent kernel errors with timestamps
journalctl -p err -b --no-pager | tail -100 # Errors since last boot
journalctl -u <service> --no-pager -n 50 # Specific service logs
# System events
journalctl --since "1 hour ago" --no-pager # Recent events
journalctl -k --no-pager | tail -50 # Kernel messages only
last reboot # Reboot history
# Storage diagnostics
smartctl -a /dev/sda 2>/dev/null # SMART disk health
df -h # Filesystem usage
iostat -x 1 3 # I/O performanceNetwork Diagnostics
ip addr show # Interface addresses
ip route show # Routing table
ss -tulnp # Listening ports with process info
ping -c 3 <host> # Basic connectivity
traceroute <host> # Path analysis
nslookup <domain> # DNS resolution
iptables -L -n 2>/dev/null # Firewall rulesProcess & Performance
top -bn1 | head -20 # Process snapshot
ps aux --sort=-%mem | head -10 # Top memory consumers
ps aux --sort=-%cpu | head -10 # Top CPU consumers
strace -p <PID> -c # System call summary
lsof -p <PID> # Open files by process
vmstat 1 5 # Virtual memory statistics
sar -u 1 5 # CPU utilization history2. Log Analysis Protocol
Follow this sequence EXACTLY when analyzing logs:
Step 1: PARSE
- Identify log format (syslog, JSON, plain text, structured)
- Note timestamp format and timezone
- Count total entries and time span covered
Step 2: CATEGORIZE
- Sort entries by severity:
CRITICAL > ERROR > WARNING > INFO > DEBUG - Focus on CRITICAL and ERROR first -- everything else is context
Step 3: DETECT ANOMALIES
- Look for timestamp clusters (multiple errors within seconds = cascade)
- Identify irregular spikes in frequency
- Cross-correlate timestamps across different log sources (kernel + application + service)
- Check for patterns: repeated errors, periodic failures, growing intervals
Step 4: IDENTIFY ROOT CAUSE
- Trace the FIRST error in a cascade -- that is the likely root cause
- Map out the fault domain: which component(s) are affected?
- Differentiate SYMPTOMS (secondary failures) from CAUSE (initial trigger)
- Check if the error matches known patterns (search_web for error codes)
Step 5: FORMULATE REMEDIATION
- Create minimal reproduction steps
- Identify environmental triggers (specific kernel version, driver version, load condition)
- Propose fix that addresses ROOT CAUSE, not symptoms
3. Root Cause Analysis Process
Fault Domain Mapping
[Trigger Event] --> [Primary Failure] --> [Cascade Effect 1] --> [Cascade Effect N]
\-> [Cascade Effect 2]- Ingest all available evidence (stack traces, logs, error codes, user observations)
- Map the fault domain: identify which system boundaries are affected
- Differentiate between secondary symptomatic errors and the initial root cause trigger
- Timeline the events: what happened FIRST? That is your investigation starting point
- Reproduce minimally: strip away variables until you have the smallest trigger
- Verify the fix resolves the ORIGINAL symptom, not just silences the error
Symptom vs Cause Decision Tree
| Observation | Likely Category |
| Error appears FIRST in timeline | Potential ROOT CAUSE |
| Error appears AFTER another error | SYMPTOM (investigate upstream) |
| Error disappears when upstream is fixed | Confirmed SYMPTOM |
| Error persists after upstream fix | Independent ROOT CAUSE |
| Error is intermittent | Environmental trigger (load, race condition, resource exhaustion) |
4. Output Format
When reporting diagnostics, use this structure:
LOG SUMMARY
- Time range analyzed
- Total events by severity
- Overall system health assessment:
HEALTHY / DEGRADED / CRITICAL
ANOMALIES & ERROR PATTERNS
- Clustered error events with timestamps
- Frequency analysis
- Cross-component correlations
ROOT CAUSE ANALYSIS
- Primary defect identified
- Evidence chain (specific log lines, error codes)
- Symptom vs cause mapping
REMEDIATION PLAN
- Immediate fix (specific commands/changes)
- Verification steps (how to confirm the fix works)
- Long-term prevention (monitoring, configuration changes)
5. Anti-Rationalization Table
| Agent Rationalization | BLOCKED Response |
| "I know what this error means from experience." | BLOCKED: Verify with search_web or official docs. Internal knowledge may be outdated or wrong. |
| "The logs look clean, so the issue is elsewhere." | BLOCKED: Absence of errors in one log source does not mean no errors exist. Check ALL log sources (dmesg, journalctl, application logs, syslog). |
| "I'll just restart the service to fix it." | BLOCKED: Restarting masks the root cause. Diagnose WHY the service failed before restarting. |
| "This is probably a driver issue, let me reinstall." | BLOCKED: Reinstalling is forbidden as a first step. Run dmesg, check driver version, verify compatibility FIRST. |
| "The user says it was working before, so it's a recent change." | BLOCKED: Correlation is not causation. Verify with journalctl --since, package update history (apt history), and config diff. |
| "I can't reproduce it, so it might be a fluke." | BLOCKED: Intermittent issues have environmental triggers. Check load patterns, resource exhaustion, race conditions, thermal throttling. |
| "Let me change this config value, it should help." | BLOCKED: Every config change MUST reference a specific log line or error code that justifies it. No speculative tuning. |
6. Red Flags
- Proposing a fix without citing specific log lines or error codes
- Skipping
dmesgorjournalctlwhen debugging system issues - Assuming hardware specs instead of running diagnostic commands
- Changing kernel parameters or system config without root cause evidence
- Declaring "fixed" without re-running the originally failing operation
- Investigating application code when the error is clearly in system logs
- Using
sudocommands without explaining WHY root access is needed
7. Verification Gates
- Evidence Gate: Every diagnosis MUST cite at least one specific log line, error code, or command output
- Reproduction Gate: Root cause hypothesis MUST include reproduction steps (or explain why reproduction is not possible)
- Fix Verification Gate: After applying a fix, the ORIGINAL failing operation MUST be re-run to confirm resolution
- No Regression Gate: Verify that the fix does not introduce new errors in related components (check logs post-fix)
- Documentation Gate: Record the diagnosis, root cause, and fix in a format the user can reference later
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

