skills/workflow/remote-code-agents/SKILL.md
Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations.
npx skillsauth add liauw-media/codeassist remote-code-agentsInstall 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.
When facing long-running tasks, complex analysis, or workloads better suited for dedicated compute resources, delegate them to remote Claude Code agent containers rather than executing locally.
Note: This skill supports both Claude Code agents (production-ready) and OpenRouter agents (⚠️ experimental, multi-model support).
Remote code agents require the following environment variables:
# Required: API endpoint for your remote agents
export REMOTE_AGENT_API_URL="http://your-agent-host:8080"
# Required: API key for authentication
export REMOTE_AGENT_API_KEY="your-secure-api-key"
# Optional: Default agent type
export REMOTE_AGENT_DEFAULT_TYPE="general"
Note: Never commit API keys or internal endpoints to version control. Use:
.env files (gitignored)Use for: Coding, debugging, refactoring, feature implementation
AGENT_TYPE=general
Use for: Analysis, documentation, architecture review, research
AGENT_TYPE=research
Use for: Code review, test generation, QA analysis
AGENT_TYPE=testing
If you have the claude-task CLI installed:
# Submit a task
TASK_ID=$(claude-task submit \
"Analyze this codebase for performance bottlenecks in API endpoints" \
--repo https://github.com/org/repo \
--type research)
# Check status later
claude-task status $TASK_ID
# Wait for completion
claude-task wait $TASK_ID
Using curl or HTTP clients:
# Submit task
curl -X POST "${REMOTE_AGENT_API_URL}/tasks" \
-H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Review this code for security vulnerabilities",
"repo_url": "https://github.com/org/repo",
"branch": "main",
"agent_type": "testing"
}'
# Response: {"task_id": "uuid", "status": "submitted"}
# Check status
curl -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks/${TASK_ID}"
# Get results
curl -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks/${TASK_ID}/output"
code-review:
stage: review
script:
- |
TASK_ID=$(curl -X POST "${REMOTE_AGENT_API_URL}/tasks" \
-H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
-H "Content-Type: application/json" \
-d "{
\"prompt\": \"Review this merge request for bugs and security issues\",
\"repo_url\": \"${CI_REPOSITORY_URL}\",
\"branch\": \"${CI_COMMIT_REF_NAME}\",
\"agent_type\": \"testing\"
}" | jq -r '.task_id')
# Wait for completion (with timeout)
for i in {1..60}; do
STATUS=$(curl -s -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks/${TASK_ID}" | jq -r '.status')
[ "$STATUS" = "completed" ] && break
sleep 10
done
# Get and display results
curl -s -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks/${TASK_ID}/output"
only:
- merge_requests
- name: Delegate to Remote Agent
env:
REMOTE_AGENT_API_URL: ${{ secrets.REMOTE_AGENT_API_URL }}
REMOTE_AGENT_API_KEY: ${{ secrets.REMOTE_AGENT_API_KEY }}
run: |
TASK_ID=$(curl -X POST "${REMOTE_AGENT_API_URL}/tasks" \
-H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Generate tests for new features",
"repo_url": "${{ github.repository }}",
"agent_type": "testing"
}' | jq -r '.task_id')
echo "Task submitted: ${TASK_ID}"
When working interactively and you need to delegate:
# Explain to user what you're doing
echo "This analysis will take ~15 minutes. Delegating to remote agent..."
# Submit task
TASK_ID=$(curl -X POST "${REMOTE_AGENT_API_URL}/tasks" \
-H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Perform comprehensive security audit of authentication system",
"repo_url": "https://github.com/org/repo",
"agent_type": "research"
}' | jq -r '.task_id')
echo "Task ID: ${TASK_ID}"
echo "You can check status with: curl -H 'X-API-Key: ${REMOTE_AGENT_API_KEY}' ${REMOTE_AGENT_API_URL}/tasks/${TASK_ID}"
# List all tasks
curl -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks"
# Filter by status
curl -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/tasks?status=completed"
# Get available agents
curl -H "X-API-Key: ${REMOTE_AGENT_API_KEY}" \
"${REMOTE_AGENT_API_URL}/agents"
Be specific in your prompts:
❌ Bad: "Fix bugs" ✅ Good: "Review the authentication module for security vulnerabilities, focusing on JWT validation and password hashing"
For tasks > 5 minutes:
# Submit and continue working
TASK_ID=$(submit_task "Long analysis task")
echo "Check later: claude-task status ${TASK_ID}"
# Return to it later when needed
Ensure remote agents can access repositories:
If you want to set up your own remote agent infrastructure:
# Create agent directory
mkdir -p ~/claude-agents
# Configure environment
cat > ~/claude-agents/.env <<EOF
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here
API_KEY=your-secure-random-api-key
EOF
# Deploy using Docker Compose
# (See repository examples for docker-compose.yml)
docker-compose up -d
# 1. Get current branch/repo info (git-platform-cli)
REPO_URL=$(git remote get-url origin)
BRANCH=$(git branch --show-current)
# 2. Delegate code review (remote-code-agents)
TASK_ID=$(claude-task submit \
"Review changes in ${BRANCH} for bugs, security, and performance" \
--repo "${REPO_URL}" \
--type testing)
# 3. Continue local work while agent reviews
# 4. Later: Check results
claude-task status ${TASK_ID}
When delegating to remote agents, I will:
Note: This skill requires external infrastructure. Ensure remote agents are configured and accessible before use.
development
Use when decomposing complex work. Dispatch fresh subagent per task, review between tasks. Flow: Load plan → Dispatch task → Review output → Apply feedback → Mark complete → Next task. No skipping reviews, no parallel dispatch.
development
# Server Documentation System Set up a documentation system that tracks changes and maintains server/project documentation with Claude Code hooks. ## When to Use - Setting up a new server or development environment - Need to track configuration changes over time - Want automatic documentation of work sessions - Maintaining changelog for infrastructure ## Directory Structure ``` ~/docs/ # User home directory (cross-platform) ├── changelog.md # Global over
development
Use when working on multiple features simultaneously. Creates isolated workspaces without branch switching, enabling parallel development.
tools
Use when making commits, creating branches, or managing Git operations. Ensures consistent Git practices and proper commit messages.