Borrowing it
Nothing to install: this file belongs to MisonL/Ling. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/MisonL/Ling/main/.agents/skills/server-management/SKILL.mdgit clone --depth 1 https://github.com/MisonL/LingWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/misonl/ling/server-management)<a href="https://agentmods.dev/skills/misonl/ling/server-management"><img src="https://agentmods.dev/badge/skills/misonl/ling/server-management.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01303 |
| Opus 5 | $0.00018 | $0.00651 |
| Sonnet 5 | $0.00007 | $0.00261 |
| Haiku 4.5 | $0.00004 | $0.00130 |
Grade A, and why
server-management scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
服务器管理
面向生产运维的服务器管理原则。
学习如何思考,不是背命令。
1. 进程管理原则
工具选型
| 场景 | 工具 |
|---|---|
| Node.js 应用 | PM2(集群 clustering、重载 reload) |
| 任意应用 | systemd(Linux 原生) |
| 容器 | Docker/Podman |
| 编排 | Kubernetes, Docker Swarm |
进程管理目标
| 目标 | 含义 |
|---|---|
| 崩溃后重启(Restart on crash) | 自动恢复(Auto-recovery) |
| 零停机重载(Zero-downtime reload) | 服务不中断 |
| 集群(Clustering) | 用满 CPU 多核 |
| 持久化(Persistence) | 服务器重启后仍可恢复 |
2. 监控原则
监控什么
| 类别 | 关键指标 |
|---|---|
| 可用性(Availability) | 在线率(Uptime)、健康检查 |
| 性能(Performance) | 响应时间、吞吐量 |
| 错误(Errors) | 错误率、错误类型 |
| 资源(Resources) | CPU、内存、磁盘 |
告警分级策略
| 级别 | 响应 |
|---|---|
| Critical(严重) | 立即处理 |
| Warning(警告) | 尽快排查 |
| Info(信息) | 每日审查 |
监控工具选择
| 需求 | 可选工具 |
|---|---|
| 简单/免费 | PM2 metrics, htop |
| 全链路可观测 | Grafana, Datadog |
| 错误追踪 | Sentry |
| 在线率监控 | UptimeRobot, Pingdom |
3. 日志管理原则
日志策略
| 日志类型 | 用途 |
|---|---|
| 应用日志(Application logs) | 调试、审计 |
| 访问日志(Access logs) | 流量分析 |
| 错误日志(Error logs) | 问题发现 |
日志原则
- 进行 日志轮转(Rotate logs),避免磁盘打满
- 使用 结构化日志(Structured logging)(如 JSON)便于解析
- 合理划分日志级别(error/warn/info/debug)
- 日志中不得出现敏感数据
4. 扩缩容决策
何时扩缩容
| 症状 | 应对 |
|---|---|
| CPU 持续高负载 | 增加实例(水平扩展 horizontal) |
| 内存持续高占用 | 增加 RAM 或修复内存泄漏 |
| 响应变慢 | 先做性能分析(Profile)再扩容 |
| 流量突增 | 自动扩缩容(Auto-scaling) |
扩缩容策略
| 类型 | 适用场景 |
|---|---|
| 垂直扩展(Vertical) | 快速止血、单实例场景 |
| 水平扩展(Horizontal) | 长期可持续、分布式场景 |
| 自动扩缩容(Auto) | 流量波动明显 |
5. 健康检查原则
健康状态判定
| 检查项 | 含义 |
|---|---|
| HTTP 200 | 服务可响应 |
| 数据库已连接 | 数据可访问 |
| 依赖可用 | 外部服务可达 |
| 资源正常 | CPU/内存未耗尽 |
健康检查实现方式
- 简单模式:仅返回 200
- 深度模式:检查所有关键依赖
- 按负载均衡器(Load Balancer)的接入需求选择
6. 安全原则
| 领域 | 原则 |
|---|---|
| 访问控制(Access) | 仅用 SSH key,禁用口令登录 |
| 防火墙(Firewall) | 只开放必要端口 |
| 更新(Updates) | 定期打安全补丁 |
| 密钥管理(Secrets) | 放环境变量,不落地文件 |
| 审计(Audit) | 记录访问与变更 |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 162 lines · 37 tokens per session scan A 55a668006cfe
server-management is a skill published in the GitHub repository MisonL/Ling (8 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 1,303 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
deploy-docker-compose
Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…
compute-env-setup
Set up a reproducible Feynman compute environment for research jobs. Use when a task needs Python/R packages, GPU libraries, containers, Modal, SSH, caches, or managed model runtime setup.
securing-kubernetes-on-cloud
This skill covers hardening managed Kubernetes clusters on EKS, AKS, and GKE by implementing Pod Security Standards, network policies, workload identity, RBAC scoping, image admission controls, and runtime security monitoring. It addresses cloud-specific security features including IRSA for EKS, Workload Identity for…
detecting-privilege-escalation-in-kubernetes-pods
Detect and prevent privilege escalation in Kubernetes pods by monitoring security contexts, capabilities, and syscall patterns with Falco and OPA policies.
implementing-rbac-hardening-for-kubernetes
Harden Kubernetes Role-Based Access Control by implementing least-privilege policies, auditing role bindings, eliminating cluster-admin sprawl, and integrating external identity providers.
docker-socket-mount
Docker / containerd socket mounted into a container → host RCE. Common in CI runners, GitOps controllers (ArgoCD, Flux), and 'Docker-in-Docker' setups. Single-command escape via docker run --rm --privileged -v /:/host alpine chroot /host.