Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:23:51 +08:00
commit ce6744c596
14 changed files with 664 additions and 0 deletions

25
commands/cli.md Normal file
View File

@@ -0,0 +1,25 @@
---
model: claude-sonnet-4-0
allowed-tools: Task, Bash, Read, Write
argument-hint: <task> [preference]
description: CLI tool selection and usage patterns from terminal-native expert
---
# Cli Command
CLI tool selection and usage patterns from terminal-native expert
## Arguments
**$1 (Required)**: task
**$2 (Optional)**: preference
## Examples
```bash
/cli "Find large files efficiently" modern
/cli "Monitor system resources" standard
```
Invoke the cli-wizard agent with: $ARGUMENTS

25
commands/permissions.md Normal file
View File

@@ -0,0 +1,25 @@
---
model: claude-sonnet-4-0
allowed-tools: Task, Bash, Read, Write
argument-hint: <security-requirement>
description: Unix permissions and security configuration guidance
---
# Permissions Command
Unix permissions and security configuration guidance
## Arguments
**$1 (Required)**: security-requirement
**$2 (Optional)**: Additional options
## Examples
```bash
/permissions "Secure API keys in filesystem"
/permissions "Setup shared project directory"
```
Invoke the permissions-guardian agent with: $ARGUMENTS

25
commands/pipe.md Normal file
View File

@@ -0,0 +1,25 @@
---
model: claude-sonnet-4-0
allowed-tools: Task, Bash, Read, Write
argument-hint: <data-task>
description: Unix pipeline design for elegant data flow and processing
---
# Pipe Command
Unix pipeline design for elegant data flow and processing
## Arguments
**$1 (Required)**: data-task
**$2 (Optional)**: Additional options
## Examples
```bash
/pipe "Extract errors from logs and count by type"
/pipe "Find duplicate files by content hash"
```
Invoke the pipe-architect agent with: $ARGUMENTS

67
commands/shell.md Normal file
View File

@@ -0,0 +1,67 @@
---
model: claude-sonnet-4-0
allowed-tools: Task, Bash, Read, Write
argument-hint: <script-purpose> [robustness]
description: Shell script creation with error handling and best practices
---
# Shell Command
Shell script creation with error handling and best practices
## SECURITY WARNING
**CRITICAL: This command creates shell scripts with Bash execution capabilities.**
Scripts you create will have the power to:
- Execute system commands
- Modify/delete files
- Access network resources
- Change permissions and ownership
- Potentially escalate privileges
**BEFORE requesting a script, consider:**
- What's the blast radius if this script is exploited?
- Does this script handle any untrusted input?
- Will this script access sensitive data or credentials?
- What's the minimum privilege level needed?
### Security Requirements Checklist
EVERY shell script must include:
- [ ] **Strict error handling**: `set -euo pipefail`
- [ ] **Input validation**: Validate ALL external inputs with regex
- [ ] **Quoted variables**: ALWAYS quote variables to prevent injection
- [ ] **No hardcoded secrets**: Use env vars or secret management
- [ ] **Secure temp files**: Use `mktemp`, never predictable names
- [ ] **Least privilege**: Run with minimum necessary permissions
- [ ] **Cleanup handlers**: Use `trap` to clean up on exit/error
- [ ] **Safe file permissions**: chmod 700 for scripts, 600 for configs
- [ ] **Command validation**: Validate commands before execution
- [ ] **Audit logging**: Log security-relevant operations
### Dangerous Operations to Avoid
**STOP and think before using:**
- `rm -rf` with variables
- `chmod 777` or similar overly permissive modes
- `sudo` without specific command limits
- `eval` with external input
- Unquoted variables in commands
- Shell injection via unsanitized input
## Arguments
**$1 (Required)**: script-purpose
**$2 (Optional)**: robustness (production requires strict security)
## Examples
```bash
/shell "Backup database with rotation" production
/shell "Deploy application with health checks"
```
Invoke the shell-scripter agent with: $ARGUMENTS

25
commands/text.md Normal file
View File

@@ -0,0 +1,25 @@
---
model: claude-sonnet-4-0
allowed-tools: Task, Bash, Read, Write
argument-hint: <processing-task>
description: Text processing with sed, awk, grep, and regex mastery
---
# Text Command
Text processing with sed, awk, grep, and regex mastery
## Arguments
**$1 (Required)**: processing-task
**$2 (Optional)**: Additional options
## Examples
```bash
/text "Extract email addresses from log"
/text "Transform CSV to JSON format"
```
Invoke the text-surgeon agent with: $ARGUMENTS