gvray-admin CLAUDE.md

Project-specific instructions for developing the GVRAY Admin backend, a NestJS and TypeScript application with a database, login controls, role-based permissions, API documentation, and Docker deployment. They define the repository's code, security, documentation, and commit rules.

In plain words
What is it for?
Use them when changing controllers, services, data models, permissions, API responses, configuration, documentation, or deployment-related code in the GVRAY Admin repository.
Why use it?
They reduce mistakes such as exposing passwords or tokens, putting business logic in the wrong layer, using incorrect permission codes, or running database and deployment commands without confirmation.

Instructions file

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 instructions/gvray/gvray-admin/claude-md
Clone the repo
git clone --depth 1 https://github.com/gvray/gvray-admin
Per session 763 This file is loaded in full into every session.
When invoked 763 The same file — it is already loaded in full.
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 $0.00763 $0.00763
Opus 5 $0.00381 $0.00381
Sonnet 5 $0.00153 $0.00153
Haiku 4.5 $0.00076 $0.00076

Measured yesterday against content hash b9b8968f04fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gvray-admin CLAUDE.md 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 yesterday.

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.

CLAUDE.md · 53 lines

What it actually says

GVRAY Admin — Claude Code 指南

本文件是 Claude Code 自动加载入口,只保留高优先级规则。详细规范按需读取,不在这里导入长文档。

项目概况

GVRAY Admin 是 NestJS 11 + TypeScript 后端,使用 Prisma 6 + MySQL、JWT 认证、RBAC 权限模型、Swagger/OpenAPI 和 Docker 部署。

关键目录

  • src/core/:基础设施(decorators / guards / interceptors / filters / pipes / strategies)
  • src/modules/:业务模块,系统管理模块在 src/modules/system/
  • src/prisma/:Nest Prisma Module / PrismaService
  • prisma/schema.prismaseed.tsseeds/、migrations(如存在)
  • src/shared/:constants、DTO、interfaces、utils、services(含 BaseService)

开发硬规则

  • 先读相关模块,不要整仓读取;文档与源码冲突时以源码为准。
  • Controller 只处理路由、鉴权、DTO、Swagger;业务逻辑放 Service。
  • 返回业务数据由 ResponseInterceptor 自动包装;自定义 message/code/分页用 ResponseUtil
  • 禁止返回未过滤的 Prisma 对象;禁止响应中出现 password、token、secret;禁止暴露数据库自增 id
  • 权限码使用 src/shared/constants/permissions.constant.ts 常量,不硬编码。
  • 路径使用 tsconfig alias,避免深层相对路径。
  • 改动涉及接口/权限/配置/响应/部署时,同步更新对应文档。
  • 未经确认不运行数据库重置/迁移/seed、权限导入、部署发布等破坏性命令。
  • 不确定文件位置时先 grep / glob,不假设路径。
  • 错误信息、Swagger 描述统一使用中文。
  • 提交使用 conventional commits(feat: / fix: / refactor: 等)。

按需阅读

常用命令

pnpm start:dev
pnpm build
pnpm test
pnpm prisma:generate
pnpm prisma:migrate   # 会改变数据库结构,执行前确认
pnpm prisma:seed      # 会写入/更新种子数据(含权限、菜单),执行前确认
pnpm db:reset         # 会重置数据库,必须明确确认
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. yesterday First seen · 53 lines · 763 tokens per session scan A b9b8968f04fb

Subscribe to this mod's changes

gvray-admin CLAUDE.md is an instructions file published in the GitHub repository gvray/gvray-admin (11 stars, last pushed 5d ago), licensed MIT. It adds 763 tokens to every session, about $0.0038 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.