Safe CLI Commands - Read-Only Execution Skill
Overview
This skill provides a comprehensive reference for running command line programs in safe, read-only mode. It documents environment variables, command-line flags, and configuration options to:
- Query-only operations - Retrieve information without modifications
- Dry-run mode - Preview changes without applying them
- Read-only access - Prevent accidental writes or deletions
- Safe defaults - Use non-destructive command alternatives
- Audit and inspection - Tools for system analysis without changes
Coverage
- 149 programs documented
- 111 unique categories (version control, cloud CLIs, databases, security, monitoring, etc.)
- Multi-platform coverage: Linux, macOS, Windows
- Includes: Core utilities, development tools, CI/CD tools, cloud platforms, container tools
Structure
/
├── SKILL.md # This file - skill overview
├── INDEX_BY_NAME.md # Program index alphabetically
├── INDEX_BY_CATEGORY.md # Program index by category
├── PLATFORM_COVERAGE.md # Platform coverage statistics
├── programs/ # Individual program documentation (155 files)
│ ├── git.md
│ ├── curl.md
│ ├── aws.md
│ ├── docker.md
│ └── ...
└── scripts/ # Helper scripts (if needed)
Quick Reference
See the program indexes for complete listings:
- INDEX_BY_NAME.md - Alphabetical listing of all programs
- INDEX_BY_CATEGORY.md - Programs organized by category
- PLATFORM_COVERAGE.md - Platform coverage statistics
Universal Safe Mode Environment Variables
| Variable |
Value |
Effect |
DRY_RUN |
true |
Many tools respect this for preview mode |
NO_WRITE |
1 |
Prevent write operations where supported |
READ_ONLY |
1 |
Enable read-only mode where available |
TERM |
dumb |
Minimal terminal, prevents interactive prompts |
TZ |
UTC |
Sets timezone, prevents timezone prompts |
PYTHONUNBUFFERED |
1 |
Unbuffered Python output |
Safe Command Patterns by Category
Version Control (Git, GitHub, GitLab)
- Use
git status, git log, git show - never git commit, git push
- Use
--dry-run with git operations that might modify
- Clone with
--depth 1 for read-only inspection
Cloud Platforms (AWS, Azure, GCP)
- Use
describe-*, get-*, list-* commands only
- Avoid
create-*, delete-*, update-*, put-*
- Use IAM read-only roles when possible
Container & Orchestration (Docker, Kubernetes)
- Use
docker inspect, docker logs, docker ps
- Use
kubectl get, kubectl describe, kubectl logs
- Avoid
docker run, kubectl apply, kubectl delete
Databases (MySQL, PostgreSQL, MongoDB)
- Use
SELECT queries only - never INSERT, UPDATE, DELETE
- Connect with read-only user credentials
- Use
--read-only connection flags where available
File Operations
- Use
cat, less, head, tail for viewing
- Use
ls, find, stat for listing
- Avoid
rm, mv, cp, chmod in production
Program Documentation Format
Each program file includes:
- Platforms supported
- Category
- Safe Commands - Read-only, non-destructive commands
- Dangerous Commands - Commands to avoid in safe mode
- Environment variables - Relevant env vars for safe operation
- Recommended Safe Usage - Example scripts
Safety Guidelines
- Always verify command intent before execution
- Use read-only credentials when available
- Test in staging before running in production
- Log all operations for audit trails
- Use dry-run flags where available
- Avoid sudo/root unless absolutely necessary
Contributing
When adding safe command documentation:
- Identify read-only alternatives for each tool
- Document dangerous commands to avoid
- Test commands in isolated environment
- Note any side effects (logging, metrics)
- Follow the established Markdown format
1---2name: safe-commands3description: Collection of safe, read-only CLI commands for 149 tools. Environment variables and parameters for running command line programs reliably without modifying system state. Includes query-only modes, dry-run options, and non-destructive alternatives.4license: MIT5---67# Safe CLI Commands - Read-Only Execution Skill89## Overview1011This skill provides a comprehensive reference for running command line programs in **safe, read-only mode**. It documents environment variables, command-line flags, and configuration options to:1213- **Query-only operations** - Retrieve information without modifications14- **Dry-run mode** - Preview changes without applying them15- **Read-only access** - Prevent accidental writes or deletions16- **Safe defaults** - Use non-destructive command alternatives17- **Audit and inspection** - Tools for system analysis without changes1819## Coverage2021- **149 programs documented**22- **111 unique categories** (version control, cloud CLIs, databases, security, monitoring, etc.)23- **Multi-platform coverage:** Linux, macOS, Windows24- **Includes:** Core utilities, development tools, CI/CD tools, cloud platforms, container tools2526## Structure2728```29/30├── SKILL.md # This file - skill overview31├── INDEX_BY_NAME.md # Program index alphabetically32├── INDEX_BY_CATEGORY.md # Program index by category33├── PLATFORM_COVERAGE.md # Platform coverage statistics34├── programs/ # Individual program documentation (155 files)35│ ├── git.md36│ ├── curl.md37│ ├── aws.md38│ ├── docker.md39│ └── ...40└── scripts/ # Helper scripts (if needed)41```4243## Quick Reference4445See the program indexes for complete listings:46- [**INDEX_BY_NAME.md**](INDEX_BY_NAME.md) - Alphabetical listing of all programs47- [**INDEX_BY_CATEGORY.md**](INDEX_BY_CATEGORY.md) - Programs organized by category48- [**PLATFORM_COVERAGE.md**](PLATFORM_COVERAGE.md) - Platform coverage statistics4950## Universal Safe Mode Environment Variables5152| Variable | Value | Effect |53|----------|-------|--------|54| `DRY_RUN` | `true` | Many tools respect this for preview mode |55| `NO_WRITE` | `1` | Prevent write operations where supported |56| `READ_ONLY` | `1` | Enable read-only mode where available |57| `TERM` | `dumb` | Minimal terminal, prevents interactive prompts |58| `TZ` | `UTC` | Sets timezone, prevents timezone prompts |59| `PYTHONUNBUFFERED` | `1` | Unbuffered Python output |6061## Safe Command Patterns by Category6263### Version Control (Git, GitHub, GitLab)64- Use `git status`, `git log`, `git show` - never `git commit`, `git push`65- Use `--dry-run` with git operations that might modify66- Clone with `--depth 1` for read-only inspection6768### Cloud Platforms (AWS, Azure, GCP)69- Use `describe-*`, `get-*`, `list-*` commands only70- Avoid `create-*`, `delete-*`, `update-*`, `put-*`71- Use IAM read-only roles when possible7273### Container & Orchestration (Docker, Kubernetes)74- Use `docker inspect`, `docker logs`, `docker ps`75- Use `kubectl get`, `kubectl describe`, `kubectl logs`76- Avoid `docker run`, `kubectl apply`, `kubectl delete`7778### Databases (MySQL, PostgreSQL, MongoDB)79- Use `SELECT` queries only - never `INSERT`, `UPDATE`, `DELETE`80- Connect with read-only user credentials81- Use `--read-only` connection flags where available8283### File Operations84- Use `cat`, `less`, `head`, `tail` for viewing85- Use `ls`, `find`, `stat` for listing86- Avoid `rm`, `mv`, `cp`, `chmod` in production8788## Program Documentation Format8990Each program file includes:91- **Platforms supported**92- **Category**93- **Safe Commands** - Read-only, non-destructive commands94- **Dangerous Commands** - Commands to avoid in safe mode95- **Environment variables** - Relevant env vars for safe operation96- **Recommended Safe Usage** - Example scripts9798## Safety Guidelines991001. **Always verify** command intent before execution1012. **Use read-only credentials** when available1023. **Test in staging** before running in production1034. **Log all operations** for audit trails1045. **Use dry-run** flags where available1056. **Avoid sudo/root** unless absolutely necessary106107## Contributing108109When adding safe command documentation:1101. Identify read-only alternatives for each tool1112. Document dangerous commands to avoid1123. Test commands in isolated environment1134. Note any side effects (logging, metrics)1145. Follow the established Markdown format