name: linux-environment
description: Safe, unprivileged Linux environment discovery skill. Detects active distribution identity, kernel release, execution context (native, container, virtual machine, chroot), init system, and installed compiler toolchains (GCC, Clang, Rust, Meson, CMake, Makepkg). Use when starting a new task to establish target version boundaries, when cross-compiling, or when diagnosing environmental constraints.
license: Apache-2.0
compatibility: Requires Linux environment and Python 3.
metadata:
author: Eshan Roy
version: "0.1.0"
claude_context: "fork"
claude_agent: "general"
Linux Environment: Safe System Discovery
The linux-environment skill performs unprivileged, non-invasive reconnaissance of the active Linux system. It provides accurate version boundaries and execution context descriptors to downstream engineering skills without risking host state alteration.
1. Core Operating Constraints
To ensure host safety and privacy, this skill strictly enforces:
- No
sudo or Root Escalation: All discovery queries must execute as the current unprivileged user.
- No Package Installation: Never run
pacman -S, apt install, or dnf to install discovery tools.
- No Configuration Mutations: Read configuration files in read-only mode (
r); never touch system files.
- No Secret or Environment Dumps: Never dump
env, shell histories, private keys, or credentials.
- No Network Scans: Do not scan network interfaces or connect to remote ports.
- Graceful Failure: If a diagnostic utility is missing, report its absence; never invent synthetic data.
2. Discovery Execution
To perform discovery, execute the deterministic helper script:
python3 skills/linux-environment/scripts/discover_environment.py --format json
Or for human-readable terminal output:
python3 skills/linux-environment/scripts/discover_environment.py --format text
Discovery Facets Returned
- Distribution: Name, ID (
arch, debian, fedora, ubuntu), version number, and base family.
- Kernel: Release string, architecture (
x86_64, aarch64), and LTS status.
- Execution Context:
native: Running directly on host hardware.
container: Running inside Docker, Podman, LXC, or container runtime.
vm: Running inside KVM, QEMU, VMware, or VirtualBox.
chroot: Running in a chroot overlay.
- Init System: Active init daemon (
systemd, sysvinit, or custom) and running version.
- Toolchains & Build Systems:
- Compilers present (
gcc, clang, rustc).
- Build generators present (
meson, cmake, make, ninja, cargo).
- Package managers present (
makepkg, pacman, dpkg, rpm, apt).
- Diagnostic tools present (
systemd-analyze, namcap, strace, gdb, perf).
3. Interpreting Output for Downstream Routing
The JSON descriptor generated by discover_environment.py informs how other skills must act:
- If
context.type == "container": Note that kernel module testing (insmod) is prohibited because containers share the host kernel. Escalate kernel testing to QEMU microVMs.
- If
distribution.id != "arch": Avoid hardcoding Arch-specific pacman or PKGBUILD workflows; adapt instructions to the active distribution format.
- If
toolchains.compilers lacks gcc or clang: Flag missing compiler prerequisites before attempting local software builds.
For detailed detection heuristics and filesystem markers, refer to references/detection-heuristics.md.
1---2name: linux-environment3description: Safe, unprivileged Linux environment discovery skill. Detects active distribution identity, kernel release, execution context (native, container, virtual machin4---5---6name: linux-environment7description: Safe, unprivileged Linux environment discovery skill. Detects active distribution identity, kernel release, execution context (native, container, virtual machine, chroot), init system, and installed compiler toolchains (GCC, Clang, Rust, Meson, CMake, Makepkg). Use when starting a new task to establish target version boundaries, when cross-compiling, or when diagnosing environmental constraints.8license: Apache-2.09compatibility: Requires Linux environment and Python 3.10metadata:11 author: Eshan Roy12 version: "0.1.0"13 claude_context: "fork"14 claude_agent: "general"15---1617# Linux Environment: Safe System Discovery1819The `linux-environment` skill performs unprivileged, non-invasive reconnaissance of the active Linux system. It provides accurate version boundaries and execution context descriptors to downstream engineering skills without risking host state alteration.2021---2223## 1. Core Operating Constraints2425To ensure host safety and privacy, this skill strictly enforces:26- **No `sudo` or Root Escalation**: All discovery queries must execute as the current unprivileged user.27- **No Package Installation**: Never run `pacman -S`, `apt install`, or `dnf` to install discovery tools.28- **No Configuration Mutations**: Read configuration files in read-only mode (`r`); never touch system files.29- **No Secret or Environment Dumps**: Never dump `env`, shell histories, private keys, or credentials.30- **No Network Scans**: Do not scan network interfaces or connect to remote ports.31- **Graceful Failure**: If a diagnostic utility is missing, report its absence; never invent synthetic data.3233---3435## 2. Discovery Execution3637To perform discovery, execute the deterministic helper script:3839```bash40python3 skills/linux-environment/scripts/discover_environment.py --format json41```4243Or for human-readable terminal output:44```bash45python3 skills/linux-environment/scripts/discover_environment.py --format text46```4748### Discovery Facets Returned491. **Distribution**: Name, ID (`arch`, `debian`, `fedora`, `ubuntu`), version number, and base family.502. **Kernel**: Release string, architecture (`x86_64`, `aarch64`), and LTS status.513. **Execution Context**:52 - `native`: Running directly on host hardware.53 - `container`: Running inside Docker, Podman, LXC, or container runtime.54 - `vm`: Running inside KVM, QEMU, VMware, or VirtualBox.55 - `chroot`: Running in a chroot overlay.564. **Init System**: Active init daemon (`systemd`, `sysvinit`, or custom) and running version.575. **Toolchains & Build Systems**:58 - Compilers present (`gcc`, `clang`, `rustc`).59 - Build generators present (`meson`, `cmake`, `make`, `ninja`, `cargo`).60 - Package managers present (`makepkg`, `pacman`, `dpkg`, `rpm`, `apt`).61 - Diagnostic tools present (`systemd-analyze`, `namcap`, `strace`, `gdb`, `perf`).6263---6465## 3. Interpreting Output for Downstream Routing6667The JSON descriptor generated by `discover_environment.py` informs how other skills must act:68- **If `context.type == "container"`**: Note that kernel module testing (`insmod`) is prohibited because containers share the host kernel. Escalate kernel testing to QEMU microVMs.69- **If `distribution.id != "arch"`**: Avoid hardcoding Arch-specific `pacman` or `PKGBUILD` workflows; adapt instructions to the active distribution format.70- **If `toolchains.compilers` lacks `gcc` or `clang`**: Flag missing compiler prerequisites before attempting local software builds.7172For detailed detection heuristics and filesystem markers, refer to [references/detection-heuristics.md](references/detection-heuristics.md).