Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
mirrord-quickstart【部署与运维】Guide users from zero to their first working mirrord session — check system requirements, install mirrord via CLI, VS Code, or IntelliJ, run a first session against a Kubernetes target, and verify the connection. Use when a user is new to mirrord, wants to install it, needs help running their first session, or wants to debug or test a local process a…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Help new users get mirrord running quickly:
Go one step at a time — don't overwhelm a new user with all options at once, and when they first connect, explain what just happened.
Step 1: Detect user's environment Ask or detect:
Step 2: Verify requirements
# Check kubectl access
kubectl cluster-info
kubectl get pods -A | head -5
If kubectl fails, help them configure it first.
Do not run remote install scripts that pipe a network download into a shell interpreter. Use only methods your organization approves.
Official guide: Follow mirrord installation documentation for supported options (package managers, pinned release binaries with checksum verification, etc.).
Summary for the agent:
Security: Prefer package managers or manually verified binaries from official release artifacts. Never execute installation by piping downloaded content into a shell.
Verify installation:
mirrord --version
# List available targets
mirrord ls
# Run a local process with mirrord
mirrord exec --target pod/<pod-name> -- <your-command>
# Example: Node.js app
mirrord exec --target pod/api-server-7c8d9 -- node app.js
# Example: Python app
mirrord exec --target pod/backend-abc123 -- python main.py
If mirrord ls returns no targets, check that the kubeconfig context points at the right cluster (kubectl config current-context) and list pods in the expected namespace (kubectl get pods -n <namespace>).
After running, verify the connection:
mirrord exec --target pod/<pod-name> -- <your-command>
mirrord exec --target pod/<pod-name> -- env | grep -i database
curl http://<remote-service-url>
Once the first session works, point users to:
mirrord ui — launches a local dashboard showing every active session on the machine, with a live event stream (HTTP requests, file operations, DNS, outgoing connections). See Local UI.mirrord up — for debugging several microservices together from one mirrord-up.yaml (compose-style). Point to the mirrord-up skill.curl. See Debugging from Browser.| Issue | Solution |
|---|---|
| "kubectl not found" | Install kubectl and configure cluster access |
| "No pods found" | Check namespace: kubectl get pods -n <namespace> |
| "Permission denied" | Check RBAC permissions for your kubectl context |
| "Agent failed to start" | Ensure cluster runs Linux kernel 4.20+ |