Agent skill · Audited from source
Create Module
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: 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.
Cite
Cite this page
ModelsAtlas. “Create Module (mx-space/core)”. Retrieved 14 Oct 2026. https://modelsatlas.com/skills/mx-space/create-module
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/create-moduleThe 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: 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.
---
name: create-module
description: 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.
argument-hint: <module-name>
disable-model-invocation: true
---
# Create NestJS Module (PostgreSQL / Drizzle)
Create a new NestJS module for Mix Space project. Module name: `$ARGUMENTS`
## Directory Structure
Create the following files under `apps/core/src/modules/<module-name>/`:
```
<module-name>/
├── <name>.module.ts # Module definition
├── <name>.controller.ts # HTTP controller
├── <name>.service.ts # Business logic
├── <name>.repository.ts # Drizzle repository (extends BaseRepository)
├── <name>.schema.ts # Zod validation schemas for API DTOs
├── <name>.types.ts # TypeScript row/input types
└── <name>.enum.ts # Enums (optional, only if needed)
```
Also add the Drizzle table definition in `apps/core/src/database/schema/`.
## File Templates
### 0. Drizzle Table (`database/schema/<name>.ts`)
Create a new schema file (or append to an existing one) in `apps/core/src/database/schema/`.
```typescript
import { index, pgTable, text, uniqueIndex } from 'drizzle-orm/pg-core'
import { createdAt, pkText, refText, tsCol, updatedAt } from './columns'
export const <name>s = pgTable(
'<name>s',
{
id: pkText(),
createdAt: createdAt(),
name: text('name').notNull(),
// Add other columns...
},
(table) => [
// Add indexes and unique constraints
// uniqueIndex('<name>s_name_uniq').on(table.name),
// index('<name>s_created_at_idx').on(table.createdAt),
],
)
```
Then re-export it from `apps/core/src/database/schema/index.ts`:
```typescript
export * from './<name>'
```
**Column helpers** (from `columns.ts`):
- `pkText()` — Snowflake primary key as text (auto-named `id`)
- `refText(name)` — Snowflake foreign-key reference as text
- `createdAt()` — `created_at` timestamp with default `now()`
- `updatedAt()` — `updated_at` nullable timestamp
- `tsCol(name)` — generic timestamp column
**Common column types**:
- `text('col')` — string
- `integer('col')` — number
- `boolean('col')` — boolean (use `.default(false)`)
- `jsonb('col').$type<T>()` — JSON data
- `text('col').array()` — text array (e.g., tags)
### 1. Types (`<name>.types.ts`)
```typescript
import type { EntityId } from '~/shared/id/entity-id'
export interface <Name>Row {
id: EntityId
name: string
createdAt: Date
}
export interface <Name>CreateInput {
name: string
}
export type <Name>PatchInput = Partial<<Name>CreateInput>
```
### 2. Repository (`<name>.repository.ts`)
```typescript
import { Inject, Injectable } from '@nestjs/common'
import { desc, eq, sql } from 'drizzle-orm'
import { PG_DB_TOKEN } from '~/constants/system.constant'
import { <name>s } from '~/database/schema'
import {
BaseRepository,
type PaginationResult,
toEntityId,
} from '~/processors/database/base.repository'
import type { AppDatabase } from '~/processors/database/postgres.provider'
import { type EntityId, parseEntityId } from '~/shared/id/entity-id'
import { SnowflakeService } from '~/shared/id/snowflake.service'
import type { <Name>CreateInput, <Name>PatchInput, <Name>Row } from './<name>.types'
const mapRow = (row: typeof <name>s.$inferSelect): <Name>Row => ({
id: toEntityId(row.id) as EntityId,
name: row.name,
createdAt: row.createdAt,
})
@Injectable()
export class <Name>Repository extends BaseRepository {
constructor(
@Inject(PG_DB_TOKEN) db: AppDatabase,
private readonly snowflake: SnowflakeService,
) {
super(db)
}
async list(
page = 1,
size = 10,
filter?: Record<string, unknown>,
): Promise<PaginationResult<<Name>Row>> {
page = Math.max(1, page)
size = Math.min(50, Math.max(1, size))
const offset = (page - 1) * size
const [rows, [{ count }]] = await Promise.all([
this.db
.select()
.from(<name>s)
.orderBy(desc(<name>s.createdAt))
.limit(size)
.offset(offset),
this.db.select({ count: sql<number>`count(*)::int` }).from(<name>s),
])
return {
data: rows.map(mapRow),
pagination: this.paginationOf(Number(count ?? 0), page, size),
}
}
async findAll(): Promise<<Name>Row[]> {
const rows = await this.db
.select()
.from(<name>s)
.orderBy(desc(<name>s.createdAt))
return rows.map(mapRow)
}
async findById(id: EntityId | string): Promise<<Name>Row | null> {
const idBig = parseEntityId(id)
const [row] = await this.db
.select()
.from(<name>s)
.where(eq(<name>s.id, idBig))
.limit(1)
return row ? mapRow(row) : null
}
async create(input: <Name>CreateInput): Promise<<Name>Row> {
const id = this.snowflake.nextId()
const [row] = await this.db
.insert(<name>s)
.values({
id,
name: input.name,
})
.returning()
return mapRow(row)
}
async update(
id: EntityId | string,
patch: <Name>PatchInput,
): Promise<<Name>Row | null> {
const idBig = parseEntityId(id)
const update: Partial<typeof <name>s.$inferInsert> = {}
if (patch.name !== undefined) update.name = patch.name
if (Object.keys(update).length === 0) {
const [existing] = await this.db
.select()
.from(<name>s)
.where(eq(<name>s.id, idBig))
.limit(1)
return existing ? mapRow(existing) : null
}
const [row] = await this.db
.update(<name>s)
.set(update)
.where(eq(<name>s.id, idBig))
.returning()
return row ? mapRow(row) : null
}
async deleteById(id: EntityId | string): Promise<<Name>Row | null> {
const idBig = parseEntityId(id)
const [row] = await this.db
.delete(<name>s)
.where(eq(<name>s.id, idBig))
.returning()
return row ? mapRow(row) : null
}
async count(): Promise<number> {
const [row] = await this.db
.select({ couExcerpt, first 6,000 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
Mix Space API design conventions. Apply when writing controllers, API endpoints, or handling HTTP requests.
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 Create Module
What does the Create Module skill do?
Is Create Module safe to install?
What can Create Module access on my machine?
How current is this page?
Sources
- github.com/mx-space/core/tree/master/.claude/skills/create-modul — 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 Create Module skill do?
- Is Create Module safe to install?
- What can Create Module access on my machine?