elixir-phoenix-permissions
Recommend safe `settings.json` command permissions for Elixir workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Recommend safe `settings.json` command permissions for Elixir workflows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Recommend the right `$elixir-phoenix-*` skill for the current task.
Elixir/Phoenix: Review lifecycle, state-machine, Oban, persistence, pause/resume, retry, and restart-sensitive changes before commit, push, or PR. Use for concurrency-sensitive runtime work to produce explicit blocking vs optional findings, require durability checks, and verify smoke plus restart resilience when applicable.
Capture a solved Phoenix problem as a reusable solution doc.
Audit LiveView assigns for memory bloat, dead assigns, and stream candidates.
Audit project health across architecture, security, performance, tests, and deps.
Analyze Phoenix context boundaries and coupling with `mix xref`.
| name | elixir-phoenix-permissions |
| description | Recommend safe `settings.json` command permissions for Elixir workflows. |
| metadata | {"short-description":"Recommend Codex command permissions"} |
Scan recent session transcripts to find Bash commands you keep approving,
cross-reference with current settings.json, and recommend adding the missing ones.
Primary goal: Discover MISSING permissions from actual usage. Secondary goal: Clean up redundant/garbage entries.
``elixir-phoenix-permissions [--days=14] [--dry-run] — Scans session JSONL files, finds uncovered Bash commands, classifies risk, and recommends settings.json changes. Use --dry-run to preview without writing.
$ARGUMENTS — --days=N (default: 14), --dry-run (preview only).
rm, sudo, kill, curl|sh, mix ecto.reset, git push --force, chmod 777| Level | Examples | Action |
|---|---|---|
| GREEN | ls, cat, grep, tail, which, mkdir, cd, mix test/compile/credo/format, git status/log/diff | Auto-recommend |
| YELLOW | git add/commit/push, mix ecto.migrate, mix deps.get, npm install, docker build/run, source, mise exec | Recommend with note |
| RED | rm -rf, sudo, kill, `curl | sh,mix ecto.reset/drop,git push --force,git reset --hard` |
Run the extraction script from references/extraction-script.md.
This scans all project JSONL files from the last N days, checks each Bash command
against current settings.json patterns, and reports uncovered commands with counts.
IMPORTANT: Run this FIRST. Do NOT skip to settings cleanup.
For each uncovered command from Step 1 output:
Bash(base_command *) format
(use SPACE before *, NOT colon — :* is deprecated)
mkdir -p (94x) → Bash(mkdir *)mise exec (39x) → Bash(mise *)tail -5 (20x) → Bash(tail *)Bash(done), Bash(fi),
Bash(__NEW_LINE_*), partial heredocs, entries covered by broader patterns:* patterns — replace any Bash(name:*) with Bash(name *)
(space before *). The :* suffix is deprecated and may not match reliablyPresent a combined table:
## Permission Recommendations (last N days)
### ADD — Missing permissions (from session scan)
| Pattern to Add | Times Used | Risk | Example |
|...
### REMOVE — Redundant/garbage entries
| Entry | Reason |
|...
### RED — Require manual approval (not adding)
| Command | Count | Risk |
|...
--dry-run)Walk through findings interactively using ask the user directly. Present items
in batches by risk level, starting with GREEN (safest):
Batch 1 — GREEN items (read-only, tests, safe tools):
Use ask the user directly with options:
Batch 2 — YELLOW items (write ops, need caution):
Always show individually — one ask the user directly per item with options:
Batch 3 — REMOVE candidates (garbage/redundant):
Use ask the user directly with options:
Track approved items in a list. After triage, show final summary of what will be added/removed and ask for confirmation.
Merge approved additions into ~/.codex/settings.json under permissions.allow.
Remove approved garbage entries. Report final counts.
references/risk-classification.md — Full classification rulesreferences/settings-format.md — Permission pattern format