Logotipo de Server Md

Server Md

Comunidad
DoiiarX
server-md

管理个人 SERVER.md 运维知识库。Use this skill whenever the user mentions ~/SERVER.md, SERVER.md, 服务器清单, server inventory, tailnet nodes, self-managed servers, WSL/Windows/Ubuntu host notes, or asks Claude to create, locate, update, summarize, or use a personal server runbook. It helps Claude find the canonical SERVER.md across WSL, Windows, native Ubuntu, and remote hosts; preserve progressive disclosure by splitting details into reference files; summarize local machine and managed servers without leaking secrets; and turn server notes into safe operational checklists.

Descripción general

EditorDoiiarX
Repositorioclaude-skills
Nombre de la habilidadserver-md
Estrellas
23
Forks
0
Archivos incluidos
5
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 5 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por DoiiarX en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Server Md en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/DoiiarX/claude-skills/tree/main/server-md
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DoiiarX/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/server-md .claude/skills/server-md
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Server Md en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Server Md automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Server Md no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

SERVER.md 运维知识库 Skill

这个 skill 用来通过 server-md CLI 查询和维护个人服务器清单、资源和运维快捷命令。常见需求走“需求词 → tag → find → show → run/render”的短路径:先用 tag 一次发现候选 shortcut/resource/server,再 show 精确记录,最后按 risk / execute_mode 决定 run、render 或请用户确认。主副本定位、环境排查、schema 维护等场景再使用高级命令。

快速流程

1. 从需求提取候选 tag

从用户原话提取 1–3 个自然 tag;优先用通用词、服务类型、资源类型。同义词可以并查,但不要为了“确认一下”全量扫 sidecar。

用户说法候选 tag
X / Twitter / 推文 / tweets APItweet, tweets, tweets-api, twitter, x, public-api
代理 / SOCKS / 转发proxy, socks, tunnel
Cloudflare / DNS / tunnelcloudflare, cloudflared, tunnel
Tailnet / VPN / 节点网络tailnet, tailscale, headscale
数据库 / 备份 / 日志database, backup, logs

2. find:一次发现候选 shortcut/resource/server

bash
~/.claude/skills/server-md/server-md find --tag <tag> --limit 20 --json
~/.claude/skills/server-md/server-md find --tag tweet --tag twitter --tag x --limit 20 --json

如果只想找可执行入口,限制类型:

bash
~/.claude/skills/server-md/server-md find --tag <tag> --type shortcut --limit 20 --json

如果 tag 不确定,用关键词过滤:

bash
~/.claude/skills/server-md/server-md find --filter <keyword> --limit 20 --json

3. show:查看精确记录

从 find 结果中选出最相关的 shortcut/resource 后,先 show,再决定是否运行。show 用于确认 description、risk、execute_mode、warnings、tips、params。

bash
~/.claude/skills/server-md/server-md shortcut show --category <category> --name <name> --json
~/.claude/skills/server-md/server-md resource show --name <resource-name> --json

如果需要聚合某台服务器上的相关资源和 shortcut:

bash
~/.claude/skills/server-md/server-md server brief --name <server-or-alias> --tag <tag> --json

4. run/render:执行或渲染 shortcut

根据 risk / execute_mode / warnings 决定是否直接运行:

bash
~/.claude/skills/server-md/server-md shortcut run --category <category> --name <name> --execute-mode auto --arg key=value --raw --json
  • risk=read-only 且 execute_mode=auto:通常可以直接 run。
  • execute_mode=render/manual:只渲染命令或按说明操作,不擅自执行远程操作。
  • risk=medium/high、confirm=true、涉及重启/删除/DNS/生产数据/token 轮换:先说明影响,等待用户确认。
  • 默认不使用 --reveal,不输出 token、密码、私钥、完整 host/IP/连接命令。

tag 不确定时:subagent 推荐 tag

需求模糊或 tag 命名不确定时,可以启动一个不继承当前上下文细节的 subagent 做轻量发现。它只需要推荐 tag 和下一步 show 的候选,不要完整跑完任务;主 agent 再继续执行。

推荐 prompt:

text
你只能使用 server-md CLI,不能使用 --reveal,不能读取 sidecar 原文。
给定自然需求:“<用户原始需求>”。
请用少量 `server-md find` 查询判断应该搜索哪些 tag,以及最可能的 resource/shortcut 名称。
返回:推荐 tag 列表、命中的 shortcut/resource、是否有歧义、建议下一步 show 的精确 category/name 或 resource name。

目标输出形态:

text
推荐 tags: <tag1>, <tag2>, <tag3>
下一步 show shortcut: <category>/<name>
下一步 show resource: <resource-name>
歧义: <none|说明>

常用命令

默认输出会 mask secret-like 字段和值,也会 mask IP/host/command/SSH 指纹等连接目标。Mask 格式为 __MASKED_TYPE_hash__,同一真实值在同一 CLI 安装目录内会稳定映射到同一 token,方便判断多行日志是否指向同一对象。stdout/stderr/output 会保留可读日志内容,但会掩码其中的 secret、IP、host 和 SSH 指纹。

find

bash
server-md find --tag <topic> --limit 20 --json
server-md find --tag <topic> --type shortcut --limit 20 --json
server-md find --filter <keyword> --limit 20 --json
server-md find --tag <topic> --type shortcut --type resource --json

Rules:

  • find 同时查询 shortcut/resource/server,结果按 shortcut → resource → server 排序。
  • 多个 --tag 是 OR 语义;--type 可重复,也支持 shortcut,resource 逗号分隔。
  • 普通查询先 find,命中后 show 精确记录;需要单机聚合时才用 server brief。

server

bash
server-md server list --status active --traffic-role primary --limit 20 --json
server-md server list --tail --limit 5 --json
server-md server resolve --name <name-or-alias> --json
server-md server connect --name <name-or-alias> --prefer tailnet --json
server-md server probe --name <name-or-alias> --prefer auto --timeout 5 --json
server-md server probe --name <name-or-alias> --ssh --json
server-md server brief --name <name-or-alias> --tag <topic> --status active --limit 20 --json
server-md server register --name <name> --alias <alias> --user <user> --role <role> --magic-dns <host> --status active --traffic-role primary --json

Notes:

  • connect only renders an SSH command; do not execute it unless the user asks.
  • probe collects DNS, TCP/22, and optional SSH findings in one result; use it for connectivity troubleshooting before guessing.
  • List-like commands use --limit and optional --tail for compact head/tail-style output.
  • --status filters lifecycle state (active, staging, deprecated, retired, disabled, unknown); --traffic-role filters serving role (primary, secondary, staging, none).
  • --role and --user may be repeated; server records store them as roles[] and users[] while remaining compatible with old singular role/user sidecars.
  • Optional fields such as tailnet_ip, magic_dns, public_ip, public_host, identity, proxy_command, notes_file, users, and port may be absent.
  • Prefer omitting unknown optional fields over writing empty strings.

resource

bash
server-md resource list --server <name-or-alias> --tag <topic> --status active --limit 20 --json
server-md resource list --status retired --tail --limit 10 --json
server-md resource show --name <resource-name> --json
server-md resource add --name <name> --server <server> --kind project --path <path> --tag <tag> --status active --traffic-role primary --json

shortcut

bash
server-md shortcut list --server <name-or-alias> --tag <topic> --status active --limit 20 --json
server-md shortcut show --category <category> --name <name> --json
server-md shortcut add --category health --name <name> --host <server> --command '<target-host command with {{param}}>' --transport auto --param param=default --risk read-only --execute-mode render --status active --traffic-role primary --json
server-md shortcut challenge --category <category> --name <name> --arg param=value --json
server-md shortcut run --category <category> --name <name> --execute-mode auto --arg param=value
server-md shortcut run --category <category> --name <name> --execute-mode auto --raw
server-md shortcut run --category <category> --name <name> --execute-mode auto --raw --json
server-md shortcut run --category <category> --name <name> --execute-mode auto --detail
server-md shortcut run --category <category> --name <name> --execute-mode auto --detail --json
server-md shortcut run --category <category> --name <name> --confirm-code <code> --detail --json

Rules:

  • list and show only inspect records.
  • add writes shortcut metadata directly into server-md.json; do not create wrapper files/directories, clone repositories, or change CLI code just to register a shortcut.
  • shortcut.host is executable targeting, not descriptive metadata. With transport=auto, run executes locally only when the sidecar declares/detects that host as the current machine; otherwise it builds the registered SSH connection automatically.
  • Store the command as it should run on the target host, for example systemctl status app --no-pager. Do not manually prepend SSH to new shortcuts.
  • transport=local explicitly runs on the caller even when host is present; use it for public HTTP checks or caller-side orchestration. transport=ssh always uses the registered server connection.
  • Legacy commands that already begin with ssh or tailscale ssh are executed unchanged and marked legacy_explicit_transport; migrate them gradually instead of wrapping them twice.
  • shortcut challenge and shortcut run resolve the same target and template arguments, so pass the same repeated --arg values to both.
  • Template placeholders use {{name}}. Register safe defaults with shortcut add --param name=value; override at run time with repeated shortcut run --arg name=value.
  • Template values are constrained to a safe character set (letters/digits/_.:@%+=,/-) and are substituted by the CLI, not by shell eval.
  • run follows the registered execute_mode: render, manual, or auto.
  • run has two output shapes: raw and detail. Raw prints only stdout/stderr and is the default for log-reading; detail includes metadata plus stdout/stderr.
  • --json is only a format switch for the selected shape: --raw --json returns {stdout,stderr}, while --detail --json returns the full envelope.
  • Every run appends a masked JSONL event to execution.log (default ~/.server-md/ops.jsonl).
  • risk=medium/high or confirm=true requires challenge; the user must provide the confirmation code.
  • Without explicit authorization, render commands instead of executing remote operations.

log

bash
server-md log path --json
server-md log tail --limit 20 --json
server-md log tail --category health --name <shortcut-name> --json

Rules:

  • log path returns the configured JSONL log path.
  • log tail reads recent shortcut execution events; output stays masked by default.

sync

bash
server-md sync plan --server <name-or-alias> --json
server-md sync pull --server <name-or-alias> --dry-run --json
server-md sync push --server <name-or-alias> --scope resources --tag <topic> --dry-run --json
server-md sync bidir --server <name-or-alias> --conflict merge --dry-run --json

Rules:

  • sync only exchanges the target server slice: servers[target], resources whose server is target, and shortcuts whose host is target.
  • Default --max-depth is 1; deeper recursion is intentionally unsupported in this version.
  • push never sends the whole local sidecar to a child server; pull never imports unrelated remote servers.
  • Writes create server-md.json.bak next to the written sidecar and then atomically replace the JSON file.
  • Conflicts default to fail; use --conflict local|remote|newer|merge only when the desired winner is clear.
  • Remote commands, including host-targeted shortcuts, are wrapped in bash -lc so a fish default shell does not parse bash syntax.
  • Successful push/bidirectional sync writes execution.local_server=<target> into the host-scoped sidecar. This prevents a target host from SSHing back into itself.
  • Use repeated --server to sync selected servers only; do not use sync as a broadcast mechanism.

inventory

bash
server-md inventory init --json
server-md inventory list --kind hosts --status active --limit 20 --json
server-md inventory list --kind services --host <host> --tag <tag> --traffic-role primary --json
server-md inventory host-set --name <host> --tailnet-ip <ip> --tag <tag> --status active --json
server-md inventory service-set --name <service> --host <host> --unit <unit> --healthcheck <url> --status active --traffic-role primary --json
server-md inventory validate --json

高级命令

bash
server-md locate --json
server-md env --json
server-md redact-check <paths...> --json
server-md redact-check <paths...> --fix --json
  • locate --json:定位主副本和 sidecar,适用于用户要求查找 SERVER.md、路径异常、迁移或维护 CLI/schema。
  • env --json:查看 CLI 运行环境和配置来源,适用于排查环境差异。
  • redact-check:发布或同步前做脱敏扫描;--fix 会就地改文件。
  • Keep masked output by default.

高级:显示被掩码的真实值

--reveal 是全局参数,必须放在子命令前。只有用户明确要求查看真实值时才用。可以一次 reveal 多个类型;不传类型表示 reveal 全部。

bash
server-md --reveal HOST IP <subcommand> ...
server-md --reveal __MASKED_HOST_ab12cd34ef__ __MASKED_IP_9f8e7d6c5b__ shortcut run --category logs --name newapi-errors --detail --json
server-md --reveal SSH_KEY HOST shortcut run --category logs --name newapi-errors --detail --json
server-md --reveal redact-check <paths...> --json

Mask token 使用稳定格式 __MASKED_TYPE_hash__,例如 __MASKED_HOST_ab12cd34ef__。同一 CLI 安装目录内首次运行会生成持久 salt,因此同一真实值会稳定映射到同一 token,方便跨行判断一致性;不同机器/安装目录不共享 salt。--reveal 支持一次传多个类型或多个具体 mask token:传类型会 reveal 该类型全部值,传具体 token 只 reveal 对应值。

核心原则

  1. Tag-first,find-first,show-before-run

    • 从自然需求先推 1–3 个 tag,优先 find --tag ... 一次发现 shortcut/resource/server。
    • 命中候选后必须 show 精确记录,再根据 risk / execute_mode / warnings 决定 run、render 或请求确认。
    • 普通查询路径是 find → shortcut/resource show → shortcut run/render;定位、环境和维护路径归入“高级命令”。
  2. JSON/sidecar 是事实源

    • server-md.json 决定服务器、资源、快捷命令、warnings、tips、constraints。
    • 通过 CLI 查询这些事实;Markdown 保持为简短入口和参考索引。
  3. 一跳够用就停止

    • show 返回足够信息时,直接给出结论或下一条安全命令。
    • run 只用于已确认的 shortcut;不要为拿 token、host、命令原文而使用 --reveal。
    • 需要聚合上下文时使用 server brief --name <name> --tag <tag> --json。
  4. 敏感信息和网络地址默认不输出

    • 不要输出 token、密码、私钥、SMTP 授权码、完整 Bearer token、完整 cloudflared token、兑换码私钥等。
    • 默认也不要输出 IP、MagicDNS/public host 和连接命令;平时用别名、shortcut、connect/run 渲染流程承接。
    • 远程命令的 stdout/stderr 可以保留结论性日志内容,但必须掩码其中的 secret、IP、host 和 SSH 指纹。
    • 命令示例使用环境变量或占位。
  5. 危险操作先确认

    • 涉及公网、DNS、生产服务、数据、账号状态、删除、重启、token 轮换时,先给计划和影响,不直接执行。

文件结构

text
server-md/
├── SKILL.md
├── server-md
├── examples/
│   └── server-md.example.json
└── references/
    ├── sidecar-config.md
    └── operations-workflow.md

输出风格

  • 用简短表格先给结论,再给命令。
  • 明确说明信息来自 server-md CLI / sidecar 查询,而不是 Markdown 正文。
  • 当信息可能过期时,给出验证命令,而不是假设仍正确。
  • 如命令涉及重启、删除、DNS、Cloudflare、生产数据库、兑换码作废、token 轮换,先给计划,不要直接执行。

相关参考

普通查询不要打开 references。只有在维护 skill / CLI / schema / 安全流程时才读对应文件:

  • examples/server-md.example.json — 完全脱敏的 sidecar 示例。
  • references/sidecar-config.md — sidecar schema 与空值规则维护。
  • references/operations-workflow.md — shortcut 执行与安全规则维护。

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Server Md?

管理个人 SERVER.md 运维知识库。Use this skill whenever the user mentions ~/SERVER.md, SERVER.md, 服务器清单, server inventory, tailnet nodes, self-managed servers, WSL/Windows/Ubuntu host notes, or asks Claude to create, locate, update, summarize, or use a personal server runbook. It helps Claude find the canonical SERVER.md across WSL, Windows, native Ubuntu, and remote hosts; preserve progressive disclosure by splitting details into reference files; summarize local machine and managed servers without leaking secrets; and turn server notes into safe operational checklists.

¿Por qué usar Server Md en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Server Md está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Server Md en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/DoiiarX/claude-skills/tree/main/server-md. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Server Md?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Server Md?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Server Md con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Server Md?

DoiiarX la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇