agentleFS
YoavLaxYoavLax/agent-compass/.github/skills/build-e2e-platform/SKILL.md

build-e2e-platform

Skill39 starsChanged 4 months agoMITView on GitHub

Builds and rebuilds the containerized AgentCompass platform (Docker Compose) for end-to-end testing, configuring GITHUB_TOKEN to avoid GitHub's 60 req/hour anonymous rate limit. Use this skill when running e2e tests, testing the live /api/analyze endpoint, or rebuilding the container. Trigger when GitHub rate limits appear during manual testing.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 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.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Before/after changing src/airx/ or src/airx_server/ and you need to verify against the real, containerized service (not just pytest).

    line 14
  2. Very specific:

    Prefer reusing an already-authenticated gh CLI session over asking the user to paste a token:

    line 25
  3. Very specific:

    If gh auth token fails (not logged in), ask the user to run gh auth login first, or to set $env:GITHUB_TOKEN themselves in the terminal — …

    line 31
  4. Very specific:

    Never commit a token into docker-compose.yml, .env, or test fixtures — it's read from the shell environment only (${GITHUB_TOKEN:-}).

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill 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
SKILL.md

Build the AgentCompass platform locally for e2e testing

When to use

  • Before/after changing src/airx/** or src/airx_server/** and you need to verify against the real, containerized service (not just pytest).
  • Running the fixture-based e2e suite (tests/test_e2e_fixtures.py) plus a live smoke test against a real GitHub repo.
  • Testing GitHub-rate-limit-sensitive code paths (src/airx/ingest.py), which need GITHUB_TOKEN to get 5000 req/h instead of 60.

Prerequisites

  • Docker Desktop running.
  • A GitHub token with at least public_repo scope (or default read scope) — do NOT hardcode it in any file. Get it from the environment or the gh CLI, never print it.

Procedure

1. Get a GitHub token into the shell session (never write it to disk)

Prefer reusing an already-authenticated gh CLI session over asking the user to paste a token:

$env:GITHUB_TOKEN = gh auth token

If gh auth token fails (not logged in), ask the user to run gh auth login first, or to set $env:GITHUB_TOKEN themselves in the terminal — never request the token value via chat/askQuestions (it's a secret).

2. Run the pure-Python e2e/unit suite first (fast, no Docker needed)

.venv\Scripts\python.exe -m pytest -q

This covers tests/test_e2e_fixtures.py (fs.scan → build_index → score pipeline over tests/fixtures/*) and everything else. Fix failures here before touching Docker.

3. Build and start the local platform

docker compose up -d --build

This rebuilds the agentcompass:latest image (multi-stage: Vite build of web/ + FastAPI/uvicorn runtime) and (re)creates the container, forwarding GITHUB_TOKEN from the current shell env into the container per docker-compose.yml.

4. Wait for health, then smoke-test the live API

Invoke-RestMethod http://localhost:8080/api/health
Invoke-RestMethod http://localhost:8080/api/analyze -Method Post -ContentType application/json -Body '{"source":"owner/repo"}'

Swap owner/repo for a real public repo. A successful response confirms the container picked up GITHUB_TOKEN and the full build→analyze pipeline works end-to-end.

5. Private repos (local-path mode)

The default compose service only supports public GitHub URLs via the API. For a private repo, clone it locally and analyze via the CLI against the local venv instead of the container (reflects latest source without rebuilding):

gh repo clone owner/private-repo $env:TEMP\e2e-clone -- --depth 1
.venv\Scripts\python.exe -m airx.cli analyze $env:TEMP\e2e-clone

6. ONLY When asked: Clean up

docker compose down
Remove-Item -Recurse -Force $env:TEMP\e2e-clone -ErrorAction SilentlyContinue

Also delete any scratch *-report.json files left in the repo root.

Notes

  • GITHUB_TOKEN is optional functionally (anonymous calls work) but required to avoid 429s during repeated live testing — see src/airx/ingest.py line ~147 and docker-compose.yml header comment.
  • Other tunable env vars passed through compose: MAX_FETCH_FILES, MAX_FILE_BYTES, MAX_TOTAL_BYTES (all optional, defaults in src/airx_server/config.py).
  • Never commit a token into docker-compose.yml, .env, or test fixtures — it's read from the shell environment only (${GITHUB_TOKEN:-}).

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.