agentleFS
smgglrs-aismgglrs-ai/navra/.claude/skills/navra-policy/SKILL.md

navra-policy

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Generate navra ACL rules from natural language, or audit an existing config for security gaps

  • Reads credentials

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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
  1. Distinctive:

    Always output a complete permission set block:

    line 57
  2. Very specific:

    If the user's request is ambiguous, ask for clarification before generating.

    line 73
  3. Distinctive:

    Read the existing config and identify security weaknesses.

    line 140
  4. Very specific:

    Always include /.env and /*secret* in deny rules as baseline

    line 186
  5. Very specific:

    Never suggest safety = "none" — use secrets-only as the minimum

    line 187

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

Convert natural language permission descriptions to navra TOML configuration, or audit an existing config for weaknesses.

Usage

  • /navra-policy — describe what you want, get TOML rules
  • /navra-policy audit — audit the current config for security gaps

Generate mode (default)

The user describes permissions in plain language. Translate to navra TOML config fragments that can be added to ~/.config/navra/config.toml.

Translation rules

Path access:

User saysTOML
"read my code"allow = ["~/Code/**"] + operations = ["read"]
"read and write in project X"allow = ["~/Code/project-x/**"] + operations = ["read", "write"]
"no access to secrets"deny = ["**/.env", "**/*secret*", "**/credentials*", "**/*.pem", "**/*.key"]
"only this directory"allow = ["<exact-path>/**"] with no broader patterns

Tool permissions:

User saysTOML
"allow git but approve pushes"[[tool_rules]] with git_push → approve, rest allow
"no shell access"[[tool_rules]] with exec_* → deny
"read-only git"operations includes git.status, git.diff, git.log but not git.commit, git.push

Safety levels:

User saysTOML
"strict" / "maximum safety"safety = "standard" + tool_rules deny exec
"normal" / "standard"safety = "standard"
"just catch secrets"safety = "secrets-only"
"I know what I'm doing"safety = "secrets-only" (never suggest none)

IFC policies:

User saysTOML
"prevent data leaks"tainted_write_policy = "deny"
"ask before writing after reading external data"tainted_write_policy = "approve"
"trust everything in my project"trusted_paths = ["~/Code/myproject/**"]

Output format

Always output a complete permission set block:

[permissions.<name>]
allow = [...]
deny = [...]
operations = [...]
safety = "..."
default_tool_policy = "allow"

# Tool-specific rules (if needed)
[[permissions.<name>.tool_rules]]
tool = "..."
policy = "..."

If the user's request is ambiguous, ask for clarification before generating. Always include sensible deny rules even if the user didn't mention them — **/.env and **/*secret* at minimum.

Common patterns

Developer (read/write code, git, no secrets):

[permissions.dev]
allow = ["~/Code/**"]
deny = ["**/.env", "**/*secret*", "**/credentials*", "**/*.pem", "**/*.key"]
operations = ["read", "write", "git.status", "git.diff", "git.log",
              "git.branch", "git.commit", "git.fetch", "git.pull", "git.push"]
safety = "standard"
default_tool_policy = "allow"

[[permissions.dev.tool_rules]]
tool = "git_push"
policy = "approve"

[[permissions.dev.tool_rules]]
tool = "exec_*"
policy = "deny"

Read-only reviewer:

[permissions.reviewer]
allow = ["~/Code/**", "~/Documents/**"]
deny = ["**/.env", "**/*secret*"]
operations = ["read", "git.status", "git.diff", "git.log"]
safety = "standard"
default_tool_policy = "deny"

[[permissions.reviewer.tool_rules]]
tool = "file_read"
policy = "allow"

[[permissions.reviewer.tool_rules]]
tool = "rag_*"
policy = "allow"

Restricted agent (single project, no network):

[permissions.restricted]
allow = ["~/Code/specific-project/**"]
deny = ["**/.env", "**/*secret*", "**/.git/config"]
operations = ["read", "write"]
safety = "standard"
tainted_write_policy = "deny"
default_tool_policy = "deny"

[[permissions.restricted.tool_rules]]
tool = "file_read"
policy = "allow"

[[permissions.restricted.tool_rules]]
tool = "file_write"
policy = "approve"

Audit mode

Read the existing config and identify security weaknesses.

Steps

  1. Read ~/.config/navra/config.toml
  2. For each permission set, check:

Critical issues (always flag):

  • allow = ["/**"] or allow = ["~/**"] — overly broad access
  • No deny rules at all — missing baseline protection
  • safety = "none" — all content filtering disabled
  • tainted_write_policy = "allow" — exfiltration prevention disabled
  • default_tool_policy = "allow" with no tool_rules — all tools unrestricted

Warnings (suggest improvement):

  • deny list missing **/.env — credential files exposed
  • deny list missing **/*secret* — secret files exposed
  • deny list missing **/*.pem or **/*.key — private keys exposed
  • No tool_rules for exec_* — shell execution unrestricted
  • No tool_rules for git_push — can push without approval
  • operations includes write but no approval configured
  • Agent has can_delegate = true without ring restrictions
  • Rate limit not set for agents with broad permissions

Informational:

  • Modules enabled but not used by any permission set
  • Permission sets defined but not referenced by any agent
  • Multiple agents sharing the same permission set (may be intentional but worth noting)

Output format

Report findings grouped by severity. For each finding, show:

  1. What was found (the config line)
  2. Why it's a concern
  3. The suggested fix (exact TOML)

Notes

  • navra uses deny-wins semantics — a deny rule always beats an allow
  • Glob patterns: * matches one path segment, ** matches any depth
  • ~ expands to the user's home directory
  • Always include **/.env and **/*secret* in deny rules as baseline
  • Never suggest safety = "none" — use secrets-only as the minimum
  • The operations field uses dot-namespaced strings: read, write, git.status, git.commit, etc.
  • Tool rules use glob patterns on tool names: git_*, file_write, exec_*

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.