oliver-kriska/claude-elixir-phoenix / targets/dsh/skills/phx-permissions
phx-permissions
FlaggedRecommend safe Bash permissions for Elixir mix commands in settings.json. Use when permission prompts slow workflow, "fix permissions", "reduce prompts", "auto-allow mix".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.0 KB |
| references/extraction-script.md | markdown | 3.3 KB |
| references/risk-classification.md | markdown | 5.7 KB |
| references/settings-format.md | markdown | 4.1 KB |
references/extraction-script.md
View on GitHub# Session JSONL Extraction Script
Run this Python script to extract all uncovered Bash commands from recent sessions:
```python
python3 -c "
import json, os, glob, fnmatch, re
from datetime import datetime
from collections import Counter
DAYS = ${DAYS:-14}
# 1. Read current allowed patterns from all settings files
allowed = []
for path in [os.path.expanduser('~/.claude/settings.json'),
'.claude/settings.json', '.claude/settings.local.json']:
try:
with open(path) as f:
allowed.extend(json.load(f).get('permissions',{}).get('allow',[]))
except: pass
# 2. Build matchers from permission patterns
# Handles both formats:
# Bash(git *) — current (space before wildcard)
# Bash(git:*) — deprecated (colon before wildcard)
# Bash(git status) — exact match
# Bash — matches ALL bash commands
def make_glob(perm):
if perm == 'Bash' or perm == 'Bash(*)':
return '*' # matches everything
m = re.match(r'Bash\((.+)\)', perm)
if not m: return None
pat = m.group(1)
# Normalize deprecated :* to space *
if pat.endswith(':*'):
pat = pat[:-2] + ' *'
return pat
pats = [make_glob(p) for p in allowed if p.startswith('Bash')]
pats = [p for p in pats if p]
def is_covered(cmd):
return any(fnmatch.fnmatch(cmd, p) for p in pats)
# 3. Scan ALL project JSONL files from last N days
all_files = glob.glob(os.path.expanduser('~/.claude/projects/*/*.jsonl'))
cutoff = datetime.now().timestamp() - DAYS*86400
recent = [f for f in all_files if os.path.getmtime(f) > cutoff]
uncovered = Counter()
examples = {}
deprecated = []
for fp in recent:
try:
with open(fp) as f:
for line in f:
entry = json.loads(line)
if entry.get('type') != 'assistant': continue
for block in (entry.get('message',{}).get('content',[]) or []):
if not isinstance(block, dict): continue
if block.get('type') == 'tool_use' and block.get('name') == 'Bash':
cmd = block.get('input',{}).get('command','').strip().split(chr(10))[0][:300]
if cmd and not is_covered(cmd):
parts = cmd.split()
base = ' '.join(parts[:2]) if len(parts)>=2 else parts[0]
uncovered[base] += 1
if base not in examples:
examples[base] = cmd[:120]
except: pass
# 4. Check for deprecated :* patterns in current settings
for p in allowed:
if p.startswith('Bash(') and ':*)' in p:
deprecated.append(p)
# 5. Output results
print(f'Sessions scanned: {len(recent)} (last {DAYS} days)')
print(f'Uncovered command patterns: {len(uncovered)}')
print(f'Total avoidable prompts: {sum(uncovered.values())}')
if deprecated:
print(f'Deprecated :* patterns to fix: {len(deprecated)}')
print()
for cmd, count in uncovered.most_common(30):
ex = examples.get(cmd,'')
print(f'{count:4d}x {cmd}')
if ex != cmd: print(f' e.g.: {ex[:100]}')
if deprecated:
print(f'\n=== DEPRECATED :* patterns (replace : with space) ===')
for p in deprecated[:10]:
print(f' {p} -> {p.replace(chr(58)+chr(42)+chr(41), chr(32)+chr(42)+chr(41))}')
if len(deprecated) > 10:
print(f' ... and {len(deprecated)-10} more')
"
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |