com um clique
secret-handling
Never read .env files or write secrets to .squad/ committed files
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Never read .env files or write secrets to .squad/ committed files
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
{what this skill teaches agents}
{what this skill teaches agents}
**WORKFLOW SKILL** — Iteratively improve skill frontmatter compliance using the Ralph loop pattern. WHEN: "run sensei", "sensei help", "improve skill", "fix frontmatter", "skill compliance", "frontmatter audit", "score skill", "check skill tokens". INVOKES: token counting tools, test runners, git commands. FOR SINGLE OPERATIONS: use token CLI directly for counts/checks.
**WORKFLOW SKILL** — Research, outline, and scaffold a Slidev presentation. Phase 1 researches the topic and generates a detailed OUTLINE.md via runSubagent research and user guidance. Phase 2 generates slides.md, style.css, and images/ from the approved outline. WHEN: "create presentation", "new presentation", "scaffold presentation", "new Slidev deck", "new talk", "create slides", "start a presentation", "presentation about". INVOKES: runSubagent (web search, Microsoft Learn, WorkIQ), vscode_askQuestions, file-system tools. FOR SINGLE OPERATIONS: copy template folder manually.
**WORKFLOW SKILL** — Query WorkIQ for recent activity signals, identify patterns in conversations and meetings, cross-reference with latest tech announcements, and propose aligned demos as GitHub issues. WHEN: "intelligence scan", "what demos to build", "scan recent activity", "WorkIQ scan", "demo proposals from conversations", "identify demo opportunities", "what should I demo next". INVOKES: WorkIQ MCP, web search, GitHub issue tools. FOR SINGLE OPERATIONS: Query WorkIQ MCP directly.
Build an n-layer dependency graph from .NET upgrade assessment data and generate a phased modernization plan. Parses assessment.json from the .NET upgrade tools, extracts project dependency hierarchy via breadth-first layering, splits thick layers to cap projects per sub-layer, and produces a phased upgrade plan with Mermaid diagrams. Each phase targets PR-reviewable scope. SDK-style conversion is Phase 0, then layer-by-layer bottom-up modernization. WHEN: "plan appmod phases", "generate upgrade layers", "dependency layer plan", "phased migration plan", "break down dotnet upgrade", "layer extraction", "modernization phases", "upgrade dependency graph", "PR-sized migration plan", "appmod phasing strategy".
Baseado na classificação ocupacional SOC
| name | secret-handling |
| description | Never read .env files or write secrets to .squad/ committed files |
| domain | security, file-operations, team-collaboration |
| confidence | high |
| source | earned (issue |
Spawned agents have read access to the entire repository, including .env files containing live credentials. If an agent reads secrets and writes them to .squad/ files (decisions, logs, history), Scribe auto-commits them to git, exposing them in remote history. This skill codifies absolute prohibitions and safe alternatives.
NEVER read these files:
.env (production secrets).env.local (local dev secrets).env.production (production environment).env.development (development environment).env.staging (staging environment).env.test (test environment with real credentials).env.* UNLESS explicitly allowed (see below)Allowed alternatives:
.env.example (safe — contains placeholder values, no real secrets).env.sample (safe — documentation template).env.template (safe — schema/structure reference)If you need config info:
.env.example — shows structure without exposing secretsREADME.md, docs/, config guidesNEVER assume you can "just peek at .env to understand the schema." Use .env.example or ask.
NEVER write these to .squad/ files:
| Pattern Type | Examples | Regex Pattern (for scanning) |
|---|---|---|
| API Keys | OPENAI_API_KEY=sk-proj-..., GITHUB_TOKEN=ghp_... | `[A-Z_]+(?:KEY |
| Passwords | DB_PASSWORD=super_secret_123, password: "..." | `[?:PASSWORD |
| Connection Strings | postgres://user:pass@host:5432/db, Server=...;Password=... | `(?:postgres |
| JWT Tokens | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... | eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+ |
| Private Keys | -----BEGIN PRIVATE KEY-----, -----BEGIN RSA PRIVATE KEY----- | -----BEGIN [A-Z ]+PRIVATE KEY----- |
| AWS Credentials | AKIA..., aws_secret_access_key=... | `AKIA[0-9A-Z]{16} |
| Email Addresses | user@example.com (PII violation per team decision) | [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} |
What to write instead:
DATABASE_URL=<set in .env>API key configured (see .env.example)Before committing .squad/ changes, Scribe MUST:
Scan all staged files for secret patterns (use regex table above)
Check for prohibited file names (don't commit .env even if manually staged)
If secrets detected:
STOP the commit (do NOT proceed)
Remove the file from staging: git reset HEAD <file>
Report to user:
🚨 SECRET DETECTED — commit blocked
File: .squad/decisions/inbox/river-db-config.md
Pattern: DATABASE_URL=postgres://user:password@localhost:5432/prod
This file contains credentials and MUST NOT be committed.
Please remove the secret, replace with placeholder, and try again.
Exit with error (never silently skip)
If no secrets detected:
Implementation note for Scribe:
git commitSelect-String or git diff --cached to scan staged contentIf you discover a secret in git history:
STOP immediately — do not make more commits
Alert the user:
🚨 CREDENTIAL LEAK DETECTED
A secret was found in git history:
Commit: abc1234
File: .squad/decisions/inbox/agent-config.md
Pattern: API_KEY=sk-proj-...
This requires immediate remediation:
1. Revoke the exposed credential (regenerate API key, rotate password)
2. Remove from git history (git filter-repo or BFG)
3. Force-push the cleaned history
Do NOT proceed with new work until this is resolved.
Do NOT attempt to fix it yourself — secret removal requires specialized tools
Wait for user confirmation before resuming work
Agent needs to know what environment variables are required:
Agent: "What environment variables does this app need?"
→ Reads `.env.example`:
OPENAI_API_KEY=sk-...
DATABASE_URL=postgres://user:pass@localhost:5432/db
REDIS_URL=redis://localhost:6379
→ Writes to .squad/decisions/inbox/river-env-setup.md:
"App requires three environment variables:
- OPENAI_API_KEY (OpenAI API key, format: sk-...)
- DATABASE_URL (Postgres connection string)
- REDIS_URL (Redis connection string)
See .env.example for full schema."
Agent needs to know database schema:
Agent: (reads .env)
DATABASE_URL=postgres://admin:super_secret_pw@prod.example.com:5432/appdb
→ Writes to .squad/decisions/inbox/river-db-schema.md:
"Database connection: postgres://admin:super_secret_pw@prod.example.com:5432/appdb"
🚨 VIOLATION: Live credential written to committed file
Correct approach:
Agent: (reads .env.example OR asks user)
User: "It's a Postgres database, schema is in migrations/"
→ Writes to .squad/decisions/inbox/river-db-schema.md:
"Database: Postgres (connection configured in .env). Schema defined in db/migrations/."
Scribe is about to commit:
# Stage files
git add .squad/
# Scan staged content for secrets
$stagedContent = git diff --cached
$secretPatterns = @(
'[A-Z_]+(?:KEY|TOKEN|SECRET)=[^\s]+',
'(?:PASSWORD|PASS|PWD)[:=]\s*["'']?[^\s"'']+',
'eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+'
)
$detected = $false
foreach ($pattern in $secretPatterns) {
if ($stagedContent -match $pattern) {
$detected = $true
Write-Host "🚨 SECRET DETECTED: $($matches[0])"
break
}
}
if ($detected) {
# Remove from staging, report, exit
git reset HEAD .squad/
Write-Error "Commit blocked — secret detected in staged files"
exit 1
}
# Safe to commit
git commit -F $msgFile
.env "just to check the schema" — use .env.example instead.squad/ — Scribe commits ALL .squad/ changes