SKILL.md

  1---
  2name: handling-customer-data
  3description: Handles customer data responsibly by answering questions ABOUT data without ever seeing the data directly. Use when querying Redis, databases, logs, or any source containing customer information like JIDs, emails, phone numbers, or account details.
  4user-invocable: true
  5license: LicenseRef-MutuaL-1.2
  6metadata:
  7  author: Amolith <amolith@secluded.site>
  8---
  9
 10**You must NEVER see customer data directly.** When working with data that may contain customer information (JIDs, emails, phone numbers, names, account IDs, etc.), filter through shell tools to answer questions about the data without the data itself appearing in your context.
 11
 12## Core principle
 13
 14Answer questions ABOUT data, not WITH data. The user may see data directly; you may not.
 15
 16## Approved patterns
 17
 18### Counting matches
 19
 20```bash
 21redis-cli KEYS "pattern-*" | wc -l
 22grep -c "pattern" file.txt
 23```
 24
 25### Boolean checks
 26
 27```bash
 28redis-cli KEYS "pattern-*" | grep -qE "[A-Z]" && echo TRUE || echo FALSE
 29```
 30
 31### Saving for user review
 32
 33```bash
 34redis-cli KEYS "pattern-*" | grep -E "[A-Z]" > results.txt
 35# Report: "Saved N results to results.txt"
 36```
 37
 38### Aggregations
 39
 40```bash
 41redis-cli KEYS "prefix-*" | wc -l
 42cat file.txt | cut -d',' -f2 | sort | uniq -c | sort -rn | head -5
 43# Report: "Top 5 categories by count: [counts only, not values]"
 44```
 45
 46## Prohibited patterns
 47
 48**Never do these:**
 49
 50```bash
 51# DON'T: Print matching data
 52redis-cli KEYS "pattern-*" | grep "something"
 53
 54# DON'T: Show file contents with customer data
 55cat customer_jids.txt
 56
 57# DON'T: Display query results
 58redis-cli GET "jmp_customer_jid-12345"
 59
 60# DON'T: Print filtered results
 61grep "error" /var/log/app.log  # if log contains customer data
 62```
 63
 64## Decision flow
 65
 661. **Does this data source contain customer information?**
 67   - Redis keys/values with JIDs, emails, phones → Yes
 68   - Application logs → Likely yes
 69   - Database tables with customer columns → Yes
 70   - Configuration files → Usually no
 71
 722. **What question am I answering?**
 73   - "How many?" → Use `wc -l`, `grep -c`
 74   - "Does X exist?" → Use `grep -q && echo TRUE || echo FALSE`
 75   - "Which ones match?" → Save to file, report count only
 76   - "What are the values?" → **Stop. Ask user to look directly.**
 77
 783. **Will the output appear in my response?**
 79   - If yes and contains customer data → Redirect to file instead
 80   - If yes and only contains counts/booleans → Acceptable
 81
 82## Example session
 83
 84**User**: "Are there any uppercase JIDs in Redis?"
 85
 86**Good**:
 87
 88```bash
 89redis-cli KEYS "jmp_customer_id-*" | grep -qE "[A-Z]" && echo TRUE || echo FALSE
 90```
 91
 92Response: "TRUE - there are uppercase characters in some JID keys."
 93
 94**User**: "How many?"
 95
 96**Good**:
 97
 98```bash
 99redis-cli KEYS "jmp_customer_id-*" | grep -cE "[A-Z]"
100```
101
102Response: "52 keys contain uppercase characters."
103
104**User**: "Which ones?"
105
106**Good**:
107
108```bash
109redis-cli KEYS "jmp_customer_id-*" | grep -E "[A-Z]" > uppercase_jids.txt
110```
111
112Response: "Saved to `uppercase_jids.txt`. You can review the file directly."
113
114**Bad** (never do this):
115
116```bash
117redis-cli KEYS "jmp_customer_id-*" | grep -E "[A-Z]"
118```
119
120This would print customer JIDs into the response.
121
122## When in doubt
123
124If you're uncertain whether output contains customer data, assume it does. Redirect to a file and let the user review.