Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

mom-factura-testing妈妈事实测试

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

269

周安装

11

GitHub Stars

1

下载量

87
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:mom-factura-testing(妈妈事实测试)
来源仓库:https://github.com/ithustle/momenu-skills
仓库路径:skills/mom-factura-testing
安装命令:
npx skills add https://github.com/ithustle/momenu-skills --skill mom-factura-testing
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ithustle/momenu-skills --skill mom-factura-testing

简介

mom-factura-testing 用于辅助测试设计、自动化测试、用例整理和回归验证,适合编写单元测试或端到端测试。

  • 适用于需要编写测试计划或根据失败日志定位问题的场景。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 需确认项目测试框架和运行命令,避免误改真实逻辑。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Mom Factura Testing & QA

Test payment integrations without processing real transactions.

Base URL: https://api.momenu.online

Enable QA Mode

Add header x-env-qa: true to use the test environment. Works from any origin.

For local development, also add x-dev-mode: true (localhost/127.0.0.1 only).

Content-Type: application/json
x-api-key: YOUR_API_KEY
x-env-qa: true
x-dev-mode: true

Simulate Payment Results

The simulateResult field in the MCX endpoint body triggers specific scenarios. Only active when x-env-qa: true.

ValueBehavior
successPayment succeeds, returns transactionId and invoiceUrl
insufficient_balanceFails: client has no balance
timeoutFails: no response from provider
rejectedFails: payment explicitly rejected
invalid_numberFails: phone not registered

Internal test phone mapping (automatic, no action needed):

  • success → 244900000000
  • insufficient_balance → 244900000001
  • timeout → 244900000002
  • rejected → 244900000003
  • invalid_number → 244999999999

Test Examples

Successful MCX Payment

curl -X POST https://api.momenu.online/api/payment/mcx \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-env-qa: true" \
  -d '{"paymentInfo":{"amount":1000,"phoneNumber":"244923456789"},"simulateResult":"success"}'

Insufficient Balance

curl -X POST https://api.momenu.online/api/payment/mcx \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-env-qa: true" \
  -d '{"paymentInfo":{"amount":5000,"phoneNumber":"244923456789"},"simulateResult":"insufficient_balance"}'

Amount Validation Error

curl -X POST https://api.momenu.online/api/payment/mcx \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-env-qa: true" \
  -d '{"paymentInfo":{"amount":2500,"phoneNumber":"244923456789"},"products":[{"id":"1","productName":"P","productPrice":3000,"productQuantity":1}],"simulateResult":"success"}'

Returns: {"success": false, "code": "AMOUNT_MISMATCH"}

E-kwanza in QA (no simulateResult support)

curl -X POST https://api.momenu.online/api/payment/ekwanza \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-env-qa: true" \
  -d '{"paymentInfo":{"amount":2000,"phoneNumber":"244923456789"}}'

Reference in QA

curl -X POST https://api.momenu.online/api/payment/reference \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-env-qa: true" \
  -d '{"paymentInfo":{"amount":10000}}'

Test Helpers

JavaScript

const API = "https://api.momenu.online";
const headers = {
  "Content-Type": "application/json",
  "x-api-key": "YOUR_API_KEY",
  "x-env-qa": "true"
};

async function testMCX(simulateResult = "success") {
  const res = await fetch(`${API}/api/payment/mcx`, {
    method: "POST", headers,
    body: JSON.stringify({
      paymentInfo: { amount: 1000, phoneNumber: "244923456789" },
      simulateResult
    })
  });
  return res.json();
}

// Run all scenarios
for (const s of ["success","insufficient_balance","timeout","rejected","invalid_number"]) {
  testMCX(s).then(r => console.log(s, r.success ? "PASS" : "FAIL", r));
}

Python

import requests

API = "https://api.momenu.online"
headers = {"Content-Type": "application/json", "x-api-key": "YOUR_API_KEY", "x-env-qa": "true"}

def test_mcx(simulate="success"):
    r = requests.post(f"{API}/api/payment/mcx", json={
        "paymentInfo": {"amount": 1000, "phoneNumber": "244923456789"},
        "simulateResult": simulate
    }, headers=headers)
    return r.json()

for s in ["success", "insufficient_balance", "timeout", "rejected", "invalid_number"]:
    result = test_mcx(s)
    print(f"{s}: {'PASS' if result.get('success') else 'FAIL'} - {result}")

Common Issues

ErrorCauseFix
DOMAIN_NOT_ALLOWEDOrigin not registeredAdd x-dev-mode: true (localhost) or register domain
MISSING_API_KEYHeader missingCheck header is x-api-key (lowercase, hyphens)
AMOUNT_MISMATCHamount!= products totalVerify SUM(price*qty) == amount, or send only one
MISSING_PHONENo phone for MCX/E-kwanzaAdd paymentInfo.phoneNumber (not needed for Reference)
simulateResult ignoredNot in QA modeAdd header x-env-qa: true
simulateResult ignoredWrong endpointOnly works on MCX, not E-kwanza or Reference

Pre-Production Checklist

  1. Remove x-env-qa: true header
  2. Remove x-dev-mode: true header
  3. Remove simulateResult from request bodies
  4. Register production domain in merchant panel
  5. Store API key in environment variables (never hardcode)
  6. Implement error handling for all error codes
  7. Implement webhook endpoint to receive payment confirmations
  8. Implement status endpoint fallback for E-kwanza and Reference
  9. Verify amount validation with products
  10. Test with real phone numbers

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.07%
按下载量换算31

Claude

31.36%
按下载量换算27

Cursor

18.29%
按下载量换算16

Gemini CLI

9.32%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills