thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation
Claude Code and agent skill by thomasxm/crowdsentinels-ai-mcp
- community
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-investigationSKILL.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
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:
| Tool | Use Case | ||
|---|---|---|---|
threat_hunt_search | IR-focused search with auto IoC extraction (PREFERRED) | ||
smart_search | Token-efficient search with summarization | ||
execute_detection_rule | Run EQL/Lucene detection rules | ||
execute_esql_hunt | Run ES | QL hunting queries | |
esql_query | Ad-hoc ES | QL queries | |
eql_search | Ad-hoc EQL queries |
Phase 2: Analysis (MANDATORY - DO NOT SKIP)
After EVERY search/hunt query, you MUST analyze the results:
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:
| Tool | Use Case | |
|---|---|---|
hunt_adjacent_stages | Hunt the stages immediately before/after the current one | |
hunt_by_kill_chain_stage | Targeted hunt for a specific kill-chain stage | |
get_host_activity_timeline | Time-ordered activity for one host | |
get_kill_chain_overview | Where each stage stands across the investigation | |
correlate_by_time | Co-occurring SIEM+endpoint activity in a window (no VR) | |
build_unified_timeline | Merge ES/osquery/Chainsaw/Wireshark into one chronology (no VR) | |
iterative_hunt, get_next_step, start_guided_investigation | Server-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.
| Tool | Use Case | |
|---|---|---|
velociraptor_pslist / velociraptor_netstat / velociraptor_* | Live forensics (when VR configured) | |
osquery_processes | Live process list (join with sockets to pin C2 owners) | |
osquery_sockets | Listening/established sockets ⋈ processes | |
osquery_users / osquery_query | Accounts / ad-hoc SQL over any table | |
endpoint_to_siem_pivot, endpoint_hunt_from_ioc | Pivot 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 / artifact | What 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.Amcache | Program-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.Usn | Resource-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:
| Tool | Use Case | |
|---|---|---|
suggest_rules_for_data | Which rules apply to the data you hunted | |
search_rules_by_mitre_attack | Find rules by technique/tactic | |
hunt_with_sigma_rules | Run Sigma rules over EVTX | |
execute_detection_rule | Run 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.
create_investigation(name, description, severity)- Start trackingadd_iocs_to_investigation(iocs)- Store discovered IoCs as you find themget_shared_iocs()- Retrieve for cross-correlationget_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:
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
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
- SKILL.md in the repositoryCheckingskills/crowdsentinel-investigation/SKILL.md
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
[](https://verified-skill.com/skills/thomasxm/crowdsentinels-ai-mcp/crowdsentinel-investigation)