Browse Source

feat: Add plugin format, hooks, tool-discovery, thinking rules, and workflows

Priority 1 (Critical):
- Add .claude-plugin/plugin.json for official plugin format
- Add hooks/README.md with pre/post execution examples
- Add skills/tool-discovery with SKILL.md and reference.md

Priority 2 (High Value):
- Add rules/thinking.md with extended thinking triggers
- Add docs/WORKFLOWS.md with 10 workflow patterns

README updates:
- Add plugin install instructions
- Update structure with new directories
- Add tool-discovery to skills table
- Add hooks to Tools & Rules section

Based on research from:
- Anthropic Claude Code Best Practices
- Official Claude Code Plugins documentation
- Community resources (awesome-claude-code, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0xDarkMatter 4 months ago
parent
commit
c8ef93b631
7 changed files with 894 additions and 3 deletions
  1. 78 0
      .claude-plugin/plugin.json
  2. 15 3
      README.md
  3. 287 0
      docs/WORKFLOWS.md
  4. 194 0
      hooks/README.md
  5. 74 0
      rules/thinking.md
  6. 78 0
      skills/tool-discovery/SKILL.md
  7. 168 0
      skills/tool-discovery/reference.md

+ 78 - 0
.claude-plugin/plugin.json

@@ -0,0 +1,78 @@
+{
+  "name": "claude-mods",
+  "version": "1.0.0",
+  "description": "Custom commands, skills, and agents for Claude Code - session continuity, expert agents, modern CLI tools",
+  "author": "0xDarkMatter",
+  "repository": "https://github.com/0xDarkMatter/claude-mods",
+  "license": "MIT",
+  "keywords": [
+    "claude-code",
+    "agents",
+    "commands",
+    "skills",
+    "session-management",
+    "cli-tools"
+  ],
+  "components": {
+    "commands": [
+      "commands/sync.md",
+      "commands/plan.md",
+      "commands/saveplan.md",
+      "commands/loadplan.md",
+      "commands/showplan.md",
+      "commands/review.md",
+      "commands/test.md",
+      "commands/explain.md",
+      "commands/agent-genesis.md",
+      "commands/g-slave.md",
+      "commands/init-tools.md"
+    ],
+    "agents": [
+      "agents/astro-expert.md",
+      "agents/asus-router-expert.md",
+      "agents/aws-fargate-ecs-expert.md",
+      "agents/bash-expert.md",
+      "agents/claude-architect.md",
+      "agents/cloudflare-expert.md",
+      "agents/craftcms-expert.md",
+      "agents/cypress-expert.md",
+      "agents/fetch-expert.md",
+      "agents/firecrawl-expert.md",
+      "agents/javascript-expert.md",
+      "agents/laravel-expert.md",
+      "agents/payloadcms-expert.md",
+      "agents/playwright-roulette-expert.md",
+      "agents/postgres-expert.md",
+      "agents/project-organizer.md",
+      "agents/python-expert.md",
+      "agents/react-expert.md",
+      "agents/rest-expert.md",
+      "agents/sql-expert.md",
+      "agents/tailwind-expert.md",
+      "agents/typescript-expert.md",
+      "agents/vue-expert.md",
+      "agents/wrangler-expert.md"
+    ],
+    "skills": [
+      "skills/agent-discovery",
+      "skills/code-stats",
+      "skills/data-processing",
+      "skills/git-workflow",
+      "skills/project-docs",
+      "skills/project-planner",
+      "skills/python-env",
+      "skills/safe-file-reader",
+      "skills/structural-search",
+      "skills/task-runner",
+      "skills/tool-discovery"
+    ],
+    "rules": [
+      "rules/cli-tools.md"
+    ]
+  },
+  "categories": [
+    "productivity",
+    "development",
+    "workflow"
+  ]
+}

+ 15 - 3
README.md

@@ -6,9 +6,11 @@ Custom commands, skills, and agents for [Claude Code](https://docs.anthropic.com
 
 ```
 claude-mods/
+├── .claude-plugin/     # Plugin metadata
 ├── agents/             # Expert subagents (24)
 ├── commands/           # Slash commands (11)
-├── skills/             # Custom skills (10)
+├── skills/             # Custom skills (11)
+├── hooks/              # Hook examples & docs
 ├── rules/              # Claude Code rules
 ├── tools/              # Modern CLI toolkit docs
 ├── tests/              # Test suites + justfile
@@ -19,7 +21,15 @@ claude-mods/
 
 ## Installation
 
-### Quick Install
+### Plugin Install (Recommended)
+
+```bash
+# In Claude Code, run:
+/plugin marketplace add 0xDarkMatter/claude-mods
+/plugin install claude-mods
+```
+
+### Script Install
 
 **Linux/macOS:**
 ```bash
@@ -77,6 +87,7 @@ Then symlink or copy to your Claude directories:
 | [safe-file-reader](skills/safe-file-reader/) | Read files without permission prompts |
 | [structural-search](skills/structural-search/) | Search code by AST structure with ast-grep |
 | [task-runner](skills/task-runner/) | Run project commands with just |
+| [tool-discovery](skills/tool-discovery/) | Find the right library/tool for any task |
 
 ### Agents
 
@@ -107,12 +118,13 @@ Then symlink or copy to your Claude directories:
 | [wrangler-expert](agents/wrangler-expert.md) | Cloudflare Workers deployment, wrangler.toml |
 | [claude-architect](agents/claude-architect.md) | Claude Code architecture, extensions, MCP, plugins, debugging |
 
-### Tools & Rules
+### Tools, Rules & Hooks
 
 | Resource | Description |
 |----------|-------------|
 | [tools/](tools/) | Modern CLI toolkit - token-efficient replacements for legacy commands |
 | [rules/cli-tools.md](rules/cli-tools.md) | Tool preference rules (fd, rg, eza, bat, etc.) |
+| [hooks/](hooks/) | Hook examples for pre/post execution automation |
 
 #### Web Fetching Hierarchy
 

+ 287 - 0
docs/WORKFLOWS.md

@@ -0,0 +1,287 @@
+# Claude Code Workflows
+
+Recommended patterns for common development tasks.
+
+## Core Workflow: Explore → Plan → Code → Commit
+
+The fundamental Claude Code workflow from [Anthropic's best practices](https://www.anthropic.com/engineering/claude-code-best-practices):
+
+```
+1. EXPLORE - Read files, understand context
+2. PLAN    - Think hard, design approach
+3. CODE    - Implement solution
+4. COMMIT  - Save with descriptive message
+```
+
+### Example
+
+```
+User: "Add user authentication to the app"
+
+1. "Read the existing auth files and user model"
+   → Claude reads relevant files
+
+2. "think harder about the authentication approach"
+   → Claude analyzes options (JWT vs sessions, OAuth integration, etc.)
+
+3. "Implement the authentication following your plan"
+   → Claude writes code
+
+4. "Commit with a descriptive message"
+   → Claude commits changes
+```
+
+---
+
+## Test-Driven Development (TDD)
+
+Write tests first, then implement:
+
+```
+1. Write failing tests for expected behavior
+2. Confirm tests fail (no implementation yet)
+3. Commit tests
+4. Implement code to pass tests
+5. Verify tests pass
+6. Commit implementation
+```
+
+### Example
+
+```
+User: "Add a validateEmail function using TDD"
+
+1. "Write tests for validateEmail - should accept valid emails, reject invalid ones"
+2. "Run the tests to confirm they fail"
+3. "Commit the tests"
+4. "Implement validateEmail to pass the tests"
+5. "Run tests again to verify"
+6. "Commit the implementation"
+```
+
+---
+
+## Code Review Workflow
+
+Multi-step review with subagents:
+
+```
+1. Check staged changes
+2. Review for bugs, security, performance
+3. Generate improvement suggestions
+4. Apply fixes if approved
+```
+
+### Example
+
+```
+User: "Review my staged changes"
+
+1. /review                           # Run code review
+2. "think hard about the security findings"
+3. "Fix the critical issues found"
+4. "Commit the fixes"
+```
+
+---
+
+## Feature Development Workflow
+
+From idea to merged PR:
+
+```
+1. Understand requirements
+2. Explore existing code
+3. Plan implementation
+4. Write tests
+5. Implement feature
+6. Review and refine
+7. Create PR
+```
+
+### Example
+
+```
+User: "Add dark mode to the settings page"
+
+1. "What are the requirements for dark mode?"
+2. "Read the current settings page and theme system"
+3. "think harder about implementing dark mode"
+4. "Write tests for the dark mode toggle"
+5. "Implement the dark mode feature"
+6. /review
+7. "Create a PR for this feature"
+```
+
+---
+
+## Debugging Workflow
+
+Systematic problem investigation:
+
+```
+1. Reproduce the issue
+2. Read relevant code and logs
+3. Think about root cause
+4. Use subagents to verify hypotheses
+5. Implement fix
+6. Add regression test
+```
+
+### Example
+
+```
+User: "Users report login fails intermittently"
+
+1. "Read the authentication logs"
+2. "Read the login handler code"
+3. "think harder about what could cause intermittent failures"
+4. "Use a subagent to check the session storage implementation"
+5. "Fix the identified race condition"
+6. "Add a test to prevent regression"
+```
+
+---
+
+## Refactoring Workflow
+
+Safe, incremental improvements:
+
+```
+1. Ensure tests exist
+2. Plan refactoring approach
+3. Make small, atomic changes
+4. Run tests after each change
+5. Commit incrementally
+```
+
+### Example
+
+```
+User: "Refactor the user service to use dependency injection"
+
+1. "Check test coverage for the user service"
+2. "think hard about the DI refactoring approach"
+3. "Extract the database dependency first"
+   → Run tests
+   → Commit
+4. "Extract the cache dependency"
+   → Run tests
+   → Commit
+5. "Update the service constructor"
+   → Run tests
+   → Commit
+```
+
+---
+
+## Multi-Agent Parallel Workflow
+
+Run multiple Claude instances for faster development:
+
+```
+1. Break work into independent tasks
+2. Assign each task to a separate instance
+3. One instance writes, another verifies
+4. Merge results
+```
+
+### Example
+
+```
+Terminal 1: "Implement the API endpoints"
+Terminal 2: "Write the frontend components"
+Terminal 3: "Write integration tests"
+
+# Later
+"Merge the work from all terminals"
+```
+
+---
+
+## Session Continuity Workflow
+
+Using claude-mods commands for persistent state:
+
+```
+Session 1:
+  /sync                              # Bootstrap context
+  [work on tasks]
+  /saveplan "Stopped at auth module" # Save state
+
+Session 2:
+  /sync                              # Bootstrap context
+  /loadplan                          # Restore tasks
+  /showplan                          # Check status
+  [continue work]
+  /saveplan "Completed auth"         # Save progress
+```
+
+---
+
+## Visual Iteration Workflow
+
+For UI development with screenshots:
+
+```
+1. Provide design mock (Figma screenshot, etc.)
+2. Ask Claude to implement
+3. Take screenshot of result
+4. Iterate until match
+5. Commit when satisfied
+```
+
+### Example
+
+```
+User: [pastes Figma screenshot]
+      "Implement this design"
+
+1. Claude implements initial version
+2. User: [pastes screenshot of result]
+         "The spacing is off, fix it"
+3. Claude adjusts spacing
+4. User: "Looks good, commit it"
+```
+
+---
+
+## Subagent Verification Pattern
+
+Use subagents to verify your work:
+
+```
+1. Complete main task
+2. "Use a subagent to verify this is correct"
+3. Address any issues found
+4. Proceed with confidence
+```
+
+### Example
+
+```
+User: "Implement rate limiting"
+
+1. Claude implements rate limiting
+2. "Use a subagent to review this implementation for edge cases"
+3. Subagent finds issue with concurrent requests
+4. Claude fixes the edge case
+5. "Commit the rate limiting feature"
+```
+
+---
+
+## Quick Reference
+
+| Workflow | Key Steps | When to Use |
+|----------|-----------|-------------|
+| **Explore → Plan → Code → Commit** | Read, think, implement, commit | All development |
+| **TDD** | Test first, then implement | New features, bug fixes |
+| **Code Review** | /review, think, fix | Before PRs |
+| **Feature Dev** | Requirements → PR | New features |
+| **Debugging** | Reproduce, investigate, fix, test | Bug investigation |
+| **Refactoring** | Test, small changes, verify | Code improvement |
+| **Multi-Agent** | Parallel instances | Large tasks |
+| **Session Continuity** | /sync, /saveplan, /loadplan | Multi-session work |
+| **Visual Iteration** | Mock → implement → screenshot → iterate | UI development |
+| **Subagent Verification** | Complete → verify → fix | Critical code |

+ 194 - 0
hooks/README.md

@@ -0,0 +1,194 @@
+# Hooks
+
+Claude Code hooks allow you to run custom scripts at key workflow points.
+
+## Configuration
+
+Add hooks to `.claude/settings.json` or `.claude/settings.local.json`:
+
+```json
+{
+  "hooks": {
+    "PreToolUse": [
+      {
+        "matcher": "Bash",
+        "hooks": ["bash hooks/security-check.sh $TOOL_INPUT"]
+      }
+    ],
+    "PostToolUse": [
+      {
+        "matcher": "Write|Edit",
+        "hooks": ["bash hooks/post-edit.sh $FILE_PATH"]
+      }
+    ]
+  }
+}
+```
+
+## Hook Types
+
+| Hook | Trigger | Use Case |
+|------|---------|----------|
+| `PreToolUse` | Before tool execution | Validate inputs, security checks |
+| `PostToolUse` | After tool execution | Run tests, linting, notifications |
+| `Notification` | On specific events | Alerts, logging |
+| `Stop` | When Claude stops | Cleanup, summaries |
+
+## Examples
+
+### 1. Security Check (PreToolUse)
+
+Detect dangerous patterns before execution:
+
+```bash
+#!/bin/bash
+# hooks/security-check.sh
+# Detects: eval, exec, os.system, pickle, SQL injection patterns
+
+INPUT="$1"
+
+PATTERNS=(
+  "eval("
+  "exec("
+  "os.system("
+  "subprocess.call.*shell=True"
+  "pickle.loads"
+  "__import__"
+  "rm -rf /"
+  "DROP TABLE"
+  "; DROP"
+)
+
+for pattern in "${PATTERNS[@]}"; do
+  if echo "$INPUT" | grep -q "$pattern"; then
+    echo "SECURITY WARNING: Detected potentially dangerous pattern: $pattern"
+    exit 1
+  fi
+done
+
+exit 0
+```
+
+### 2. Auto-Lint (PostToolUse)
+
+Run linter after file edits:
+
+```bash
+#!/bin/bash
+# hooks/post-edit.sh
+
+FILE="$1"
+EXT="${FILE##*.}"
+
+case "$EXT" in
+  ts|tsx|js|jsx)
+    npx eslint --fix "$FILE" 2>/dev/null
+    ;;
+  py)
+    ruff check --fix "$FILE" 2>/dev/null
+    ;;
+  md)
+    # Optional: markdown lint
+    ;;
+esac
+```
+
+### 3. Auto-Test (PostToolUse)
+
+Run tests after code changes:
+
+```bash
+#!/bin/bash
+# hooks/post-test.sh
+
+FILE="$1"
+
+# Only run for source files
+if [[ "$FILE" == *"/src/"* ]]; then
+  # Find and run related test
+  TEST_FILE="${FILE/src/tests}"
+  TEST_FILE="${TEST_FILE/.ts/.test.ts}"
+
+  if [[ -f "$TEST_FILE" ]]; then
+    npm test -- "$TEST_FILE" --passWithNoTests
+  fi
+fi
+```
+
+### 4. Commit Message Hook
+
+Ensure commit messages follow convention:
+
+```bash
+#!/bin/bash
+# hooks/commit-msg.sh
+
+MSG="$1"
+
+# Conventional commits pattern
+PATTERN="^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?: .{1,50}"
+
+if ! echo "$MSG" | grep -qE "$PATTERN"; then
+  echo "ERROR: Commit message doesn't follow conventional commits format"
+  echo "Expected: type(scope): description"
+  echo "Example: feat(auth): add login endpoint"
+  exit 1
+fi
+```
+
+## Settings Example
+
+Full hooks configuration:
+
+```json
+{
+  "hooks": {
+    "PreToolUse": [
+      {
+        "matcher": "Bash",
+        "hooks": ["bash hooks/security-check.sh $TOOL_INPUT"]
+      }
+    ],
+    "PostToolUse": [
+      {
+        "matcher": "Write|Edit",
+        "hooks": [
+          "bash hooks/post-edit.sh $FILE_PATH",
+          "bash hooks/post-test.sh $FILE_PATH"
+        ]
+      }
+    ]
+  }
+}
+```
+
+## Variables Available
+
+| Variable | Description |
+|----------|-------------|
+| `$TOOL_INPUT` | Full input to the tool |
+| `$TOOL_OUTPUT` | Output from tool (PostToolUse only) |
+| `$FILE_PATH` | Path to file being modified |
+| `$TOOL_NAME` | Name of tool being called |
+
+## Best Practices
+
+1. **Keep hooks fast** - They run synchronously and block Claude
+2. **Exit 0 for success** - Non-zero exits halt execution
+3. **Log sparingly** - Output goes to Claude's context
+4. **Use matchers** - Only run hooks for relevant tools
+5. **Test locally first** - Debug before enabling in Claude
+
+## Security Patterns to Detect
+
+From Anthropic's security-guidance plugin:
+
+| Pattern | Risk |
+|---------|------|
+| `eval(`, `exec(` | Code injection |
+| `os.system(`, `subprocess.call.*shell=True` | Command injection |
+| `pickle.loads` | Deserialization attack |
+| `__import__` | Dynamic import abuse |
+| `innerHTML`, `document.write` | XSS |
+| `DROP TABLE`, `; DROP` | SQL injection |
+| `rm -rf /` | Destructive commands |

+ 74 - 0
rules/thinking.md

@@ -0,0 +1,74 @@
+# Extended Thinking
+
+Claude Code supports extended thinking mode for deeper analysis. Trigger with these phrases:
+
+## Thinking Triggers
+
+| Phrase | Budget | Use When |
+|--------|--------|----------|
+| `think` | Low | Quick analysis, simple decisions |
+| `think hard` | Medium | Multiple options to evaluate |
+| `think harder` | High | Complex problems, architectural decisions |
+| `ultrathink` | Maximum | Critical decisions, security review |
+
+## Usage Examples
+
+```
+"think about how to structure this feature"
+"think hard about the trade-offs here"
+"think harder about potential edge cases"
+"ultrathink about the security implications"
+```
+
+## When to Use Each Level
+
+### `think` - Quick Analysis
+- Choosing between 2-3 simple options
+- Reviewing straightforward code
+- Making minor decisions
+
+### `think hard` - Deeper Analysis
+- Planning a new feature
+- Evaluating multiple approaches
+- Debugging non-obvious issues
+
+### `think harder` - Comprehensive Evaluation
+- Architectural decisions
+- Complex refactoring plans
+- Performance optimization strategies
+- Trade-off analysis with many variables
+
+### `ultrathink` - Maximum Depth
+- Security-critical code review
+- Production incident investigation
+- Major architectural changes
+- Risk assessment for breaking changes
+
+## Best Practices
+
+1. **Use during planning** - Think before implementing
+2. **Match complexity** - Don't ultrathink simple tasks
+3. **Combine with subagents** - "think harder, then use subagents to verify"
+4. **Be specific** - "think hard about the authentication flow" > "think hard"
+
+## Example Workflow
+
+```
+1. "Read the authentication module"
+2. "think harder about how to add OAuth support"
+3. [Claude provides detailed analysis]
+4. "Now implement it following the plan"
+```
+
+## Anti-Patterns
+
+```
+BAD:  "ultrathink about this typo fix"
+GOOD: "fix the typo in line 42"
+
+BAD:  "think" (with no context)
+GOOD: "think about the best data structure for this use case"
+
+BAD:  Jumping straight to implementation
+GOOD: "think hard about the approach, then implement"
+```

+ 78 - 0
skills/tool-discovery/SKILL.md

@@ -0,0 +1,78 @@
+---
+name: tool-discovery
+description: Discover the right library or tool for any task. Maps common needs to battle-tested solutions.
+triggers:
+  - library for
+  - tool for
+  - how to parse
+  - how to process
+  - PDF, Excel, images, audio, video
+  - OCR, crypto, chess, ML
+  - parsing, scraping, database
+  - scientific computing, bioinformatics
+  - network analysis, data extraction
+---
+
+# Tool Discovery
+
+Find the right library or tool for your task instead of implementing from scratch.
+
+## When to Use
+
+This skill activates when you need to:
+- Parse file formats (PDF, Excel, images, audio, video)
+- Process data (JSON, YAML, CSV, XML)
+- Implement domain algorithms (crypto, chess, ML)
+- Extract information (OCR, web scraping, data mining)
+- Work with specialized domains (scientific, bioinformatics, network)
+
+## How to Use
+
+1. **Check reference.md** for authoritative recommendations
+2. **Verify availability**: `which <tool>` or `pip list | grep <keyword>`
+3. **Use the recommended tool** instead of manual implementation
+
+## Why This Matters
+
+- Your manual implementation WILL have bugs
+- Battle-tested libraries are proven by thousands of users
+- If you can describe what you need in 2-3 words, a tool almost certainly exists
+
+## Example Queries
+
+| Need | Say | Get |
+|------|-----|-----|
+| Read PDF | "PDF parser" | PyMuPDF, pdfplumber |
+| Extract text from images | "image OCR" | tesseract, paddleocr |
+| Parse Excel | "Excel reader" | openpyxl, pandas |
+| Process audio | "audio processing" | librosa, pydub |
+| Chess engine | "chess library" | python-chess |
+| Scientific computing | "matrix operations" | numpy, scipy |
+
+## Protocol
+
+```
+1. User asks about library/tool for X
+2. INVOKE this skill
+3. READ reference.md for recommendations
+4. VERIFY tool is available (`which`, `pip list`)
+5. USE recommended tool
+6. NEVER implement from scratch what exists
+```
+
+## Anti-Patterns
+
+```
+BAD:  "I'll parse this PDF by reading the binary"
+GOOD: "Let me check reference.md for PDF tools"
+
+BAD:  "I'll analyze this image pixel by pixel"
+GOOD: "Let me use PIL/OpenCV for image processing"
+
+BAD:  "I'll write a JSON parser"
+GOOD: "I'll use the built-in json module"
+```
+
+## See Also
+
+- `reference.md` - Full library reference by category

+ 168 - 0
skills/tool-discovery/reference.md

@@ -0,0 +1,168 @@
+# Tool Discovery Reference
+
+Authoritative recommendations for common tasks. Use these instead of manual implementations.
+
+## File Formats
+
+### Documents
+| Format | Python | CLI | Notes |
+|--------|--------|-----|-------|
+| **PDF** | `PyMuPDF`, `pdfplumber` | `pdftotext` | PyMuPDF for complex, pdfplumber for tables |
+| **Word (.docx)** | `python-docx` | `pandoc` | |
+| **Excel (.xlsx)** | `openpyxl`, `pandas` | | openpyxl for formatting, pandas for data |
+| **CSV** | `pandas`, `csv` | `csvkit` | pandas for analysis, csv for streaming |
+| **JSON** | `json`, `orjson` | `jq` | orjson 10x faster than json |
+| **YAML** | `PyYAML`, `ruamel.yaml` | `yq` | ruamel preserves comments |
+| **TOML** | `tomllib` (3.11+), `toml` | `yq` | |
+| **XML** | `lxml`, `xml.etree` | `xmlstarlet` | lxml for speed |
+| **Markdown** | `markdown`, `mistune` | `pandoc` | |
+
+### Images
+| Task | Python | CLI | Notes |
+|------|--------|-----|-------|
+| **Read/Write** | `Pillow (PIL)` | `imagemagick` | |
+| **Computer Vision** | `opencv-python` | | |
+| **OCR** | `pytesseract`, `paddleocr` | `tesseract` | paddleocr more accurate |
+| **Metadata** | `exifread`, `Pillow` | `exiftool` | |
+| **QR Codes** | `qrcode`, `pyzbar` | `zbarimg` | |
+
+### Audio/Video
+| Task | Python | CLI | Notes |
+|------|--------|-----|-------|
+| **Audio I/O** | `pydub`, `soundfile` | `ffmpeg` | |
+| **Audio Analysis** | `librosa` | | Feature extraction, spectrograms |
+| **Speech-to-Text** | `whisper`, `vosk` | | whisper most accurate |
+| **Video** | `moviepy`, `opencv` | `ffmpeg` | |
+| **Transcoding** | `ffmpeg-python` | `ffmpeg` | |
+
+### Archives
+| Format | Python | CLI |
+|--------|--------|-----|
+| **ZIP** | `zipfile` | `unzip` |
+| **TAR/GZ** | `tarfile` | `tar` |
+| **7z** | `py7zr` | `7z` |
+| **RAR** | `rarfile` | `unrar` |
+
+## Data Processing
+
+### Structured Data
+| Task | Python | CLI |
+|------|--------|-----|
+| **DataFrames** | `pandas`, `polars` | | polars 10x faster |
+| **SQL Queries** | `sqlalchemy`, `sqlite3` | `sqlite3` |
+| **GraphQL** | `gql`, `sgqlc` | |
+| **Protobuf** | `protobuf` | `protoc` |
+
+### Text Processing
+| Task | Python | CLI |
+|------|--------|-----|
+| **Regex** | `re` | `rg`, `grep` |
+| **Find/Replace** | `re.sub()` | `sd`, `sed` |
+| **Diff** | `difflib` | `delta`, `difft` |
+| **Fuzzy Match** | `fuzzywuzzy`, `rapidfuzz` | `fzf` |
+| **NLP** | `spacy`, `nltk` | |
+| **Tokenization** | `tiktoken` | | OpenAI tokenizer |
+
+### Web/Network
+| Task | Python | CLI |
+|------|--------|-----|
+| **HTTP Requests** | `httpx`, `requests` | `curl`, `http` |
+| **Web Scraping** | `beautifulsoup4`, `selectolax` | `firecrawl` |
+| **HTML Parsing** | `lxml`, `html5lib` | |
+| **URL Parsing** | `urllib.parse`, `furl` | |
+| **WebSockets** | `websockets`, `socketio` | `websocat` |
+| **DNS** | `dnspython` | `dig` |
+
+## Domain-Specific
+
+### Scientific Computing
+| Domain | Python |
+|--------|--------|
+| **Arrays/Math** | `numpy` |
+| **Scientific** | `scipy` |
+| **Statistics** | `statsmodels`, `scipy.stats` |
+| **Symbolic Math** | `sympy` |
+| **Plotting** | `matplotlib`, `plotly` |
+| **Geospatial** | `geopandas`, `shapely` |
+
+### Machine Learning
+| Task | Python |
+|------|--------|
+| **General ML** | `scikit-learn` |
+| **Deep Learning** | `pytorch`, `tensorflow` |
+| **NLP Models** | `transformers` (HuggingFace) |
+| **Computer Vision** | `torchvision`, `timm` |
+| **Embeddings** | `sentence-transformers` |
+| **LLM Inference** | `llama-cpp-python`, `vllm` |
+
+### Cryptography
+| Task | Python |
+|------|--------|
+| **Hashing** | `hashlib` |
+| **Encryption** | `cryptography` |
+| **JWT** | `pyjwt` |
+| **Passwords** | `bcrypt`, `argon2-cffi` |
+| **Secrets** | `secrets` (stdlib) |
+
+### Games/Puzzles
+| Domain | Python |
+|--------|--------|
+| **Chess** | `python-chess` |
+| **Sudoku** | `py-sudoku` |
+| **Graph Problems** | `networkx` |
+| **Optimization** | `ortools`, `pulp` |
+
+### Bioinformatics
+| Task | Python |
+|------|--------|
+| **Sequences** | `biopython` |
+| **Genomics** | `pysam`, `pyvcf` |
+| **Protein** | `biotite` |
+
+## CLI Tools (Modern Replacements)
+
+| Instead of | Use | Why |
+|------------|-----|-----|
+| `find` | `fd` | 5x faster, simpler syntax |
+| `grep` | `rg` (ripgrep) | 10x faster, respects .gitignore |
+| `ls` | `eza` | Git status, icons, tree view |
+| `cat` | `bat` | Syntax highlighting |
+| `du` | `dust` | Visual tree sorted by size |
+| `man` | `tldr` | Practical examples only |
+| `sed` | `sd` | Simpler syntax |
+| `diff` | `delta`, `difft` | Syntax highlighting, AST-aware |
+| `top` | `btm` | Better graphs |
+| `ps` | `procs` | Enhanced process view |
+
+## Verification Commands
+
+Before using a tool, verify it's available:
+
+```bash
+# Python packages
+pip list | grep <package>
+python -c "import <package>; print(<package>.__version__)"
+
+# CLI tools
+which <tool>
+<tool> --version
+
+# Install if missing
+pip install <package>
+# or
+uv pip install <package>  # 10-100x faster
+```
+
+## Decision Tree
+
+```
+Need to process X?
+├── Is X a standard file format?
+│   └── Check "File Formats" section
+├── Is X a data transformation?
+│   └── Check "Data Processing" section
+├── Is X domain-specific?
+│   └── Check "Domain-Specific" section
+└── Is X a CLI operation?
+    └── Check "CLI Tools" section
+```