integrate

integrate is a command for coding agents from dhslegen/digital-delivery-team. It costs 62 tokens per session (2,260 once invoked), scanned B, original, MIT.

An integration command that starts the required database, Redis, backend, and frontend services, applies database migrations, and runs smoke tests. Smoke tests are quick checks that the main system paths work.

In plain words
What is it for?
Checking the integration environment, starting the application stack, applying migrations, testing frontend-backend connections, and performing a dry run.
Why use it?
Unit tests and code review may miss problems between separately running services, such as unavailable databases or mismatched API paths.

Command

Part of the digital-delivery-team plugin — 13 skills, 21 commands, 9 agents, 8 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dhslegen/digital-delivery-team/integrate
Clone the repo
git clone --depth 1 https://github.com/dhslegen/digital-delivery-team

Or install digital-delivery-team, the plugin that ships this one along with the rest of its 13 skills, 21 commands, 9 agents, 8 hooks.

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 integrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/integrate.svg)](https://agentmods.dev/commands/dhslegen/digital-delivery-team/integrate)
Your own site
<a href="https://agentmods.dev/commands/dhslegen/digital-delivery-team/integrate"><img src="https://agentmods.dev/badge/commands/dhslegen/digital-delivery-team/integrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00062 $0.02260
Opus 5 $0.00031 $0.01130
Sonnet 5 $0.00012 $0.00452
Haiku 4.5 $0.00006 $0.00226

Measured 4d ago against content hash 1533b0eb95fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

integrate scanned grade B with 2 findings 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

echo " exit 7: smoke 失败 → curl 验证 endpoint;检查 api-contract.yaml 路径"
commands/integrate.md · 169 lines

How it starts

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

/integrate

为什么有这个命令:v0.9.11 之前 /impl → /verify 直接跑 unit 测试 + 代码评审,但前后端从未真正联调过——数据库没起、Redis 没起、server 进程没启动、API 路径前后端是否对齐未知。/integrate 填补这一环。

输入:$ARGUMENTS


Phase 1 — 前置校验

test -f docs/api-contract.yaml || { echo "❌ 请先运行 /design"; exit 1; }
test -f .ddt/tech-stack.json || { echo "❌ 缺 .ddt/tech-stack.json,先 /design"; exit 1; }

[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT=$(cat "${HOME}/.claude/delivery-metrics/.ddt-plugin-root" 2>/dev/null)
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || DDT_PLUGIN_ROOT="${HOME}/.claude/plugins/marketplaces/digital-delivery-team"
[ -f "$DDT_PLUGIN_ROOT/bin/aggregate.mjs" ] || { echo "❌ DDT plugin root 未解析"; exit 1; }
export DDT_PLUGIN_ROOT

if printf '%s' "$ARGUMENTS" | grep -q -- '--dry-run'; then
  node "$DDT_PLUGIN_ROOT/bin/integrate-up.mjs" --dry-run
  exit 0
fi
node "$DDT_PLUGIN_ROOT/bin/emit-phase.mjs" --phase integrate --action start

Phase 2 — 派发 integrate-up

跑核心起栈脚本:

node "$DDT_PLUGIN_ROOT/bin/integrate-up.mjs" $ARGUMENTS
INTEGRATE_EXIT=$?

bin/integrate-up.mjs 执行 8 个阶段(每步 emit 子状态到 stdout):

Phase 动作 失败退出码
1 环境侦测:docker / docker-compose / 端口占用 / tech-stack 2
2 docker-compose 准备:用户配置 OR plugin 模板复制(按 preset)
3 docker compose up -d --wait(mysql/postgres + redis + healthcheck) 3
4 db migration(按 preset:mvn flyway / npx prisma migrate / alembic upgrade) 4
5 启 server 后台(mvn spring-boot:run / npm run start:dev),等 health 60s 5
6 启 web 后台(npm run dev),等端口 :5173 30s 6
7 smoke:GET health + OpenAPI 第一个 GET endpoint + web 端口监听 7
8 报告 → docs/integrate-report.md;可选 --tear-down 拆环境

Phase 3 — 失败处理

if [ "$INTEGRATE_EXIT" -ne 0 ]; then
  echo "❌ /integrate 失败(exit $INTEGRATE_EXIT);详见 docs/integrate-report.md"
  echo ""
  echo "常见原因 + 自助:"
  echo "  exit 2: docker / docker-compose 不可用 → 装 Docker Desktop"
  echo "  exit 3: docker compose up 失败 → docker compose -f docker-compose.yml logs"
  echo "  exit 4: db migration 失败 → 检查 server/{db,prisma,alembic} 配置"
  echo "  exit 5: server 未就绪 → cat .ddt/integrate/server.log"
  echo "  exit 6: web 未就绪 → cat .ddt/integrate/web.log"
  echo "  exit 7: smoke 失败 → curl 验证 endpoint;检查 api-contract.yaml 路径"
  echo ""
  echo "修好后重跑 /integrate;保留 stack 时手动 docker compose down 清理"
  exit "$INTEGRATE_EXIT"
fi

Read the full file on GitHub · 169 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. 4d ago First seen · 169 lines · 62 tokens per session scan B 1533b0eb95fe

Subscribe to this mod's changes

integrate is a command published in the GitHub repository dhslegen/digital-delivery-team (1 stars, last pushed 3mo ago), licensed MIT. It adds 62 tokens to every session and 2,260 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.