secure-secret-input
Skill2 starsChanged 6 months agoMITView on GitHub
Collect sensitive values from users via secure local prompts, never in chat. Use when asking for API keys, tokens, passwords, or any secret that should remain hidden from logs.
- Reads credentials
In this repository30 other files it gives its agents.
- adr-spec-gateSkill
- agent-continuity-loopSkill
- agent-flywheelSkill
- agent-runtime-paritySkill
- business-guardrailsSkill
- compact-instructionsSkill
- debug-protocolSkill
- dns-and-whois-toolsSkill
- docs-as-codeSkill
- engineering-standardsSkill
- excellence-no-intermediatesSkill
- git-pr-rulesSkill
- hooks-for-enforcementSkill
- hooks-multi-tool-paritySkill
- iac-first-commitSkill
- impact-metrics-gateSkill
- large-payload-completenessSkill
- ledger-auto-updatesSkill
- llm-model-selectionSkill
- local-service-autostartSkill
- multi-phase-sessionSkill
- new-projectSkill
- notion-apiSkill
- notion-batch-patternSkill
- observability-when-to-addSkill
- permanent-learning-protocolSkill
- progress-md-businessSkill
- reactive-integration-designSkill
- tokens-taxonomySkill
- version-bump-rulesSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when an AI agent needs a user to provide any sensitive or private value such as API keys, tokens, cookies, session IDs, …
- Distinctive: line 12
Never ask the user to paste a secret into chat: Instead, open a visible local terminal or secure prompt window with clear labeling.
- Distinctive: line 41
When opening a local input window, make the purpose unambiguous.
- Distinctive: line 81
If a raw secret is accidentally exposed (pasted in chat, logged to file, stored in docs, etc.):
- Distinctive: line 85
Remove it from logs and files: when safe to do so (use file deletion/editing, not just masking).
- Distinctive: line 150
Avoid assumptions: Do not assume the value already exists.
- Distinctive: line 151
Privacy by default: Every secret collection should feel intentional and secure to the user.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secure Secret Input
Use this skill when an AI agent needs a user to provide any sensitive or private value such as API keys, tokens, cookies, session IDs, passwords, app IDs, client secrets, or recovery codes.
Rule
Never ask the user to paste a secret into chat. Instead, open a visible local terminal or secure prompt window with clear labeling.
Default flow:
- Check first — does the value already exist in credential storage, environment variables, local configuration files, or an authenticated API? If yes, use it programmatically and do not ask the user.
- If the user must provide it, open a visible local window or terminal with a clear title and purpose.
- Mask input — use masked input when supported (e.g., PowerShell's
Read-Host -AsSecureStringon Windows, orread -sin bash on Unix). - Write directly to destination — store the value directly to where it will be used:
- Project runtime:
.envfile (excluded from version control) - Long-lived credential: credential manager (1Password, Bitwarden, OS keychain, etc.)
- One-shot use: process-local memory only
- Application integration: native OS credential store
- Project runtime:
Print only safe metadata — after collection, output only:
- Status (success / failure)
- Destination path (e.g., env-var name, credential store item name)
- Boolean confirmation
Never print the actual value.
- Clean up — delete temporary files, markers, or helper scripts that could contain the value.
- Update documentation — record only the secret's logical name, purpose, and storage location in any inventory or documentation. Never record the value itself.
Window Text Example
When opening a local input window, make the purpose unambiguous. The user may see it out of context.
Title:
Secure Input - API_KEY_NAMEBody:
An AI assistant needs a sensitive value.
Label: API_KEY_NAME
Purpose: Authentication with service XYZ
Destination: Project .env and credential vault
Type or paste it here, not in the chat.
The value will not be printed or logged.Storage Targets
Choose the narrowest, most durable storage that fits the use case:
| Use Case | Storage | Notes |
| Project runtime secret | .env file + ignore in git | Simple, local, secure if .gitignore is enforced |
| Long-lived credential | Credential manager (Bitwarden, 1Password, macOS Keychain, Windows Credential Manager, etc.) | Encrypted, shareable, centralized |
| One-shot command/session secret | Process-local memory only | Discarded when process exits |
| CI/CD pipeline secret | Platform secret store (GitHub Secrets, GitLab CI Variables, etc.) | Never in .env or repo files |
Do NOT store raw secrets in:
- Repo files or documentation
- Chat history or logs
- Screenshots or recordings
- Memory files or handoff documents
- Generated code or config exports
- Plaintext JSON/YAML/CSV files
Exposure Response
If a raw secret is accidentally exposed (pasted in chat, logged to file, stored in docs, etc.):
- Stop using it immediately.
- Mark it for rotation — revoke it in the service's settings if possible.
- Remove it from logs and files when safe to do so (use file deletion/editing, not just masking).
- Create a replacement — collect a new secret through the secure input flow.
- Update records — update any inventory or documentation with the new safe metadata.
Decision Tree: Ask in Chat, or Use Local Input?
Does the user need to provide a new credential/secret?
├─ NO → use it from storage, don't ask
└─ YES
├─ Is this a one-shot test or demo? → local input (process memory only)
├─ Will it be reused across sessions? → local input + persistent storage
├─ Is it part of initial setup (e.g., first-time credential creation)?
├─ Can the service generate it and display it once? → user sees it in browser, AI collects via local input
├─ Can the user generate it offline? → user provides via local input
└─ Does it require user's real password or MFA? → acknowledge user must go to web UI first, then collect result via local input (not in chat)
└─ Could the user reasonably enter it via local prompt? (most API keys, auth tokens, recovery codes → YES)
→ Use secure local input. Never ask for chat entry.Common Patterns
Pattern 1: Collect API Key for a Service
Purpose: User wants to configure a service (e.g., OpenAI, Stripe, etc.)
Flow:
1. Check: Does .env already have OPENAI_API_KEY? If yes, use it.
2. If not: Open a local prompt titled "Secure Input - OPENAI_API_KEY"
3. User pastes their key (masked).
4. Write to .env: OPENAI_API_KEY=<value>
5. Write to credential manager if long-term: item named "OpenAI API Key" with the value.
6. Print: "✓ API key configured. Using local environment variable OPENAI_API_KEY."
7. Do not print the key itself.Pattern 2: Unlock a Credential Manager
Purpose: AI needs to access stored secrets (e.g., Bitwarden, 1Password) but the vault is locked.
Flow:
1. Open a secure prompt or unlock window (native to the credential manager).
2. Collect the master password or passphrase (masked).
3. Authenticate to the vault (process-local, no chat).
4. Proceed with downstream access.
5. Print: "✓ Vault unlocked. You have N credentials available."
6. Do not print the master password.Pattern 3: Collect a Recovery Code
Purpose: User needs to save a recovery code or MFA backup.
Flow:
1. Explain: "I can store your recovery code securely in your credential manager."
2. Open a local prompt titled "Secure Input - Recovery Code"
3. User pastes the code (masked in entry, but visible as bullets/dots).
4. Write to credential manager with a clear label (e.g., "Service XYZ Recovery Code - YYYY-MM-DD").
5. Print: "✓ Recovery code saved to your credential vault under 'Service XYZ Recovery Code'."
6. Do not print the code itself in chat or logs.Implementation Notes
- Cross-platform: PowerShell (
Read-Host -AsSecureString) on Windows,read -sin bash on Unix/macOS, native prompts in applications. - Avoid assumptions: Do not assume the value already exists; verify first. Do not assume which credential manager the user prefers; ask or check their setup.
- Privacy by default: Every secret collection should feel intentional and secure to the user. If they see a local prompt pop up, they should immediately understand why.
- Audit trail: Log the collection event (e.g., "collected API key for service X on YYYY-MM-DD") without logging the value. Use metadata only.
Related Concepts
- Token and credential rotation — periodic updates to API keys and authentication secrets to reduce exposure risk.
- Credential manager setup — initializing and configuring password managers (Bitwarden, 1Password, KeePass, macOS Keychain, Windows Credential Manager) to store and retrieve secrets securely.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

