Security Custom Rules Skill

Draft custom security rules for Semgrep and Bandit with testing and documentation.

50|9|Updated Oct 15, 2025
One-click install
npx skills add https://github.com/jpoley/flowspec --skill security-custom-rules-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Security Custom Rules Skill
Source: https://github.com/jpoley/flowspec/tree/main/.claude/skills/security-custom-rules
Command: npx skills add https://github.com/jpoley/flowspec --skill security-custom-rules-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps Claude Code guide users through creating, validating, and testing custom security rules for organization-specific security standards, reducing false positives and improving scanning effectiveness.

Core Features & Use Cases

  • Bootstrap custom rule directories for Semgrep and Bandit, including .specify/security/rules/ and .specify/security/bandit/
  • Draft, refine, and test rules with examples, metadata, and references
  • Integrate with your security workflow to enforce internal coding standards and reproducible scans

Quick Start

Use this skill to bootstrap a new custom security rule in .specify/security/rules/ and provide a sample pattern to validate against your codebase.

Frequently Asked Questions about Security Custom Rules Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom security rules for Semgrep and Bandit?

Custom security rules let you enforce organization-specific coding standards and catch vulnerabilities unique to your codebase. Bootstrap rule directories in .specify/security/rules/ and .specify/security/bandit/, then draft patterns with metadata and test them against representative code before integrating into your security workflow.

What's the best way to test custom security rules before deployment?

Test custom rules by validating patterns against representative code samples that should and shouldn't match. Structure rules with correct metadata and documentation, then integrate test cases to ensure reproducible, auditable scans that reduce false positives in your security workflow.

Can I use custom security rules with my existing security workflow?

Yes. Custom rules integrate directly into Semgrep and Bandit workflows. After drafting and testing your organization-specific rules in .specify/security/rules/, you can enforce them alongside standard checks to maintain consistent security standards across your codebase.

Why should I write custom security rules instead of relying on built-in checks?

Custom rules target project-specific vulnerabilities and internal coding standards that built-in checks don't cover. They reduce false positives, improve scanning effectiveness, and make security enforcement reproducible and auditable across your organization.

What metadata and documentation do custom security rules need?

Custom rules require proper structure, metadata describing the vulnerability or standard they enforce, test cases validating the pattern, and documentation explaining the rule's purpose. This ensures correct rule behavior, auditability, and reproducible scans across your security workflow.

Do I need prior experience with Semgrep or Bandit to create custom rules?

While familiarity with Semgrep or Bandit syntax helps, this Skill guides you through rule creation from pattern drafting through testing and integration. You'll learn correct rule structure and metadata requirements as you build organization-specific rules for your codebase.