metraton/gaia/security-tiers

Claude Code and agent skill by metraton/gaia

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when classifying any operation before executing it, or deciding whether user approval is required

Install

npx vskill@latest install metraton/gaia/security-tiers

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as metraton/gaia/security-tiers.

Security Tiers

COMMAND_SET boundary

Classification applies to each exact atomic command. After read-only investigation, one or more predictable T3 commands may be requested plan-first with gaia approvals request-set -- a single predictable T3 command uses the same verb proactively, not only after the pre-execution policy gate returns [T3_BLOCKED]. Never discover a set by attempting a compound shell command. subagent-request-approval owns request construction and grouping; this skill owns the classification and no-elusion decision that routes work there.

security-tiers classifies every operation into four tiers so an agent knows whether it can run freely or must request the user's consent.

The validator model: a simple first line, walls behind it

The Bash classifier is the first line, and it is kept simple on purpose: the target walls below stand behind it, so a command it misreads still meets a wall at the thing that matters. It applies five rules; the sections after this one detail each lane.

  1. A closed change-verb lexicon. A word changes state only when it is in hooks/modules/security/verb_lexicon.py::CHANGE_VERB_CLASSES -- five classes, create, update, delete, publish and exec -- whose union is hooks/modules/security/mutative_verbs.py::MUTATIVE_VERBS. A word outside it is not a change verb, so add, commit and stash are free by elimination. The ambiguous words set, copy, start, tag, label and annotate (verb_lexicon.py::AMBIGUOUS_VERBS) are relieved only on a family proven local, LOCAL_FAMILIES (docker), through verb_lexicon.py::ambiguous_verb_relieved; an unmodelled CLI (rclone copy) is not proven local and signs. Inside the execution scan (rule 3) a lexicon verb counts only on a remote family (hooks/modules/security/execution_scan.py::REMOTE_FAMILIES: k8s, iac, git, cloud, workspace, package, system).
  2. A closed exception table. The verb yields to the effect only in the shapes verb_lexicon.py::EFFECT_OVER_VERB_EXCEPTIONS lists, each naming the symbol that decides it: a push of one's own non-default branch and a --ff-only merge in a managed worktree (mutative_verbs.py::_check_git_publish_relief), a local git merge (mutative_verbs.py::_git_merge_is_local), a --ff-only merge to the branch's own remote ref (mutative_verbs.py::_git_local_sync), opening or editing a change request (verb_lexicon.py::CHANGE_REQUEST_OWN_WORK), and gaia approvals revoke|reject|reject-all|clean (mutative_verbs.py::CONSENT_REDUCING_SUBCOMMAND_EXCEPTIONS). Opening a change request is free on any repository; a local merge is free with only the plain flags mutative_verbs.py::_GIT_LOCAL_MERGE_FLAGS lists (plus -m <msg>, or a bare --abort, --continue, --quit), while a strategy option (-s, -X) or an operand the shell computes (git merge $BRANCH) signs; pr merge signs for every binary, and so does a change-request edit on another repository or with a retarget flag. "What reaches the remote" below gives each shape in full.
  3. The word that decides what runs is literal. When the program word, or the verb word of a CLI that picks its action by word, is a shell expansion, the command asks as unknown.dynamic-span (verb dynamic-program or dynamic-verb; Step 0-dynamic in mutative_verbs.py::_detect_mutative_command, reading _literal_words and _dynamic_verb_span_word).
  4. One short execution scan, depth 1. execution_scan.py::scan_execution reads an execution's entry -- a script file, inline -c/-e code, a heredoc program, a package script with its pre/post scripts, a make target or just recipe with its direct prerequisites, go run, cargo run -- and the literal local files it names, once each and never their own callees (at most MAX_CALLEES, 32, each up to MAX_BYTES, 512 KiB). execution_scan.py::_signal looks for six signals: a change verb on a remote family (remote-change-verb, sign.lands); a write -- never a read -- onto a system, account or harness path (system-path, sign.system-path or sign.lands-on-protected); a download piped into an interpreter (download-and-run, sign.foreign-code); code built at runtime, such as eval of a variable or an import whose specifier is computed (runtime-code, sign.foreign-code); a recursive delete or truncate outside the project or Gaia scratch (destroys-outside, sign.destroys, measured against execution_scan.py::_kept_roots; a permanently blocked disk or delete command reports as floor under the same rule); data sent over the network (network-send, sign.speaks). The scan only adds asks (mutative_verbs.py::_check_execution_scan, run right after _detect_mutative_command): a verdict the older lanes already made mutative is kept unless its verb is one of mutative_verbs.py::_NO_MODEL_VERBS -- an unresolved npm/bun/pnpm/yarn run, an unresolved frozen install, an unreadable script file -- and only such an ask is freed when the scan reads the entry with no signal, never one whose entry is inline code. A file read only in part (over the size cap or not UTF-8) asks as partial-read (unknown.dynamic-span), and an entry that runs a local path the scan cannot read keeps the older verdict.
  5. Reads are free, except secrets and the store. What changes nothing is free by elimination (hooks/modules/security/tiers.py::_classify_command_tier_cached). Reading where secrets live is refused (hooks/modules/security/sensitive_read_guard.py::check), and so is any sqlite3 read of Gaia's store or Python that reaches it in-process (hooks/modules/security/gaia_db_write_guard.py::check, which calls hooks/modules/security/store_code_guard.py::check); gaia context query opens the store read-only.

The target walls behind those rules:

  • Running as another user signs. sudo, su and doas, past assignments and transparent wrappers, ask under sign.privilege, while the payload still meets every floor (hooks/modules/security/privilege_guard.py::privilege_verdict).
  • A shell write onto a system path signs. A writer whose target resolves under /etc, /usr or /boot asks under sign.system-path (hooks/modules/security/shell_write_guard.py::system_path_target, called from hooks/modules/tools/bash_validator.py).
  • The real store is written only by Gaia's entry points. gaia/store/writer.py::real_store_refusal refuses a write to the account's real gaia.db, creating a missing one included, from any process that gaia/store/writer.py::_runs_as_entry_point does not recognize: bin/gaia, whose main sets GAIA_STORE_ENTRY_POINT so a subcommand such as gaia scan and every child it starts inherit it; a hooks/*.py entry; opencode/bridge.py. A pytest run never writes it. This is an accidental-write wall against stray scripts and tests, not a privilege boundary: code running as the user can still pass as an entry point.
  • Session start checks the install. hooks/modules/session/install_integrity.py::integrity_notice compares the install links and Gaia's settings keys with the hashes the install manifest recorded and reports drift under ## Install integrity (hooks/modules/session/session_lifecycle.py::_install_integrity_notice). It is a notice, never a block.

Concealment is not chased in the parser. The scan and the verb rules read only what the text shows literally; a signal behind a variable, a helper of a helper or a computed name is not followed (the header of execution_scan.py::REMOTE_FAMILIES states it). That case belongs to the walls above and to the no-elusion rule below, not to a longer parser. Every validator change lands behind a replay with friction caps set beforehand. tests/replay/test_validator_replay_diff.py::test_the_working_tree_validator_stays_within_the_friction_caps, selected with -m replay, runs tools/validator_replay/replay.py::run to classify the truth table, real command history, approvals and curated cases with the merge-base validator and the working tree; tools/validator_replay/replay.py::check_caps fails the run when the difference exceeds tools/validator_replay/caps.json. A change to a pinned truth row or curated case (replay.py::PINNED) passes only when its task declares it in tools/validator_replay/declared/<task>.json and the run is pointed at that file with GAIA_REPLAY_DECLARED (read by the test and passed to replay.py::run; unset, nothing is declared), and a verdict that loosens needs a named review there.

The four tiers

TierWhat it isApproval?Example verbs
T0Read-only; observes state, changes nothingNoget, list, describe, show, logs, status
T1Local validation; no remote calls, no stateNovalidate, lint, fmt, check
T2Simulation / dry-run; may read remote, never writesNoplan, diff, --dry-run, template
T3State-mutating; creates, updates, or destroysYesapply, create, delete, push, deploy

A fifth verdict exists OUTSIDE this ladder: the categorical denial -- blocked commands, the .claude/hooks tree targeted through Bash (hooks/modules/security/protected_path_guard.py::check), the DB-write guards (the sqlite3 CLI aimed at gaia.db, whatever its SQL, and any shell writer -- copy, move, redirect, tee, dd of=, truncate, a mutative inline interpreter -- whose destination is the gaia.db file, hooks/modules/security/gaia_db_write_guard.py::check), a file write into a git working tree whose author is the SHELL (hooks/modules/security/shell_write_guard.py::check), and reading or listing a path where secrets live -- credential directories and files, .env files, the key patterns -- through Bash (hooks/modules/security/sensitive_read_guard.py::check) or Read, Glob, Grep and OpenCode's list (check_file_tool in the same module), and a git push of a branch whose net comment and docstring lines exceed the limit (hooks/modules/security/comment_push_gate.py::check, measured by gaia lint comments; it fails open with a warning when the counter errors; a --help, -h or --dry-run push publishes nothing and is not measured). It is not a tier, it is not approvable, and no grant lifts it. The secret-read refusal is categorical because a signature would only put the credential's contents into a transcript. A body file handed to a publishing command (--body-file, -F, --description-file, --notes-file, git commit -F, for any forge binary) that resolves to a secret is a secret read and is refused the same way.

The gaia.db guard (`gaia_db_write_guard.py::check`) runs `sqlite3` only inside an allowlisted subset whose reach it can prove from the line, and refuses every other call categorically. The subset proves where a call can land, not that it only reads: it admits INSERT, UPDATE, DELETE and CREATE/DROP of a table, index or view on a database other than gaia.db, and every call inside it signs. The proof comes from the content the line shows: what that content proves sqlite3 can reach decides the verdict, and the program's name decides nothing. On a line that runs sqlite3 (directly, behind a wrapper, through xargs or a shell's -c):

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
3
Repository forks
1
7-day trend score
7

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/metraton/gaia/security-tiers/badge)](https://verified-skill.com/skills/metraton/gaia/security-tiers)

Something wrong with this skill or its page? Tell us.