scaffold-bdd
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
Skill by SyntaxArc
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/syntaxarc-scaffold-bdd
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 2
codeload.github.com· found in install commandgithub.com· found in code
Files it touches
~/.claude/skills/scaffold-bdd
What's inside
- Skill name
scaffold-bdd- Description
- Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …). Use for "add tests", "acceptance/BDD/e2e tests", "behave", or "feature file".
- License
- MIT
- Instructions
- 119 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (10)
- SKILL.md
- app_harness.py · reference/
- env.test · reference/
- environment.py · reference/
- example.feature · reference/
- example_steps.py · reference/
- scenario_context.py · reference/
- scenario_context_pool_manager.py · reference/
- test_containers.py · reference/
- test_helpers.py · reference/
SKILL.md (first lines)
# Scaffold ArchiPy BDD
## Read first
Read these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}/../../rules/`):
- `../../rules/testing-bdd-for-apps.mdc`
## Before writing files
1. Inspect existing `features/`, Behave config, `.env.test`, tags, and the endpoints being tested.
2. Find the app's entrypoints: the `AppConfig` class, DI container, `create_<domain>_v{n}_router(container)` routers,
`register_<domain>_v{n}_servicers(server, container)` for gRPC, Temporal workflows/activities, and how the schema is
created (Alembic or `metadata.create_all`).
3. Decide the seam. REST/gRPC routers or servicers exist ⇒ **services layer** (default, for every scenario). No
REST/gRPC surface (Temporal/queue worker, consumer, scheduled/batch job, CLI) ⇒ process/task project: use the real
trigger where possible, else the logic layer via `process_logic(context, "<provider>")`. Say which you chose.
4. Derive the `@needs-*` tags from the infrastructure the endpoints touch (archipy extras in `pyproject.toml`, adapters
under `repositories/*/adapters/`).
5. Ask only for an unresolved feature name. Never overwrite shared support files; merge missing hooks/containers while
preserving project-specific behavior.
## Prefer ArchiPy
```bash
uv add --group dev "archipy[behave,testcontainers]"
```
FastAPI's `TestClient` needs nothing extra with `archipy[fastapi]`. gRPC tests need the app's generated stubs.
## Generate
Resolve files under `reference/` relative to this `SKILL.md` in the plugin installation
(`$CURSOR_PLUGIN_ROOT/skills/scaffold-bdd/` or `${CLAUDE_SKILL_DIR}/`). These are
plugin templates, not app-relative paths. Copy and adapt them into the app; never edit the plugin copies.
**Copy templates from `reference/`, adapt package imports, create only if missing:**
| Destination | Template |
|---------------------------------------------|----------------------------------------------|
| `features/environment.py` | `reference/environment.py` |
| `features/test_containers.py` | `reference/test_containers.py` |
| `features/app_harness.py` | `reference/app_harness.py` |
| `features/scenario_context.py` | `reference/scenario_context.py` |
| `features/scenario_context_pool_manager.py` | `reference/scenario_context_pool_manager.py` |
| `features/test_helpers.py` | `reference/test_helpers.py` |
| `.env.test` | `reference/env.test` |
| `features/<name>.feature` (pattern) | `reference/example.feature` |
| `features/steps/<name>_steps.py` (pattern) | `reference/example_steps.py` |
### Wire the harness (`features/app_harness.py`)
Fill every `ADAPT` hook; import app modules inside the hooks, never at module top:
- `build_rest_app()` — `AppUtils.create_fastapi_app()` + the same routers as `manage.create_app()`.
- `build_grpc_server()` — `AppUtils.create_grpc_app(config)` or `create_async_grpc_app(config)` +
`register_<domain>_v{n}_servicers(server, container)`. No port binding; the harness binds `127.0.0.1:0`.
- `build_process_container()` — process/task projects only: return the DI container for `process_logic`; keep `None`
when the app has a services layer.
- `temporal_worker_spec()` — task queue, workflows, and activities of the app's worker.
- `prepare_state()` — schema once per run; `reset_state()` — wipe data between scenarios.
Return `None` from a hook the app does not need. Set `from configs.app_config import AppConfig` in `environment.py`
to the app's config class.
### Log capture (`pyproject.toml`)
Merge into `[tool.behave]` (keep existing keys) so logs print only for failed scenarios:
```toml
[tool.behave]
capture = true
capture_log = true
logging_clear_handlers = true
```
Never call `logging.basicConfig` or add a stderr `StreamHandler` in `features/`: it bypasses Behave's capture and prints
warnings/errors for passing scenarios. Remove one if the app already has it.
### Containers (`features/test_containers.py`)
The template registers Postgres, MySQL, Redis, Kafka, Temporal, MinIO, Elasticsearch, Keycloak, Vault, and ScyllaDB
with lazy imports, so unused ones cost nothing. Keep them all; `before_all` starts only the tags present in the run.
Pin images in `.env.test` when the app needs versions other than the defaults in `TestConfig`.
### Feature + steps
- Gherkin source of truth; tag each feature with every `@needs-*` service it touches.
- Steps use only `rest_client(context)`, `grpc_channel(context)` / `context.app.async_grpc_channel()`, and
`get_current_scenario_context(context)` for per-scenario data.
- Cover success, validation errors, and domain errors as HTTP statuses / gRPC status codes produced by ArchiPy's
handlers and interceptors.
- Third-party APIs with no container: override only that adapter provider with a port-conforming fake.
## Do not
- Behave only (not pytest) as primary style.
- No `logging.basicConfig` / stderr handlers in `features/`; rely on Behave log capture.
- Steps never call repositories, adapters, or DI providers directly. Logics are reachable only in process/task projects
(no services layer), through `process_logic`; apps with a services layer go through REST/gRPC for every scenario.
- Never create the test app without `AppUtils`, and never use `grpc_testing` or direct servicer calls.
- Do not mock databases, caches, queues, or Temporal — run their containers.
- No shared mutable globals across scenarios; `reset_state()` after each scenario.
- Do not stop or restart containers per feature — ArchiPy session managers bind once per run.
## Verify
1. Check Docker with `docker info`. If it is unavailable, say so and stop after a dry run
(`uv run behave --dry-run`); do not fall back to mocks.
2. Run the new feature: `uv run behave features/<name>.feature`.
3. Confirm the scenarios pass in any order (data reset works) and containers stop at the end.
4. Report files, tags, dependency changes, and commands run.
## Docs
- https://syntaxarc.github.io/ArchiPy/tutorials/testing_strategy/
- https://syntaxarc.github.io/ArchiPy/getting-started/project_structure/From SyntaxArc/archipy-plugin, MIT.
More from SyntaxArc/archipy-plugin
- 0.601score
scaffold-observability
SyntaxArc
Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-decorator
SyntaxArc
Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-domain
SyntaxArc
Scaffold a full ArchiPy domain slice (DTOs, errors, repository + adapter, logic, service).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-health-checks
SyntaxArc
Scaffold FastAPI/gRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-interceptor
SyntaxArc
Add or wire cross-cutting FastAPI/gRPC interceptors or middleware, preferring ArchiPy's.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-models
SyntaxArc
Scaffold ArchiPy models under models/: domain/repository DTOs, errors, optional entities and types.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
docs-observability
SyntaxArc
Open ArchiPy OpenTelemetry guidance (traces, metrics, logs)
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 10, 2026 (17 days ago)
- Last release
- Oct 18, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/SyntaxArc/archipy-plugin
- Website
- syntaxarc.github.io/ArchiPy/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SyntaxArc
- 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-decorator
SyntaxArc
Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry).
SkillAFreshness: A★ 3Claude Code +9
Cite this page
scaffold-bdd skill. Agent Mart. https://agentmart.dev/skills/syntaxarc-scaffold-bdd (last updated 2026-10-24)