Path Sensitive Shell Safety logo

Path Sensitive Shell Safety

Community
giang6283623
path-sensitive-shell-safety

Guardrail workflow for shell changes that use path variables, remote base directories, repo folders, checkout repair, or destructive filesystem commands such as rm, mv, cp, rsync, find -delete, git clean, or git reset.

Overview

Publishergiang6283623
Repositoryminimal-vibe-coding-kit
Skill namepath-sensitive-shell-safety
Stars
26
Forks
3
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by giang6283623 on GitHub. Read the source before you install it.

Installation

Install the Path Sensitive Shell Safety AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/giang6283623/minimal-vibe-coding-kit/tree/main/.agents/skills/path-sensitive-shell-safety
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/giang6283623/minimal-vibe-coding-kit.git /tmp/minimal-vibe-coding-kit
mkdir -p .claude/skills
cp -r /tmp/minimal-vibe-coding-kit/.agents/skills/path-sensitive-shell-safety .claude/skills/path-sensitive-shell-safety
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Path Sensitive Shell Safety in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Path Sensitive Shell Safety on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Path Sensitive Shell Safety is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Path-Sensitive Shell Safety

Use this skill before editing or reviewing shell, deploy, installer, cleanup, or repair logic that builds filesystem paths from variables or touches remote repositories.

Common triggers:

  • Path variables such as remote_base, repo_dir, repo_folder, target_dir, backup_dir, worktree, site, app, or user-entered folder names.
  • Destructive or path-sensitive commands: rm, mv, cp -a, rsync --delete, find -delete, docker volume rm, git clean, git reset, checkout repair, clone replacement, or symlink-sensitive copy.
  • Git sync that decides which branch or remote checkout will be deployed.

Safety objective

No empty, unset, broad, symlinked, or unintended path may reach a destructive command. Validate values before joining paths, validate the joined path before use, and validate containment immediately before the command.

Required workflow

  1. Identify the command with the highest blast radius.
  2. List every variable that contributes to its path or repository target.
  3. Classify each variable:
    • trusted constant;
    • config value;
    • remote/server value;
    • user/operator input;
    • derived path.
  4. Validate raw inputs before joining:
    • required and non-empty;
    • expected shape: absolute base path or safe single folder segment;
    • no traversal, newlines, glob metacharacters, leading option dash, or control characters;
    • explicit allowlist for server roots when possible.
  5. Join paths with quoted expansions only. Do not use eval.
  6. Canonicalize existing paths with physical resolution (pwd -P or realpath) before destructive work.
  7. Assert containment:
    • target is inside the approved base;
    • target is not /, ., .., $HOME, the base root itself, or another broad system directory;
    • target is not a symlink unless the operation explicitly supports symlinks.
  8. Put the final guard directly next to the dangerous command.
  9. Use command terminators and quoting: -- "$path" where supported.
  10. For Git sync, verify expected origin, selected branch policy, fetch success, clean worktree, fast-forward state, and final HEAD == origin/<branch> before build/deploy.
  11. Run the repo validation command and AgentShield probe when this changes agent surfaces or automation rules.

Required outcomes

  • Prefer a recoverable delete (trash) over permanent rm for user files; permanent deletion requires explicit confirmation of the exact paths. If trash is missing, recommend installing it (macOS 14+ built-in; older macOS brew install trash; Linux sudo apt install trash-cli; any OS with Node npm i -g trash-cli).
  • A blank branch may follow the documented default-branch fallback policy.
  • An explicit branch must fail if missing; never silently deploy another branch.
  • A blank folder/base value must fail before any rm, mv, cp, rsync, find, Docker, or Git cleanup command runs.
  • A repair flow may move an unusable checkout to a timestamped backup only after a verified replacement exists.
  • No automatic cleanup should delete backups, locks, runtime data, uploads, volumes, databases, or environment files without separate explicit confirmation.

Review priority

Use reviewing-4p-priorities if triage is needed:

  • P0: unsafe path command already caused data loss or can expose/delete secrets in the active environment.
  • P1: unchecked empty/broad variable can reach destructive commands in deploy/repair/install paths.
  • P2: guard exists but misses edge cases such as symlinks, traversal, explicit branch fallback, or wrong origin.
  • P3/P4: documentation clarity or minor naming improvements after the safety invariant is already enforced.

Reference

Use references/workflow.md for copy-ready guard patterns and review checklist.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Path Sensitive Shell Safety AI skill do?

Guardrail workflow for shell changes that use path variables, remote base directories, repo folders, checkout repair, or destructive filesystem commands such as rm, mv, cp, rsync, find -delete, git clean, or git reset.

Why use Path Sensitive Shell Safety on TypingMind?

Because you install it once and use it with any model. Path Sensitive Shell Safety is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Path Sensitive Shell Safety in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/giang6283623/minimal-vibe-coding-kit/tree/main/.agents/skills/path-sensitive-shell-safety. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Path Sensitive Shell Safety?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Path Sensitive Shell Safety?

As many as you like. As long as a model supports skills, you can use Path Sensitive Shell Safety with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Path Sensitive Shell Safety AI skill free?

Yes. It is published on GitHub by giang6283623 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇