api-and-namespace-design

api-and-namespace-design is a skill for Claude Code, Codex from iflytek/skillhub. It costs 36 tokens per session (1,260 once invoked), scanned A, original, Apache-2.0.

A set of rules for designing web APIs and organizing skills and users into namespaces. It also covers access roles, OpenAPI contracts, compatibility with ClawHub, and protection against request-forgery attacks.

In plain words
What is it for?
Use it when adding or changing REST endpoints, namespaces, user or skill coordinates, access roles, admin endpoints, OpenAPI files, or ClawHub CLI compatibility.
Why use it?
It keeps API behavior and naming consistent as the product grows, while reducing permission mistakes and mismatches between documented and generated API code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

About the project

SkillHub is a self-hosted registry where organizations publish, discover, version, and manage reusable skills for AI agents. Teams use it to share governed skill packages privately, with namespaces, role-based access control, audit logs, and CLI installation; the catalogue entries are skills and related agent integrations that can be managed through it.

iflytek/skillhub · 5,003 stars · on GitHub · skill.xfyun.cn

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 skills/iflytek/skillhub/api-and-namespace-design
Any agent
npx skills add iflytek/skillhub --skill api-and-namespace-design
Clone the repo
git clone --depth 1 https://github.com/iflytek/skillhub

Made for: Claude Code, Codex.

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 api-and-namespace-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/iflytek/skillhub/api-and-namespace-design.svg)](https://agentmods.dev/skills/iflytek/skillhub/api-and-namespace-design)
Your own site
<a href="https://agentmods.dev/skills/iflytek/skillhub/api-and-namespace-design"><img src="https://agentmods.dev/badge/skills/iflytek/skillhub/api-and-namespace-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.1 $0.00036 $0.01260
Opus 5 $0.00018 $0.00630
Sonnet 5 $0.00007 $0.00252
Haiku 4.5 $0.00004 $0.00126

Measured 6d ago against content hash 9bb92d6b4db7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

api-and-namespace-design scanned grade A with 0 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/api-and-namespace-design/SKILL.md · 141 lines

How it starts

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

API and Namespace Design Skill

Trigger

Use this skill when:

  • Adding or modifying REST API endpoints
  • Changing namespace, skill, or user coordinate logic
  • Working on ClawHub CLI compatibility layer
  • Modifying OpenAPI specifications or generated types
  • Adding new admin or governance endpoints

Namespace Coordinate System

SkillHub uses a two-axis coordinate model:

@{namespace_slug}/{skill_slug}
  • @global/my-skill — Global namespace skill
  • @my-team/my-skill — Team namespace skill (namespace slug is any valid slug)
  • @department-ops/my-skill — Department namespace skill

Namespace Model

Namespaces (domain/namespace/):

  • Slug: unique identifier, validated by SlugValidator
  • Status: ACTIVE, FROZEN, ARCHIVED
  • Roles: OWNER, ADMIN, MEMBER
  • Frozen or archived namespaces cannot publish skills

RBAC Roles

Namespace-level (domain/namespace/NamespaceRole):

  • OWNER — Full control over namespace and all skills
  • ADMIN — Can manage members, archive skills, publish
  • MEMBER — Can publish skills to the namespace

Platform-level:

  • SUPER_ADMIN — Bypasses all permission checks, can publish directly without review

ClawHub Compatibility Layer

ClawHub CLI uses a single-slug model (no / allowed in slugs). Mapping:

SkillHub Coordinate Canonical Slug Notes
@global/my-skill my-skill Global namespace omits prefix
@team-name/my-skill team-name--my-skill Double-dash separator

Conflict resolution: -- split takes priority. @global/team-name--my-skill would conflict with @team-name/my-skill, resolved to the team namespace skill. Global skill slugs must NOT contain --.

API Design

Controllers

  • Controllers in skillhub-app (com.iflytek.skillhub.controller/) are transport only
  • Responsibilities: extract auth context, bind request params, wrap responses
  • Complex business logic belongs in domain services (skillhub-domain) or app services
  • Use Springdoc OpenAPI annotations (@Operation, @ApiResponse) for API documentation
  • User identity is always String in API inputs and outputs

Read the full file on GitHub · 141 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. 6d ago First seen · 141 lines · 36 tokens per session scan A 9bb92d6b4db7

Subscribe to this mod's changes

api-and-namespace-design is a skill published in the GitHub repository iflytek/skillhub (5,003 stars, last pushed yesterday), licensed Apache-2.0. It adds 36 tokens to every session and 1,260 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

openspec-explore

Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.

tbdavid2019/openclaw-docs-skill · 39 tokens

openclaw-docs

Find authoritative guidance for installing, configuring, operating, securing, and troubleshooting OpenClaw, including channels, model providers, Gateway operations, tools, plugins, automation, nodes, multi-agent routing, and CLI errors. Use for any question or maintenance task involving an OpenClaw installation…

tbdavid2019/openclaw-docs-skill · 80 tokens

openspec-apply-change

Implement tasks from an OpenSpec change. Use when the user wants to start implementing, continue implementation, or work through tasks.

tbdavid2019/openclaw-docs-skill · 31 tokens

openspec-archive-change

Archive a completed change in the experimental workflow. Use when the user wants to finalize and archive a change after implementation is complete.

tbdavid2019/openclaw-docs-skill · 31 tokens

openspec-propose

Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.

tbdavid2019/openclaw-docs-skill · 47 tokens

anysearch

Real-time search engine supporting web search, vertical domain search, parallel batch search, and URL content extraction.

anysearch-ai/anysearch-skill · 24 tokens