massing: Skill for Claude Code

.claude/skills/backend-tests/SKILL.md

backend-tests is a skill for Claude Code from ibuilder/massing. It costs 69 tokens per session (885 once invoked), scanned C, original, MIT.

A testing guide for Python API and data services in the Massing project, including how its self-contained test scripts and test runner work.

In plain words
What is it for?
Use it to run or add backend tests, isolate their environments, clean up database locks, or investigate CI test-gate failures.
Why use it?
It prevents common test-runner, environment, database-lock, encoding, and test-registration problems from causing misleading failures.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ibuilder/massing's own configuration. It tells Claude Code how to work on massing itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything massing configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Standing directions for this repo: [docs/roadmap-directions.md](../../../docs/roadmap-directions.md). Read those first..

Reuse

Borrowing it

Nothing to install: this file belongs to ibuilder/massing. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ibuilder/massing/main/.claude/skills/backend-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ibuilder/massing

Made for: Claude Code.

Wrote 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.

agentmods badge for backend-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/ibuilder/massing/backend-tests/github.svg)](https://agentmods.dev/skills/ibuilder/massing/backend-tests)
Your own site
<a href="https://agentmods.dev/skills/ibuilder/massing/backend-tests"><img src="https://agentmods.dev/badge/skills/ibuilder/massing/backend-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for backend-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/ibuilder/massing/backend-tests"><img src="https://agentmods.dev/badge/skills/ibuilder/massing/backend-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 885 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.00885
Opus 5.5 $0.00028 $0.00354
Sonnet 5.5 $0.00014 $0.00177
Haiku 4.5 $0.00007 $0.00089

Measured 2mo ago against content hash 2b793eed5404, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

backend-tests scanned grade C with 1 finding 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 2mo ago.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **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 throwaw
.claude/skills/backend-tests/SKILL.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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).

Read the full file on GitHub · 41 lines

Changes

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.

  1. 2mo ago First seen · 41 lines · 69 tokens per session scan C 2b793eed5404

Subscribe to this mod's changes

backend-tests is a skill published in the GitHub repository ibuilder/massing (132 stars, last pushed today), licensed MIT. It adds 69 tokens to every session and 885 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

solid-impl-testing

Use when writing unit or integration tests for SolidJS components, signals, or stores. Prevents missing cleanup calls, incorrect async test patterns, and React Testing Library habits that break SolidJS tests. Covers @solidjs/testing-library render, screen queries, fireEvent, cleanup, async testing, renderHook…

OpenAEC-Foundation/OpenAEC-Workspace-Composer · 103 tokens

sync-new-data-type

Adds scaffolding for a new Sync data type in Chromium across protocol buffers, DataType definitions, feature flags, controller builders, unit tests, and metrics.

chromium/chromium · 36 tokens

generate-testability-wrappers

DO NOT USE when the target already consumes an injected interface or built-in abstraction such as IFileSystem or TimeProvider, even if the request says "generate a wrapper"; no new wrapper is needed. Use only when C# source calls an ambient/static dependency and no injectable seam exists: first-time TimeProvider…

dotnet/skills · 147 tokens

convex-test

Generate convex-test tests for the app's Convex functions.

openclaw/clawhub · 16 tokens

testing

Testing and code quality context for Jest, React Testing Library, ESLint, and test patterns. Use when writing tests or fixing linting issues.

Team-Commonly/commonly · 31 tokens

platform-apex-test-generate

Use to generate and validate Apex test classes with TestDataFactory patterns, bulk testing (251+ records), mocking, assertions, and disciplined test-fix loops. Use when creating Apex test classes (for triggers, services, controllers, batch jobs, queueables, and callouts), improving coverage, debugging or fixing…

forcedotcom/sf-skills · 116 tokens