j.jenga-permission-level
Skill0 starsChanged 23 days agoApache-2.0View on GitHub
Report or switch the current session's 5-tier permission level (Locked/Guarded/Standard/Elevated/Unrestricted) without hand-editing settings.json.
In this repository151 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- j.brainstormSkill
- j.breakSkill
- j.btwSkill
- j.check-inSkill
- j.clearifySkill
- j.close-storySkill
- j.cloud-connectSkill
- j.commitSkill
- j.connectSkill
- j.continueSkill
- j.conventionsSkill
- j.dashboard-shareSkill
- j.dashboardSkill
- j.deep-diveSkill
- j.distributeSkill
- j.docSkill
- j.doc-syncSkill
- j.doooSkill
- j.doSkill
- j.jenga-configSkill
- j.jengaSkill
- j.errorSkill
- j.evaluateSkill
- j.examplifySkill
- j.gitignoreSkill
- j.helpSkill
- j.ideaSkill
- j.improveSkill
- j.initSkill
- j.jbpSkill
- j.lgtmSkill
- j.pi-planSkill
- j.playbook-newSkill
- j.playbookSkill
- j.proceedSkill
- j.publishSkill
- j.reconcile-originSkill
- j.reconcileSkill
- j.redoSkill
- j.skillifySkill
- j.smoke-testSkill
- j.spinoffSkill
- j.statusSkill
- j.testSkill
- j.todoSkill
- j.toolsSkill
- j.unchartedSkill
- j.wtfSkill
- skill-nameSkill
- j.brainstormSkill
- j.breakSkill
- j.btwSkill
- j.check-inSkill
- j.clearifySkill
- j.close-storySkill
- j.cloud-connectSkill
- j.commitSkill
- j.connectSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Read .jenga-permission-level.json at the repo root.
- Distinctive: line 52
Before doing anything else, validate the argument:
- Very specific: line 55
If it does not match — including non-numeric input, decimals, negative numbers, 0, or 6 and above — stop immediately, print a clear error …
- Distinctive: line 59
Do not inline the copy/update logic here — per this repo's scripts-over-inline-logic convention, the switch is owned entirely by a …
- Very specific: line 73
If neither scripts/jenga-permission-level-switch.sh nor node_modules/@jenga-ai/agent/scripts/jenga-permission-level-switch.sh exists yet …
- Distinctive: line 77
When this skill's session concludes, emit the following signal on its own line so the Jenga Router clears the active session:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
jenga-permission-level — Report or Switch Session Permission Level
Purpose
/jenga-permission-level [1-5] reports or switches the current session's permission level:
| Level | Name | Notes |
| 1 | Locked | |
| 2 | Guarded | Conceptual default — always reported as Default: 2, no matter the current session level. |
| 3 | Standard | |
| 4 | Elevated | |
| 5 | Unrestricted |
defaultMode stays acceptEdits at every level; only the permissions block changes. Levels are backed by template files at $([ -f templates/permission-levels/level-<n>-<name>.json ] && echo templates/permission-levels/level-<n>-<name>.json || echo node_modules/@jenga-ai/agent/templates/permission-levels/level-<n>-<name>.json), e.g. $([ -f templates/permission-levels/level-4-elevated.json ] && echo templates/permission-levels/level-4-elevated.json || echo node_modules/@jenga-ai/agent/templates/permission-levels/level-4-elevated.json) (naming convention: <name> is the lowercase level name from the table above — Locked/Guarded/Standard/Elevated/Unrestricted). Those templates are owned by story E33_S01 and are the input the switch script (see below) copies from.
Instructions
1. No argument — report status
Read .jenga-permission-level.json at the repo root. Treat a missing file, or a missing/unparseable session_level field, as session_level: 2.
Run:
n=$(jq -r '.session_level // 2' .jenga-permission-level.json 2>/dev/null || echo 2)
echo "Default: 2 / Session: $n"Print exactly Default: 2 / Session: <n> (e.g. Default: 2 / Session: 4). Do not write any files in this path.
2. Argument <n> provided — validate
Before doing anything else, validate the argument:
- It must match
^[1-5]$(a single digit, 1 through 5). - If it does not match — including non-numeric input, decimals, negative numbers,
0, or6and above — stop immediately, print a clear error (e.g.Error: permission level must be an integer between 1 and 5, got '<input>'), and make no file changes. Do not invoke the switch script.
3. Argument <n> valid — delegate to the switch script
Do not inline the copy/update logic here — per this repo's scripts-over-inline-logic convention, the switch is owned entirely by a dedicated script:
bash "$([ -f scripts/jenga-permission-level-switch.sh ] && echo scripts/jenga-permission-level-switch.sh || echo node_modules/@jenga-ai/agent/scripts/jenga-permission-level-switch.sh)" <n>This script (created by a separate task, E33_S02_T02) is responsible for:
- Copying
$([ -f templates/permission-levels/level-<n>-<name>.json ] && echo templates/permission-levels/level-<n>-<name>.json || echo node_modules/@jenga-ai/agent/templates/permission-levels/level-<n>-<name>.json)over both.claude/settings.jsonand.agents/settings.jsonas a whole-file overwrite — not a merge of thepermissionsblock alone. Two fields vary by level and are expected to change on a switch:permissions.denyandautoMode.allow. All 5 templates carry byte-identicaldefaultMode,env,hooks, andpermissions.allow; that invariant is what keeps the overwrite safe. Two consequences follow: any top-level key present in a destination file but absent from the templates is silently dropped by a switch, and any future per-level difference indefaultMode/env/hookswould take effect without warning. Keep the templates in sync with rootsettings.jsonfor everything except those two varying fields. - Creating or updating
.jenga-permission-level.jsonat the repo root to{"session_level": <n>}.
Relay the script's stdout to the user and honor its exit code:
- Exit code
0— report success, e.g.Switched to level <n> (<name>). - Non-zero exit code — report the script's error output verbatim and treat the switch as failed; do not claim success.
If neither scripts/jenga-permission-level-switch.sh nor node_modules/@jenga-ai/agent/scripts/jenga-permission-level-switch.sh exists yet (e.g. E33_S02_T02 has not landed), report that clearly as a missing dependency rather than attempting to reimplement its logic inline.
Session End
When this skill's session concludes, emit the following signal on its own line so the Jenga Router clears the active session:
[JENGA:SESSION_END:jenga-permission-level]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.

