n8n-pilot: Command for Claude Code

.claude/commands/security-dialogs.md

security-dialogs is a command for Claude Code from AI-agents-incubator/n8n-pilot. It costs 8 tokens per session (2,020 once invoked), scanned A, original, MIT.

A security command that uses an AI agent to inspect conversation or dialog files for credentials, such as passwords or access tokens, that simple pattern matching may miss.

In plain words
What is it for?
Use it before a GitHub release, after cleanup finds possible credentials, during a security audit, or when a conversation may have exposed a secret.
Why use it?
It helps find sensitive information hidden in context when a regular text or pattern scan is not enough.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents; positional $N argument.

This is AI-agents-incubator/n8n-pilot's own configuration. It tells Claude Code how to work on n8n-pilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything n8n-pilot configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash security/cleanup-dialogs.sh --last.

Reuse

Borrowing it

Nothing to install: this file belongs to AI-agents-incubator/n8n-pilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AI-agents-incubator/n8n-pilot/main/.claude/commands/security-dialogs.md
Clone the repo
git clone --depth 1 https://github.com/AI-agents-incubator/n8n-pilot

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-dialogs

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/security-dialogs.svg)](https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/security-dialogs)
Your own site
<a href="https://agentmods.dev/commands/ai-agents-incubator/n8n-pilot/security-dialogs"><img src="https://agentmods.dev/badge/commands/ai-agents-incubator/n8n-pilot/security-dialogs.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,020 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.02020
Opus 5 $0.00004 $0.01010
Sonnet 5 $0.00002 $0.00404
Haiku 4.5 $0.00001 $0.00202

Measured 3d ago against content hash 3738a1e6744c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

security-dialogs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/security-dialogs.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Security Dialogs — Deep Credential Scan

Purpose: Use AI agent to analyze dialog files for context-dependent credentials that regex cannot detect.

When to use:

  • Before creating GitHub release (paranoia mode)
  • When bash cleanup found credentials and you want deeper analysis
  • Manual security audit of dialog history
  • Suspected credential leak in conversations

Implementation

Step 0: Check Why Agent Was Invoked

This command can be invoked in two ways:

  1. Manual: User types /security-dialogs
  2. Automatic: Triggered by security/auto-invoke-agent.sh based on risk triggers
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🔒 Security Dialogs — Deep AI Credential Scan"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

# Check if auto-invoked (environment variables set by auto-invoke-agent.sh)
if [ -n "$DEEP_SCAN_TRIGGER_LEVEL" ]; then
  echo "🤖 Auto-invoked due to: $DEEP_SCAN_TRIGGER_LEVEL trigger level"
  echo ""
  echo "Trigger reasons:"
  echo "$DEEP_SCAN_TRIGGER_REASONS" | grep -o '"reasons": *\[[^]]*\]' | sed 's/.*\[\(.*\)\].*/\1/' | tr ',' '\n' | sed 's/^ *"/  • /' | sed 's/"$//'
  echo ""
else
  echo "🔍 Manual deep scan requested by user"
  echo ""
fi

Step 1: Run Regex Cleanup First

# Layer 1-3: Run standard bash cleanup (if not already run)
if [ ! -f "security/reports/"*"cleanup-report"* ] || [ -z "$CLEANUP_EXIT" ]; then
  echo "Step 1: Running regex-based cleanup (fast)..."
  bash security/cleanup-dialogs.sh --last
  REGEX_EXIT_CODE=$?

  if [ $REGEX_EXIT_CODE -eq 0 ]; then
    echo "✓ Regex cleanup: No credentials detected"
  else
    echo "⚠️  Regex cleanup: Credentials found and redacted"
  fi
else
  echo "Step 1: Regex cleanup already completed"
  REGEX_EXIT_CODE=$CLEANUP_EXIT
fi

echo ""

Step 2: Identify Sprint Changes to Analyze

Key principle: Analyze ONLY changes from current sprint, not entire codebase.

echo "Step 2: Identifying sprint changes for deep scan..."
echo ""

# 1. Get last dialog (current session)
LAST_DIALOG=$(find dialog -name "*.md" 2>/dev/null | sort -r | head -1)

if [ -z "$LAST_DIALOG" ]; then
  echo "⚠️  No dialog files found"
  exit 0
fi

DIALOG_SIZE=$(du -h "$LAST_DIALOG" | awk '{print $1}')
echo "  • Dialog: $(basename $LAST_DIALOG) ($DIALOG_SIZE)"

# 2. Get git diff (changed files in sprint)
CHANGED_FILES=$(git diff --name-only HEAD~5..HEAD 2>/dev/null)
CHANGED_COUNT=$(echo "$CHANGED_FILES" | grep -v '^$' | wc -l | tr -d ' ')

if [ "$CHANGED_COUNT" -gt 0 ]; then
  echo "  • Changed files: $CHANGED_COUNT files in last 5 commits"

  # Show file types for context
  echo "$CHANGED_FILES" | grep '\.' | sed 's/.*\.//' | sort | uniq -c | while read count ext; do
    echo "    - $count .$ext files"
  done
else
  echo "  • Changed files: No git changes detected"
fi

echo ""
echo "Scope: Sprint changes only (NOT entire codebase)"
echo ""

Read the full file on GitHub · 276 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 276 lines · 8 tokens per session scan A 3738a1e6744c

Subscribe to this mod's changes

security-dialogs is a command published in the GitHub repository AI-agents-incubator/n8n-pilot (29 stars, last pushed 6mo ago), licensed MIT. It adds 8 tokens to every session and 2,020 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.