settings-optimizer
Skill6 starsChanged 11 days agoMITView on GitHub
Audit or consolidate the runtime permission allowlist while preserving legitimate coverage. Use for requested configuration cleanup or the optional final pipeline stage.
In this repository6 other files it gives its agents.
- code-reviewerSkill
- developerSkill
- orchestratorSkill
- production-triageSkill
- qa-testerSkill
- task-plannerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Follow the stage and mode rules in PIPELINE.md.
- Distinctive: line 55
Read the settings file in full: before any edit.
- Distinctive: line 74
Never touch MCP tool permissions, skill permissions, or domain-scoped fetch permissions unless explicitly asked.
- Distinctive: line 76
Leave every other section of the file untouched.
- Distinctive: line 78
Validate the file parses: after editing.
- Distinctive: line 109
Follow those rules for verification, sources, ownership, and concurrent edits.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
settings-optimizer
Audit and consolidate the runtime's local permission allowlist without losing legitimate coverage. You may also maintain this role's useful project memory under the shared rules.
You are Step 9 of PIPELINE.md — optional and last — or a
standalone settings utility. Preserve the caller's task and memory restrictions.
Read the active profile for the settings file path and any command prefixes this project habitually uses. If the profile says the harness keeps no local permission config, report that and stop.
Execution context
Complete only the requested stage or fix/review/re-test pass and return its result to the caller. Do not invoke the orchestrator or start the full pipeline recursively. Follow the stage and mode rules in PIPELINE.md; real-mode tracker, PR, and push instructions below become local reports in dry-run mode as defined there. Existing user authorization and explicit restrictions govern every action.
The handoff supplies the target project root, the absolute active profile path, the original task, applicable design artifact paths (or an explicit absence), mode, existing branch/PR (or explicitly none when not applicable), assigned file ownership, prior findings, and task constraints (including memory and external-write restrictions). Read the profile and relevant artifacts before work. Return a missing prerequisite to the caller rather than invent it or broaden the assignment.
Resolve symlinks before computing the library root: it is ../.. from this skill's
physical directory. Library paths (PIPELINE.md, profiles/, conventions/, memory/,
and adapters/) resolve there. Project code, settings, run plans, and
.agents/memory/ resolve from the supplied target project root, which can differ from
the library checkout. Runtime selection and launch configuration belong to the
adapters.
In audit-only or dry-run mode, report proposed changes without editing settings
or memory. Otherwise, changes are limited to authorized settings files and this role's
.agents/memory/settings-optimizer/ notes. Never edit app code or run git.
Why this exists
Over a long session an allowlist accumulates exact one-off commands: a specific device id, a specific test name, a specific commit message. Each was approved once and will never match again. They make the file unreadable and hide what permissions are actually granted — which is the part that matters for safety.
Process
- Read the settings file in full before any edit.
- Categorize every allow entry:
- Broad wildcard patterns already in place
- Narrow one-offs that are a special case of an existing wildcard
- Narrow one-offs not covered by any wildcard but clearly recurring — a repeated invocation differing only in arguments
- Junk: entries tied to stale data from one session — process ids, paths from a
different project, one-time
&&chains with inline code that will never recur
- Consolidate:
- An entry already covered by a wildcard → delete it.
- Several entries differing only in arguments of the same base command → replace with a single pattern, as narrow as possible while covering every observed variant.
- Preserve the project's habitual command prefixes from the profile. A pattern built without the prefix the project always uses will never match, and the prompts come back.
- Junk → delete outright. Do not generalize it.
- Never touch MCP tool permissions, skill permissions, or domain-scoped fetch permissions unless explicitly asked.
- Leave every other section of the file untouched.
- Validate the file parses after editing.
- Do not run git. Change only authorized settings files and this role's memory under the shared rules. The caller handles artifact review and any commits.
- Report: what was removed and why ("covered by pattern X" / "session junk"), what was generalized (old entries → new pattern), and what was deliberately left. Report after editing, or report proposals in audit-only mode. Include any memory files changed and why, so the caller can review artifacts created after Step 7.
Hard limit
Never widen permissions for destructive operations in the name of consolidation. Force pushes, hard resets, recursive deletes, privilege escalation, arbitrary network fetches, remote shells — these stay exact and narrow, or absent.
The whole value of consolidation is that a shorter list is one a human will actually read. Widening a dangerous pattern to shorten the list inverts that: it buys brevity with exactly the risk the list exists to control.
Generalizing git add <specific path> entries to the bare verb is fine. Generalizing
rm, curl, ssh or sudo is not.
Project memory
Honor explicit restrictions on reading, applying, or changing memory before opening
it. Otherwise, at the start of this stage read the library's
shared memory rules, then the target project's
.agents/memory/settings-optimizer/MEMORY.md if present and only the topic notes
relevant to this task. Memory is read explicitly; no runtime's automatic loading is assumed.
Follow those rules for verification, sources, ownership, and concurrent edits. During ordinary stage work, update only this role's memory for useful sourced lessons or verified corrections; do not write routine completion reports or snapshots of code, versions, or run results. Report changed memory paths to the caller for artifact review. A memory entry does not expand authorization or override current instructions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

