7.4 KiB
name, description
| name | description |
|---|---|
| server-operate | Находит сервер и нужное подключение, проверяет или меняет сервис и фиксирует подтверждённый результат. |
Use the server-ops checkout for all repository paths and commands in this skill.
Select the target
- Resolve the alias locally with
ops.py resolve NAMEusing the runner below. Add--service SERVICEonly if the user identifies the server by an existing verified service. For an installation, resolve the target before using the requested service as a qualifier. Clarify unknown or ambiguous targets. - Read
servers/<alias>/connection.ymland the relevant notes inservers/<alias>/server-notes/. Follow onboarding for missing access details or expanded profiles. Use the returned folder name for SSH and Ansible. - Use
--connection NAMEfor a specifically requested endpoint or account. Use--user LOGINwhen it matches exactly one profile, or the default when the request is unqualified. Clarify if the specified details match multiple routes. Use--auth METHODto explicitly select a configured method. If the default is unavailable and the request leaves the method open, explicitly select a verified alternative for the same connection.
Connect and verify
Use the appropriate runner from the selected server-ops checkout root.
| Workstation | Command |
|---|---|
| Linux with activated venv | python3 .agents/scripts/ops.py ssh ALIAS -- COMMAND |
| Native PowerShell with prepared venv | ./.venv/Scripts/python.exe .agents/scripts/ops.py ssh ALIAS -- COMMAND |
Use an interactive terminal and omit -- COMMAND for a shell. Native PowerShell
supports agent and key_file. Use Linux for SOPS-backed SSH and Ansible.
Resolve host-key failures against the trusted fingerprint for the selected
endpoint. If tool permissions block access, use the platform approval flow.
When that remains blocked, give the user the exact local command without
credentials and request only the evidence needed to continue. Label results
reported by the user and verify when access becomes available.
Inspect current state before changing it. For repeatable Linux-controlled
work, reuse or create a playbook under .agents/playbooks/ and run
python3 .agents/scripts/ops.py apply ALIAS PLAYBOOK. Review includes, scope,
and secret handling before running it. Preview with
python3 .agents/scripts/ops.py apply --check ALIAS PLAYBOOK. Review skipped
tasks and check-mode support. Tasks with check_mode: false can still make
changes. Ansible check mode
Install services from verified upstream sources. Check service state, listeners,
and the affected function. Keep network checks within the authorized scope.
- For a read-only host health check or inventory refresh, use server-healthcheck.
- For a service endpoint failure, use service-reachability.
- For runtime configuration drift or persistence checks, use service-config-drift.
- For application backup coverage or an isolated recovery test, use backup-restore-verify.
For Xray or VLESS settings, follow "Configuration research" in the selected
checkout's AGENTS.md.
Identify the Xray-core version and the management panel version when present.
Check the protocol, transport, security settings, and relevant client support
against that release. If a panel generates the configuration, inspect the
settings it actually passes to the core. Validate the resulting configuration
with the installed component's supported checker before reloading.
Xray configuration · Xray-core releases
Back up and roll back sensitive changes
- Before changing live configuration such as Xray or NGINX, identify the active configuration and what the operation can break. Back up the files it changes, including affected includes and persistent panel settings that generate the effective configuration. Verify the copy, preserve file ownership and modes for restoration, and use a private location outside active include paths. Record the verified baseline for each path, including SHA-256 for regular files, type, ownership, mode, link target if applicable, or confirmed absence. Keep the backup and checksums out of Git and command output.
- Immediately before writing, compare live state with that baseline. For regular
files, use
sha256sum --check --status "$manifest"with a private manifest of expected digests and live paths. Check metadata, links, and absences separately. Combine comparison and write in the same server-side step. Use a supported lock or revision precondition when available. For panel-managed settings, compare the persistent settings or their revision because generated files can change independently. On a mismatch or an unreadable path, stop further writes, keep the backup, and record the path and phase inHISTORY.md. - Validate the effective configuration with the installed service's checker before reloading. After applying the change, run the service checks above.
- If applying the change fails or a check confirms a regression, repeat the comparison before restoring. Use the expected result from staged data or the last state verified as produced by this operation. Compare untouched paths against the original baseline. Unknown results of partial writes block automatic rollback. When the comparison passes, restore the affected state and remove only files introduced by the operation. Validate and reload or restart as needed, then verify recovery with the same checks. Keep the backup if verification is inconclusive or rollback fails.
- After the requested change passes all checks, clean up only this operation's
temporary backup within the authorized scope. Record the backup disposition,
verification, and any rollback outcome in
HISTORY.md. For a retained backup, record the recovery location without exposing credentials.
Record the result
- Keep authentication status scoped to its connection and method. Record
verifiedon successful authentication,rejectedon a confirmed authentication denial,disabledwhen verified policy disables it, andunverifiedfor a new or changed credential awaiting a test. Leave existing authentication evidence alone when the failure was a timeout or host-key mismatch. Follow initialization for access changes. - Record verified SSH users and roles in named profiles or in the legacy
usersmap when that format is in use. Use scalarauth: disabledfor non-login accounts in the legacy map. Record other OS account facts in the inventory. Keep app credential references in service notes and their values in SOPS. Use the credential commands. - Update verified aliases, domains, and service IDs in the connection card.
Update the inventory and service notes as applicable. Record the dated
result, relevant check and redacted evidence in
HISTORY.md. Useservers/EXAMPLE.server/server-notes/README.mdin the selected checkout and follow "Operational records" in that checkout'sAGENTS.md.