Agent Skills › netalertx/NetAlertX › install-scripts

install-scripts

GitHub

指导安装脚本的审查与修改,涵盖卸载安全、检查脚本退出码规范及遗留代码处理。

.gemini/skills/install-scripts/SKILL.md netalertx/NetAlertX

Trigger Scenarios

编辑 install/ 目录下的文件 审查涉及安装脚本的 PR

Install

npx skills add netalertx/NetAlertX --skill install-scripts -g -y
More Options

Non-standard path

npx skills add https://github.com/netalertx/NetAlertX/tree/main/.gemini/skills/install-scripts -g -y

Use without installing

npx skills use netalertx/NetAlertX@install-scripts

指定 Agent (Claude Code)

npx skills add netalertx/NetAlertX --skill install-scripts -a claude-code -g -y

安装 repo 全部 skill

npx skills add netalertx/NetAlertX --all -g -y

预览 repo 内 skill

npx skills add netalertx/NetAlertX --list

SKILL.md

Frontmatter
{
    "name": "install-scripts",
    "description": "Read before editing anything under install\/ (production-filesystem\/, ubuntu24\/, etc.) or reviewing a PR that touches it. Covers uninstall safety, why check-*.sh scripts don't all exit the same way, and what's legacy vs. active."
}

Install Scripts

Conventions mined from real review comments on install/* PRs (#1214, #1230, #1235) — not derived from reading the scripts alone, so check current behavior before relying on any of these if the surrounding code has since changed.

Uninstall safety

install/*/uninstall.sh must only remove NetAlertX's own files (/app and its own data) — never touch system packages it depends on (PHP, nginx, avahi, etc.) or other shared system components. A hardware/bare-metal install shares the host with other software; removing a system package on uninstall can break things NetAlertX didn't install.

check-*.sh scripts don't all exit the same way — by design

install/production-filesystem/services/scripts/check-*.sh scripts are not uniform in whether a failure is fatal:

  • Some are fail-fast on purpose: check-first-run-config.sh exits non-zero on a critical failure (can't create the config dir, can't copy default config) so the container doesn't start in a broken state.
  • Some are warning-only on purpose: check-ramdisk.sh exits 0 even when it detects a real issue, letting the app start anyway with suboptimal config.

Don't assume one check's exit-code convention applies to another — check what that specific script is actually guarding before suggesting a change to its exit behavior.

/back is legacy, not the active code path

back/cron_script.sh (and the rest of /back) is legacy, kept only for compatibility with older/external components. The active, maintained version is install/production-filesystem/services/scripts/cron_script.sh. Changes to /back are out of scope for most PRs unless the PR is specifically about compatibility with whatever still depends on it.

Build-time vs. runtime, and generated files

See the devcontainer-configs/devcontainer-management skills for the Dockerfile-generation and build-vs-runtime-file-availability rules — the same "source files aren't present at Docker build time" constraint applies to install/production-filesystem/build/* scripts, not just the devcontainer image.

Version History

  • cd1d0ed Current 2026-09-22 11:06

Same Skill Collection

.claude/skills/database-patterns/SKILL.md
.claude/skills/git-workflow/SKILL.md
.claude/skills/install-scripts/SKILL.md
.claude/skills/plugin-development/SKILL.md
.claude/skills/plugin-readme/SKILL.md
.claude/skills/plugin-review/SKILL.md
.claude/skills/pr-analysis/SKILL.md
.claude/skills/prd-writing/SKILL.md
.claude/skills/scan-pipeline/SKILL.md
.claude/skills/skill-hygiene/SKILL.md
.claude/skills/testing-workflow/SKILL.md
.claude/skills/ux-design-patterns/SKILL.md
.gemini/skills/database-patterns/SKILL.md
.gemini/skills/devcontainer-management/SKILL.md
.gemini/skills/git-workflow/SKILL.md
.gemini/skills/logging-standards/SKILL.md
.gemini/skills/mcp-activation/SKILL.md
.gemini/skills/plugin-review/SKILL.md
.gemini/skills/pr-analysis/SKILL.md
.gemini/skills/prd-writing/SKILL.md
.gemini/skills/project-navigation/SKILL.md
.gemini/skills/scan-pipeline/SKILL.md
.gemini/skills/settings/SKILL.md
.gemini/skills/skill-hygiene/SKILL.md
.gemini/skills/skills-index/SKILL.md
.gemini/skills/testing-workflow/SKILL.md
.gemini/skills/ux-design-patterns/SKILL.md
.github/skills/api-development/SKILL.md
.github/skills/authentication/SKILL.md
.github/skills/code-standards/SKILL.md
.github/skills/database-patterns/SKILL.md
.github/skills/database-reset/SKILL.md
.github/skills/devcontainer-configs/SKILL.md
.github/skills/devcontainer-services/SKILL.md
.github/skills/devcontainer-setup/SKILL.md
.github/skills/docker-build/SKILL.md
.github/skills/docker-prune/SKILL.md
.github/skills/git-workflow/SKILL.md
.github/skills/install-scripts/SKILL.md
.github/skills/logging-standards/SKILL.md
.github/skills/mcp-activation/SKILL.md
.github/skills/plugin-readme/SKILL.md
.github/skills/plugin-review/SKILL.md
.github/skills/plugin-run-development/SKILL.md
.github/skills/pr-analysis/SKILL.md
.github/skills/prd-writing/SKILL.md
.github/skills/project-navigation/SKILL.md
.github/skills/sample-data/SKILL.md
.github/skills/scan-pipeline/SKILL.md

Metadata

Files
0
Version
f6010e0
Hash
1c6c4483
Indexed
2026-09-22 11:06

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 04:24
浙ICP备14020137号-1