شعار Osquery Query Helper

Osquery Query Helper

المجتمع
tsale
osquery-query-helper

Help users write, validate, and troubleshoot osquery SQL queries using provided osquery table schemas as the authoritative source.

نظرة عامة

الناشرtsale
المستودعawesome-dfir-skills
اسم المهارةosquery-query-helper
النجوم
325
التفريعات
36
الملفات المرفقة
3
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 3

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها tsale على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Osquery Query Helper في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/tsale/awesome-dfir-skills/tree/main/skills/hunting/osquery-helper
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/tsale/awesome-dfir-skills.git /tmp/awesome-dfir-skills
mkdir -p .claude/skills
cp -r /tmp/awesome-dfir-skills/skills/hunting/osquery-helper .claude/skills/osquery-query-helper
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Osquery Query Helper في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Osquery Query Helper تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Osquery Query Helper بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Osquery Query Helper

What This Skill Does

Help users with all aspects of osquery query work:

  • Write queries from scratch based on investigation goals
  • Validate queries the user has written against the schema
  • Troubleshoot queries that aren't working as expected
  • Suggest improvements for performance and accuracy

All work is grounded in the tables and columns defined in the provided schema files for the specified EDR platform.

When to Use

  • User needs a query written for incident response or threat hunting
  • User wants to validate an existing query against the correct schema
  • User has a query that's failing and needs help troubleshooting
  • User wants suggestions to improve query performance

Schema File Format

Schema files are located in resources/ and named by EDR platform: <platform>_osquery_schema.spec

  • standard_osquery_schema.spec — Baseline vanilla osquery (default when no platform specified)
  • EDR-specific examples: bitdefender_, kolide_, crowdstrike_, sentinelone_, carbonblack_

To discover available platforms:

bash
ls resources/*_osquery_schema.spec 2>/dev/null || ls resources/*.spec

Platform Notation Formats

Schema files use one of two formats to indicate OS compatibility:

Format 1: Explicit platforms([...]) field
table_name("<table_name>")
description("Brief description.")
schema([
    Column("column_name", TYPE, "Column description")
])
implementation("<table_name>@genTable")
platforms(["darwin", "linux", "windows"])
Format 2: #platform marker before table definitions

A platform marker on its own line applies to all tables until the next marker:

#darwin
table_name("<mac_only_table>")
...

#linwin
table_name("<linux_windows_table>")
...

Platform Marker Reference

MarkerPlatforms
#darwinmacOS only
#linuxLinux only
#windowsWindows only
#linwinLinux and Windows
#macwinmacOS and Windows
#posixmacOS, Linux, FreeBSD
#sleuthkitmacOS, Linux (requires The Sleuth Kit)
#utilityCross-platform utility tables
#cross-platformAll supported platforms

Schema Lookup Procedure

The schema files are large. Always follow the workflow below to extract table definitions.

Helper scripts are provided in scripts/ to simplify complex operations:

  • scripts/detect-format.sh - Determines schema format
  • scripts/extract-table.sh - Extracts complete table definitions

1. Search for Relevant Tables

bash
# Search by table name keyword
grep -i 'table_name(".*<keyword>' "$SCHEMA_FILE"

# Search descriptions for concepts
grep -i 'description(".*<concept>' "$SCHEMA_FILE"

2. Extract Full Table Definition

Use the extraction script to get the complete table definition:

bash
bash scripts/extract-table.sh <schema_file> <table_name>

Example:

bash
bash scripts/extract-table.sh resources/standard_osquery_schema.spec processes

The script automatically:

  • Detects the schema format (platforms array vs platform markers)
  • Extracts the complete table definition including all columns and platform info
  • Includes the #platform marker for Format 2 schemas

If you need to check the format manually:

bash
bash scripts/detect-format.sh <schema_file>
# Returns: "platforms_array" or "platform_markers"

3. Verify Before Using

  • Confirm columns exist: Only use columns explicitly listed in the schema([...]) block
  • Check OS compatibility: Via platforms([...]) field or preceding #platform marker
  • If unsupported: Inform the user and suggest alternatives

Guidelines

When Writing Queries

  1. Schema is law: Only use tables/columns confirmed via grep from the correct platform schema
  2. Platform awareness: Verify OS support for each table
  3. Performance first: Always include WHERE clauses, use LIMIT for exploration, avoid SELECT *, minimize JOINs
  4. Use placeholders: '<path_to_file>', '<username>', '<timestamp>', '<ip_address>'
  5. Be upfront about gaps: If a table/column doesn't exist, say so and suggest alternatives

When Validating User Queries

  1. Verify each table exists in the platform schema
  2. Confirm all referenced columns exist
  3. Check OS compatibility
  4. Flag performance issues (missing WHERE, SELECT *, expensive JOINs)
  5. Offer corrected queries, not just problems

When Troubleshooting

  1. Start with schema—most failures are mismatches
  2. Check basics: table exists, columns spelled correctly, OS supported
  3. Consider EDR differences—query may be from a different platform
  4. Explain why something failed, not just how to fix it

Safety and Privacy

  • Redact sensitive data in examples
  • Query only necessary data
  • Prefer hashes over file content dumps
  • Use time constraints to limit data volume

Workflow

0. Identify EDR Platform

Ask user or check context. Default to standard_osquery_schema.spec if unspecified.

1. Understand the Request

Writing new query? Validating? Troubleshooting? What data is needed?

2. Search and Extract Schema

Use grep to find tables, then bash scripts/extract-table.sh to get full definitions. Verify columns and OS compatibility from the extracted output.

3. Write, Validate, or Fix

Use only verified tables/columns. Add WHERE clauses and LIMIT for performance.

4. Deliver Response

Include:

  • EDR platform/schema used
  • Schema lookups performed (show grep commands)
  • The query with syntax highlighting
  • Explanation of what it does or what was wrong
  • Assumptions (platform, OS, environment)
  • Limitations (missing tables/columns, OS restrictions, performance concerns)

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Osquery Query Helper؟

Help users write, validate, and troubleshoot osquery SQL queries using provided osquery table schemas as the authoritative source.

لماذا تستخدم Osquery Query Helper على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Osquery Query Helper عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Osquery Query Helper في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/tsale/awesome-dfir-skills/tree/main/skills/hunting/osquery-helper. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Osquery Query Helper؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Osquery Query Helper؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Osquery Query Helper معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Osquery Query Helper مجانية؟

نعم. نشرها tsale على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇