thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation

Claude Code and agent skill by thomasxm/crowdsentinels-ai-mcp

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when conducting threat hunting or incident response with CrowdSentinel MCP tools. MANDATORY for any investigation involving Elasticsearch, EQL, ES|QL, or detection rules. Enforces proper use of analysis and reporting tools.

Install

npx vskill@latest install thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation

SKILL.md

CrowdSentinel Investigation Workflow

When This Skill Applies

Use this skill when:

  • Conducting threat hunting on Elasticsearch logs
  • Running detection rules (EQL, ES|QL, Lucene)
  • Investigating security incidents
  • Analyzing Windows/Linux logs for threats
  • Presenting investigation findings to user

The Iron Laws

1. EVERY INVESTIGATION ENDS WITH generate_investigation_report — INCLUDING ITS EXECUTIVE SUMMARY
2. NO INVESTIGATION IS COMPLETE WITHOUT ANALYSIS TOOLS
3. NO INVESTIGATION IS COMPLETE UNTIL THE ADJACENCY LOOP IS CLOSED

Law 1 (always report — no exceptions) — There is no "quick" exemption. EVERY investigation — even a one-query "quick and sweet" hunt — MUST end with generate_investigation_report, which carries BOTH the executive summary (prose) and the structured report/summary (aggregated IoCs, techniques, timeline, severity, recommendations). "Quick" means fewer hunts, NOT skipping the report. create_investigation is recommended — especially for multi-query cases, so IoCs aggregate under one investigation_id — but it is OPTIONAL; the report can be built from analysis results alone. If you presented findings without the report + executive summary, it is INCOMPLETE.

Law 2 — If you collected data but didn't run analysis tools, it's INCOMPLETE.

Law 3 — After analyze_kill_chain_stage, it hands you hunt_previous_stage / hunt_next_stage queries and hunts return recommended_followups. You MUST run them — via hunt_adjacent_stages, the returned queries, or get_host_activity_timeline — until every adjacent stage is confirmed or excluded. generate_investigation_report is the summary of a closed loop, not the stop signal. Stopping after one analysis pass is the #1 investigation failure.

Mandatory Workflow

Phase 1: Data Collection

Use hunting tools to gather evidence:

ToolUse Case
threat_hunt_searchIR-focused search with auto IoC extraction (PREFERRED)
smart_searchToken-efficient search with summarization
execute_detection_ruleRun EQL/Lucene detection rules
execute_esql_huntRun ESQL hunting queries
esql_queryAd-hoc ESQL queries
eql_searchAd-hoc EQL queries
Phase 2: Analysis (MANDATORY - DO NOT SKIP)

After EVERY search/hunt query, you MUST analyze the results:

┌─────────────────────────────────────────────────────────────────┐
│ AFTER collecting data, you MUST use these analysis tools: │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. analyze_search_results(results, context) │
│ → Extracts IoCs, maps MITRE ATT&CK, assesses severity │
│ → Provides recommended follow-up queries │
│ │
│ 2. analyze_kill_chain_stage(iocs, include_hunting_suggestions) │
│ → Positions attack in Cyber Kill Chain │
│ → Suggests previous/next stage hunting │
│ │
│ 3. map_events_to_kill_chain(events) │
│ → Maps event timeline to kill chain stages │
│ → Shows attack progression │
│ │
└─────────────────────────────────────────────────────────────────┘
Phase 2.5: Close the Adjacency Loop (DO NOT stop after one pass)

Iron Law 2. Drive the hunt outward from the current stage until adjacent stages are confirmed or excluded:

ToolUse Case
hunt_adjacent_stagesHunt the stages immediately before/after the current one
hunt_by_kill_chain_stageTargeted hunt for a specific kill-chain stage
get_host_activity_timelineTime-ordered activity for one host
get_kill_chain_overviewWhere each stage stands across the investigation
correlate_by_timeCo-occurring SIEM+endpoint activity in a window (no VR)
build_unified_timelineMerge ES/osquery/Chainsaw/Wireshark into one chronology (no VR)
iterative_hunt, get_next_step, start_guided_investigationServer-driven next-step engine

Exit criterion: each identified stage has its adjacent stages hunted, and pagination/coverage is complete or explicitly logged as capped.

Phase 2.6: Endpoint Validation (Velociraptor OR osquery)

Validate SIEM findings against the live host. Use Velociraptor when configured; otherwise osquery is the fallback for the same step — do not skip it.

ToolUse Case
velociraptor_pslist / velociraptor_netstat / velociraptor_*Live forensics (when VR configured)
osquery_processesLive process list (join with sockets to pin C2 owners)
osquery_socketsListening/established sockets ⋈ processes
osquery_users / osquery_queryAccounts / ad-hoc SQL over any table
endpoint_to_siem_pivot, endpoint_hunt_from_iocPivot endpoint IoCs back into Elastic (VR)

LIVE state ≠ what HAPPENED — collect retrospective execution evidence, not just `pslist`. pslist/netstat only show what is alive RIGHT NOW. An ephemeral or cleaned attack (payloads that run and exit in seconds; persistence reverted; AV-quarantined binaries) leaves NOTHING in live state — so a "clean live host" is NOT "nothing happened". For WHAT EXECUTED, hunt the SIEM and collect VR's forensic artifacts:

Tool / artifactWhat it proves (survives process exit + cleanup)
Sysmon EID 1 in winlogbeat-* (SIEM hunt)Continuous process-creation record — the primary "what ran" timeline
velociraptor_collect_artifact Windows.Forensics.AmcacheProgram-execution evidence for binaries that ran (incl. deleted)
velociraptor_collect_artifact Windows.Registry.AppCompatCache (Shimcache)Executed binaries, even now-removed ones
velociraptor_collect_artifact Windows.Forensics.SRUM / Windows.NTFS.MFT / Windows.Forensics.UsnResource-usage + file create/delete history
velociraptor_collect_artifact Linux.Events.ProcessExecutions / hunt auditbeat-*Linux execve history

NOTE: Windows.Forensics.Prefetch is a DEAD END on Windows Server — Server does not generate .pf files (verified: even with EnablePrefetcher=3 + SysMain, 0 .pf). Use Amcache/Shimcache.

Phase 2.7: Detection Validation

Confirm your detection content actually catches the activity you found:

ToolUse Case
suggest_rules_for_dataWhich rules apply to the data you hunted
search_rules_by_mitre_attackFind rules by technique/tactic
hunt_with_sigma_rulesRun Sigma rules over EVTX
execute_detection_ruleRun an EQL/Lucene detection rule
Phase 3: Investigation State (RECOMMENDED — especially multi-query)

create_investigation is OPTIONAL but recommended, especially when running multiple queries: it returns an investigation_id you thread through the hunt and into the final report so every IoC/timeline event aggregates under one case (a fuller report). Not required — the report can be built from analysis results alone — but using it makes Law 1's report richer.

  1. create_investigation(name, description, severity) - Start tracking
  2. add_iocs_to_investigation(iocs) - Store discovered IoCs as you find them
  3. get_shared_iocs() - Retrieve for cross-correlation
  4. get_investigation_summary() - Check current state
Phase 4: Reporting (summary of a CLOSED loop — not the stop signal)

Only after the adjacency loop (Phase 2.5) is closed, summarize:

generate_investigation_report(
analysis_results=[analysis1, analysis2, ...],
investigation_context="Description of what was investigated",
investigation_id="INV-..." # merges the investigation timeline into the report
)

Returns:

  • Executive summary
  • All discovered IoCs aggregated
  • MITRE ATT&CK techniques (tactics resolved from the ATT&CK map, not "Unknown")
  • Affected hosts and users (augmented from the timeline)
  • Merged chronological timeline
  • Severity assessment
  • Synthesized recommendations (next hunts when none were supplied)

If the report surfaces a new stage or unhunted adjacency, go back to Phase 2.5 — reporting is not a reason to stop hunting.

Red Flags - STOP If You're Doing This

If You're Thinking...You Must...
"I'll just summarize the results myself"Use analyze_search_results instead
"I can see the IoCs, no need for tools"Use analyze_kill_chain_stage to position them
"The user just wants quick results"Quick != incomplete. Use analysis tools.
"This is a simple query, no analysis needed"ALL queries benefit from analysis tools
"I'll present findings now"Use generate_investigation_report first
"Quick hunt — I'll skip the report"Law 1: generate_investigation_report (with executive summary + summary) is required for EVERY investigation — no exceptions
"This looks like test / simulated activity"Investigate it as a REAL intrusion until excluded. Recent live-host process chains — downloads, base64→shell, /etc/shadow reads, service/cron/Run-key writes — are in scope, not noise
"That new autostart (cron / systemd unit / .bashrc / Run key / scheduled task) is named like a real service — looks legit"It is PERSISTENCE until proven otherwise. Adversaries deliberately name persistence after legitimate services/daemons to blend in (masquerading, T1036). Judge it by the WRITE TIMESTAMP (created during the suspicious window?) and the CONTENT, not the name. An autostart created mid-intrusion is in scope even if it looks like an OS component
"Telemetry shows 0 outbound connections → no C2 / exfil"Your process/file telemetry may not record network connections at all — "no connection events" ≠ no C2/exfil. Also hunt EGRESS COMMAND LINES (curl / wget / nc / certutil / Invoke-WebRequest to an external, non-RFC1918 host) and any network-category events. An external download/upload command IS the C2/exfil evidence even with no socket event

Correct Workflow Example

python
# Step 1: Hunt for suspicious activity
results = threat_hunt_search(
index="winlogbeat-*",
query="event.code:4688 AND winlog.event_data.CommandLine:*powershell*",
timeframe_minutes=60
)
# Step 2: Analyze results (MANDATORY)
analysis = analyze_search_results(
search_results=results,
context="Hunting for suspicious PowerShell execution"
)
# Step 3: Position in kill chain
iocs = [{"type": "process", "value": "powershell.exe"}, ...]
kill_chain = analyze_kill_chain_stage(
iocs=iocs,
include_hunting_suggestions=True
)
# Step 4: Follow hunting suggestions from kill chain analysis
# (hunt previous/next stages as recommended)
# Step 5: Generate report before concluding
report = generate_investigation_report(
analysis_results=[analysis],
investigation_context="Suspicious PowerShell investigation"
)
# Step 6: Present report to user

Correct Workflow Example (Linux / auditbeat)

Linux hosts ship auditbeat (and optionally Linux-Sysmon) — NOT winlogbeat. Hunt the high-signal Linux index and use osquery for endpoint validation:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
206
Repository forks
32
7-day trend score
27

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 Oct 2026, 27 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation/badge)](https://verified-skill.com/skills/thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation)

Something wrong with this skill or its page? Tell us.