/restruct:review-permissions-restructfrom restruct
Review tool permission decisions across sessions and propose auto-approval rules. Analyzes which tools the user consistently approves, then suggests additions to .restruct/permissions.yaml to eliminate repetitive permission dialogs.
Ships in restruct. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are reviewing tool permission decision data to propose auto-approval rules. This is a data-driven workflow — base all proposals on actual usage patterns, not assumptions.
Query the restruct database for unreviewed tool decisions where the hook passed through but the user approved the tool (it executed successfully):
sqlite3 "$(find ~/.claude/plugins/data -name 'restruct.db' 2>/dev/null | head -1)" \
"SELECT tool_name, tool_input_summary, COUNT(*) as count,
COUNT(DISTINCT session_id) as sessions
FROM tool_decisions
WHERE reviewed = FALSE
AND hook_decision = 'passthrough'
AND outcome = 'executed'
GROUP BY tool_name, tool_input_summary
HAVING count >= 2
ORDER BY count DESC
LIMIT 30;"
If no results, inform the user there are no unreviewed decisions to process and stop.
Group the results into categories:
allowed_paths entries.trusted_urls.For each pattern, note:
Read the current permissions config:
cat .restruct/permissions.yaml 2>/dev/null || echo "No permissions.yaml found"
For each identified pattern, propose a specific change to .restruct/permissions.yaml:
Format each proposal as:
[tool_name] [summarized input][specific YAML entry] to [section]Do NOT propose rules for:
After presenting all proposals, ask the user which ones to accept. For accepted proposals:
.restruct/permissions.yaml with the new rules (create if it doesn't exist)sqlite3 "$(find ~/.claude/plugins/data -name 'restruct.db' 2>/dev/null | head -1)" \
"UPDATE tool_decisions SET reviewed = TRUE, reviewed_at = datetime('now')
WHERE reviewed = FALSE
AND hook_decision = 'passthrough'
AND outcome = 'executed';"
Report:
Remind the user they can run /restruct:review-permissions-restruct again after more sessions to continue improving auto-approvals.
What SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/disable-restructDisable restruct prompt refinement. Prompts pass through to Claude without local LLM preprocessing./enable-restructEnable restruct prompt refinement. Re-enables the local LLM preprocessing of prompts./init-restructGenerate a minimal, research-backed CLAUDE.md for this project. Analyzes the codebase for non-obvious commands and conventions, interviews you for team knowledge, and produces a concise file that stays under 30 rules.Other plugins' skills for the same job
restruct@thejustinwalsh is listed by thejustinwalsh/claude-plugins — review the source before installing
npx claudepluginhub thejustinwalsh/claude-plugins --plugin restruct