SuperAPI AI Directory

init-linux-cloud-agent-env

Deployment & operations

View repository

Updated 10-16 04:41

About this skill

Initialize cloud Linux agent environment

This skill is mainly used to initialize the basic tools located in a cloud Linux environment, initialize the necessary MCP clients and specific MCP configurations, CLI tools, and the guidance skills needed in subsequent conversations.

This skill also mainly provides cloud task execution specifications based on GitHub PRs.

Core purpose of this skill

Quick execution process of this skill

  1. Check and install the MCP client: Check whether the current Linux environment has the Python-form MCP CLI from Anthropic. If not, install the Anthropic Python MCP CLI client;
  2. Install MCP services: See the mcp.json in the templates directory below, or directly visit https://github.com/ruan-cat/monorepo/blob/dev/ai-plugins/common-tools/skills/init-linux-cloud-agent-env/templates/mcp.json to view the specific MCP format. Or install MCPs according to the JSON-format MCP configuration specifically sent by the user.
  3. Install CLI: Install the CLIs in the following list to facilitate completing subsequent tasks with the assistance of MCP tools.
    • gh CLI (directly download the official binary tarball to avoid the problem of missing root permissions in the Linux system)
    • vercel cli
  4. Verify MCP availability:
    • Focus on verifying the github MCP
    • Then skill-router-mcp
    • Next vercel MCP
    • Finally neon MCP

Cloud task requirements and precautions based on GitHub PRs

  1. Cloud task acquisition connectors, MCP, or CLI: You are now executing a cloud task in a cloud Linux system. Use all available tools of your github and skill-router-mcp these two tools to complete cloud tasks in a self-testing and self-checking manner based on the main PR and multiple rounds of test PRs.
    • If you cannot complete the connection and use of these two connectors, please interrupt the task in a timely manner and tell me that you have a bug, that you cannot find, and that you cannot find the necessary tools in this conversation round.
    • In the vast majority of cases, your tools basically will not suddenly disappear. If your MCP and CLI suddenly experience tool loss at the Linux sandbox level, please pause in a timely manner and inform me.
  2. Connector priority table:
    • Prioritize the @Github connector; without this connector, no work can be done at all.
    • Next is the @Skill Router MCP connector; this connector is used to obtain guidance skills. Without it, the task can still barely continue to be advanced.
  3. Priority table for backup tool downgrade use:
    • Prioritize using github MCP
    • Next use gh CLI
  4. Context requirements:
    • Actively read the target project root directory's AGENTS.md and the project-level record-bug-fix-memory skill-stored lessons learned.
    • First read .agents\skills\fix-bug\record-bug-fix-memory\SKILL.md and find errors that may be related to this task, as your historical reference.
    • Read the detailed error experiences provided in the .agents\skills\fix-bug\record-bug-fix-memory directory in a targeted manner.
    • Obtain guidance skills through Skill Router MCP : Use this skill-router-mcp to obtain the guidance skills necessary for this task.
  5. PR draft title requirements:
    • Prioritize using @Skill Router MCP Connector/skill-router-mcp to obtain guidance skills git-commit to write the PR draft title.
    • Fallback handling: If you really don't have this connector, then write a title that satisfies the Conventional Commits convention.
    • The default message for this title ispure Chinese. Unless I specifically ask you to write a pure English message, your PR draft title will by default be pure Chinese.
  6. PR draft body executionLong task progress artifactresponsibilities:
    • When you handle PR-based cloud tasks, unexpected interruptions will definitely occur. To make it easier for you to record the specifications, memory, and progress of your complex tasks, you should imitate the superpower skill approach and create four new sections in the PR draft body: spec, plan, memory, and progress, and write your任务规范,任务计划、执行时记忆、任务进度fully into the PR body, making full use of the PR's own capabilities to complete storage.
  7. GitHub URL of the superpower skill: When executing tasks in the cloud, you should proactively use the following skills as your context.
  8. Provide report information after the phase task ends:
    • Proactive wrap-up: When you clearly have GitHub MCP/gh cli tools, you should proactively delete temporary branches and close temporary PRs.
    • Main PR number: Tell me the main PR number that requires me to complete review and approval. I will personally enter the corresponding main PR to complete the review.
    • Main origin branch working branch names: Tell me which origin branches are the main working branches. Avoid accidental deletion by me.
    • Other origin branch temporary branch names: Which temporary cloud branches require my intervention to delete. Or you can proactively delete them yourself.
    • Other temporary PR numbers: Tell me which temporary PRs you have already closed. Or you can proactively close the temporary PRs yourself.

Known pitfalls

GitHub MCP file operations

  • Do not pass encoding: base64 — the tool handles encoding internally; passing it will cause double base64 and result in garbled text
  • Use content to pass raw text — do not manually base64 encode
  • Updates must pass sha — first read the file to obtain the blob SHA, otherwise it will create instead of update
  • Return format is unstable — get_file_contents may return TextContent or EmbeddedResource, you need to check the type before extracting

skill-router MCP

  • Anonymous, no Token required — deployed on Cloudflare Workers, ready to use with direct connection
  • Read-only — skill registry query and loading, writing is not supported
  • Core tools:search_skills、load_skill、list_skill_resources、load_skill_resource

Other references of this skill

The MCP configurations referenced by this skill use the same-directory templates/mcp.json as a template, four in total, all of http type. The tokens in the template are all placeholder text, and must be replaced with the user's own real token during installation:

  • github(highest priority): Endpoint https://api.githubcopilot.com/mcp/, requires Authorization: Bearer <github token> request header.
  • skill-router-mcp: Endpoint https://skill-router-mcp.1219043956.workers.dev/mcp, anonymous available, no token required.
  • vercel: Endpoint https://mcp.vercel.com, requires Authorization: Bearer <vercel token> request header.
  • Neon: Endpoint https://mcp.neon.tech/mcp, requires Authorization: Bearer <neon token> request header.

In addition to MCP, this skill also references the following external resources: