xiaohongshu
xiaohongshu
execution-recovery
Handle common execution failures with specialized recovery strategies. Fix syntax errors, import/dependency issues, path/file problems, permission denial, and connection timeouts. Use proactively when encountering errors or as automatic recovery mechanism.
Full skill instructions
Apex2's execution optimization suite implemented as a Claude Code skill. Provides robust recovery from common execution failures.
When invoked (automatically on errors or explicitly when help is needed), diagnose and fix execution problems:
Quickly categorize the error type to apply the right recovery strategy:
Syntax Errors:
Import/Module Errors:
Path/File Issues:
Network/Connection Problems:
Diagnose the specific line:
# Python syntax checking
python -m py_compile filename.py
# or specific line diagnosis
python -c "import ast; ast.parse(open('filename.py').read())"
# JavaScript syntax checking
node -c filename.js
npm install eslint --save-dev && npx eslint filename.js
Common fixes to apply:
Heredoc Management (for shell scripts):
# Validate heredoc syntax
cat << 'EOF' > script.sh
# script content here
EOF
Diagnose missing dependencies:
# Python imports
python -c "import missing_module" 2>&1 | grep ModuleNotFoundError
# Node.js
npm ls missing-package
Install solutions:
# Python
pip install missing-package
# Add to requirements.txt
# Node.js
npm install missing-package
# Add to package.json dependencies
Version conflicts:
# Check versions
pip show package-name
npm list package-name
# Install specific version
pip install package==version
npm install package@version
Path validation:
# Check if file exists
ls -la file-path
dirname file-path && ls -la $(dirname file-path)
# Current working directory
pwd
# Relative vs absolute path testing
echo $(pwd)/relative-path
Permission fixes:
# Make executable
chmod +x script.sh
# Read/write permissions
chmod 644 file.txt
chmod 755 directory/
Directory creation:
# Create parents as needed
mkdir -p path/to/directory
# Safe file creation
touch new-file.txt
Connectivity testing:
# Test basic connectivity
ping -c 3 example.com
curl -I https://example.com
# Check specific ports
telnet host port
nc -zv host port
DNS resolution:
# Check DNS
nslookup hostname
dig hostname
# Test different DNS servers
nslookup hostname 8.8.8.8
Authentication and retries:
# Retry with exponential backoff
# Use auth tokens appropriately
# Check rate limits and wait periods
# Fix indentation in heredoc
cat << 'EOF' > fixed-script.sh
#!/bin/bash
echo "Fix indentation issues"
# Other commands
EOF
# Detect stuck tmux/session issues
tmux list-sessions
tmux kill-session -t session-name
# Start fresh session
tmux new-session -d -s work-session
# Resume interrupted tasks
# Check progress of long operations
# Implement timeouts for very long commands
timeout 300s command-that-might-hang
Add safeguards to prevent recurrence:
# Container not found
docker ps -a
docker logs container-name
# Port conflicts
netstat -tulpn | grep port-number
docker run -p different-port:port
# Connection testing
psql -h host -U user -d database -c "SELECT 1;"
mysql -h host -u user -e "SELECT 1;"
# Service status
systemctl status postgresql
systemctl status mysql
# Permission denied
git config --global core.sharedRepository group
# Corrupted repository
git fsck
git gc --prune=now
Provide structured recovery report:
Error Analysis:
Type: [syntax/import/path/network/other]
Severity: [low/medium/high]
Criticality: [blocking/warning/info]
Root Cause:
Immediate cause: [what happened]
Underlying issue: [why it happened]
Contributing factors: [other factors]
Recovery Applied:
Step 1: [action taken]
Result: [success/failure]
Step 2: [next action if needed]
Result: [success/failure]
Solution Details:
Code fixed: [show corrected code]
Command executed: [show command]
Changes made: [describe modifications]
Verification:
Test performed: [how fix was verified]
Result: [successful/unsuccessful]
Additional steps: [if needed]
Prevention:
Future safeguards: [how to prevent recurrence]
Monitoring: [what to watch]
Documentation: [what to update]
This recovery skill is designed for:
The goal is to turn execution failures into learning opportunities, with the system becoming more reliable through each recovery.
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience