All skills
simota avatar

/grok

@8e1f365
by shingo imotasimota/agent-skills85 stars
15

Designing regex, parsers, and DSLs for grammar authoring and ReDoS-safe regex. Not for REST APIs (Gateway) or DB schemas (Schema).

Use this Skill: https://skilld.dev/gh/simota/agent-skills/grok

This session only. Nothing lands on disk.

referenceinteraction-questions.md

≈831 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Grok Interaction Questions

Canonical question schemas Grok asks at INTERACTION_TRIGGERS (engine choice, generator choice, internal vs external DSL, ambiguity resolution, roundtrip fidelity).

questions:
  - question: "Which regex engine should this pattern target?"
    header: "Engine"
    options:
      - label: "RE2 / Rust regex / Hyperscan (Recommended)"
        description: "Linear-time, ReDoS-immune. Required when input is untrusted"
      - label: "PCRE / Perl-compat"
        description: "Full feature set incl. backreferences, lookaround; ReDoS-prone"
      - label: "ECMAScript (/u or /v flag)"
        description: "Browser/Node default. ES2024 /v adds set notation; ES2025 adds RegExp.escape() and inline flag modifiers (?i:...)"
      - label: "Oniguruma (Ruby)"
        description: "Ruby / mruby environments; supports named captures, multi-byte"
      - label: "Other (please specify)"
        description: "Java, .NET, Python re, etc."
    multiSelect: false
  - question: "Which parser generator should implement this grammar?"
    header: "Generator"
    options:
      - label: "Hand-written recursive descent (Recommended for small LL(k))"
        description: "Best error messages; control over performance and diagnostics"
      - label: "tree-sitter"
        description: "Incremental parsing, error recovery; ideal for editor/IDE tooling"
      - label: "ANTLR4"
        description: "LL(*) with strong tooling; multi-language targets"
      - label: "Chevrotain (JS/TS)"
        description: "Fluent-API, no codegen, excellent error recovery"
      - label: "PEG.js / peggy / nearley"
        description: "PEG or Earley; good for rapid JS/TS prototyping"
      - label: "Other (please specify)"
        description: "Menhir, Lark, Marpa, Yacc/Bison, etc."
    multiSelect: false
  - question: "Is this DSL internal (host-language embedded) or external (standalone syntax)?"
    header: "DSL Kind"
    options:
      - label: "Internal (Recommended when users are developers)"
        description: "Fluent API, tagged template, or builder pattern in host language"
      - label: "External"
        description: "Standalone grammar with its own parser, for non-programmer authors"
      - label: "Hybrid (YAML/JSON with schema + embedded expressions)"
        description: "Data-driven config with validated extension points"
    multiSelect: false
  - question: "Grammar has ambiguity / conflicts. How to resolve?"
    header: "Ambiguity"
    options:
      - label: "Refactor to unambiguous form (Recommended)"
        description: "Rewrite rules; document precedence/associativity explicitly"
      - label: "Use ordered choice (PEG)"
        description: "Accept PEG semantics; callers must know the order matters"
      - label: "Accept GLR / Earley ambiguity"
        description: "Return all parses; downstream must disambiguate semantically"
    multiSelect: false
  - question: "Should AST transforms preserve source formatting (comments, whitespace)?"
    header: "Roundtrip"
    options:
      - label: "Preserve (Recommended for codemods)"
        description: "Use recast, jscodeshift, or ts-morph with full-fidelity nodes"
      - label: "Normalize"
        description: "Emit via printer; simpler but loses developer-authored formatting"
    multiSelect: false

Source: SKILL.md on GitHub

No alerts4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    このスキルは、正規表現、パーサー、DSL(ドメイン固有言語)の設計に特化した高度で安全な専門家エージェントです。ReDoS(正規表現によるサービス拒否攻撃)の防止、抽象構文木(AST)の安全な変換、およびパーサージェネレーターの適切な選択に関する詳細なセキュリティプロトコルが含まれています。悪意のあるパターン、秘密情報の漏洩、または不審な挙動は検出されませんでした。

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at 8e1f365. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated last month

README badge

README badge for simota/agent-skills/grok