Logo di Path Sensitive Shell Safety

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.

Panoramica

Autoregiang6283623
Repositoryminimal-vibe-coding-kit
Nome della skillpath-sensitive-shell-safety
Stelle
26
Fork
3
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 1 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da giang6283623 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Path Sensitive Shell Safety in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/giang6283623/minimal-vibe-coding-kit/tree/main/.agents/skills/path-sensitive-shell-safety
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Path Sensitive Shell Safety in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Path Sensitive Shell Safety non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Path Sensitive Shell Safety non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Path Sensitive Shell Safety su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Path Sensitive Shell Safety è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Path Sensitive Shell Safety in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/giang6283623/minimal-vibe-coding-kit/tree/main/.agents/skills/path-sensitive-shell-safety. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Path Sensitive Shell Safety?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Path Sensitive Shell Safety?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Path Sensitive Shell Safety: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Path Sensitive Shell Safety è gratuita?

Sì. È pubblicata su GitHub da giang6283623 con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇