Agent skill · Audited from source
Api Conventions
skill · mx-space/coreNOASSERTION licenceAudited 14 Oct 2026 · source 81b3f9a4c850
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 81b3f9a4c850 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Mix Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
Cite
Cite this page
ModelsAtlas. “Api Conventions (mx-space/core)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/mx-space/api-conventions
2 skills are called “Api Conventions”. You are viewing mx-space/core.
- mx-space/core★ 564✓SAFE
- huangjia2019/claude-code-engineering★ 1.1k✓SAFE
Trust audit
Audit 0.4.1 · source read 14 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | WARN | 1 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (1)
MEDIUMInventory / provenanceinv.symlink · apps/core/.env
apps/core/.env
- Why
- link not followed
- Fix
- —
Audit 0.4.1 · source sha 81b3f9a4c850 · 14 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishermx-space GitHub organizationOwner of the repository this skill is read from
- Source foldermx-space/core/.claude/skills/api-conventionsThe exact folder we audited
- LicenceNOASSERTIONAs the repository states it
- Commit pinned for this verdict81b3f9a4c850A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Mix Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
---
name: api-conventions
description: Mix Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
user-invocable: false
---
# Mix Space API Design Conventions
## Controller Decorators
```typescript
// Use @ApiController instead of @Controller
// Dev environment has no prefix, production auto-adds /api/v{version} prefix
@ApiController('posts') // ✓
@Controller('posts') // ✗
```
## Authentication
```typescript
// Endpoints requiring login
@Auth()
async create() {}
// Optional auth (get current user status)
async get(@IsAuthenticated() isAuth: boolean) {}
// Get current user
async get(@CurrentUser() user: UserModel) {}
```
## Response Transformation
`ResponseInterceptor` (global `APP_INTERCEPTOR`) wraps every controller return value:
| Return value | Emitted |
| ----------------------------- | ---------------------------------------------- |
| bare value `T` | `{ data: T }` |
| `withMeta(data, meta)` | `{ data, meta }` |
| `undefined` | 204 No Content |
| `@HTTPDecorators.RawResponse` | untouched — skips envelope and case conversion |
`withMeta` (from `~/common/response/envelope.types`) is detected by an internal `Symbol`,
**not** by the presence of a `data` key — returning an object literal whose top-level keys
include `data` gets double-wrapped. CI enforces this via
`scripts/check-controller-response-envelope.ts`.
`transformResponseCase` (`~/common/response/case-transform.ts`) converts the response
`data`/`meta` to snake_case at the wire boundary:
- `createdAt` → `created_at`
- `categoryId` → `category_id`
Opt a field subtree out with `@BypassCaseTransform(['items[].rawPayload'])`.
## Pagination
Pagination belongs in `meta`, never merged into `data`. Build it with `MetaObjectBuilder`:
```typescript
@Get('/')
async list(@Query({ schema: BasicPagerSchema }) query: BasicPagerInput) {
const result = await this.postRepository.list({
page: query.page,
size: query.size,
sortBy: query.sortBy,
sortOrder: query.sortOrder,
})
const metaBuilder = new MetaObjectBuilder().view('card').pagination({
page: result.pagination.currentPage,
size: result.pagination.size,
total: result.pagination.total,
totalPages: result.pagination.totalPage,
})
return withMeta(result.data, metaBuilder.build())
}
```
For CRUD boilerplate, use `BasePgCrudFactory`:
```typescript
@ApiController(paths)
export class LinkControllerCrud extends BasePgCrudFactory({
repository: LinkRepository,
}) {
@Get('/')
async gets(@Query({ schema: BasicPagerSchema }) pager: BasicPagerInput) {
const { size = 10, page = 1 } = pager
return this.repository.list(page, size)
}
}
```
## Parameter Validation
```typescript
// Path parameters — attach EntityIdSchema for Snowflake entity IDs
@Get('/:id')
async get(@Param({ schema: EntityIdSchema }) params: EntityIdInput) {
return this.service.findById(params.id)
}
// For integer IDs or entity IDs (e.g. notes with nid)
@Get('/:id')
async get(@Param({ schema: IntIdOrEntityIdSchema }) params: IntIdOrEntityIdInput) {}
// Query parameters
@Get('/')
async list(@Query({ schema: BasicPagerSchema }) query: BasicPagerInput) {}
// Request body
@Post('/')
async create(@Body({ schema: CreateSchema }) body: CreateInput) {}
```
## HTTP Methods
| Method | Purpose | Status Code |
| ------ | ----------------- | ----------- |
| GET | Retrieve resource | 200 |
| POST | Create resource | 201 |
| PUT | Full update | 200 |
| PATCH | Partial update | 200 |
| DELETE | Delete resource | 204 |
## Error Handling
```typescript
import { BusinessException } from '~/common/exceptions/biz.exception'
import { ErrorCodeEnum } from '~/constants/error-code.constant'
// Business errors
throw new BusinessException(ErrorCodeEnum.PostNotFound)
throw new BusinessException(ErrorCodeEnum.SlugNotAvailable, slug)
// HTTP errors
throw new BadRequestException('Invalid input')
throw new NotFoundException('Resource not found')
throw new UnauthorizedException('Not logged in')
```
## Idempotency
```typescript
// Add idempotency protection for create operations
@Post('/')
@HTTPDecorators.Idempotence()
async create() {}
// Custom idempotency key
@HTTPDecorators.Idempotence({ key: 'custom-key' })
```
## Caching
```typescript
// Disable cache
@Get('/')
@HttpCache.disable
async list() {}
// Custom cache
@HttpCache({ ttl: 60, key: 'my-key' })
async get() {}
```Excerpt, first 4,677 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 81b3f9a
git clone https://github.com/mx-space/core git -C core checkout 81b3f9a4c850
The author documents no install command, so this uses the repository directly. Our verdict covers commit 81b3f9a4c850 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
81b3f9a4c850
Similar skills
All docs & writing skills →mx-space/core
Create a new NestJS module with repository, service, controller, schema, and Drizzle table definition. Use when adding new feature modules, API endpoints, or business domains.
mx-space/core
Author and review Drizzle SQL migrations safely for rolling deploys. Triggers when editing apps/core/src/database/schema/*.ts or apps/core/src/database/migrations/*.sql, when the user runs drizzle-kit generate, when…
mx-space/core
Use when verifying and porting an mx-core controller (Post/Note/Page/Comment/Category/etc.) after the MongoDB→PostgreSQL cutover, or when its data shape no longer matches what api-client and admin-vue3 expect. Triggers…
mx-space/core
Review code for Mix Space project conventions. Checks NestJS patterns, Drizzle ORM repositories, Zod schemas, API design, etc.
mx-space/core
Use when an agent must inspect, draft, validate, edit, publish, unpublish, delete, or configure mx-space content through packages/cli or the mxs binary.
mx-space/core
Use when releasing mx-core server (apps/core), @mx-space/api-client, or @mx-space/cli (mxs) — version bump, changelog, git tag, Docker build, GitHub Release, and Dokploy redeploy. Triggers on "发版", "release a new…
Questions about Api Conventions
What does the Api Conventions skill do?
Is Api Conventions safe to install?
What can Api Conventions access on my machine?
How current is this page?
Sources
- github.com/mx-space/core/tree/master/.claude/skills/api-conventi — the audited source at commit 81b3f9a4c850 and every finding aboveObserved · 14 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Api Conventions skill do?
- Is Api Conventions safe to install?
- What can Api Conventions access on my machine?