aihub-core / actions
CLAUDE.md16 starsChanged 3 days agoApache-2.0View on GitHub
Purpose: Composite GitHub Actions for CI/CD. Consumed by this repo's workflows (.github/workflows/) and external customer repos. Each action is a single action.yml file. NOT repository-specific workflows — those consume these actions. - shell: bash required on every run: step. Composite actions do NOT inherit shell from the caller workflow. Omitting it causes a hard failure. - All actions start with actions/checkout@v4 as their first step - Git auth: HTTPS token rewrite (git config --global url."https://$TOKEN@github.com/"...) or SSH key setup testbackend…
- Reads credentials
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
All actions start with actions/checkout@v4 as their first step
- Distinctive: line 108
No unit tests for actions.
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.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.
Files
.github/actions - Reusable GitHub Actions
Purpose: Composite GitHub Actions for CI/CD. Consumed by this repo's workflows (.github/workflows/) and external
customer repos. Each action is a single action.yml file. NOT repository-specific workflows — those consume these
actions.
Folder Structure
.github/actions/
├── build_image/ # Docker image build + push to GHCR
├── lint_backend/ # Python linting (Ruff format via reviewdog)
├── lint_frontend/ # Nuxt linting (ESLint via reviewdog)
├── pytest_coverage_comment/ # PR coverage comment (downloads test_backend artifacts)
├── sonarcloud_scan/ # SonarCloud quality analysis (downloads test_backend artifacts)
└── test_backend/ # Python tests with coverage + artifact uploadComposite Action Rules
shell: bashrequired on everyrun:step. Composite actions do NOT inherit shell from the caller workflow. Omitting it causes a hard failure.- All actions start with
actions/checkout@v4as their first step - Git auth: HTTPS token rewrite (
git config --global url."https://$TOKEN@github.com/"...) or SSH key setup
Action Coupling (test_backend -> coverage/sonar)
test_backend uploads artifacts with names derived from working_directory:
{working_directory}-coverage-report(coverage.xml){working_directory}-pytest-report(pytest.xml)
Both pytest_coverage_comment and sonarcloud_scan download artifacts by these exact names. Changing the naming
convention in any one action silently breaks the others. Always update all three together.
Deferred Test Failure (test_backend)
test_backend does NOT fail immediately on test failure:
- Captures pytest exit code into a variable
- Exit code 5 (no tests found) creates an empty
pytest.xml— does NOT fail the action - Exit code != 0 sets
TEST_FAIL=trueenv var - Uploads coverage + pytest XML artifacts (always, regardless of test outcome)
- "Check if Tests Failed" step runs LAST —
exit 1only after artifacts are uploaded
This ensures downstream jobs (pytest_coverage_comment, sonarcloud_scan) always receive artifacts even when tests
fail.
Action Details
build_image: Two separate docker/build-push-action@v6 steps controlled by if: ${{ inputs.ssh_key != '' }}. When
ssh_key is provided, the build gets SSH access to private repos during Docker build. When empty, a simpler step runs
with just VERSION build-arg. Tags: ghcr.io/{owner}/{repo}/{image_name}:{version} with optional secondary_tag
(nightly/latest).
lint_backend: Uses ruff format via reviewdog. Aligned with local development (make pr-ready also uses
ruff format).
lint_frontend: Requires lockfile input (path to pnpm lockfile) in addition to working_directory — used for pnpm
cache key. Runs nuxi prepare before linting to generate Nuxt type stubs.
test_backend: Most complex action. Key inputs:
docker_compose_services: space-separated list of Docker services to start (empty = no Docker)install_ffmpeg: installs FFmpeg viamake install-ffmpeghuggingface_api_key: added to.env.devfor model downloadsswiss_llm_cloud_*: Swiss LLM Cloud secrets (API, embedding, reranking, whisper, OCR) added to.env.devregenerate_compose: runsmake generate-composebefore starting Docker servicespytest_timeout_seconds: per-test budget passed as--timeout(default 300). Keep it well under the calling job'stimeout-minutes, otherwise a hung test consumes the whole job and the forced stop discardspytest.xml,coverage.xmland the traceback — the run then reports only "The operation was canceled".pytest-timeoutcomes from the workspace root dev group, so every module has it.- Health check polling: waits up to 10 minutes for Docker services to become healthy
- Pre-pull login is best-effort: the
docker login ghcr.ioin the pre-pull step must not fail the job (|| echo "::warning::..."). The mirrored images underghcr.io/bbvch-ai/aihub-core/*are public, so an expired/absentPAT_GITHUB_READ_PACKAGESstill lets anonymous pulls succeed. Do NOT make this login fatal again.
pytest_coverage_comment: Downloads {working_directory}-pytest-report and {working_directory}-coverage-report
artifacts from test_backend, posts formatted coverage report as PR comment via
MishaKav/pytest-coverage-comment@main.
sonarcloud_scan: Downloads {working_directory}-coverage-report artifact when report_coverage: true. Runs
SonarSource/sonarqube-scan-action@v6. Requires sonar_token and sonar_project_key inputs. Default organization:
bbv-ai.
Local vs Remote References
Actions can be referenced two ways:
- Local (same checkout):
uses: ./.github/actions/test_backend— used inanalyze-test-pr.ymlwhere the action needs to run within the same checkout (e.g.,use_local_core: true) - Remote (cross-job/external):
uses: bbvch-ai/aihub-core/.github/actions/pytest_coverage_comment@main— used when the action runs in a separate job or from external repos
External repos always use remote refs: uses: bbvch-ai/aihub-core/.github/actions/<action>@main (or @v1.0.0 for
pinned versions).
Caching Layers (test_backend / lint_frontend)
| Cache | Path | Key Strategy |
| uv installation | ~/.local | {os}-uv-{version} |
| uv cache | ~/.cache/uv | {os}-uv-cache-{uv.lock hash} |
| pnpm store | $(pnpm store path) | {os}-pnpm-{lockfile hash} |
Testing Actions
No unit tests for actions. Changes are tested by:
- Push to a branch in
swiss-ai-hub - Open PR (triggers
analyze-test-pr.yml,lint-pr.yml) or trigger workflow manually - Observe CI results
Essential Files
- All actions:
.github/actions/*/action.yml - Main CI consumer:
.github/workflows/analyze-test-pr.yml(test + coverage + sonar) - Build consumer:
.github/workflows/build-agents.yml - Lint consumer:
.github/workflows/lint-pr.yml
In this repository50 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- arc42Skill
- audit-frontendSkill
- bot-frameworkSkill
- create-or-audit-claude-mdSkill
- create-or-audit-skillSkill
- create-or-audit-subagentSkill
- create-prSkill
- dagster-pipelinesSkill
- debug-agentSkill
- debug-frontendSkill
- debug-pipelineSkill
- design-systemSkill
- docker-devSkill
- document-decisionSkill
- document-featureSkill
- explainSkill
- generate-sdkSkill
- i18nSkill
- implement-feedback-from-prSkill
- likec4-dslSkill
- lintSkill
- merge-mainSkill
- nats-eventsSkill
- plan-issueSkill
- pr-demo-videoSkill
- primevue-lookupSkill
- rclone-guideSkill
- reflectSkill
- review-diffSkill
- scaffold-agentSkill
- scaffold-api-endpointSkill
- scaffold-api-repositorySkill
- scaffold-api-serviceSkill
- scaffold-bot-handlerSkill
- scaffold-composableSkill
- scaffold-event-displaySkill
- scaffold-frontend-componentSkill
- scaffold-frontend-pageSkill
- scaffold-frontend-subpageSkill
- scaffold-pipelineSkill
- setup-bot-connectionSkill
- splice-issueSkill
- sync-agent-docsSkill
- test-scopeSkill
- update-docSkill
- verify-sdk-syncSkill
- write-docSkill
- write-issueSkill
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
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.

