agentleFS
frankxaifrankxai/Starlight-Intelligence-System/skills/safety/permission-gate/SKILL.md

safety/permission-gate

Skill10 starsChanged 2 months agoMITView on GitHub

Gate every mutation request against the Claw's declared permission surface — fires before any write to filesystem, vault, or external system. No Claw bypasses this gate. Default skill for Starlight Sentinel and every Claw that carries filesystem or sis_vaults write permissions.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 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.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always active when Sentinel Claw is running

    line 15
  2. Distinctive:

    Default for: Starlight Sentinel

    line 16
  3. Very specific:

    Check: is the requested action within the Claw's declared permissions.* surface?

    line 28
  4. Distinctive:

    Check: is the target path within the declared workspace?

    line 29
  5. Very specific:

    Check: does the Claw's mutation_default allow this action without explicit approval?

    line 30
  6. Very specific:

    If mutation_default: false → escalate to Procedure 2 (Mutation Approval Request)

    line 31
  7. Very specific:

    If within permissions + mutation_default: true → APPROVE, log, return

    line 32
  8. Distinctive:

    If outside permissions → DENY, log reason, return

    line 33
  9. Distinctive:

    Never auto-approve boundary violations

    line 41
  10. Very specific:

    Every decision (APPROVE or DENY) writes to ~/.starlight/logs/permission.jsonl

    line 45
  11. Distinctive:

    Every mutation is logged before it executes

    line 58

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Permission Gate

Every mutation request passes through this gate. No Claw bypasses it.

When This Skill Activates

  • Any Claw attempts to write files, execute shell commands, or export data
  • Keywords: "write", "move", "delete", "execute", "export", "send", "upload"
  • Always active when Sentinel Claw is running
  • Default for: Starlight Sentinel

What This Skill Does

Evaluates permission requests from Claws against their declared permission surface in CLAW.md, the user's workspace contract, and the active safety posture. Issues a programmatic APPROVE or DENY with logged reasoning.

Procedures

Procedure 1: Permission Evaluation

  1. Receive permission request: { claw_id, action_type, target, declared_reason }
  2. Load the requesting Claw's CLAW.md permission block
  3. Check: is the requested action within the Claw's declared permissions.* surface?
  4. Check: is the target path within the declared workspace?
  5. Check: does the Claw's mutation_default allow this action without explicit approval?
  6. If mutation_default: false → escalate to Procedure 2 (Mutation Approval Request)
  7. If within permissions + mutation_default: true → APPROVE, log, return
  8. If outside permissions → DENY, log reason, return

Procedure 2: Permission Boundary Violation

  1. Action requested is outside declared permission surface
  2. Log violation: { timestamp, claw_id, requested_action, declared_surface, verdict: DENY }
  3. Present violation to user in plain language
  4. Offer: "Update Claw contract to include this permission?" or "Proceed as one-time exception?"
  5. Never auto-approve boundary violations

Procedure 3: Permission Log Write

  1. Every decision (APPROVE or DENY) writes to ~/.starlight/logs/permission.jsonl
  2. Entry includes: timestamp, claw_id, action_type, target (sanitized), decision, reason
  3. Log is append-only — no entry is ever modified or deleted

Integration Points

  • Vaults: Reads Wisdom vault for security principles
  • Agents: Primary agent is Starlight Sentinel
  • Claws: Called by every Claw with requires_sentinel: true
  • Skills: Composes with mutation-approval for interactive approval flows

Quality Criteria

  • Every mutation is logged before it executes
  • Boundary violations are surfaced to the user, never silently resolved
  • DENY decisions include a human-readable reason
  • Log entries are parseable JSON (not freeform text)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.