[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ESGZXEY5PAKBQVK04KT5BD":3,"skill-same:01M7ESGZXEY5PAKBQVK04KT5BD":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7ESGZXEY5PAKBQVK04KT5BD","semgrep-rule-creator",null,"Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fsemgrep-rule-creator\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: semgrep-rule-creator\ndescription: Creates custom Semgrep rules for detecting security vulnerabilities, bug patterns, and code patterns. Use when writing Semgrep rules or building custom static analysis detections.\nallowed-tools:\n  - Bash\n  - Read\n  - Write\n  - Edit\n  - Glob\n  - Grep\n  - WebFetch\nrisk: critical\nsource: community\ndate_added: \"2026-09-04\"\n---\n\n# Semgrep Rule Creator\n\nCreate production-quality Semgrep rules with proper testing and validation.\n\n## When to Use\n**Ideal scenarios:**\n- Writing Semgrep rules for specific bug patterns\n- Writing rules to detect security vulnerabilities in your codebase\n- Writing taint mode rules for data flow vulnerabilities\n- Writing rules to enforce coding standards\n\n## When NOT to Use\n\nDo NOT use this skill for:\n- Running existing Semgrep rulesets\n- General static analysis without custom rules (use `static-analysis` skill)\n\n## Rationalizations to Reject\n\nWhen writing Semgrep rules, reject these common shortcuts:\n\n- **\"The pattern looks complete\"** → Still run `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>` to verify. Untested rules have hidden false positives\u002Fnegatives.\n- **\"It matches the vulnerable case\"** → Matching vulnerabilities is half the job. Verify safe cases don't match (false positives break trust).\n- **\"Taint mode is overkill for this\"** → If data flows from user input to a dangerous sink, taint mode gives better precision than pattern matching.\n- **\"One test is enough\"** → Include edge cases: different coding styles, sanitized inputs, safe alternatives, and boundary conditions.\n- **\"I'll optimize the patterns first\"** → Write correct patterns first, optimize after all tests pass. Premature optimization causes regressions.\n- **\"The AST dump is too complex\"** → The AST reveals exactly how Semgrep sees code. Skipping it leads to patterns that miss syntactic variations.\n\n## Anti-Patterns\n\n**Too broad** - matches everything, useless for detection:\n```yaml\n# BAD: Matches any function call\npattern: $FUNC(...)\n\n# GOOD: Specific dangerous function\npattern: eval(...) # security-allowlist: Semgrep sink pattern\n```\n\n**Missing safe cases in tests** - leads to undetected false positives:\n```python\n# BAD: Only tests vulnerable case\n# ruleid: my-rule\ndangerous(user_input)\n\n# GOOD: Include safe cases to verify no false positives\n# ruleid: my-rule\ndangerous(user_input)\n\n# ok: my-rule\ndangerous(sanitize(user_input))\n\n# ok: my-rule\ndangerous(\"hardcoded_safe_value\")\n```\n\n**Overly specific patterns** - misses variations:\n```yaml\n# BAD: Only matches exact format\npattern: os.system(\"rm \" + $VAR)\n\n# GOOD: Matches all os.system calls with taint tracking\nmode: taint\npattern-sinks:\n  - pattern: os.system(...)\n```\n\n## Strictness Level\n\nThis workflow is **strict** - do not skip steps:\n- **Read documentation first**: See [Documentation](#documentation) before writing Semgrep rules\n- **Test-first is mandatory**: Never write a rule without tests\n- **100% test pass is required**: \"Most tests pass\" is not acceptable\n- **Optimization comes last**: Only simplify patterns after all tests pass\n- **Avoid generic patterns**: Rules must be specific, not match broad patterns\n- **Prioritize taint mode**: For data flow vulnerabilities\n- **One YAML file - one Semgrep rule**: Each YAML file must contain only one Semgrep rule; don't combine multiple rules in a single file\n- **No generic rules**: When targeting a specific language for Semgrep rules - avoid generic pattern matching (`languages: generic`)\n- **Forbidden `todook` and `todoruleid` test annotations**: `todoruleid: \u003Crule-id>` and `todook: \u003Crule-id>` annotations in tests files for future rule improvements are forbidden\n\n## Overview\n\nThis 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.\n\n**Approach selection:**\n- **Taint mode** (prioritize): Data flow issues where untrusted input reaches dangerous sinks\n- **Pattern matching**: Simple syntactic patterns without data flow requirements\n\n**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. \u003C!-- security-allowlist: Semgrep taint-mode explanation -->\n\n**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\u002Fnegatives), 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.\n\n**Output structure** - exactly 2 files in a directory named after the rule-id:\n```\n\u003Crule-id>\u002F\n├── \u003Crule-id>.yaml     # Semgrep rule\n└── \u003Crule-id>.\u003Cext>    # Test file with ruleid\u002Fok annotations\n```\n\n## Quick Start\n\n```yaml\nrules:\n  - id: insecure-eval\n    languages: [python]\n    severity: HIGH\n    message: User input passed to eval() allows code execution # security-allowlist: Semgrep finding message\n    mode: taint\n    pattern-sources:\n      - pattern: request.args.get(...)\n    pattern-sinks:\n      - pattern: eval(...) # security-allowlist: Semgrep sink pattern\n```\n\nTest file (`insecure-eval.py`):\n```python\n# ruleid: insecure-eval\neval(request.args.get('code'))  # security-allowlist: intentionally vulnerable Semgrep fixture\n\n# ok: insecure-eval\neval(\"print('safe')\")  # security-allowlist: safe-literal Semgrep fixture\n```\n\nRun tests (from rule directory): `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>`\n\n## Quick Reference\n\n- For commands, pattern operators, and taint mode syntax, see quick-reference.md.\n- For detailed workflow and examples, you MUST see workflow.md\n\n## Workflow\n\nCopy this checklist and track progress:\n\n```\nSemgrep Rule Progress:\n- [ ] Step 1: Analyze the Problem\n- [ ] Step 2: Write Tests First\n- [ ] Step 3: Analyze AST structure\n- [ ] Step 4: Write the rule\n- [ ] Step 5: Iterate until all tests pass (semgrep --test)\n- [ ] Step 6: Optimize the rule (remove redundancies, re-test)\n- [ ] Step 7: Final Run\n```\n\n## Documentation\n\n**REQUIRED**: Before writing any rule, use WebFetch to read **all** of these 4 links with Semgrep documentation:\n\n1. [Rule Syntax](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Frule-syntax)\n2. [Pattern Syntax](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Fpattern-syntax)\n3. [ToB Testing Handbook - Semgrep](https:\u002F\u002Fappsec.guide\u002Fdocs\u002Fstatic-analysis\u002Fsemgrep\u002Fadvanced\u002F)\n4. [Constant propagation](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Fconstant-propagation)\n5. [Writing Rules Index](https:\u002F\u002Fgithub.com\u002Fsemgrep\u002Fsemgrep-docs\u002Ftree\u002Fmain\u002Fdocs\u002Fwriting-rules\u002F)\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","# Semgrep Rule Creator\n\nCreate production-quality Semgrep rules with proper testing and validation.\n\n## When to Use\n**Ideal scenarios:**\n- Writing Semgrep rules for specific bug patterns\n- Writing rules to detect security vulnerabilities in your codebase\n- Writing taint mode rules for data flow vulnerabilities\n- Writing rules to enforce coding standards\n\n## When NOT to Use\n\nDo NOT use this skill for:\n- Running existing Semgrep rulesets\n- General static analysis without custom rules (use `static-analysis` skill)\n\n## Rationalizations to Reject\n\nWhen writing Semgrep rules, reject these common shortcuts:\n\n- **\"The pattern looks complete\"** → Still run `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>` to verify. Untested rules have hidden false positives\u002Fnegatives.\n- **\"It matches the vulnerable case\"** → Matching vulnerabilities is half the job. Verify safe cases don't match (false positives break trust).\n- **\"Taint mode is overkill for this\"** → If data flows from user input to a dangerous sink, taint mode gives better precision than pattern matching.\n- **\"One test is enough\"** → Include edge cases: different coding styles, sanitized inputs, safe alternatives, and boundary conditions.\n- **\"I'll optimize the patterns first\"** → Write correct patterns first, optimize after all tests pass. Premature optimization causes regressions.\n- **\"The AST dump is too complex\"** → The AST reveals exactly how Semgrep sees code. Skipping it leads to patterns that miss syntactic variations.\n\n## Anti-Patterns\n\n**Too broad** - matches everything, useless for detection:\n```yaml\n# BAD: Matches any function call\npattern: $FUNC(...)\n\n# GOOD: Specific dangerous function\npattern: eval(...) # security-allowlist: Semgrep sink pattern\n```\n\n**Missing safe cases in tests** - leads to undetected false positives:\n```python\n# BAD: Only tests vulnerable case\n# ruleid: my-rule\ndangerous(user_input)\n\n# GOOD: Include safe cases to verify no false positives\n# ruleid: my-rule\ndangerous(user_input)\n\n# ok: my-rule\ndangerous(sanitize(user_input))\n\n# ok: my-rule\ndangerous(\"hardcoded_safe_value\")\n```\n\n**Overly specific patterns** - misses variations:\n```yaml\n# BAD: Only matches exact format\npattern: os.system(\"rm \" + $VAR)\n\n# GOOD: Matches all os.system calls with taint tracking\nmode: taint\npattern-sinks:\n  - pattern: os.system(...)\n```\n\n## Strictness Level\n\nThis workflow is **strict** - do not skip steps:\n- **Read documentation first**: See [Documentation](#documentation) before writing Semgrep rules\n- **Test-first is mandatory**: Never write a rule without tests\n- **100% test pass is required**: \"Most tests pass\" is not acceptable\n- **Optimization comes last**: Only simplify patterns after all tests pass\n- **Avoid generic patterns**: Rules must be specific, not match broad patterns\n- **Prioritize taint mode**: For data flow vulnerabilities\n- **One YAML file - one Semgrep rule**: Each YAML file must contain only one Semgrep rule; don't combine multiple rules in a single file\n- **No generic rules**: When targeting a specific language for Semgrep rules - avoid generic pattern matching (`languages: generic`)\n- **Forbidden `todook` and `todoruleid` test annotations**: `todoruleid: \u003Crule-id>` and `todook: \u003Crule-id>` annotations in tests files for future rule improvements are forbidden\n\n## Overview\n\nThis 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.\n\n**Approach selection:**\n- **Taint mode** (prioritize): Data flow issues where untrusted input reaches dangerous sinks\n- **Pattern matching**: Simple syntactic patterns without data flow requirements\n\n**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. \u003C!-- security-allowlist: Semgrep taint-mode explanation -->\n\n**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\u002Fnegatives), 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.\n\n**Output structure** - exactly 2 files in a directory named after the rule-id:\n```\n\u003Crule-id>\u002F\n├── \u003Crule-id>.yaml     # Semgrep rule\n└── \u003Crule-id>.\u003Cext>    # Test file with ruleid\u002Fok annotations\n```\n\n## Quick Start\n\n```yaml\nrules:\n  - id: insecure-eval\n    languages: [python]\n    severity: HIGH\n    message: User input passed to eval() allows code execution # security-allowlist: Semgrep finding message\n    mode: taint\n    pattern-sources:\n      - pattern: request.args.get(...)\n    pattern-sinks:\n      - pattern: eval(...) # security-allowlist: Semgrep sink pattern\n```\n\nTest file (`insecure-eval.py`):\n```python\n# ruleid: insecure-eval\neval(request.args.get('code'))  # security-allowlist: intentionally vulnerable Semgrep fixture\n\n# ok: insecure-eval\neval(\"print('safe')\")  # security-allowlist: safe-literal Semgrep fixture\n```\n\nRun tests (from rule directory): `semgrep --test --config \u003Crule-id>.yaml \u003Crule-id>.\u003Cext>`\n\n## Quick Reference\n\n- For commands, pattern operators, and taint mode syntax, see quick-reference.md.\n- For detailed workflow and examples, you MUST see workflow.md\n\n## Workflow\n\nCopy this checklist and track progress:\n\n```\nSemgrep Rule Progress:\n- [ ] Step 1: Analyze the Problem\n- [ ] Step 2: Write Tests First\n- [ ] Step 3: Analyze AST structure\n- [ ] Step 4: Write the rule\n- [ ] Step 5: Iterate until all tests pass (semgrep --test)\n- [ ] Step 6: Optimize the rule (remove redundancies, re-test)\n- [ ] Step 7: Final Run\n```\n\n## Documentation\n\n**REQUIRED**: Before writing any rule, use WebFetch to read **all** of these 4 links with Semgrep documentation:\n\n1. [Rule Syntax](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Frule-syntax)\n2. [Pattern Syntax](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Fpattern-syntax)\n3. [ToB Testing Handbook - Semgrep](https:\u002F\u002Fappsec.guide\u002Fdocs\u002Fstatic-analysis\u002Fsemgrep\u002Fadvanced\u002F)\n4. [Constant propagation](https:\u002F\u002Fsemgrep.dev\u002Fdocs\u002Fwriting-rules\u002Fdata-flow\u002Fconstant-propagation)\n5. [Writing Rules Index](https:\u002F\u002Fgithub.com\u002Fsemgrep\u002Fsemgrep-docs\u002Ftree\u002Fmain\u002Fdocs\u002Fwriting-rules\u002F)\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n",{"name":5,"risk":24,"source":25,"date_added":26,"description":7,"allowed-tools":27},"critical","community","2026-09-04",[28,29,30,31,32,33,34],"Bash","Read","Write","Edit","Glob","Grep","WebFetch","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fsemgrep-rule-creator",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill semgrep-rule-creator",{"tool":49,"command":50},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill semgrep-rule-creator",{"tool":52,"command":53},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill semgrep-rule-creator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fsemgrep-rule-creator\u002FSKILL.md",true,[],[58,66,71,78,85,92],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":65},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":67,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":65},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":65},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":65},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":65},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":65},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]