agentleFS
0xSteph0xSteph/pentest-ai/AGENTS.md

pentest-ai

AGENTS.md1.7k starsChanged 4 months agoMITView on GitHub

For AI coding agents (Claude Code, Cursor, Copilot, Codex CLI, Devin, Windsurf, Gemini CLI, Aider) and human contributors. Briefly: build, test, style, layout. Defer to README.md for product info. Optional surfaces (install only what you'll touch): Browser tests need: playwright install chromium. Stealth crawler needs: scrapling install --force. asyncio_mode = "auto" is set in pyproject.toml. Use pytest-asyncio patterns; do not call asyncio.run inside tests. Pre-commit hooks: pre-commit install once, then they run on every commit. This is offensive-security tooling. Never…

  • Reads credentials
  • Installs packages

Trending

Quiet since August.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 0 mentionsAug 2026: 1 mentionSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the 0xSteph/pentest-ai repository that our weekly crawl found: only 3 in all, so this is a hint, not a trend. There is no adoption data for this file yet.
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add tests for new code; mirror module structure in tests/.

    line 58
  2. Very specific:

    No secrets in code or tests.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Agent guide for pentest-ai

For AI coding agents (Claude Code, Cursor, Copilot, Codex CLI, Devin, Windsurf, Gemini CLI, Aider) and human contributors. Briefly: build, test, style, layout. Defer to README.md for product info.

Build

pip install -e .[dev]

Optional surfaces (install only what you'll touch):

pip install -e .[litellm,api,menu,browser,tracing,stealth,cloud]

Browser tests need: playwright install chromium. Stealth crawler needs: scrapling install --force.

Test

pytest                         # full suite
pytest tests/test_cli.py       # one file
pytest -k "name_substring"     # by keyword

asyncio_mode = "auto" is set in pyproject.toml. Use pytest-asyncio patterns; do not call asyncio.run inside tests.

Lint, types, format

ruff check .          # lint
ruff format .         # format
mypy .                # types (non-strict; see [tool.mypy] in pyproject.toml)

Pre-commit hooks: pre-commit install once, then they run on every commit.

Layout

PathPurpose
cli/ptai CLI entrypoint, menu, install wizard, MCP setup
mcp_server/FastMCP server, exposes tools to Claude Code, Cursor, etc.
api/FastAPI HTTP surface (alternative to MCP for non-MCP clients)
engine/Orchestrator, scope, auth, findings DB, telemetry, HITL, playbooks
agents/BaseAgent orchestrator classes (18 dirs under agents/)
tools/Wrappers — all of them in tools/registry.py
playbooks/YAML multi-step engagement playbooks
tests/pytest suite
benchmarks/reproducible solve-rate measurements
docs/user-facing documentation

Conventions

  • Python ≥ 3.10. Tested on 3.10 – 3.14 (requires-python = ">=3.10,<3.15").
  • Add tests for new code; mirror module structure in tests/.
  • New tool wrappers register in tools/registry.py (there are no per-category packages under tools/).
  • New agents subclass agents/base.py:BaseAgent.
  • 160-char line length (ruff config).
  • No secrets in code or tests. .env* is gitignored.

Authorization & safety

This is offensive-security tooling. Never run it against systems you do not own or have written authorization to test. First run prompts for AUP acceptance and persists to ~/.pentest-ai/aup-consent.txt. Set PENTEST_AI_AUP_ACCEPTED=1 only in non-interactive CI you control.

Scope enforcement is non-negotiable: any change that allows scanning outside the declared target list is a security regression. See SECURITY.md.

Definition of done

  • New tests for new code; existing tests pass: pytest
  • ruff check . clean
  • mypy . clean (or new ignores justified in PR description)
  • No new secrets committed (.gitleaks.toml is enforced)
  • CHANGELOG.md updated for user-visible changes
  • If a new tool/agent: registered, documented, and integration-tested

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.