🤖 AI Agents & Workflows
Network Packet Analyzer CLI
Example outputs
Here is what ChatGPT, Claude, and Gemini typically return for this prompt:
I'll help you create a comprehensive network packet analyzer! The program will use libpcap for packet capture with BPF filters, parse Ethernet/IP/TCP/UDP headers, and decode application protocols like HTTP and DNS. For statistics, we'll track bandwidth using rolling windows and maintain connection state tables. The alert system can detect SYN floods, port scans, and unusual traffic volumes, while the GeoIP integration uses MaxMind databases for location data.
I should note that building a full-featured packet analyzer requires careful consideration of privileges (libpcap needs root/CAP_NET_RAW) and potential legal/ethical implications of network monitoring. The implementation would involve pcap_open_live() for capture, manual packet parsing from the data link layer up, and likely integration with GeoIP libraries. I'd recommend starting with basic capture and incrementally adding protocol parsers, as HTTP/DNS analysis can be quite complex depending on depth needed.
This C program requires libpcap-dev and optionally libmaxminddb for GeoIP. Key functions include pcap_loop() for capture, manual struct parsing for protocol headers (struct iphdr, tcphdr, etc.), and pcap_dump() for PCAP export. Statistics can use hash tables for connection tracking, CSV export via fprintf(), and ANSI escape codes for colored output. Reference implementation patterns from tcpdump source code for robust protocol decoding.
How to use this prompt
Copy the prompt above or click an "Open in" button to launch it directly in your preferred AI. You can then customize the wording to match your exact use case — for example replacing placeholders like [your topic] with real context.
Which AI model works best
Claude excels at agent workflows thanks to its long context window (up to 1M tokens) and nuanced instruction-following. ChatGPT has native Actions (tool-calling) built in. Gemini integrates best with Google Workspace data. For autonomous workflows, Claude Sonnet 4.6 is the current sweet-spot for quality and cost.
How to customize this prompt
Adjust the agent's role and constraints to your environment. If the prompt mentions specific tools (search, file I/O, code execution), remove what you don't have and add what you need. Add guardrails: "Always ask for confirmation before writing files." Define success criteria explicitly.
Common use cases
- Building autonomous research assistants for a specific domain
- Creating chatbots with defined personalities and knowledge limits
- Orchestrating multi-step workflows (research → draft → review → publish)
- Defining system prompts for custom GPTs or Claude Projects
- Building agent loops that call tools and self-correct
Variations
Adapt the tone (more casual, more technical), change the output format (bullet points vs. paragraphs), or add constraints (word limits, target audience).