python-cybersecurity-tool-development — Claude Code skill
Skill teaches the agent to write Python pentesting tools: port scanners, enumerators, brute-forcers with async network, input validation, and structured logging.
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a claude-codeWhat python-cybersecurity-tool-development does
Agent builds a modular architecture: scanners/, enumerators/, attackers/, reporting/, utils/. Inside are pure functions with type hints, guard clauses for input checks, async def for network operations. Configs use Pydantic v2, network uses aiohttp or httpx, packets use scapy, ports use python-nmap.
All external inputs are sanitized, secrets load from environment variables, shell commands with user strings are forbidden. Network scans work through connection pools, DNS lookups are cached, targets are processed in batches. Logs go to JSON for SIEM. Tests run with pytest and pytest-asyncio.
Skill sets secure defaults: TLS 1.2+, strong ciphers, rate-limiting for scanning. CLI and RESTful API are built from the same code, middleware centralizes logs and metrics. Without cryptography, scapy, or paramiko in the environment, some functions are unavailable.
What it helps with
- build an async port scanner with request rate limits
- organize a modular pentesting tool structure
- write an SSH brute-forcer with input sanitization and guard clauses
- log scan results to JSON for SIEM ingestion
- batch large target lists and cache DNS lookups
Example prompts for the agent
- Write an async port scanner with connection pooling and rate-limiting for a list of IPs
- Organize project structure:
scanners/,enumerators/,attackers/,reporting/,utils/— and add guard clauses to each function - Build an SSH brute-forcer with
asyncssh, input sanitization, JSON logs, and secrets from.env
How to install python-cybersecurity-tool-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a claude-code2Manually: put the files in place
~/.claude/skills/python-cybersecurity-tool-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/python-cybersecurity-tool-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a codex2Manually: put the files in place
.agents/skills/python-cybersecurity-tool-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a cursor2Manually: put the files in place
.cursor/skills/python-cybersecurity-tool-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills python-cybersecurity-tool-development2Manually: put the files in place
.github/skills/python-cybersecurity-tool-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path python-cybersecurity-tool-developmentManually: put the files in place
.devin/skills/python-cybersecurity-tool-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about python-cybersecurity-tool-development
How to install python-cybersecurity-tool-development in Claude Code?
Run npx skills add Mindrally/skills --skill python-cybersecurity-tool-development -a claude-code. The skill file will be in ~/.claude/skills/python-cybersecurity-tool-development/SKILL.md.
What does python-cybersecurity-tool-development do?
Teaches the agent to build Python pentesting tools: scanners, enumerators, brute-forcers. Sets modular architecture, async network, guard clauses, input sanitization, JSON logs, and secure defaults.
Which libraries does the skill require?
Skill relies on cryptography, scapy, python-nmap or libnmap, paramiko or asyncssh, aiohttp or httpx. Without them, some functions are unavailable.
Source text
SKILL.md · Apache-2.0
--- name: python-cybersecurity-tool-development description: Guidelines for building Python cybersecurity tools with secure coding practices, async scanning, and structured security testing. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Python Cybersecurity Tool Development You are an expert in Python cybersecurity tool development, focusing on secure, efficient, and well-structured security testing applications. ## Key Principles - Write concise, technical responses with accurate Python examples - Use functional, declarative programming; avoid classes where possible - Prefer iteration and modularization over code duplication - Use descriptive variable names with auxiliary verbs (e.g., `is_encrypted`, `has_valid_signature`) - Use lowercase with underscores for directories and files - Follow the Receive an Object, Return an Object (RORO) pattern ## Python/Cybersecurity Guidelines - Use `def` for pure, CPU-bound routines; `async def` for network- or I/O-bound operations - Add type hints for all function signatures - Validate inputs with Pydantic v2 models where structured config is required - Organize file structure into modules: - `scanners/` (port, vulnerability, web) - `enumerators/` (dns, smb, ssh) - `attackers/` (brute_forcers, exploiters) - `reporting/` (console, HTML, JSON) - `utils/` (crypto_helpers, network_helpers) ## Error Handling and Validation - Perform error and edge-case checks at the top of each function (guard clauses) - Use early returns for invalid inputs - Log errors with structured context (module, function, parameters) - Raise custom exceptions and map them to user-friendly messages - Keep the "happy path" last in the function body ## Dependencies - `cryptography` for symmetric/asymmetric operations - `scapy` for packet crafting and sniffing - `python-nmap` or `libnmap` for port scanning - `paramiko` or `asyncssh` for SSH interactions - `aiohttp` or `httpx` (async) for HTTP-based tools ## Security-Specific Guidelines - Sanitize all external inputs; never invoke shell commands with unsanitized strings - Use secure defaults (TLSv1.2+, strong cipher suites) - Implement rate-limiting and back-off for network scans - Load secrets from secure stores or environment variables - Provide both CLI and RESTful API interfaces - Use middleware for centralized logging, metrics, and exception handling ## Performance Optimization - Utilize asyncio and connection pooling for high-throughput scanning - Batch or chunk large target lists to manage resource utilization - Cache DNS lookups and vulnerability database queries when appropriate - Lazy-load heavy modules only when needed ## Key Conventions 1. Use dependency injection for shared resources 2. Prioritize measurable security metrics (scan completion time, false-positive rate) 3. Avoid blocking operations in core scanning loops 4. Use structured logging (JSON) for easy ingestion by SIEMs 5. Automate testing with pytest and `pytest-asyncio`
© Mindrally · Apache-2.0 · Mindrally/skills