agent-config
Create, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or…
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.
$ npx -y skills add luongnv89/skills --skill security-setup --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/security-setupContext preview
The summary Claude sees to decide when to auto-load this skill.
Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews.
name: security-setup description: "Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI. Use when hardening repos or adding security hooks. Don't use for incident response or cloud security reviews." license: MIT compatibility: "Cross-platform (macOS, Linux, Windows). Requires git, Python 3.8+, and project write access. Uses pre-commit plus free local tools such as gitleaks, trivy, semgrep, bandit, or cargo-audit when appropriate. Semgrep on Windows requires WSL2." effort: high metadata: version: 1.5.0 author: "Luong NGUYEN <luongnv89@gmail.com>"
Install a local-first security hardening stack for a project. Favor checks that run offline at hook time, produce machine-readable output, and give developers a clear summary before code leaves their machine.
<!-- Maintainer note — not runtime guidance: keep this orchestrator short for the agent's context budget; detailed matrices, templates, and long verification scenarios live in `references/`. Link, don't inline. -->
This skill may trigger automatically per its description, but it never writes silently: Phase 1 always dry-runs the planned changes and waits for explicit user confirmation before touching files, and Phase 2 (CI) only runs when the user explicitly asks for it (e.g. `--ci`).
Check these before Phase 1:
1. Run `git rev-parse --git-dir`. If it exits non-zero, stop and end with a `BLOCKED` final report. 2. Run `python3 --version` (`python --version` on Windows). If no interpreter answers, or the version is below 3.8, stop and end with a `BLOCKED` final report. 3. If a selected tool cannot run offline, record the gap for `SECURITY.md` and the final report. Do not claim offline coverage for it.
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)" git fetch origin git pull --rebase origin "$branch"
If the working tree is not clean, stash first as a backup, sync, then restore:
git stash push -u -m "pre-sync" # backup local changes branch="$(git rev-parse --abbrev-ref HEAD)" git fetch origin && git pull --rebase origin "$branch" git stash pop # rollback by restoring the backup
If `origin` is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing. Never use `--force` rollback options without confirmation.
Work in two gated phases:
1. **Local security baseline** - install a pre-commit hook that checks secrets, dependency vulnerabilities, and static analysis issues locally. 2. **CI/CD mirror** - only when the user asks for `--ci`, create a free-tier GitHub Actions workflow that runs the same local runner on pull requests.
Do not create CI files until Phase 1 is installed and passing.
Inspect the repo before choosing tools. The runner and skill instructions work on macOS, Linux, and Windows; pick the matching shell snippet.
**macOS / Linux (bash, zsh):**
ls -la package.json package-lock.json pnpm-lock.yaml yarn.lock pyproject.toml requirements.txt Cargo.toml Cargo.lock go.mod pom.xml build.gradle 2>/dev/null ls -la .pre-commit-config.yaml SECURITY.md .github/workflows/security.yml 2>/dev/null command -v gitleaks trivy semgrep detect-secrets bandit cargo-audit pre-commit 2>/dev/null
**Windows PowerShell:**
Get-ChildItem -Force -ErrorAction SilentlyContinue package.json,package-lock.json,pnpm-lock.yaml,yarn.lock,pyproject.toml,requirements.txt,Cargo.toml,Cargo.lock,go.mod,pom.xml,build.gradle
Get-ChildItem -Force -ErrorAction SilentlyContinue .pre-commit-config.yaml,SECURITY.md,.github\workflows\security.yml
foreach ($t in 'gitleaks','trivy','semgrep','detect-secrets','bandit','cargo-audit','pre-commit') { Get-Command $t -ErrorAction SilentlyContinue }Identify:
Use `references/tool-selection.md` for the tool matrix and install commands.
Choose the smallest useful set:
a Python-heavy repo.
add `cargo-audit` only for Rust repos that already use Cargo.
Add language-native scanners only when the language is present (`bandit` for Python, `gosec` for Go, `cargo clippy`/`cargo audit` for Rust).
When the repo uses package managers, recommend Socket Firewall as a lightweight local guardrail for day-to-day dependency installs. This does not replace lockfile scanning with `trivy`/`cargo-audit`; it shifts risk left by making risky installs harder before a new dependency reaches the repo.
For macOS/Linux users on `zsh` or `bash`, suggest adding these aliases to the developer shell profile:
alias npm="sfw npm" alias yarn="sfw yarn" alias pnpm="sfw pnpm" alias pip="sfw pip" alias uv="sfw uv" alias cargo="sfw cargo"
Only include aliases for package managers the project actually uses, and document the guardrail in `SECURITY.md` as optional local developer setup. If Socket Firewall is not installed, print the official install instructions or link to the official docs
One command drops a tested, versioned skill into your agent. No more ad-hoc prompts. The same rigorous steps run every time. Skills are independent files.
Create, update, or audit AGENTS.md (default) or CLAUDE.md agent instructions: set up, prune, add a rule, or merge CLAUDE.md or…
Find open AI engineering jobs that fit a candidate, verify location and apply links, and assess each employer's product. Use for…
Generate App Store screenshots and header/search images for iPhone, iPad and Mac from a codebase or landing page, or re-render a…
Audit iOS/macOS apps against App Store Review Guidelines before submission, with evidence-backed verdicts and fixes. Don't use…
Optimize App Store and Google Play listings via a 7-phase, plan-approval-gated ASO workflow (keyword strategy, metadata,…
Generate a commit message, stage all changes, and push to remote after scanning for secrets, large files, and protected-branch…