Pcap Analysis
Guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python, with tested utility functions.
Install
npx skills add UCSB-NLP-Chang/Skill-Usage --skill pcap-analysisgit clone --depth 1 https://github.com/UCSB-NLP-Chang/Skill-Usage.git /tmp/Skill-Usage
mkdir -p ~/.claude/skills
cp -r /tmp/Skill-Usage/tasks/dapt-intrusion-detection/environment/skills/pcap-analysis ~/.claude/skills/pcap-analysisPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# PCAP Network Analysis Guide
This skill provides guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python.
## Quick Start: Using the Helper Module
A utility module (`pcap_utils.py`) is available in this folder with **tested, correct implementations** of common analysis functions. It provides some utility functions to count intermediate results and help you come to some of the conclusion faster. **Use these functions directly** rather than reimplementing the logic yourself, as they handle edge cases correctly.
```python
# RECOMMENDED: Import and use the helper functions
import sys
sys.path.insert(0, '/root/skills/pcap-analysis') # Add skill folder to path
from pcap_utils import (
load_packets, split_by_protocol, graph_metrics,
detect_port_scan, detect_dos_pattern, detect_beaconing,
port_counters, ip_counters, iat_stats, flow_metrics,
packets_per_minute_stats, producer_consumer_counts, shannon_entropy
)
packets = load_packets('/root/packets.pcap')
parts = split_by_protocol(packets)
# Graph metrics (indegree/outdegree count UNIQUE IPs, not packets!)
g = graph_metrics(parts['ip'])
print(g['max_indegree'], g['max_outdegree'])
# Detection functions use STRICT thresholds that must ALL be met
print(detect_port_scan(parts['tcp'])) # Returns True/False
print(detect_dos_pattern(ppm_avg, ppm_max)) # Returns True/False
print(detect_beaconing(iat_cv)) # Returns True/False
```Details
- Skill name
pcap-analysis- Repository
- UCSB-NLP-Chang/Skill-Usage
- Path
tasks/dapt-intrusion-detection/environment/skills/pcap-analysis/SKILL.md- Repo updated
- 8 April 2026
FAQ
What does the Pcap Analysis skill do?
Guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python, with tested utility functions.
How do I install the Pcap Analysis skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add UCSB-NLP-Chang/Skill-Usage --skill pcap-analysis. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Pcap Analysis popular?
It lives in UCSB-NLP-Chang/Skill-Usage, which has 49 GitHub stars and 5 forks.
Related skills
Pubchem Database
49UCSB-NLP-Chang/Skill-Usage
Query PubChem via PUG-REST API/PubChemPy (110M+ compounds). Search by name/CID/SMILES, retrieve properties, similarity/substructure searches, bioactivity, for cheminformatics.
Pymatgen
49UCSB-NLP-Chang/Skill-Usage
Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.
Rdkit
49UCSB-NLP-Chang/Skill-Usage
Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom sanitization, specialized algorithms.
Qutip
49UCSB-NLP-Chang/Skill-Usage
Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across va
D3.js Visualization
49UCSB-NLP-Chang/Skill-Usage
Produce D3.js charts and interactive data visualizations. Create beautiful, interactive charts and graphs using the D3.js library.
Search Driving Distance
49UCSB-NLP-Chang/Skill-Usage
Estimate driving/taxi duration, distance, and rough cost between two cities using the bundled distance matrix CSV. Use this skill when comparing ground travel options or validating itinerary legs.
Browse the most popular Claude skills, all data & analytics skills, or write your own with the skills generator.