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

navra-diagnose

Skill2 starsChanged 5 months agoApache-2.0View on GitHub

Explain why a navra tool call was blocked — reads audit trail, traces denial chain, suggests fix

  • Reads credentials
  • Commits and pushes

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If it doesn't exist, tell the user navra hasn't recorded any activity yet (is the service running?).

    line 23
  2. Very specific:

    If the user specified a tool name, add AND tool_name LIKE '%<tool>%'.

    line 39
  3. Very specific:

    If the user specified an agent, add AND agent_name LIKE '%<agent>%'.

    line 40
  4. Very specific:

    Read the navra config to find the matching rule:

    line 57
  5. Very specific:

    Look at the agent's permission set (from agent_perms field).

    line 63
  6. Distinctive:

    If this is intentional, no change needed.

    line 113
  7. Distinctive:

    Use separate sessions for reading and writing

    line 123
  8. Very specific:

    Add the source path to trusted_paths if the data is not actually sensitive"

    line 126
  9. Distinctive:

    Always warn when a suggestion would weaken security:

    line 136
  10. Distinctive:

    Only remove them if you're certain the path is safe."

    line 142
  11. Distinctive:

    If the database has many entries, always use LIMIT to avoid dumping thousands of rows

    line 153
  12. Very specific:

    If no denials are found, check if navra is running: systemctl --user status navra

    line 157

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

Diagnose navra security denials by reading the blackbox audit log.

Usage

  • /navra-diagnose — show recent denials and explain each
  • /navra-diagnose file_write — filter by tool name
  • /navra-diagnose claude — filter by agent name
  • User can also describe the problem: "my git push was blocked"

Workflow

1. Locate the blackbox database

DB="${XDG_DATA_HOME:-$HOME/.local/share}/navra/blackbox.db"

If it doesn't exist, tell the user navra hasn't recorded any activity yet (is the service running?).

2. Query recent denials

sqlite3 "$DB" "
  SELECT seq, datetime(timestamp_ms/1000, 'unixepoch', 'localtime') as time,
         agent_name, tool_name, outcome, ifc_label
  FROM blackbox
  WHERE outcome LIKE 'denied_%'
  ORDER BY seq DESC
  LIMIT 20;
"

If the user specified a tool name, add AND tool_name LIKE '%<tool>%'. If the user specified an agent, add AND agent_name LIKE '%<agent>%'.

To get full details on a specific denial:

sqlite3 "$DB" "
  SELECT seq, datetime(timestamp_ms/1000, 'unixepoch', 'localtime') as time,
         agent_name, agent_perms, tool_name, tool_args, outcome, ifc_label
  FROM blackbox
  WHERE seq = <seq>;
"

3. Explain each denial type

denied_acl — Path or tool rule blocked the call.

Read the navra config to find the matching rule:

cat ~/.config/navra/config.toml

Look at the agent's permission set (from agent_perms field). Check:

  • Is the target path covered by an allow pattern?
  • Does a deny pattern match it?
  • Is the operation in the operations list?
  • Does a tool_rules entry block this tool?
  • Is default_tool_policy = "deny"?

Report: "Tool {tool} was blocked because deny rule {pattern} matched the target path" or "Operation {op} is not in the permission set's operations list."

denied_ifc — Information Flow Control violation.

The session was tainted by a prior read, and the write was blocked. Find the taint source:

sqlite3 "$DB" "
  SELECT seq, tool_name, ifc_label
  FROM blackbox
  WHERE session_id = (
    SELECT session_id FROM blackbox WHERE seq = <denied_seq>
  )
  AND seq < <denied_seq>
  AND ifc_label != 'Trusted:Public'
  ORDER BY seq;
"

Report: "The session was tainted at step {seq} when {tool} returned data labeled {label}. The subsequent write to {tool} was blocked because the tainted session cannot write to a less sensitive target (Bell-LaPadula no-write-down property)."

denied_rate — Rate limit exceeded.

Report: "Agent {agent} exceeded the rate limit for permission set {perms}. Check the rate_limit field in the config."

4. Suggest minimal fix

For each denial, suggest the smallest config change that would allow it — but warn about security implications.

ACL denial fixes:

  • Missing allow: "Add {path} to the allow list in [permissions.{set}]"
  • Deny rule match: "The deny rule {pattern} blocks this path. If this is intentional, no change needed. To allow it, remove the deny rule — but this may expose sensitive files."
  • Missing operation: "Add {op} to the operations list"
  • Tool rule: "Change the tool rule for {tool} from deny to allow (or approve for human-in-the-loop)"

IFC denial fixes:

  • "This is by design — navra prevents data exfiltration by blocking writes after reading sensitive data. Options:
    1. Use separate sessions for reading and writing
    2. Set tainted_write_policy = \"approve\" to allow with human approval
    3. Add the source path to trusted_paths if the data is not actually sensitive"

Rate limit fixes:

  • "Increase the rate limit: rate_limit = \"120/60\" (120 calls per 60 seconds)"

5. Security warnings

Always warn when a suggestion would weaken security:

  • Adding .env or *secret* paths to allow → "This would expose credential files. Consider using environment variables or a credential manager instead."
  • Removing deny rules → "Deny rules are your last line of defense. Only remove them if you're certain the path is safe."
  • Setting tainted_write_policy = "allow" → "This disables exfiltration prevention. Use approve instead to keep human oversight."
  • Changing safety = "none" → "This disables all content filtering including secret detection."

Notes

  • The blackbox is append-only with SHA-256 hash chains — entries cannot be tampered with
  • If the database has many entries, always use LIMIT to avoid dumping thousands of rows
  • The tool_args field may be truncated to 4096 bytes and PII-filtered — partial information is expected
  • If no denials are found, check if navra is running: systemctl --user status navra

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.