Agent Skillsnetalertx/NetAlertX › devcontainer-management

devcontainer-management

GitHub

指导识别、管理和运行 NetAlertX 开发容器内的命令。用于在容器中执行测试、设置脚本或排查容器相关问题,确保正确找到并操作目标容器。

.gemini/skills/devcontainer-management/SKILL.md netalertx/NetAlertX

Trigger Scenarios

用户请求在开发环境中运行命令 需要执行测试或设置脚本 排查开发容器相关问题

Install

npx skills add netalertx/NetAlertX --skill devcontainer-management -g -y
More Options

Non-standard path

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

Use without installing

npx skills use netalertx/NetAlertX@devcontainer-management

指定 Agent (Claude Code)

npx skills add netalertx/NetAlertX --skill devcontainer-management -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": "devcontainer-management",
    "description": "Guide for identifying, managing, and running commands within the NetAlertX development container. Use this when asked to run commands, testing, setup scripts, or troubleshoot container issues."
}

Devcontainer Management

When starting a session or performing tasks requiring the runtime environment, you must identify and use the active development container.

Finding the Container

Run docker ps to list running containers. Look for an image name containing vsc-netalertx or similar.

docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}" | grep netalertx
  • If no container is found: Inform the user. You cannot run integration tests or backend logic without it.
  • If multiple containers are found: Ask the user to clarify which one to use (e.g., provide the Container ID).

Running Commands in the Container

Prefix commands with docker exec <CONTAINER_ID> to run them inside the environment. Use the scripts in /services/ to control backend and other processes.

docker exec <CONTAINER_ID> bash /workspaces/NetAlertX/.devcontainer/scripts/setup.sh

Note: This script wipes /tmp ramdisks, ensures /data, /data/config, /data/db exist, and restarts services (python server, cron, php-fpm, nginx) by symlinking and running /entrypoint.sh (install/production-filesystem/entrypoint.d/). By default it does not delete existing database or config content - entrypoint.d/25-first-run-db.sh and 20-first-run-config.sh only wipe them when ALWAYS_FRESH_INSTALL=true is set in the environment (default: unset/false, so content is preserved).

Version History

  • a686a01 Current 2026-09-03 06:46

    优化 setup.sh 脚本说明,明确默认保留数据库和配置内容,仅当设置特定环境变量时才清除,增强了文档的鲁棒性和准确性。

  • 8aec57b 2026-07-24 22:13

Same Skill Collection

.claude/skills/plugin-development/SKILL.md
.claude/skills/pr-analysis/SKILL.md
.claude/skills/testing-workflow/SKILL.md
.gemini/skills/logging-standards/SKILL.md
.gemini/skills/mcp-activation/SKILL.md
.gemini/skills/pr-analysis/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/devcontainer-setup/SKILL.md
.github/skills/docker-build/SKILL.md
.github/skills/docker-prune/SKILL.md
.github/skills/logging-standards/SKILL.md
.github/skills/mcp-activation/SKILL.md
.github/skills/plugin-run-development/SKILL.md
.github/skills/pr-analysis/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
a686a01
Hash
bc07361b
Indexed
2026-07-24 22:13

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-03 16:27
浙ICP备14020137号-1 $お客様$