Agent skill

API Reference

by mobazha in mobazha/mobazha-unified

Look up Mobazha backend API endpoints, request/response formats, and field mappings.

MPL-2.0Auto-check passedBackend & APIs

Install API Reference

skills CLI
$ npx skills add mobazha/mobazha-unified --skill api-reference -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mobazha/mobazha-unified api-reference --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mobazha/mobazha-unified.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/api-reference .claude/skills/api-reference && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-reference
GitHub stars
165
Token cost
~1.7k tokens
SKILL.md length
399 words
Files
2
Skills in repo
29
Repo updated
First seen
Licence
MPL-2.0

At a glance

Look up Mobazha backend API endpoints, request/response formats, and field mappings.

  • Implementing API calls
  • SKILL.md covers Architecture, Frontend API Layer, Backend Source Locations and Critical Field Notes, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Debugging API errors

What it does

API Reference is an agent skill from mobazha/mobazha-unified. Look up Mobazha backend API endpoints, request/response formats, and field mappings. Use when implementing API calls, debugging API errors, checking data structures, or when the user asks about API endpoints, backend structure, "API 接口", "后端接口", "字段映射", "数据结构".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).

It sits in Backend & APIs, covering REST APIs and Structured output and tool calling. The repository describes itself as: Open-source commerce frontend for storefronts, marketplaces, checkout, and seller management. The licence is MPL-2.0.

When your agent uses it

  • Implementing API calls
  • Debugging API errors
  • Checking data structures
  • The user asks about API endpoints

Example prompts

  • “API 接口”
  • “/api-reference”

What it can do on your machine

Read from SKILL.md and the folder at commit 156c699. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Reference loads about 1.7k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 399 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mobazha/mobazha-unified at commit 156c699, republished under its MPL-2.0 licence (© mobazha). 399 words, ~1,745 tokens.

Download SKILL.mdSave it as .claude/skills/api-reference/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
api-reference
description
Look up Mobazha backend API endpoints, request/response formats, and field mappings. Use when implementing API calls, debugging API errors, checking data structures, or when the user asks about API endpoints, backend structure, "API 接口", "后端接口", "字段映射", "数据结构".

Mobazha API Reference

Architecture

[Frontend] → [mobazha_hosting (gateway)] → [mobazha (core node)]
                    ↓
             Some APIs handled directly
             Some APIs proxied
  • mobazha_hosting: Hosting gateway — user management, group marketplace
  • mobazha: Core P2P node — orders, products, wallets

Frontend API Layer

API 服务文件通过三层 helpers(packages/core/services/api/helpers.ts)统一路由,不直接调用 getGatewayUrl() / getAuthHeaders()。

层函数前缀路由目标用途
Layer 1auth*getMyGatewayUrl() — 按角色路由认证端点(orders, wallet, chat, notifications)
Layer 2public*getGatewayUrl() — 始终本地节点公开数据(listings, profiles, exchange rates)
Layer 3search*getSearchUrl() — 搜索服务搜索/发现(trending, featured)

认证:getAuthHeaders() 从 getStoredToken() 获取 token(Bearer 或 basic: 前缀)。已移除 authCredentials 和 username/password 参数。

独立站角色路由:getMyGatewayUrl() 对独立站买家返回 getBuyerGatewayUrl()(→ SaaS),其他角色返回 getGatewayUrl()(→ 本地节点)。

mobazha 后端:Auth 中间件按路由粒度应用(auth() 闭包),公开路由无需认证。

Backend Source Locations

mobazha (Core Node — P2P)
Data TypeFile PathNotes
Purchasepkg/models/purchase.goOrder creation request
PurchaseItempkg/models/purchase.goOrder item
ListingMetadatapkg/models/listings.goProduct index (with CID)
API Routesinternal/api/gateway.goRoute definitions
JWT Validatorinternal/api/jwt_validator.goStandalone JWT auth
Cert Fetcherinternal/net/cert_fetcher.goSaaS cert retrieval
Order Handlersinternal/api/order_handlers.goOrder API
Listing Handlersinternal/api/listing_handlers.goProduct API
Protobuf Defspkg/orders/mbzpb/订单/商品/通用 proto
mobazha_hosting (Cloud Gateway)
Data TypeFile PathNotes
Gateway Routerapi/gateway.gonewHostingRouter() 路由注册
Login Handlersapi/login*.goTelegram/Discord/Web 登录
Group Marketplaceapi/group_*.go群组集市 API
Account Bindingapi/account_handlers.go多平台账号绑定
Encryption APIinternal/services/encryption*.goPhase2 加密密钥管理
Relay Serviceinternal/services/relay*.goGas-less 交易中继
Node Lifecyclehost/节点创建/启动/GC
Store Registrydb/store_registry.go独立站注册/心跳/CRUD
Store Reg APIapi/store_registry_handlers.go注册/心跳端点
Cross-Store Proxyapi/cross_store_proxy.go四级路由代理中间件
HTTPS Proxyinternal/services/store_proxy.goLevel 2 HTTPS 反向代理
LibP2P Proxyinternal/services/libp2p_proxy.goLevel 3 LibP2P stream 代理
Standalone Bindapi/standalone_bind_handlers.goOAuth 绑定流程
Auth Certificateapi/gateway.go handleGETAuthCertificateCasdoor 公钥端点
Show full SKILL.md (183 more words)Show less
Data TypeFile PathNotes
Server + Routesbackend/internal/api/server.gosetupRoutes() 路由注册
Search Handlersbackend/internal/api/search_handlers.go商品搜索
Listing Handlersbackend/internal/api/listing_handlers.go商品索引
Profile Handlersbackend/internal/api/profile_handlers.go用户资料
NetDB Handlersbackend/internal/api/netdb_handlers.goP2P 网络数据库
Signature Verifybackend/internal/api/middleware.goNetDB 签名验证
SQLC Queriesbackend/internal/db/sqlc/queries/类型安全 SQL 查询
Sphinx Searchbackend/internal/services/sphinx.go全文搜索引擎

For complete API endpoint tables and data structures, see reference.md.

Critical Field Notes

  • listingHash must be a CID (e.g. QmXxxx...), NOT a slug
  • quantity must be a string, not a number
  • Address fields are flat (not nested objects)
  • No vendorId field — backend resolves from listingHash
  • Product detail API doesn't return CID — get it from listingindex

Storefront Config API (PG-201)

Store 品牌化配置端点,后端存储在 NodeSettings(key=store_config)。

MethodRouteAuthDescription
GET/v1/settings/storefrontYes (owner)获取当前用户的 StoreConfig(含 draft)
PUT/v1/settings/storefrontYes (owner)全量替换 StoreConfig(后端做 JSON 结构校验,100KB 限制)
GET/v1/settings/storefront/{peerID}No (public)获取指定店铺的 StoreConfig(仅 status=published)

前端 API 路径常量:packages/core/config/apiPaths.ts → NODE_API.SETTINGS_STOREFRONT / NODE_API.SETTINGS_STOREFRONT_PUBLIC(peerID)

响应格式:标准 { data: StoreConfig } 信封。公开端点返回 null(无配置时 404)。

类型定义:packages/core/types/storeConfig.ts(Discriminated Union)。

详细 Schema 见 docs/features/PG-201_STORE_BRANDING_DESIGN.md。

Common Field Mapping

FrontendBackendNotes
address.nameshipToRecipient name
address.streetaddressAddress line
address.countrycountryCodeCountry code
quantity (number)quantity (string)Must convert to string
listingHash/cidlistingHashMust be CID

© mobazha, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .cursor/skills/api-reference of mobazha/mobazha-unified.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 156c699

Compare with similar skills

API Reference next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Reference compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Reference this skillmobazha/mobazha-unified165—~1.7kAutomated safety check: PassMPL-2.0
API Referencematrixorigin/memoria607—~2.3kAutomated safety check: PassApache-2.0
API Conventionshuangjia2019/claude-code-engineering1.1k1 repos~398Automated safety check: PassNone
REST API Designsecondsky/claude-skills2271 repos~552Automated safety check: PassMIT
Adynato Web APImajiayu000/claude-skill-registry6661 repos~2kAutomated safety check: PassMIT
RuView CLI, API and WASMruvnet/RuView97k—~1.2kAutomated safety check: NotesMIT

Similar skills

  • API Reference

    matrixorigin/memoria

    Memoria REST API endpoints, request/response formats, auth, rate limits.

    607 GitHub stars~2.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Conventions

    huangjia2019/claude-code-engineering

    API design patterns and conventions for this project. An agent skill from huangjia2019/claude-code-engineering.

    1.1k GitHub starsUsed in 1 repo~398 tokens
    Backend & APIsAuto-check passed
  • REST API Design

    secondsky/claude-skills

    Designs RESTful APIs with proper resource naming, HTTP methods, status codes, and response formats.

    227 GitHub starsUsed in 1 repo~552 tokens
    Backend & APIsAuto-check passed
  • Adynato Web API

    majiayu000/claude-skill-registry

    Web API development conventions for Adynato projects. An agent skill from majiayu000/claude-skill-registry.

    666 GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Covers the RuView `wifi-densepose` command line binary, its Axum REST API and the WebAssembly builds for browsers and ESP32, for embedding or scripting RuView.

    97k GitHub stars~1.2k tokensUpdated today
    Backend & APIsAuto-check: notes
  • REST API Contract Review

    decebals/claude-code-java

    Reviews REST API design for correct HTTP verbs, versioning, DTO use, consistent responses and backward compatibility before an API change ships.

    750 GitHub starsUsed in 1 repo~2.8k tokens
    Backend & APIsAuto-check passed

More from mobazha/mobazha-unified

All 29 skills in this repo
  • A11y Guide

    mobazha/mobazha-unified

    Accessibility guide for Mobazha following WCAG 2.1 AA standards including color contrast, reduced motion, ARIA patterns, keyboard navigation, focus management, and screen reader testing.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed
  • Code Review

    mobazha/mobazha-unified

    Review code for quality, architecture consistency, and adherence to Mobazha project standards using confidence-based filtering.

    165 GitHub stars~464 tokensUpdated 4 days ago
    Auto-check passed
  • Code Simplifier

    mobazha/mobazha-unified

    Simplify and refine recently written code for clarity, consistency, and maintainability while preserving all functionality.

    165 GitHub stars~601 tokensUpdated 4 days ago
    Auto-check passed
  • Commit Helper

    mobazha/mobazha-unified

    Generate commit messages and run pre-commit validation following Mobazha conventions.

    165 GitHub stars~735 tokensUpdated 4 days ago
    Auto-check passed
  • Component Dev

    mobazha/mobazha-unified

    Create and modify UI components following Mobazha conventions including directory structure, spacing standards, accessibility, and testing.

    165 GitHub stars~638 tokensUpdated 4 days ago
    Auto-check passed
  • Debug Troubleshoot

    mobazha/mobazha-unified

    Troubleshooting handbook for common issues in Mobazha development including build errors, Matrix connection issues, wallet problems, and performance debugging.

    165 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check passed

Questions about API Reference

What does API Reference do?

Look up Mobazha backend API endpoints, request/response formats, and field mappings. API Reference is an agent skill from mobazha/mobazha-unified. Look up Mobazha backend API endpoints, request/response formats, and field mappings.

When should I use API Reference?

API Reference fits situations like: implementing API calls; debugging API errors; checking data structures; the user asks about API endpoints.

How do I install API Reference in Claude Code?

Run `npx skills add mobazha/mobazha-unified --skill api-reference -a claude-code`. Or copy the skill folder (.cursor/skills/api-reference in mobazha/mobazha-unified) into .claude/skills/api-reference in your project. Claude Code loads it when a task matches its description.

How do I install API Reference in Codex?

Run `npx skills add mobazha/mobazha-unified --skill api-reference -a codex`. Or copy the skill folder (.cursor/skills/api-reference in mobazha/mobazha-unified) into .agents/skills/api-reference in your project. Codex loads it when a task matches its description.

Can I use API Reference in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mobazha/mobazha-unified --skill api-reference -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-reference, .gemini/skills/api-reference, .github/skills/api-reference and .opencode/skills/api-reference in your project.

What does API Reference need to run?

SKILL.md names no scripts, command-line tools or credentials: API Reference is instructions for the agent only.

Does API Reference access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Reference safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Reference use?

API Reference is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Reference use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Reference?

Skills that share tags, products or a category with API Reference: API Reference (matrixorigin/memoria, 607 stars), API Conventions (huangjia2019/claude-code-engineering, 1.1k stars), REST API Design (secondsky/claude-skills, 227 stars) and Adynato Web API (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Reference?

mobazha (a GitHub organization) maintains it in mobazha/mobazha-unified, which has 165 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 3, 2026.

Source: mobazha/mobazha-unified on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.