Agent Skillsnetalertx/NetAlertX › netalertx-idempotent-setup

netalertx-idempotent-setup

GitHub

重置 devcontainer 环境,通过强制清除并重建运行时状态、挂载临时文件系统及重启服务,解决环境损坏或配置修改后的问题,确保开发环境一致性与可用性。

.github/skills/devcontainer-setup/SKILL.md netalertx/NetAlertX

Trigger Scenarios

修复损坏的开发环境 重新运行启动脚本 重置容器运行时状态 修改设置脚本后

Install

npx skills add netalertx/NetAlertX --skill netalertx-idempotent-setup -g -y
More Options

Non-standard path

npx skills add https://github.com/netalertx/NetAlertX/tree/main/.github/skills/devcontainer-setup -g -y

Use without installing

npx skills use netalertx/NetAlertX@netalertx-idempotent-setup

指定 Agent (Claude Code)

npx skills add netalertx/NetAlertX --skill netalertx-idempotent-setup -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": "netalertx-idempotent-setup",
    "description": "Reprovision and reset the devcontainer environment. Use this when asked to re-run startup, reprovision, setup devcontainer, fix permissions, or reset runtime state."
}

Devcontainer Setup

The setup script forcefully resets all runtime state. It is idempotent—every run wipes and recreates all relevant folders, symlinks, and files.

Command

/workspaces/NetAlertX/.devcontainer/scripts/setup.sh

What It Does

  1. Kills all services (php-fpm, nginx, crond, python3)
  2. Mounts tmpfs ramdisks for /tmp/log, /tmp/api, /tmp/run, /tmp/nginx
  3. Creates critical subdirectories
  4. Links /entrypoint.d and /app symlinks
  5. Creates /data, /data/config, /data/db directories
  6. Creates all log files
  7. Runs /entrypoint.sh to start services
  8. Writes version to .VERSION

When to Use

  • After modifying setup scripts
  • After container rebuild
  • When environment is in broken state
  • After database reset

Philosophy

No conditional logic. Everything is recreated unconditionally. If something doesn't work, run setup again.

Version History

  • 8aec57b Current 2026-07-24 22:14

Same Skill Collection

.gemini/skills/devcontainer-management/SKILL.md
.gemini/skills/mcp-activation/SKILL.md
.gemini/skills/project-navigation/SKILL.md
.gemini/skills/settings/SKILL.md
.gemini/skills/skills-index/SKILL.md
.gemini/skills/testing-workflow/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/docker-build/SKILL.md
.github/skills/docker-prune/SKILL.md
.github/skills/mcp-activation/SKILL.md
.github/skills/plugin-run-development/SKILL.md
.github/skills/project-navigation/SKILL.md
.github/skills/sample-data/SKILL.md
.github/skills/settings-management/SKILL.md
.github/skills/skills-overview/SKILL.md
.github/skills/testing-workflow/SKILL.md

Metadata

Files
0
Version
548d698
Hash
86dbb22f
Indexed
2026-07-24 22:14

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 08:53
浙ICP备14020137号-1 $Гость$