Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/lh17708357536-gif/flutter-cn-overseas-app-skillsnpx agentmods add skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deployWrote 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.
[](https://agentmods.dev/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deploy)<a href="https://agentmods.dev/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deploy"><img src="https://agentmods.dev/badge/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deploy/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.
<a href="https://agentmods.dev/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deploy"><img src="https://agentmods.dev/badge/skills/lh17708357536-gif/flutter-cn-overseas-app-skills/backend-production-deploy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.03486 |
| Opus 5 | $0.00033 | $0.01743 |
| Sonnet 5 | $0.00013 | $0.00697 |
| Haiku 4.5 | $0.00007 | $0.00349 |
Grade B, and why
backend-production-deploy 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 12d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
chmod 600 "$SSH_KEY" 2>/dev/null || true Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
6. 健康检查:curl 内网 + 外网 + pm2 logs 末 60 行无 error How it starts
The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.
后端生产部署 SOP
本 skill 蒸馏自实际生产经验,覆盖 NestJS + Prisma + PM2 + Nginx 的标准部署链路。所有
<PLACEHOLDER>在新项目落地前需替换为真实值(建议放到scripts/deploy-backend.sh顶部变量段)。
强约束(不可违反)
- 未经用户明确同意,禁止任何对生产的写操作 —
rsync 上传 / pm2 restart / prisma db push / npm install / .env 修改 / nginx reload / 写生产 uploads都属于"写操作"。本地代码完善随时可做,部署前必须 ask & wait。 - 生产
.env永远不被覆盖 — 只允许"追加缺失键",禁止 rsync 同步.env*。 - dry-run 先于正式 rsync — 任何代码同步前先跑
rsync -n --itemize-changes看实际要传的文件清单,向用户确认无意外。 - uploads 必须双向补齐 — 本地与生产共享数据库但分别本地磁盘存上传文件,任意一方生成图片对方就 404;必须
--ignore-existing双向 rsync。 - buildNumber 重用风险 — 触发部署的客户端版本如果牵涉 iOS/Android,参考
ios-app-storeskill 的版本号纪律。
6 步标准 SOP
1. git status --short # 摸底:本次涉及哪些文件
2. rsync -n(dry-run) # 看实际要传什么;用户审核
3. rsync 正式上传 # 排除 .env / node_modules / uploads / dist / logs / ...
4. uploads 双向补齐 # remote→local,再 local→remote,都 --ignore-existing
5. 远程:npm install / db push / build / pm2 restart --update-env
6. 健康检查:curl 内网 + 外网 + pm2 logs 末 60 行无 error
每步对应模板见下文。
1. 配置变量(写在 scripts/deploy-backend.sh 顶部)
SSH_KEY="${SSH_KEY:-<SSH_KEY_PATH>}" # 例:/tmp/prod_server_key
REMOTE_HOST="<REMOTE_USER>@<PROD_HOST>" # 例:[email protected]
REMOTE_PATH="<REMOTE_PROJECT_PATH>" # 例:/www/wwwroot/server
LOCAL_PATH="<LOCAL_PROJECT_PATH>/server" # 例:/Users/me/code/myapp/server
PM2_APP_NAME="<PM2_APP_NAME>" # 例:myapp-api
PROD_DOMAIN="<PROD_DOMAIN>" # 例:myapp.com
校验:
if [[ ! -f "$SSH_KEY" ]]; then
echo "❌ SSH 密钥不存在: $SSH_KEY"; exit 1
fi
chmod 600 "$SSH_KEY" 2>/dev/null || true
2. dry-run 模板(read-only,让用户先审)
rsync -avzn --itemize-changes -e "ssh -i $SSH_KEY -o StrictHostKeyChecking=no" \
--exclude ".env" \
--exclude ".env.*" \
--exclude "*.backup-*" \
--exclude ".DS_Store" \
--exclude "node_modules/" \
--exclude "dist/" \
--exclude "coverage/" \
--exclude "logs/" \
--exclude "uploads/" \
--exclude "keys/" \
--exclude "scripts/rembg-env/" \
--exclude "prisma/dev.db" \
--exclude "prisma/test.db" \
--exclude "prisma/prisma/" \
--exclude "src/h5/public/downloads/*.apk" \
--exclude "src/h5/public/downloads/*.aab" \
"$LOCAL_PATH/" \
"$REMOTE_HOST:$REMOTE_PATH/"
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 285 lines · 66 tokens per session scan B 29edc732f956
backend-production-deploy is a skill published in the GitHub repository lh17708357536-gif/flutter-cn-overseas-app-skills (20 stars, last pushed 2mo ago), licensed MIT. It adds 66 tokens to every session and 3,486 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
domestic-integration
A reference for integrating Chinese services, including WeChat Pay, Alipay, Alibaba Cloud, Tencent Cloud, Huawei Cloud, messaging platforms, and SMS providers.
firebase-cloud-functions
Use for Firebase Cloud Functions callable functions, HTTP functions, triggers, server-side validation, security, deployment and local testing.
stripe-projects
Provision SaaS services + sync creds via Stripe Projects.
azure-eventhub-dotnet
Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".
wikipedia
Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.