Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

security-guidance

Skill by alirezarezvani

Security Guidance is a PreToolUse hook for Claude Code that warns before Claude writes common security anti-patterns. It is for developers who want to install or tune this guard on their edits.

  • Score 92
  • 31k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install security-guidance

Built from the published package, never by AI.

git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/engineering/security-guidance/skills/security-guidance ~/.claude/skills/security-guidance

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install security-guidance in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Security Guidance is a PreToolUse hook for Claude Code. Before Claude runs Edit, Write or MultiEdit, the hook checks the file path and the content being written. It looks for patterns such as command injection, XSS, SQL injection, unsafe deserialization, eval and GitHub Actions workflow injection. When it finds a match, it prints a warning to stderr and blocks the tool call.

The warning appears once per file and rule within a session, so later edits to the same match are allowed. Setting ENABLE_SECURITY_REMINDER=0 turns the hook off for a session. The skill is aimed at developers who want to install or tune this guard. The source notes that matching is substring based, so it suggests a separate SAST tool such as semgrep or CodeQL for stricter checks.

Written from the project's SKILL.md and checked against it.

What it can do

  • Path-based workflow checkFlags GitHub Actions workflow files with risky ${{ }} expressions.
  • Content pattern scanMatches substrings such as eval(, pickle, os.system and dangerouslySetInnerHTML in written content.
  • SQL and YAML checksWarns on f-string or .format SQL and on yaml.load or yaml.unsafe_load calls.
  • Warn and blockPrints a warning to Claude and exits with code 2 to block the tool call on a first match.
  • Per-session warning cacheStores shown warnings per file and rule so repeat matches in a session are allowed.
  • Environment kill switchSet ENABLE_SECURITY_REMINDER=0 to bypass the hook for one session.

What you need

  • Claude Code with plugin support
  • Python for the hook script security_reminder_hook.py

Try asking

  • Install the security-guidance plugin and confirm the hook is active.
  • Turn off the security reminder for this session only.
  • Show the security warnings log to see why the hook blocked a write.

Good to know

  • Matching is substring based, not AST based, so string literals can trigger false positives.
  • Each warning is shown once per file and rule per session.
  • Session state files are auto-cleaned after 30 days, on a 10% chance per hook run.
  • Stricter detection needs a separate SAST tool, which the skill does not provide.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: engineering/security-guidance/skills/security-guidance/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB
  • references/pretooluse_hook_canon.md8 KB

Alternatives to security-guidance

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

security-guidance: common questions

What does the security-guidance hook check?

It checks the file path and written content for patterns such as command injection, XSS, SQL injection, unsafe deserialization, eval and GitHub Actions injection. It runs before Edit, Write and MultiEdit operations.

How do I turn off the security reminder?

Run Claude with ENABLE_SECURITY_REMINDER=0 set, and the hook is bypassed for that session. The source advises using this sparingly.

Does the hook warn every time I edit the same file?

No. It warns once per file and rule in a session, then allows later matching edits in that session. Session state files can be deleted at any time.

How do I install security-guidance?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is security-guidance free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is security-guidance safe to use?

It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to security-guidance?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

security-guidance Install

Add to stack

Loading.