Linux desktop sysadmin slash commands for Claude Code. Automate repetitive tasks, manage system configurations, and streamline workflows. Connects to Linux desktop environments and integrates with Claude Code for enhanced productivity.
git clone https://github.com/danielrosehill/Claude-Code-Linux-Desktop-Slash-Commands.gitThe Claude-Code-Linux-Desktop-Slash-Commands skill offers a powerful set of slash commands designed specifically for Linux desktop system administration. By leveraging Claude Code or any compatible AI agent, users can streamline their sysadmin tasks, making it easier to manage and automate routine operations. This skill is particularly beneficial for those who frequently interact with Linux environments, allowing them to execute commands quickly and efficiently through a simple interface. One of the key benefits of this skill is its ability to save time on repetitive tasks. Although the exact time savings are not quantified, users can expect a significant reduction in the time spent on manual command entry and system management. By automating these processes, developers and system administrators can focus on more strategic initiatives, thereby increasing overall productivity. The intermediate complexity of this skill ensures that users with a moderate level of technical expertise can implement it effectively within approximately 30 minutes. This skill is particularly suited for developers, product managers, and AI practitioners who are involved in system administration or DevOps roles. It can be a valuable addition to workflows that require frequent interaction with Linux systems, helping to enhance operational efficiency. For instance, a developer could use these slash commands to quickly deploy applications, manage system resources, or troubleshoot issues without needing to remember complex command syntax. Implementing the Claude-Code-Linux-Desktop-Slash-Commands skill is straightforward, provided users have a basic understanding of Linux commands and system administration principles. As organizations increasingly adopt AI-first workflows, integrating such automation skills becomes essential for maximizing efficiency and reducing manual workload. This skill not only fits seamlessly into existing workflows but also empowers users to harness the full potential of AI in managing their Linux desktop environments.
[{"step":1,"action":"Set up API access","details":"Obtain Sortd API key from your Sortd account settings and Gmail API credentials from Google Cloud Console. Store these securely in environment variables or a configuration file.","tip":"Use `export SORTD_API_KEY='your_key_here'` in your terminal session to avoid hardcoding sensitive data in scripts."},{"step":2,"action":"Customize the script for your workflow","details":"Modify the Gmail search query (line 35) to match your specific Sortd follow-up tags or labels. Update the board ID in the track_followup function to point to your actual Sortd board.","tip":"Test your Gmail query in the Gmail web interface first to ensure it returns the expected emails before automating."},{"step":3,"action":"Test in a safe environment","details":"Run the script with the `--dry-run` flag or in a test environment first. Use the temporary directory structure to verify all API calls work without making permanent changes.","tip":"Add `set -x` at the top of the script temporarily to see detailed execution logs during testing."},{"step":4,"action":"Schedule regular execution","details":"Set up a cron job to run the script periodically (e.g., every 15 minutes). Use `crontab -e` to add: `*/15 * * * * /path/to/sortd_followup_tracker.sh >> /var/log/sortd_followup_tracker.log 2>&1`","tip":"Consider adding a lock file mechanism to prevent concurrent executions if your script runs frequently."},{"step":5,"action":"Monitor and refine","details":"Review the log file regularly to identify any failures. Adjust error handling and retry logic based on common failure patterns you observe.","tip":"Set up log rotation for your log file using logrotate to prevent it from growing too large over time."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/danielrosehill/Claude-Code-Linux-Desktop-Slash-CommandsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a Linux desktop automation script using Claude Code to [ACTION]. The script should handle [SPECIFIC_TASK] with error handling for [POTENTIAL_ERRORS]. Include comments explaining each step and ensure it works on [TARGET_LINUX_DISTRO]. Test the script in a temporary directory before execution.
```bash
#!/bin/bash
# Linux Desktop Automation Script for Sortd Integration
# Purpose: Automate email follow-up tracking in Sortd via Gmail API
# Author: AI Assistant
# Date: 2023-11-15
# Tested on: Ubuntu 22.04 LTS
# Configuration
SORTD_API_KEY="your_sortd_api_key_here"
GMAIL_API_KEY="your_gmail_api_key_here"
TEMP_DIR="/tmp/sortd_automation_$(date +%s)"
LOG_FILE="/var/log/sortd_followup_tracker.log"
# Create temporary directory
mkdir -p "$TEMP_DIR" || {
echo "$(date) - ERROR: Failed to create temp directory $TEMP_DIR" >> "$LOG_FILE"
exit 1
}
# Function to check Sortd API connectivity
check_sortd_connection() {
curl -s -o /dev/null -w "%{http_code}" \
"https://api.sortd.com/v1/status" \
-H "Authorization: Bearer $SORTD_API_KEY" \
-H "Content-Type: application/json" | grep -q "200"
return $?
}
# Function to fetch unread emails with follow-up tags
fetch_unread_emails() {
echo "$(date) - Fetching unread emails with follow-up tags..." >> "$LOG_FILE"
# Using Gmail API to search for emails with Sortd follow-up labels
python3 -c "
import json
import requests
# Gmail API endpoint for messages
url = 'https://www.googleapis.com/gmail/v1/users/me/messages/list'
params = {
'q': 'label:sortd-followup is:unread',
'maxResults': 50,
'includeSpamTrash': False
}
headers = {'Authorization': 'Bearer YOUR_GMAIL_API_KEY'}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
messages = response.json().get('messages', [])
for msg in messages:
print(f\"Processing message ID: {msg['id']}\")
# Additional processing would go here
# For example: Update Sortd board with email metadata
else:
print(f\"Failed to fetch emails: {response.text}\")
" > "$TEMP_DIR/gmail_response.json"
if [ $? -ne 0 ]; then
echo "$(date) - ERROR: Failed to fetch emails from Gmail API" >> "$LOG_FILE"
return 1
fi
return 0
}
# Function to update Sortd board with follow-up status
track_followup() {
local email_id="$1"
local subject="$2"
local sender="$3"
echo "$(date) - Tracking follow-up for email: $subject" >> "$LOG_FILE"
# Create payload for Sortd API
cat > "$TEMP_DIR/payload.json" <<EOF
{
"email_id": "$email_id",
"subject": "$subject",
"sender": "$sender",
"status": "followup_required",
"priority": "high",
"board_id": "sortd-followup-board-12345"
}
EOF
# Call Sortd API to update board
curl -s -X POST \
"https://api.sortd.com/v1/boards/entries" \
-H "Authorization: Bearer $SORTD_API_KEY" \
-H "Content-Type: application/json" \
-d @"$TEMP_DIR/payload.json" -o "$TEMP_DIR/sortd_response.json"
if [ $? -ne 0 ]; then
echo "$(date) - ERROR: Failed to update Sortd board" >> "$LOG_FILE"
return 1
fi
# Verify response
if grep -q '"status": "success"' "$TEMP_DIR/sortd_response.json"; then
echo "$(date) - Successfully tracked follow-up in Sortd" >> "$LOG_FILE"
return 0
else
echo "$(date) - ERROR: Sortd API returned error response" >> "$LOG_FILE"
cat "$TEMP_DIR/sortd_response.json" >> "$LOG_FILE"
return 1
fi
}
# Main execution
main() {
echo "$(date) - Starting Sortd follow-up automation..." >> "$LOG_FILE"
# Verify API connections
if ! check_sortd_connection; then
echo "$(date) - ERROR: Sortd API connection failed" >> "$LOG_FILE"
exit 1
fi
# Fetch and process emails
if ! fetch_unread_emails; then
echo "$(date) - ERROR: Email fetching failed" >> "$LOG_FILE"
exit 1
fi
# Process each email (simplified example)
while read -r email_data; do
email_id=$(echo "$email_data" | jq -r '.id')
subject=$(echo "$email_data" | jq -r '.subject')
sender=$(echo "$email_data" | jq -r '.from')
if ! track_followup "$email_id" "$subject" "$sender"; then
echo "Failed to track follow-up for email: $subject" >&2
fi
done < <(jq -c '.messages[]' "$TEMP_DIR/gmail_response.json")
# Cleanup
rm -rf "$TEMP_DIR"
echo "$(date) - Automation completed successfully" >> "$LOG_FILE"
}
# Run main function with error handling
main || {
echo "$(date) - CRITICAL ERROR: Automation script failed" >> "$LOG_FILE"
exit 1
}
```
### Key Features of This Script:
1. **API Integration**: Connects to both Gmail API (via OAuth) and Sortd API to track follow-up emails directly in Sortd's kanban boards.
2. **Error Handling**: Comprehensive logging to `/var/log/sortd_followup_tracker.log` with timestamps and error details.
3. **Temporary Workflow**: Uses `/tmp/sortd_automation_[timestamp]` for safe temporary file operations.
4. **Status Tracking**: Updates Sortd boards with email metadata including subject, sender, and follow-up status.
5. **Validation**: Verifies API responses before proceeding to subsequent steps.
### Example Use Case:
A sales team uses Sortd to manage their Gmail inbox with kanban-style boards. This script automatically:
- Fetches unread emails tagged with `sortd-followup` from Gmail
- Extracts email metadata (subject, sender, ID)
- Updates the corresponding Sortd board with follow-up status
- Logs all actions for audit purposes
The script can be extended to include additional Sortd features like priority assignment, board column transitions, or automated follow-up reminders based on email content analysis.AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan