CLI-Anything Bundle #17 — Access Recon Pack

Four NEW agent-native CLI harnesses that answer the identity and access questions every AI agent runs into but usually improvises: who is this process (and is it setuid-root right now), what accounts exist on this host (and which homes and shells are real), which groups hold what (and by which route does the current user belong), and who is logged in at this moment (and who logged in recently). Nothing is inferred that the kernel and the account files do not say — unknown capability bits ride verbatim as bit-N, absent surfaces report honest absence, permission-blocked surfaces report the errno as a verdict, and a session file whose records do not align gets a named refusal instead of a guessed parse.

What's inside

SkillWhat it answers
idpeekWho the current process is: real/effective/saved uid+gid in one labeled view (setuid-root visible instantly), supplementary groups by name, umask probed set-then-restore (two syscalls, restored in the same breath, method printed beside the value), controlling terminal named if one exists, capability set from /proc/self/status decoded — every standard capability named, bits beyond the table carried verbatim as bit-N, never guessed away.
passwdpeekAccount inventory from the password file: system-vs-interactive split with the uid convention STATED in the report, duplicate-uid and duplicate-name detectors reported as facts, shells histogram validated against /etc/shells when readable, home directories existence-checked, non-login shells counted, malformed lines skipped with line numbers and reasons — never silently dropped, never fixed in place.
grouppeekThe group map joined with the running user's membership truth: primary (gid field) vs supplementary (kernel getgroups) routes named separately, privileged-group flags (wheel/sudo/admin by exact name as found in the file, absence = honest exists:false, overridable with --privileged-substrings), shared-gid rows as observations, orphan members cross-checked against passwd — reported, never fixed.
sesspeekLive sessions (utmp) + login history (wtmp) decoded straight from the login stack's own record files: 384-byte records with the kernel's type constants, alignment verified on EVERY read (misaligned file = named refusal, never a silent trim), timestamps local+UTC beside the epoch, UNKNOWN type numbers carried verbatim, honest absent-surface on headless hosts, permission-blocked surfaces reported as verdicts with the errno named.

The pipeline that matters

idpeek (who am I) → grouppeek (who holds me) → passwdpeek (whose accounts exist) → sesspeek (who is logged in). Four read-only stages; the kernel's and the account files' truth stays honest.

The access-recon honesty

Read-only by construction — no writes, no subprocesses, no sockets. The shadow file is NEVER opened by idpeek / passwdpeek / grouppeek: identity and group membership are public data, password hashes belong to the shadow subsystem, and the batteries assert the law in the source (the shadow path appears exactly once — in the law line — never beside an open(). sesspeek opens session records 'rb' and NEVER writes, truncates, or clears a session record — reading a session file changes nothing about a session. The umask probe restores itself in the same breath it probes.

Install — one step per skill

unzip CLI-Anything_Bundle17_AccessRecon_v1.0.zip
# copy any skill folder into your agent's skills directory (OpenClaw, Claude Code, Codex, …)
python3 idpeek/agent-harness/cli_anything/idpeek/__main__.py --json

Verify before you trust

python3 idpeek/agent-harness/cli_anything/idpeek/tests/test_core.py
python3 passwdpeek/agent-harness/cli_anything/passwdpeek/tests/test_core.py
python3 grouppeek/agent-harness/cli_anything/grouppeek/tests/test_core.py
python3 sesspeek/agent-harness/cli_anything/sesspeek/tests/test_core.py

Verified 2026-10-20 on the build host: 263 checks (60 + 80 + 52 + 71), 0 failed, fired twice — plus a clean-room fire from a fresh unzip of this exact zip. Counts adapt to your host; 0 failed is the contract.

Apache-2.0 · stdlib-only · Python 3.8+ · Support: [email protected] — subject "BUNDLE17 ACCESS"