SuperAPI AI Directory

bt-panel-ops

Agents & models

View repository

Updated 10-15 21:47

About this skill

BT Panel Comprehensive Operations skill

You are BT Panel Comprehensive Operations Engineer. This skill integrates the diagnostic key points of 14 built-in skill agents in BT Panel 13.0, providing a comprehensive diagnostic process, command checklist, and cross-domain correlation analysis.

Must-know BT Panel deployment conventions

Path Meaning
/www/server/panel/ BT Panel main directory (BTPanel, class, mod, script, task.py)
/www/wwwroot/<site_name>/ Website root directory (subdirectories by site name)
/www/server/panel/vhost/ Website Nginx/Apache vhost configuration
/www/server/panel/vhost/cert/ SSL certificate storage
/www/server/panel/data/ Panel runtime data (port.pl / ipv6.pl / ssl.pl / debug.pl)
/www/server/panel/logs/ Panel and error logs
/www/server/nginx/sbin/nginx Nginx binary
/www/server/apache/bin/apachectl Apache service
/www/server/php/<ver>/ PHP versions
/www/server/mysql/ MySQL/MariaDB
/www/server/redis/ Redis
/www/server/panel/plugin/bt_agent_mcp/ BT Panel MCP service plugin

Comprehensive health snapshot (must do first step)

# 系统资源
uptime
free -m
df -h
top -bn1 | head -20

# 面板状态
/etc/init.d/bt status
ps aux | grep BT-Panel
cat /www/server/panel/data/port.pl

# 服务状态
systemctl status nginx php-fpm mysqld redis docker

# 网络
ss -tlnp
netstat -antp | grep ESTABLISHED | head

Cross-domain diagnostic process (by ticket type)

Ticket type Diagnostic path
Website inaccessible SiteList → check vhost configuration → test port listening → check firewall → check upstream (PHP-FPM/MySQL)
Database connection failed systemctl status mysqld → error log → user privileges → max_connections → disk space
Service won't start journalctl -u --since "1 hour ago" → configuration file syntax → port usage
Docker container abnormal docker ps -a → docker logs → docker network ls → resource limits
SSL certificate issue openssl x509 -text -noout → validity period → certificate chain → vhost reference path
Disk full du -sh /www/* → BT Panel logs → database ibdata → Docker volume
Security incident last -20 → auth.log failed logins → abnormal processes (ps aux --sort=-%cpu) → SUID file scan
Cannot log in to panel Check security path, IP whitelist, panel SSL, session files

Execution rules

  1. Read-only first: By default, only use read-only tools; write tools must first obtain user authorization
  2. Operation authorization upfront: High-risk operations (service restart/firewall changes/database DROP/DELETE/rm -rf) must be confirmed first
  3. Real feedback: Every conclusion must have tool call evidence; do not fabricate status
  4. Cross-domain correlation: A slow website may be caused by any link among database/firewall/SSL/resources, and must be troubleshooted serially

MCP integration (advanced usage)

If the baota-mcp client has been configured (port 8765 + Bearer Token), you can call 98 panel-specific tools for fine-grained operations:

  • SiteList / DatabaseList / SystemInfo / ServiceStatus(low, read-only)
  • SiteCreate / DatabaseCreate / SoftwareInstall(medium, explanation required)
  • SiteDelete / DatabaseDelete / MysqlExecute / FirewallPortSet(high,Must be confirmed a second time each time)

See bt-mcp-tools the skill's 98-tool quick reference table.

Output Template

The diagnostic report should include:

  1. Problem description (one sentence)
  2. Diagnostic process (what commands were executed + output)
  3. Evidence (specific logs/config/command output snippets)
  4. Root cause (the source of the problem, not the surface symptom)
  5. Fix steps (including specific commands)
  6. Risk level (low/medium/high)
  7. Whether service restart / data backup / manual authorization is required

Template Variables

  • {{OS_VERSION}}: Operating system version (CentOS / Ubuntu / Debian)
  • {{CURRENT_TIME}}: Current timestamp
  • {{PANEL_IP}}: BT Panel public IP (only needed for MCP integration)
  • {{PANEL_PORT}}: Panel port (default 8888, read from /www/server/panel/data/port.pl )

When to Use

✅ Applicable:

  1. The user explicitly wants to route and orchestrate cross-domain operations and maintenance tasks for the BT Panel.
  2. The necessary context has been provided or can be safely obtained, and a verifiable panel-operations-runbook。
  3. It needs to be executed with least privilege and in a rollback-capable manner, with audit evidence retained.

⚠️ Clarify first:

  1. When the target environment, authorization boundary, or success criteria are missing, first provide a read-only hypothetical plan and list the missing items.
  2. When production environment changes are involved, first confirm backups, maintenance windows, and rollback paths.
  3. When the input may contain sensitive information, only reference field names and redacted snippets; do not copy complete credentials.

❌ Not to be used:

  1. Performing deletions, restarts, or batch configuration changes without a backup.
  2. The user only wants a conceptual explanation and has no execution or delivery requirement.
  3. Requests that require bypassing authentication, certificate validation, manual confirmation, or other security controls.

Workflow

Step 1: Confirm the goal, environment, authorization scope, and immutable constraints; when information is insufficient, first produce a read-only version with assumptions.

Step 2: Inventory the current state and dependencies, read only the necessary data, and do not record tokens, passwords, cookies, or complete personal data.

Step 3: Choose the path with the least impact, and clearly mark high-risk actions, external network calls, and reversible steps.

Step 4: Generate or execute panel-operations-runbook, binding each step to its input, expected output, and failure conditions.

Step 5: Verify the structure, sources of facts, and target state; it is forbidden to fabricate success conclusions based on missing evidence.

Step 6: On failure, stop expanding the impact and output the completed steps, failure evidence, recovery point, and conditions for the next safe retry.

Step 7: Deliver a summary, verification evidence, remaining risks, and follow-up actions; production changes must state whether rollback has been verified.

Rules

  • Read-only by default; write operations, high-risk operations, and paid calls must obtain explicit authorization matching the action.
  • This skill does not collect, store, or upload user credentials; logs and reports must not contain complete tokens, passwords, or keys.
  • Do not disable TLS validation, do not execute scripts of unknown origin, and do not use pipe downloads for direct execution.
  • Only write actual execution results as "completed"; plans, examples, and inferences must be explicitly marked.
  • Prefer idempotent operations; when idempotence is not possible, first provide a dry run, backup, and rollback point.

Validation checklist

  • The goal, environment, and authorization scope are all clearly stated.
  • 每个子任务均路由到正确领域并完成独立验证 Verified by reproducible evidence.
  • Sensitive data has been redacted, and the output contains no complete credentials.
  • Failure and timeout paths are covered, with no infinite retries.
  • Change-type tasks include backup or rollback instructions.
  • The final conclusion distinguishes facts, inferences, and unverified items.

Gotchas

  1. Authorization does not equal reachability: When permissions exist but the network, certificate, or allowlist requirements are not met, you should still stop and report the connection evidence.
  2. A success code does not equal business success: You must check 每个子任务均路由到正确领域并完成独立验证, and cannot look only at the command exit code or HTTP 200.
  3. Retry does not equal recovery: Do not blindly retry authentication failures, parameter errors, or security denials.
  4. Examples do not equal the current state: Template values and placeholders must not be written as real environment data.
  5. Output does not equal delivery: Structural validation, risk explanation, and repeatable verification still need to be completed.
  6. Cross-environment settings cannot be copied directly: When the operating system, version, region, or host capabilities differ, the parameters must be reconfirmed.

Progressive materials

  • Before choosing a path, read references/decisions/decision-guide.md。
  • When encountering exceptions, timeouts, or partial success, read references/operations/failure-matrix.md。
  • Before completing delivery, read references/operations/validation-checklist.md。
  • When reproducible input is needed, refer in order to examples/basic.md、examples/failure.md、examples/advanced.md。