agent-security-hardening
AFaffaan-m/ECC314k3,503 new stars in the last 7 days
First-run setup. Detects configured API keys, points to the local setup-keys script for secure key entry, and shows sample prompts scaled to available tools.
The user invoked this skill explicitly. Help them figure out what's already working, what they're missing, and what to actually try. Critically: do NOT prompt for API keys in chat. Pasting a key into a chat input puts it in terminal scrollback, the local Claude Code session log, and the Anthropic API logs. The toolkit ships a local script that prompts for keys with masked input and writes them straight to the user's shell rc, never going through chat.
First detect the user's platform via the Bash tool's environment. If bash is available (macOS, Linux, WSL, Git Bash on Windows), use the bash detection. If you're on native Windows PowerShell with no bash, use the PowerShell detection instead.
Don't print the values; only report SET vs MISSING.
Use printenv so the loop works in both bash and zsh (Claude Code's bash tool may use either):
for var in SEATS_AERO_API_KEY DUFFEL_API_KEY_LIVE IGNAV_API_KEY AWARDWALLET_API_KEY AWARDWALLET_USER_ID SERPAPI_API_KEY RAPIDAPI_KEY LITEAPI_API_KEY TRIPADVISOR_API_KEY ENTUR_CLIENT_NAME RESROBOT_API_KEY REJSEPLANEN_API_KEY; do
if [ -n "$(printenv "$var")" ]; then echo "SET: $var"; else echo "MISSING: $var"; fi
done
$keys = @('SEATS_AERO_API_KEY','DUFFEL_API_KEY_LIVE','IGNAV_API_KEY','AWARDWALLET_API_KEY','AWARDWALLET_USER_ID','SERPAPI_API_KEY','RAPIDAPI_KEY','LITEAPI_API_KEY','TRIPADVISOR_API_KEY','ENTUR_CLIENT_NAME','RESROBOT_API_KEY','REJSEPLANEN_API_KEY')
foreach ($k in $keys) {
$v = [Environment]::GetEnvironmentVariable($k)
if ([string]::IsNullOrEmpty($v)) { Write-Host "MISSING: $k" } else { Write-Host "SET: $k" }
}
Group the results:
Tier 1 (high-value, missing matters most): SEATS_AERO_API_KEY, DUFFEL_API_KEY_LIVE, IGNAV_API_KEY, AWARDWALLET_API_KEY + AWARDWALLET_USER_ID
Tier 2 (extra sources): SERPAPI_API_KEY, RAPIDAPI_KEY, LITEAPI_API_KEY, TRIPADVISOR_API_KEY
Tier 3 (specific use cases): ENTUR_CLIENT_NAME, RESROBOT_API_KEY, REJSEPLANEN_API_KEY (Scandinavia transit only)
Be concrete. Examples:
If keys are missing and the user wants to add them, give them the right command for their platform. Detect their shell with echo $SHELL and OS with uname.
"Run this in your terminal (NOT in this chat). The script asks for each key with masked input, validates them, and writes the exports to your shell rc with a backup. Your keys never go through this chat session.
bash <(curl -fsSL https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.sh)Or if you have the repo cloned:
bash scripts/setup-keys.shWhen it's done, run
source ~/.zshrc(or~/.bashrc, or your fish config) and ask me to plan a trip."
"Run this in PowerShell (NOT in this chat). The script asks for each key with masked input and writes them to your PowerShell profile.
iwr https://raw.githubusercontent.com/borski/travel-hacking-toolkit/main/scripts/setup-keys.ps1 -OutFile $env:TEMP\setup-keys.ps1 powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\setup-keys.ps1 Remove-Item $env:TEMP\setup-keys.ps1When it's done, run
. $PROFILEor open a new PowerShell window."
"PowerShell is the easier path. If you must use cmd, set keys with
setx:setx SEATS_AERO_API_KEY \"your-key-here\" setx DUFFEL_API_KEY_LIVE \"your-key-here\"Open a new cmd window for the variables to take effect. Note that
setxwrites to the registry permanently."
"If you keep secrets in 1Password, you can use
op runto resolve them at launch instead of writing to your shell rc. The toolkit has an.env.examplethat usesop://references. See https://developer.1password.com/docs/cli/secrets-environment-variables/ for the syntax. Then launch as:op run --env-file=.env -- claude."
Don't ever offer to collect API keys via chat input. If the user explicitly insists on pasting in chat, refuse politely and explain that the script is the safe path: keys typed into chat get retained in terminal scrollback, local session logs, and remote API logs. The script avoids all three.
After setup (or now, if keys are already set), show 3-4 prompts scaled to what they have configured. Re-detect first to confirm.
No keys set:
With Seats.aero:
With AwardWallet:
End with a declarative statement (NOT a question, per the system prompt's PRE-OUTPUT GATE):
"You're set. Type
/travel-hacker:plan-tripto start a guided trip plan, or describe a trip in plain English."
setup-keys.sh or setup-keys.ps1. Chat input gets logged in too many places./tmp or other ephemeral paths. The setup-keys script uses the user's shell rc with backup.Concise, friendly, direct. Get them from "what do I have?" to "here's the script to run" in under a minute.
op run --env-file=.env -- claude as the alternative.AFaffaan-m/ECC314k3,503 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail202k4,226 new stars in the last 7 days
GAgarrytan/gstack143k524 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
RUruvnet/RuView106k596 new stars in the last 7 days