semgrep-rule-creator — community semgrep-rule-creator, LUGANODE_TASK1, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0

このスキルについて

バグ パターン、セキュリティ脆弱性、コーディング規約のためのカスタム Semgrep ルール作成が必要なコード分析エージェントに最適です。 Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

ananyashailesh ananyashailesh
[0]
[0]
Updated: 3/10/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 9/11

This page remains useful for operators, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
9/11
Quality Score
54
Canonical Locale
en
Detected Body Locale
en

バグ パターン、セキュリティ脆弱性、コーディング規約のためのカスタム Semgrep ルール作成が必要なコード分析エージェントに最適です。 Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

このスキルを使用する理由

エージェントが、適切なテストと検証を伴う、プロダクションレベルの Semgrep ルールを作成できるようにし、汚染モードを使用してデータフローの脆弱性を検出し、カスタムルールセットを使用してコーディング規約を強制し、Semgrep の静的分析機能を使用して既存のコードベースと統合します。

おすすめ

バグ パターン、セキュリティ脆弱性、コーディング規約のためのカスタム Semgrep ルール作成が必要なコード分析エージェントに最適です。

実現可能なユースケース for semgrep-rule-creator

特定バグ パターンのための Semgrep ルールの作成
カスタム ルールを使用してコードベースのセキュリティ脆弱性を検出
自動静的分析を使用してコーディング規約を強制

! セキュリティと制限

  • Semgrep 及びそのルール構文の知識が必要
  • 既存の Semgrep ルールセットの実行には不適
  • カスタム ルールなしの静的分析のみ

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

After The Review

Decide The Next Action Before You Keep Reading Repository Material

Killer-Skills should not stop at opening repository instructions. It should help you decide whether to install this skill, when to cross-check against trusted collections, and when to move into workflow rollout.

Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is semgrep-rule-creator?

バグ パターン、セキュリティ脆弱性、コーディング規約のためのカスタム Semgrep ルール作成が必要なコード分析エージェントに最適です。 Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.

How do I install semgrep-rule-creator?

Run the command: npx killer-skills add ananyashailesh/LUGANODE_TASK1/semgrep-rule-creator. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for semgrep-rule-creator?

Key use cases include: 特定バグ パターンのための Semgrep ルールの作成, カスタム ルールを使用してコードベースのセキュリティ脆弱性を検出, 自動静的分析を使用してコーディング規約を強制.

Which IDEs are compatible with semgrep-rule-creator?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for semgrep-rule-creator?

Semgrep 及びそのルール構文の知識が必要. 既存の Semgrep ルールセットの実行には不適. カスタム ルールなしの静的分析のみ.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add ananyashailesh/LUGANODE_TASK1/semgrep-rule-creator. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use semgrep-rule-creator immediately in the current project.

! Reference-Only Mode

This page remains useful for installation and reference, but Killer-Skills no longer treats it as a primary indexable landing page. Read the review above before relying on the upstream repository instructions.

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

semgrep-rule-creator

Install semgrep-rule-creator, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Semgrep Rule Creator

Create production-quality Semgrep rules with proper testing and validation.

When to Use

Ideal scenarios:

  • Writing Semgrep rules for specific bug patterns
  • Writing rules to detect security vulnerabilities in your codebase
  • Writing taint mode rules for data flow vulnerabilities
  • Writing rules to enforce coding standards

When NOT to Use

Do NOT use this skill for:

  • Running existing Semgrep rulesets
  • General static analysis without custom rules (use static-analysis skill)

Rationalizations to Reject

When writing Semgrep rules, reject these common shortcuts:

  • "The pattern looks complete" → Still run semgrep --test --config <rule-id>.yaml <rule-id>.<ext> to verify. Untested rules have hidden false positives/negatives.
  • "It matches the vulnerable case" → Matching vulnerabilities is half the job. Verify safe cases don't match (false positives break trust).
  • "Taint mode is overkill for this" → If data flows from user input to a dangerous sink, taint mode gives better precision than pattern matching.
  • "One test is enough" → Include edge cases: different coding styles, sanitized inputs, safe alternatives, and boundary conditions.
  • "I'll optimize the patterns first" → Write correct patterns first, optimize after all tests pass. Premature optimization causes regressions.
  • "The AST dump is too complex" → The AST reveals exactly how Semgrep sees code. Skipping it leads to patterns that miss syntactic variations.

Anti-Patterns

Too broad - matches everything, useless for detection:

yaml
1# BAD: Matches any function call 2pattern: $FUNC(...) 3 4# GOOD: Specific dangerous function 5pattern: eval(...)

Missing safe cases in tests - leads to undetected false positives:

python
1# BAD: Only tests vulnerable case 2# ruleid: my-rule 3dangerous(user_input) 4 5# GOOD: Include safe cases to verify no false positives 6# ruleid: my-rule 7dangerous(user_input) 8 9# ok: my-rule 10dangerous(sanitize(user_input)) 11 12# ok: my-rule 13dangerous("hardcoded_safe_value")

Overly specific patterns - misses variations:

yaml
1# BAD: Only matches exact format 2pattern: os.system("rm " + $VAR) 3 4# GOOD: Matches all os.system calls with taint tracking 5mode: taint 6pattern-sinks: 7 - pattern: os.system(...)

Strictness Level

This workflow is strict - do not skip steps:

  • Read documentation first: See Documentation before writing Semgrep rules
  • Test-first is mandatory: Never write a rule without tests
  • 100% test pass is required: "Most tests pass" is not acceptable
  • Optimization comes last: Only simplify patterns after all tests pass
  • Avoid generic patterns: Rules must be specific, not match broad patterns
  • Prioritize taint mode: For data flow vulnerabilities
  • One YAML file - one Semgrep rule: Each YAML file must contain only one Semgrep rule; don't combine multiple rules in a single file
  • No generic rules: When targeting a specific language for Semgrep rules - avoid generic pattern matching (languages: generic)
  • Forbidden todook and todoruleid test annotations: todoruleid: <rule-id> and todook: <rule-id> annotations in tests files for future rule improvements are forbidden

Overview

This skill guides creation of Semgrep rules that detect security vulnerabilities and code patterns. Rules are created iteratively: analyze the problem, write tests first, analyze AST structure, write the rule, iterate until all tests pass, optimize the rule.

Approach selection:

  • Taint mode (prioritize): Data flow issues where untrusted input reaches dangerous sinks
  • Pattern matching: Simple syntactic patterns without data flow requirements

Why prioritize taint mode? Pattern matching finds syntax but misses context. A pattern eval($X) matches both eval(user_input) (vulnerable) and eval("safe_literal") (safe). Taint mode tracks data flow, so it only alerts when untrusted data actually reaches the sink—dramatically reducing false positives for injection vulnerabilities.

Iterating between approaches: It's okay to experiment. If you start with taint mode and it's not working well (e.g., taint doesn't propagate as expected, too many false positives/negatives), switch to pattern matching. Conversely, if pattern matching produces too many false positives on safe cases, try taint mode instead. The goal is a working rule—not rigid adherence to one approach.

Output structure - exactly 2 files in a directory named after the rule-id:

<rule-id>/
├── <rule-id>.yaml     # Semgrep rule
└── <rule-id>.<ext>    # Test file with ruleid/ok annotations

Quick Start

yaml
1rules: 2 - id: insecure-eval 3 languages: [python] 4 severity: HIGH 5 message: User input passed to eval() allows code execution 6 mode: taint 7 pattern-sources: 8 - pattern: request.args.get(...) 9 pattern-sinks: 10 - pattern: eval(...)

Test file (insecure-eval.py):

python
1# ruleid: insecure-eval 2eval(request.args.get('code')) 3 4# ok: insecure-eval 5eval("print('safe')")

Run tests (from rule directory): semgrep --test --config <rule-id>.yaml <rule-id>.<ext>

Quick Reference

  • For commands, pattern operators, and taint mode syntax, see quick-reference.md.
  • For detailed workflow and examples, you MUST see workflow.md

Workflow

Copy this checklist and track progress:

Semgrep Rule Progress:
- [ ] Step 1: Analyze the Problem
- [ ] Step 2: Write Tests First
- [ ] Step 3: Analyze AST structure
- [ ] Step 4: Write the rule
- [ ] Step 5: Iterate until all tests pass (semgrep --test)
- [ ] Step 6: Optimize the rule (remove redundancies, re-test)
- [ ] Step 7: Final Run

Documentation

REQUIRED: Before writing any rule, use WebFetch to read all of these 4 links with Semgrep documentation:

  1. Rule Syntax
  2. Pattern Syntax
  3. ToB Testing Handbook - Semgrep
  4. Constant propagation
  5. Writing Rules Index

関連スキル

Looking for an alternative to semgrep-rule-creator or another community skill for your workflow? Explore these related open-source skills.

すべて表示

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

カスタマイズ可能なウィジェットプラグインをprompts.chatのフィードシステム用に生成する

149.6k
0
AI

flags

Logo of vercel
vercel

React フレームワーク

138.4k
0
ブラウザ

pr-review

Logo of pytorch
pytorch

Pythonにおけるテンソルと動的ニューラルネットワーク(強力なGPUアクセラレーション)

98.6k
0
開発者