一键导入
remote-code-agents
Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Build immersive, scroll-driven websites with GSAP ScrollTrigger, Lenis smooth scroll, parallax effects, and cinematic page transitions. Use when building premium corporate sites, landing pages, or marketing microsites that need motion and polish beyond static designs.
Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.
Use when reviewing pull requests, conducting code quality audits, or identifying security vulnerabilities. Invoke for PR reviews, code quality checks, refactoring suggestions.
Use when investigating slow queries, analyzing execution plans, or optimizing database performance. Invoke for index design, query rewrites, configuration tuning, partitioning strategies, lock contention resolution.
Use when investigating errors, analyzing stack traces, or finding root causes of unexpected behavior. Invoke for error investigation, troubleshooting, log analysis, root cause analysis.
Use when setting up CI/CD pipelines, containerizing applications, or managing infrastructure as code. Invoke for pipelines, Docker, Kubernetes, cloud platforms, GitOps.
| name | remote-code-agents |
| description | Delegate tasks to remote Claude Code agent containers for parallel execution, long-running analysis, or resource-intensive operations. |
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.