Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0xSteph Pentest ai agents Agent Distribution

From Leeroopedia
Knowledge Sources
Domains DevOps, Configuration, Distribution
Last Updated 2026-10-22 12:00 GMT

Overview

Methodology for distributing AI agent definitions, slash commands, findings database, and CLI tools across global and project installations with model-tier optimization.

Description

Agent Distribution is the principle of packaging and deploying AI agent system prompts (Markdown with YAML frontmatter), slash commands, database scripts, and underlying CLI tools to end-user environments. It addresses the problem of reproducibility: a pentest-ai-agents installation must work identically whether deployed globally (all Claude Code sessions) or per-project, with optional cost optimization via model tiering.

The principle supports lite mode: advisory agents (no Bash tool, no execution risk) can run on the Haiku model for lower token cost, while Tier 2 (execution-capable) agents remain on Sonnet. The installer applies this via `sed` replacement of `model: sonnet` to `model: haiku` in the agent YAML frontmatter.

Usage

Use this principle when:

  • Distributing a collection of AI agent definitions to end users
  • Providing multiple installation modes (global, project, lite)
  • Installing and verifying underlying CLI tools required by agents
  • Auditing tool availability against agent requirements

Theoretical Basis

Distribution applies a tiered installation model:

Install(mode,lite)=Copy(agents,destmode)×ModelTier(lite)×InstallDB×InstallTools

Where:

Failed to parse (unknown function "\begin{cases}"): {\displaystyle \text{ModelTier}(\text{lite}) = \begin{cases} \text{Haiku} & \text{if } \text{lite} \wedge \text{advisory\_only} \\ \text{Sonnet} & \text{otherwise} \end{cases} }

Pseudo-code Logic:

# Abstract distribution algorithm (NOT real implementation)
def install(mode, lite=False, no_db=False, tools=False):
    dest = GLOBAL_DIR if mode == "global" else PROJECT_DIR

    for agent in agents_dir.glob("*.md"):
        if lite and is_haiku_safe(agent):
            content = sed_replace(agent, "model: sonnet", "model: haiku")
        else:
            content = read(agent)
        write(dest / agent.name, content)

    install_commands(dest)
    if not no_db:
        install_db_scripts()
    if tools:
        install_cli_tools(detect_pkg_manager())

Practical Guide

  1. Detect execution context: When piped from curl, clone the repo to a temp dir and re-exec the installer.
  2. Check prerequisites: Verify git and Claude Code CLI presence before proceeding.
  3. Support multiple modes: Global (~/.claude/agents/), project (.claude/agents/), or interactive selection.
  4. Lite mode optimization: Replace `model: sonnet` with `model: haiku` for advisory-only agents via sed.
  5. Haiku safety: Only agents without Bash tool access are safe for Haiku — never downgrade Tier 2 agents.
  6. Install database scripts: Copy findings.sh, handoff.sh, schema.sql, common.sh to ~/.pentest-ai/bin/ and add to PATH.
  7. Install CLI tools: Detect package manager (apt/brew/pacman), filter already-installed, install via pipx/go/cargo for ecosystem tools.
  8. Verify installation: Use doctor.sh to audit which tools are present per agent.
  9. Support uninstall:*** Remove all pentest-ai agent files and slash commands.

Related Pages

Implemented By

Requires Environment

Uses Heuristics

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment