Agent skill

Backend Tests

by ibuilder in ibuilder/massing

How to run and add Python tests in the Massing API/data services.

MITAuto-check passedDevelopment

Install Backend Tests

skills CLI
$ npx skills add ibuilder/massing --skill backend-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ibuilder/massing backend-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ibuilder/massing.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/backend-tests .claude/skills/backend-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
backend-tests
GitHub stars
121
Token cost
~836 tokens
SKILL.md length
374 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

How to run and add Python tests in the Massing API/data services.

  • Works in 3 steps: no duplicate registration — a name… → every registered name has a file — the… → every file on disk is registered — a…
  • Development work in your project
  • SKILL.md covers Run, The manifest guard — REGISTER…, Two test idioms and Gotchas
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Backend Tests is an agent skill from ibuilder/massing. How to run and add Python tests in the Massing API/data services. Invoke when writing or running backend tests, or debugging a CI test-gate failure. Covers the runtests.py runner, the manifest guard, per-test env isolation, DB-lock cleanup, and the two idioms (DB-backed vs engine/IFC).

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Python. The repository describes itself as: Open, self-hosted, IFC-native AEC platform: web BIM viewer + modeling, a ~100-module GC portal (RFIs, pay apps, CPM, construction accounting — double-entry GL/WIP → QuickBooks… The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/backend-tests”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. no duplicate registration — a name listed twice would run the suite twice, burning wall time;
  2. every registered name has a file — the runner used to silently drop missing entries, so a typo still printed "N/N suites passed";
  3. every file on disk is registered — a test nobody runs is worse than no test.

What it can do on your machine

Read from SKILL.md and the folder at commit 523e5b3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Backend Tests loads about 836 tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 374 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~75
When it runs · the whole SKILL.md, loaded when a task matches
~836

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ibuilder/massing at commit 523e5b3, republished under its MIT licence (© ibuilder). 374 words, ~836 tokens.

Download SKILL.mdSave it as .claude/skills/backend-tests/SKILL.md (or your agent's skills folder).
name
backend-tests
description
How to run and add Python tests in the Massing API/data services. Invoke when writing or running backend tests, or debugging a CI test-gate failure. Covers the run_tests.py runner, the manifest guard, per-test env isolation, DB-lock cleanup, and the two idioms (DB-backed vs engine/IFC).

Massing backend tests

Standing directions for this repo: docs/roadmap-directions.md. Read those first.

There is no pytest. Tests are self-contained test_*.py scripts in services/api/ that spin up their own TestClient, assert, print a one-line summary, and exit non-zero on failure.

Run

cd services/api
PYTHONPATH="src;../data/src" ./.venv/Scripts/python.exe -X utf8 run_tests.py     # whole suite (~40 min)
PYTHONPATH="src;../data/src" ./.venv/Scripts/python.exe -X utf8 test_<name>.py    # one test

Use -X utf8 — some tests print →/²/³ and crash on the default Windows cp1252 console (a false failure; CI uses utf-8).

The manifest guard — REGISTER NEW TESTS

run_tests.py has a hand-maintained TESTS list and a manifest_problems() guard that fails the whole run before any suite starts if the list and the test_*.py files on disk are not a 1:1 map. It enforces three rules:

  1. no duplicate registration — a name listed twice would run the suite twice, burning wall time;
  2. every registered name has a file — the runner used to silently drop missing entries, so a typo still printed "N/N suites passed";
  3. every file on disk is registered — a test nobody runs is worse than no test.

After adding test_foo.py, add "test_foo" to the TESTS list or CI fails before running anything. test_manifest.py asserts the live manifest is clean and drives each rule with a synthetic violation to prove the guard can still go red — keep those synthetic cases if you touch the guard.

Show full SKILL.md (168 more words)Show less

Two test idioms

  • DB-backed API test: set os.environ["DATABASE_URL"], STORAGE_DIR, and (if it uploads a source IFC) IFC_DIR — all to ./test_*-prefixed local paths (gitignored). os.environ.pop("AEC_RBAC", None). Use TestClient(app) + X-User header. Upload a model via POST /projects/{pid}/source-ifc?publish=false.
  • Engine/IFC test: prepend ../data/src to sys.path, build a model with aec_data.massing.generate_blank_ifc + aec_data.edit.*, and assert on aec_data/aec_api engine functions directly (no DB needed).

Gotchas

  • Local DB lock: a killed test can leave test_*.db locked ("Device or resource busy"). Clean rm -f ./test_<name>.db; rm -rf ./test_storage_<name> ./test_ifc_<name> before re-running; if truly stuck, run a throwaway copy with a different db name to verify logic (CI runs clean).
  • edit_history sidecar: tests that author edits leave state under STORAGE_DIR; clean it between local runs (run_tests.py does this per-test).
  • Infinite SSE endpoints HANG under TestClient (c.stream + iter_lines never returns). Test the payload/signature logic, not the live stream.
  • app.routes introspection is unreliable for included-router paths — assert via a real TestClient call instead.
  • CI ruff runs from services/api with its ruff.toml (isort). See the ship-release skill.

See memory: backend-test-runner, ruff-ci-config-gotcha.

© ibuilder, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/backend-tests of ibuilder/massing.

Open the folder on GitHubat commit 523e5b3

Compare with similar skills

Backend Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Backend Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Backend Tests this skillibuilder/massing121—~836Automated safety check: PassMIT
LangBot Plugin Developmentlangbot-app/LangBot18k—~3.9kAutomated safety check: PassApache-2.0
LangBot Core Developmentlangbot-app/LangBot18k—~1.4kAutomated safety check: NotesApache-2.0
Keybase RPC Log Analysiskeybase/client9.3k—~3kAutomated safety check: PassBSD-3-Clause
DDNS Provider DevelopmentNewFuture/DDNS4.7k—~558Automated safety check: PassMIT
Releasezmievsa/cadwyn309—~522Automated safety check: PassMIT

Similar skills

  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • LangBot Core Development

    langbot-app/LangBot

    Covers developing the LangBot core backend and web UI: dev setup, repo layout, API auth types, adding endpoints, migrations and keeping the MCP server in step.

    18k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check: notes
  • Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.

    9.3k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Adds or changes a DNS provider in the DDNS project while keeping its code, schemas, tests and Chinese and English docs consistent.

    4.7k GitHub stars~558 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Release

    zmievsa/cadwyn

    Prepare and publish Cadwyn releases. An agent skill from zmievsa/cadwyn.

    309 GitHub stars~522 tokensUpdated today
    DevelopmentAuto-check passed
  • Saleor Port Changes

    saleor/saleor

    Forward-ports or backports a single PR or branch onto the currently checked-out Saleor branch, handling GraphQL version markers and migration numbering along the way.

    23k GitHub stars~969 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from ibuilder/massing

  • Massing Bim

    ibuilder/massing

    Drive a Massing BIM/AEC project from an AI agent over MCP — read a project's status, records, CDE, KPI and model-quality checks; run standards-compliance, schedule-risk, embodied-carbon, permit-…

    121 GitHub stars~1.1k tokensUpdated 5 days ago
    Auto-check passed
  • Ship Release

    ibuilder/massing

    The Massing release discipline — how to ship a verified, CI-green version-numbered release direct to main.

    121 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • Verify Frontend

    ibuilder/massing

    How to verify Massing web/viewer UI changes LIVE — full verification works; two historic "stalls" are fixed and neither was the geometry loader.

    121 GitHub stars~1k tokensUpdated 5 days ago
    Auto-check passed
  • Master Builder

    ibuilder/massing

    Reason like a master builder — one mind holding an entire built-asset project from raw land through design, construction, handover, operations, and disposition, anywhere in the world.

    121 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed
  • Security Monitoring

    ibuilder/massing

    How to monitor and fix security issues in Massing — CodeQL alerts, dependency audits, secret scanning, and ReDoS/XXE fixes.

    121 GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Backend Tests

What does Backend Tests do?

How to run and add Python tests in the Massing API/data services. Backend Tests is an agent skill from ibuilder/massing. How to run and add Python tests in the Massing API/data services.

When should I use Backend Tests?

Backend Tests fits situations like: development work in your project.

How do I install Backend Tests in Claude Code?

Run `npx skills add ibuilder/massing --skill backend-tests -a claude-code`. Or copy the skill folder (.claude/skills/backend-tests in ibuilder/massing) into .claude/skills/backend-tests in your project. Claude Code loads it when a task matches its description.

How do I install Backend Tests in Codex?

Run `npx skills add ibuilder/massing --skill backend-tests -a codex`. Or copy the skill folder (.claude/skills/backend-tests in ibuilder/massing) into .agents/skills/backend-tests in your project. Codex loads it when a task matches its description.

Can I use Backend Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ibuilder/massing --skill backend-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/backend-tests, .gemini/skills/backend-tests, .github/skills/backend-tests and .opencode/skills/backend-tests in your project.

What does Backend Tests need to run?

SKILL.md names no scripts, command-line tools or credentials: Backend Tests is instructions for the agent only. Our summary lists: Python 3.

Does Backend Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Backend Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Backend Tests use?

Backend Tests is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Backend Tests use?

About 836 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Backend Tests?

Skills that share tags, products or a category with Backend Tests: LangBot Plugin Development (langbot-app/LangBot, 18k stars), LangBot Core Development (langbot-app/LangBot, 18k stars), Keybase RPC Log Analysis (keybase/client, 9.3k stars) and DDNS Provider Development (NewFuture/DDNS, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Backend Tests?

ibuilder (a GitHub user) maintains it in ibuilder/massing, which has 121 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 2, 2026.

Source: ibuilder/massing on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.