Logo di Secrets In Output

Secrets In Output

Community
randommonicle
secrets-in-output

Nothing that can carry a secret value may reach a tool result, because the transcript is a synced file re-sent on every turn. Check an env var by presence and length only, list names not values, read a .env file by its keys, capture provider status output and API responses into a variable and print a named allowlist, and dry-run the output shape on a dummy value first. Triggers on any command, script or API call that names an env var, a .env file, a key, token, password or secret, or a credential-carrying header. Does not fire on whether a changed value is live (env-change-verification) or on comparing a secret (constant-time-secret-compare).

Panoramica

Pubblicato darandommonicle
Repositoryclaude-skills
Nome della skillsecrets-in-output
Stelle
27
Fork
3
File inclusi
Solo istruzioni
LicenzaApache-2.0
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.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

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

Installazione

Installa la skill IA Secrets In Output 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/randommonicle/claude-skills/tree/main/secrets-in-output
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi 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 della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/randommonicle/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/secrets-in-output .claude/skills/secrets-in-output
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Secrets In Output 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 Secrets In Output 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 Secrets In Output 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à.

Secrets in output

Two slips in two days, both in the ICC repo, both by an agent doing routine checks. On 18 September 2026 a Sonnet verification agent ran a bare npx supabase status and the local stack's keys went into its transcript. On 19 September the main session ran a loop over SUPABASE_* names with ${!v:-unset} to learn which were set, and the VALUES of an account-wide personal access token and another project's service-role key landed in the Claude Code transcript (the local ~/.claude/projects JSONL and whatever the desktop app syncs). Nothing in the library covered it; the handover convention "read the token into a shell variable without printing it" was prose. ICC LESSONS_LEARNED L-045.

The transcript is not a terminal that scrolls away. It is a file, it is synced, it is re-sent to the model on every later turn, and it outlives the session. Anything that reaches a tool result reaches all of that.

The rules

  1. Presence and length, never the value. The only question a check may answer is "is it set, and how long is it".

    bash
    [ -n "$SUPABASE_ACCESS_TOKEN" ] && echo "SUPABASE_ACCESS_TOKEN set (${#SUPABASE_ACCESS_TOKEN} chars)" || echo "unset"
    powershell
    if ($env:SUPABASE_ACCESS_TOKEN) { "set ($($env:SUPABASE_ACCESS_TOKEN.Length) chars)" } else { "unset" }

    Never a :- or - fallback on a secret (${X:-unset} prints X when it IS set, which is the case you were checking for), never echo $X, never a prefix (${X:0:6} is the value too).

  2. Names, not values, when listing. env | cut -d= -f1, compgen -v | grep SUPABASE, Get-ChildItem Env: | Select-Object Name. A bare env, printenv, set, export -p, declare -p, Get-ChildItem Env: or [Environment]::GetEnvironmentVariables() prints every value on the machine, and piping it into grep prints the matching lines whole.

  3. A .env file by its keys. cut -d= -f1 .env or grep -o '^[A-Z_]*=' .env answers "which keys are configured". cat .env, head .env, Get-Content .env, grep KEY .env and the Read tool on .env put the whole file in the transcript. .env.example is documentation and is fine.

  4. Provider status and config commands are listings too. supabase status prints the stack's keys in its table and supabase status -o env prints them as KEY=value; capture it (eval "$(npx supabase status -o env)", or > "$TMP/status.env") or filter it (| grep -viE 'key|secret|token|jwt'). netlify env:list, vercel env pull, gh secret, az keyvault secret show, aws ssm get-parameter --with-decryption and stripe config --list belong to the same class: know what each prints before it runs.

  5. An API response is untrusted output. A GET of a config endpoint can return the credentials it holds: the Supabase Management API's /config/auth answers 243 fields including smtp_pass, hook secrets and provider secrets. Never print a raw response. Parse it into a variable and print a named allowlist of the fields you need, as scripts/supabase-auth-config.mjs does. Verbose HTTP clients echo the request too: curl -v prints the Authorization header it sends.

  6. Dry-run the output shape on a dummy value first. Before a command that prints anything derived from a secret, run it with the variable pointed at a known string (X=dummy-value-123) and read what comes out. If the dummy appears, the real one would have.

  7. A value that must be used goes into a variable or a file the tool result never shows. Read it with X=$(cat file) or read -r X < file, pass it as a header or an env var to the process that needs it, and let only that process's non-secret output reach the transcript.

When it has already happened

Treat the value as exposed the moment it is in a tool result, whatever the permission mode and whoever was watching. Say so plainly in the same turn: which secret, which scope (a project key or an account-wide token), and where the transcript lives. Give the rotation steps for that provider. The owner decides whether to rotate; the record of the decision goes in the repo's lessons file with the line skill that should have prevented this: secrets-in-output.

The hook

hooks/secret-echo-guard.mjs (PreToolUse, Bash|PowerShell, plus Read for .env files) denies the command-string shapes above before they run and hands back the safe form in its reason. It is a deny, not an ask, because in a bypass-permissions session an ask is auto-approved and shown to nobody, and unattended is exactly where the slips happened. What the hook cannot see, this skill still owns: a value copied into another variable and printed (k=$KEY; echo $k), any script file run by name (the hook never reads its contents, so an echo $KEY inside bash phase.sh passes), a recursive grep over a folder holding a secret file (grep -rn TOKEN .), and every API response.

Why

A secret in a transcript is not a near miss; it is a disclosure with an unknown audience, and the only cheap moment to prevent it is before the command runs. Presence-and-length costs nothing, answers the real question, and cannot leak. Evidence: ICC L-045 (19 September 2026), the 18 September Sonnet slip recorded in the same repo's 2026-09-18 handover entry.

Provenance and maintenance

Date stamp: 2026-09-20. Distilled from the two ICC incidents above; the hook's asserted cases are in hooks/secret-echo-guard.test.mjs (the two incident commands are its first two deny cases).

FactRe-verify withExpected
The hook is wired for both command toolsnode hooks/check-index.test.mjsPASS secret-echo-guard.mjs is wired for both Bash and PowerShell
The hook denies the two incident shapes and passes the safe formnode hooks/secret-echo-guard.test.mjsALL PASS

Domande frequenti

Cosa fa la skill IA Secrets In Output?

Nothing that can carry a secret value may reach a tool result, because the transcript is a synced file re-sent on every turn. Check an env var by presence and length only, list names not values, read a .env file by its keys, capture provider status output and API responses into a variable and print a named allowlist, and dry-run the output shape on a dummy value first. Triggers on any command, script or API call that names an env var, a .env file, a key, token, password or secret, or a credential-carrying header. Does not fire on whether a changed value is live (env-change-verification) or...

Perché usare Secrets In Output su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Secrets In Output è 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 la skill 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 Secrets In Output in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/randommonicle/claude-skills/tree/main/secrets-in-output. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Secrets In Output?

Qualsiasi modello che colleghi a 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 Secrets In Output?

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

La skill IA Secrets In Output è gratuita?

Sì. È pubblicata su GitHub da randommonicle con licenza Apache-2.0. 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, template 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.

Elenco completo

Crea subito il tuo spazio di lavoro AI

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