Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/kossakovsky/selfhost-ai/claude-mdgit clone --depth 1 https://github.com/kossakovsky/selfhost-aiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/kossakovsky/selfhost-ai/claude-md)<a href="https://agentmods.dev/instructions/kossakovsky/selfhost-ai/claude-md"><img src="https://agentmods.dev/badge/instructions/kossakovsky/selfhost-ai/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.06661 | $0.06661 |
| Opus 5 | $0.03331 | $0.03331 |
| Sonnet 5 | $0.01332 | $0.01332 |
| Haiku 4.5 | $0.00666 | $0.00666 |
Grade B, and why
selfhost-ai CLAUDE.md scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- `get_real_user` / `get_real_user_home` - Get actual user even under sudo - `backup_preserved_dirs` / `restore_preserved_dirs` - Directory preservation for git updates Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health || exit 1"] How it starts
The opening of the file, as written. The whole thing — 426 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is Selfhost AI (repository selfhost-ai, formerly n8n-install), a Docker Compose-based installer that provides a comprehensive self-hosted environment for n8n workflow automation and numerous AI/automation services. The installer includes an interactive wizard, automated secret generation, and integrated HTTPS via Caddy.
Core Architecture
- Profile-based service management: Services are activated via Docker Compose profiles (e.g.,
n8n,flowise,monitoring). Profiles are stored in the.envfile'sCOMPOSE_PROFILESvariable. - No exposed ports: Services do NOT publish ports directly. All external HTTPS access is routed through Caddy reverse proxy on ports 80/443.
- Shared secrets: Core services (Postgres, Valkey (Redis-compatible, container named
redisfor backward compatibility), Caddy) are always included. Other services are optional and selected during installation. - Queue-based n8n: n8n runs in
queuemode with Redis, Postgres, and dynamically scaled workers (N8N_WORKER_COUNT).
Key Files
Makefile: Common commands (install, update, logs, etc.)docker-compose.yml: Service definitions with profilesCaddyfile: Reverse proxy configuration with automatic HTTPS.env: Generated secrets and configuration (from.env.example)scripts/install.sh: Main installation orchestrator (runs numbered scripts 01-08 in sequence)scripts/utils.sh: Shared utility functions (sourced by all scripts viasource "$(dirname "$0")/utils.sh" && init_paths)scripts/01_system_preparation.sh: System updates, firewall, security hardeningscripts/02_install_docker.sh: Docker and Docker Compose installationscripts/git.sh: Git utilities (sync with origin, branch detection, configuration)scripts/03_generate_secrets.sh: Secret generation and bcrypt hashingscripts/04_wizard.sh: Interactive service selection using whiptailscripts/05_configure_services.sh: Service-specific configuration logicscripts/databases.sh: Creates isolated PostgreSQL databases for services (library)scripts/telemetry.sh: Anonymous telemetry functions (Scarf integration)scripts/06_run_services.sh: Starts Docker Compose stackscripts/07_final_report.sh: Post-install credential summaryscripts/08_fix_permissions.sh: Fixes file ownership for non-root accessscripts/generate_n8n_workers.sh: Generates dynamic worker/runner compose file and the Prometheus n8n targets filescripts/generate_ollama_instances.sh: Generates extra Ollama instances compose file (multi-GPU)scripts/update.sh: Update orchestrator (syncs with origin and updates images)scripts/update_preview.sh: Preview available updates without applying (dry-run)scripts/doctor.sh: System diagnostics (DNS, SSL, containers, disk, memory)scripts/apply_update.sh: Applies updates after git syncscripts/docker_cleanup.sh: Removes unused Docker resources (used bymake clean)scripts/download_top_workflows.sh: Downloads community n8n workflowsscripts/import_workflows.sh: Imports workflows fromn8n/backup/workflows/into n8n (used bymake import)scripts/restart.sh: Restarts services with proper compose file handling (used bymake restart)scripts/setup_custom_tls.sh: Configures custom TLS certificates (used bymake setup-tls); supports--removeto revert to Let's Encryptstart_services.py: Python orchestrator for service startup order, builds Docker images, handles external services (Supabase/Dify cloning, env preparation, startup), generates SearXNG secret key, stops existing containers. Usespython-dotenv(dotenv_values).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +9 lines · +716 tokens per session f25d5a28ad01
- 5d ago First seen · 417 lines · 5,945 tokens per session scan B fcb0185b50ac
selfhost-ai CLAUDE.md is an instructions file published in the GitHub repository kossakovsky/selfhost-ai (922 stars, last pushed 2d ago), licensed Apache-2.0. It adds 6,661 tokens to every session, about $0.0333 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
homelab-mcp CLAUDE.md
Instructions for bjeans/homelab-mcp, covering claude development guide for homelab mcp, project overview, core philosophy, project structure and architecture patterns.
proxmox-mcp CLAUDE.md
Claude Code instructions for akmalovaa/proxmox-mcp, covering claude.md, project overview, public listings, tech stack and project structure.
cargoshipper-mcp CLAUDE.md
Claude Code instructions for scarr7981/cargoshipper-mcp, covering cargoshipper mcp server, project overview, ⚠️ important safety warning, 🤖 vibecode friendly project and available mcp servers.
antigravity-cloud-run CLAUDE.md
Instructions for ykdojo/antigravity-cloud-run, a project described as: Run multiple Antigravity CLI (agy) sessions in isolated Docker containers, locally or on Cloud Run, managed from a single web dashboard.
appwrite AGENTS.md
AGENTS.md instructions for appwrite/appwrite, covering appwrite, commands, stack, layout and libraries.
timoni AGENTS.md
AGENTS.md instructions for stefanprodan/timoni, covering agents.md, what timoni is, common commands, architecture and cmd/timoni/ — cli (cobra).