Agent skill

API And Namespace Design

by iflytek in iflytek/skillhub

API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.

Apache-2.0Auto-check passedBackend & APIs

Install API And Namespace Design

skills CLI
$ npx skills add iflytek/skillhub --skill api-and-namespace-design -a claude-code

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

GitHub CLI
$ gh skill install iflytek/skillhub api-and-namespace-design --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/iflytek/skillhub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/api-and-namespace-design .claude/skills/api-and-namespace-design && 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-and-namespace-design
GitHub stars
5.2k
Token cost
~1.3k tokens
SKILL.md length
495 words
Files
1
Skills in repo
28
Repo updated
First seen
Licence
Apache-2.0

At a glance

API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.

  • Tasks that involve OpenAPI specifications
  • SKILL.md covers Trigger, Namespace Coordinate System, ClawHub Compatibility Layer and API Design, plus 4 more sections
  • Calls make
  • Tasks that involve Authorization and RBAC

What it does

API And Namespace Design is an agent skill from iflytek/skillhub. API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Backend & APIs, covering OpenAPI specifications, Authorization and RBAC and API design. It works with OpenAPI. The repository describes itself as: Self-hosted, open-source agent skill registry for enterprises. Publish & version skill packages, govern with RBAC and audit logs, deploy on-premise with Docker or Kubernetes. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve OpenAPI specifications
  • Tasks that involve Authorization and RBAC
  • Tasks that involve API design

Example prompts

  • “/api-and-namespace-design”

What it can do on your machine

Read from SKILL.md and the folder at commit 7352597. 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

    Shell commands in SKILL.md call:

    • make

    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 And Namespace Design loads about 1.3k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 495 words of instructions outside code blocks.

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

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 iflytek/skillhub at commit 7352597, republished under its Apache-2.0 licence (© iflytek). 495 words, ~1,263 tokens.

Download SKILL.mdSave it as .claude/skills/api-and-namespace-design/SKILL.md (or your agent's skills folder).
name
api-and-namespace-design
description
API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.
license
Apache-2.0

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 CoordinateCanonical SlugNotes
@global/my-skillmy-skillGlobal namespace omits prefix
@team-name/my-skillteam-name--my-skillDouble-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
Request/Response Patterns
  • DTOs in com.iflytek.skillhub.dto/
  • ReviewTaskRequest / ReviewTaskResponse for review workflow
  • Response wrapping handled at controller layer
  • Validation errors use DomainBadRequestException with i18n message keys
Session and CSRF
  • Session-based auth with cookie storage
  • CSRF protection via XSRF-TOKEN cookie and X-XSRF-TOKEN header
  • Smoke tests validate the full register → login → CSRF → action → logout flow
  • Mock auth uses X-Mock-User-Id header in local dev
Well-known Discovery

/.well-known/clawhub.json returns { "apiBase": "/api/v1" } for ClawHub CLI auto-discovery.

Show full SKILL.md (196 more words)Show less

OpenAPI Contract Sync

When backend API contracts change:

bash
make generate-api

This runs openapi-typescript http://localhost:8080/v3/api-docs -o src/api/generated/schema.d.ts.

Commit the updated web/src/api/generated/schema.d.ts with the PR.

To verify no drift:

bash
./scripts/check-openapi-generated.sh

This starts local dependencies, boots the backend, regenerates the schema, and fails if the checked-in SDK is stale.

Versioning and Tags

  • Semantic versioning for skill versions (major.minor.patch)
  • latest tag is system-reserved, read-only, auto-follows Skill.latestVersionId
  • Custom tags (stable, beta) are manually maintained
  • latest cannot be moved manually
  • Auto-generated versions use yyyyMMdd.HHmmss format when no version is specified in SKILL.md

Key API Endpoints

MethodPathPurpose
GET/api/v1/auth/meCurrent user info (401 if unauthenticated)
POST/api/v1/auth/local/loginLocal account login
POST/api/v1/auth/local/registerLocal account registration
POST/api/v1/auth/logoutLogout (302/200/204)
POST/api/v1/auth/local/change-passwordPassword change
GET/api/v1/namespacesList namespaces
GET/api/v1/labelsList visible labels (public)
POST/api/v1/admin/labelsCreate label definition (admin)
DELETE/api/v1/admin/labels/{slug}Delete label definition (admin)
GET/actuator/healthHealth check
GET/actuator/prometheusPrometheus metrics

Common Pitfalls

  • Forgetting CSRF token on POST/PUT/DELETE requests (needs X-XSRF-TOKEN header)
  • Using numeric user IDs in API — all user identities are String
  • Not regenerating OpenAPI types after adding/changing endpoints
  • Putting business logic in controllers instead of domain/app services
  • Assuming namespace slugs follow a specific prefix pattern — they are arbitrary valid slugs

© iflytek, Apache-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

Just SKILL.md in .agents/skills/api-and-namespace-design of iflytek/skillhub.

Open the folder on GitHubat commit 7352597

Compare with similar skills

API And Namespace Design 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 And Namespace Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API And Namespace Design this skilliflytek/skillhub5.2k—~1.3kAutomated safety check: PassApache-2.0
defineRoute Route Builderbighadj22/codflow346—~924Automated safety check: PassApache-2.0
API Designeraiskillstore/marketplace4301 repos~3.6kAutomated safety check: PassNone
API DesignerJeffallan/claude-skills12k2 repos~2kAutomated safety check: PassMIT
Old Coder API DesignAmazingAng/old-coder7491 repos~3.4kAutomated safety check: PassMIT
API Surface Reviewpolarsource/polar10k—~1.3kAutomated safety check: PassMIT

Similar skills

  • defineRoute Route Builder

    bighadj22/codflow

    Creates new API endpoints, and converts older ones, with the defineRoute() pattern used in cod-server, including auth strategies, scopes and OpenAPI output.

    346 GitHub stars~924 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • API Designer

    aiskillstore/marketplace

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices.

    430 GitHub starsUsed in 1 repo~3.6k tokens
    Backend & APIsAuto-check passed
  • API Designer

    Jeffallan/claude-skills

    Designs REST and GraphQL APIs from resource modeling to an OpenAPI 3.1 contract, with versioning, pagination and RFC 7807 error handling.

    12k GitHub starsUsed in 2 repos~2k tokens
    Backend & APIsAuto-check passed
  • Old Coder API Design

    AmazingAng/old-coder

    Reviews or designs an HTTP/JSON API's endpoints, auth, pagination, versioning and deprecations, guarding against inventing a bespoke interface or silently breaking consumers.

    749 GitHub starsUsed in 1 repo~3.4k tokens
    Backend & APIsAuto-check passed
  • API Surface Review

    polarsource/polar

    Review changes to Polar's API contract — Pydantic schemas, FastAPI endpoints, OpenAPI output and the generated SDKs.

    10k GitHub stars~1.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • API Contract

    ChenyCHENYU/Robot_Admin

    A skill your agent uses when: generating TypeScript API layer (type definitions + request functions) from page-spec JSON or Swagger/OpenAPI docs.

    1k GitHub stars~1.9k tokensUpdated today
    Backend & APIsAuto-check passed

More from iflytek/skillhub

All 28 skills in this repo
  • Orca Run Replay

    iflytek/skillhub

    Answers questions about a past agent run from its recording, using causal graphs and replay, instead of reconstructing events from memory.

    5.2k GitHub starsUsed in 4 repos~3k tokens
    Auto-check passed
  • Zero Slop Prose Editor

    iflytek/skillhub

    Audits and rewrites formulaic, AI-sounding prose while keeping facts, voice and format, using a local Python scorer and inspect-only, rewrite or embedded-gate modes.

    5.2k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Sandbase

    iflytek/skillhub

    Access 2,000+ AI models and API tools through one MCP interface for inference, media generation, search, scraping, embeddings, social data, and structured retrieval.

    5.2k GitHub starsUsed in 2 repos~2.1k tokens
    Auto-check passed
  • LinkedIn Post Formatter

    iflytek/skillhub

    Drafts a copy-paste-ready LinkedIn post from your facts and ideas, choosing the smallest structure that fits and keeping an accessible plain-text fallback for any styled text.

    5.2k GitHub stars~901 tokensUpdated today
    Auto-check passed
  • SkillHub CLI

    iflytek/skillhub

    Connects an agent to a SkillHub registry and uses the official SkillHub CLI to search, install, list and explicitly upgrade skills from that registry.

    5.2k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • AI Claim Checker

    iflytek/skillhub

    Breaks AI-generated text into checkable claims, verifies them against independent sources and labels each one, with an optional exercise for learners.

    5.2k GitHub stars~1.2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about API And Namespace Design

What does API And Namespace Design do?

API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling. API And Namespace Design is an agent skill from iflytek/skillhub. API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.

When should I use API And Namespace Design?

API And Namespace Design fits situations like: tasks that involve OpenAPI specifications; tasks that involve Authorization and RBAC; tasks that involve API design.

How do I install API And Namespace Design in Claude Code?

Run `npx skills add iflytek/skillhub --skill api-and-namespace-design -a claude-code`. Or copy the skill folder (.agents/skills/api-and-namespace-design in iflytek/skillhub) into .claude/skills/api-and-namespace-design in your project. Claude Code loads it when a task matches its description.

How do I install API And Namespace Design in Codex?

Run `npx skills add iflytek/skillhub --skill api-and-namespace-design -a codex`. Or copy the skill folder (.agents/skills/api-and-namespace-design in iflytek/skillhub) into .agents/skills/api-and-namespace-design in your project. Codex loads it when a task matches its description.

Can I use API And Namespace Design 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 iflytek/skillhub --skill api-and-namespace-design -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-and-namespace-design, .gemini/skills/api-and-namespace-design, .github/skills/api-and-namespace-design and .opencode/skills/api-and-namespace-design in your project.

What does API And Namespace Design need to run?

Going by SKILL.md and its folder, API And Namespace Design needs the command-line tools its instructions call (make).

Does API And Namespace Design 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 And Namespace Design 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 And Namespace Design use?

API And Namespace Design is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API And Namespace Design use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 And Namespace Design?

Skills that share tags, products or a category with API And Namespace Design: defineRoute Route Builder (bighadj22/codflow, 346 stars), API Designer (aiskillstore/marketplace, 430 stars), API Designer (Jeffallan/claude-skills, 12k stars) and Old Coder API Design (AmazingAng/old-coder, 749 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API And Namespace Design?

iflytek (a GitHub organization) maintains it in iflytek/skillhub, which has 5,157 GitHub stars. The repository holds 28 skills in this directory. The repository was last updated on October 8, 2026.

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