Use
Example prompts for PCAP analysis with an AI agent
Updated
These prompts work in Claude Code, Cursor, Codex and any other agent connected to the PcapAI MCP server. Copy one, change the file name and the addresses, and paste it into your agent. Each card shows the tools the agent will call, what it costs, and the sample report of the same kind of problem.
Plain words work better than tool names: say what is wrong and what you need, and let the agent choose the calls. Name the mode when you know it, troubleshooting for "why is it slow or failing" and security for "is something attacking us", because the free summary of each mode answers a different question. Not connected yet? Start with the install guide.
Troubleshooting: find where the network problem is
In troubleshooting mode the engine runs 100 network diagnosis rules in 11 areas and names a fault domain: the client, the network path, the server, DNS, or the capture itself. The free summary already says which, so the first answer often settles who has to act; the unlock adds the measurements behind each problem, the hosts involved and the steps that fix it, with owners and a way to verify.
Slow application: network or server?
Users say the app on 10.0.0.20 is slow. Analyze ./app-slow.pcapng in troubleshooting mode and tell me whether the network or the server is at fault.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
The free summary gives the network health, the fault domain and the title of each problem, for example slow server responses with their median time.
Retransmissions: real loss or a capture artifact?
Wireshark shows hundreds of TCP retransmissions in ./wan.pcapng. Is the link losing packets, or is something wrong with the capture?
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
The engine tells real loss apart from frames captured twice and drops at the capture point before it blames the link, so you do not open a ticket with the ISP for a mirror-port problem.
DNS timeouts and SERVFAIL
Name lookups fail now and then. Analyze ./dns.pcap and tell me which resolver fails, for which names, and how often.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
Timeouts, SERVFAIL and NXDOMAIN answers are grouped by resolver and name, so the summary shows whether one server or the whole path is at fault.
TLS handshake failures
Clients cannot connect to https://portal.example.net. Analyze ./tls.pcapng and tell me where the TLS handshake fails and which side ends it.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
The summary names the failing step of the handshake, such as an alert from the server or a reset after the client hello.
Capture during the problem, then analyze
Capture 30 seconds on eth0 while I reproduce the slow upload, then tell me why it is slow. Ask me before you use sudo.
- The agent runs
- tcpdump upload_capture curl analyze_capture
- Cost
- Free
- In Claude Code
/pcapai:why-is-the-network-slow eth0
The agent runs tcpdump on the machine it works on, so capture where the problem shows: on the client, or on a host on the same path.
Security: check a host or a capture for threats
In security mode the engine maps what it sees to 69 MITRE ATT&CK techniques: command-and-control traffic, data leaving the network, credential exposure, scanning and Active Directory attacks. Each finding carries its confidence and the benign explanations to rule out, so the agent can say how sure the engine is instead of guessing.
Is a host compromised?
Analyze ./workstation.pcap in security mode. Is 10.2.3.101 compromised? For each finding, tell me what was seen, the MITRE ATT&CK technique and how sure the engine is.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
- In Claude Code
/pcapai:is-this-host-compromised 10.2.3.101 ./workstation.pcap
The free summary lists the findings by severity; the evidence frames and the hosts in their roles come with the unlock.
Beaconing and remote-access tools
Analyze ./office.pcap in security mode and tell me whether any host polls an outside server on a schedule, and since when.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
Regular polling, encoded requests and registrations with a remote-access server show up as command-and-control findings with their first and last time seen.
Data hidden in DNS
Check ./dns-heavy.pcap for data tunneled through DNS queries and tell me which host sends it and to which domain.
- The agent runs
- upload_capture curl analyze_capture
- Cost
- Free
Long, random-looking query names and record types that carry data, such as NULL or TXT, point to a tunnel.
Logins sent without encryption
Which logins in ./legacy-app.pcapng travel without encryption? Unlock the analysis if there are any and list the protocol, the hosts and the frame of each.
- The agent runs
- upload_capture curl analyze_capture unlock_analysis query_analysis
- Cost
- 1 report credit, once per capture
The agent gets the protocol, the hosts and the frame of each exposed login, never the password: the server withholds secret values, and the PDF shows them masked, like S******! (11).
Reports for clients, ISPs and vendors
The PDF is the part a client, an ISP or a vendor reads: an executive summary, each finding with its evidence, the fix steps with owners and verification, and the controls to review. It is included in the unlock, carries your organization name and TLP label from the report settings in your profile, and the download link works for 15 minutes.
A PDF and a short message for the client
Make the PDF report for this analysis and draft a message to the client, five sentences at most and without jargon: the verdict, the main problem and the next step.
- The agent runs
- unlock_analysis create_pdf_report
- Cost
- 1 report credit, once per capture
- In Claude Code
/pcapai:client-report <analysis_id>
The agent asks before it spends the credit; making the PDF again later costs nothing.
Evidence for the ISP or the server team
Unlock the analysis, then give me the evidence of the main network problem and the read-only checks I can run to show the ISP where the fault is.
- The agent runs
- unlock_analysis get_finding query_analysis
- Cost
- 1 report credit, once per capture
Network problems come with who is affected, where the fault lies, the measurements behind them, the fix steps with their owners and how to verify the fix; where the engine has them, read-only checks such as ping, mtr or dig to run from a host you control.
Verify a fix
After a change, capture again the same way and let the agent compare the two free summaries. Both summaries are free, so checking a fix never costs a credit; unlock the new analysis only if you need its PDF for the change record.
Before and after a change
I lowered the MTU on the VPN gateway. Capture again the same way as before and compare with the previous analysis: which problems are gone, which remain, which are new?
- The agent runs
- tcpdump upload_capture curl analyze_capture get_analysis
- Cost
- Free
- In Claude Code
/pcapai:verify-a-fix <analysis_id>
The agent keeps the analysis id of the first capture, so it can read both summaries side by side.
Credits, limits and housekeeping
Questions about the account itself cost nothing and take a single call. Deleting an analysis removes the capture, its summary, its details and its PDF at once; it cannot be undone and still counts toward the 20 analyses a day.
Credits and the size limit
How many PcapAI report credits do I have left, and what is the largest capture I can upload?
- The agent runs
- get_account
- Cost
- Free
The answer also shows how many analyses are left today and what this token is allowed to do.
List and delete analyses
List my PcapAI analyses from today and delete the one for test.pcap.
- The agent runs
- list_analyses delete_analysis
- Cost
- Free
Clients that confirm destructive tools ask you before the delete runs.
Tips for better answers
- Say what you already know. "Only the branch office is slow, since Monday" lets the agent point the engine's findings at the right hosts.
- Capture during the problem, on the right side. A capture from the slow client during a slow transfer shows more than an hour of normal traffic from the core switch.
- Ask for the read-only checks. Many troubleshooting findings come with ping, mtr, dig or similar commands to run from a host you control, so you can confirm the fault before you escalate it. Where a rule has none, its steps say in words what to check.
- Keep the analysis id. It lets you ask follow-up questions later, compare a capture taken after a fix, or make the PDF again without a new credit.
Was this page helpful?
Thanks. Missing something? Tell us what.