check-code-compliance

check-code-compliance is a command for Claude Code from 854771076/oh-my-claude-roles. It costs 15 tokens per session (470 once invoked), scanned A, original, MIT.

A code-review command that checks a project against stated TypeScript and Next.js development rules.

In plain words
What is it for?
Use it to inspect a Next.js codebase and produce a report of required fixes and suggested improvements.
Why use it?
It helps find missing type safety, naming violations, unsuitable framework patterns, configuration problems, and other rule breaches.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to inspect a Next.js codebase and produce a report of required fixes and suggested improvements.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/854771076/oh-my-claude-roles/check-code-compliance
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.

Clone the repo
git clone --depth 1 https://github.com/854771076/oh-my-claude-roles

Made for: Claude Code.

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 check-code-compliance

README.md
[![agentmods](https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/check-code-compliance/github.svg)](https://agentmods.dev/commands/854771076/oh-my-claude-roles/check-code-compliance)
Your own site
<a href="https://agentmods.dev/commands/854771076/oh-my-claude-roles/check-code-compliance"><img src="https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/check-code-compliance/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for check-code-compliance

Your own site · 80×15
<a href="https://agentmods.dev/commands/854771076/oh-my-claude-roles/check-code-compliance"><img src="https://agentmods.dev/badge/commands/854771076/oh-my-claude-roles/check-code-compliance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 470 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00015 $0.00470
Opus 5 $0.00008 $0.00235
Sonnet 5 $0.00003 $0.00094
Haiku 4.5 $0.00002 $0.00047

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

Security

Grade A, and why

check-code-compliance 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 10d 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.

packages/fullstack/TypeScript/v1.0.0/commands/check-code-compliance.md · 37 lines

What it actually says

检查当前项目代码,验证是否符合 TypeScript + Next.js 企业级开发规范

执行步骤:

  1. 全局扫描项目代码:
    • 检查是否存在 JavaScript 文件,确保全项目 TS 覆盖
    • 检查是否存在 any 类型使用,确保用 unknown 替代
    • 检查是否存在非法 // @ts-ignore,替换为 // @ts-expect-error
    • 验证类型/接口命名是否符合规范,接口没有 I 前缀
  2. 检查技术栈使用:
    • 确认使用 Next.js 15+ App Router,没有新建 Pages Router 页面
    • 确认服务端组件默认使用,仅必要场景添加 'use client'
    • 确认数据请求:服务端直接查询,客户端使用 TanStack Query v5
    • 确认类型校验统一使用 Zod,表单使用 React Hook Form
    • 确认客户端状态使用 Zustand,认证使用 Auth.js v5,ORM 使用 Prisma 5+
  3. 检查命名规范:
    • 组件文件 PascalCase,工具/钩子 camelCase,API 路由 kebab-case
    • 布尔变量以 is/has/should 开头,自定义 Hook 以 use 开头
  4. 检查工程化配置:
    • ESLint、Prettier、Husky 配置正确
    • 测试文件符合规范,核心业务覆盖率达标
    • 环境变量前缀规则正确,服务端密钥没有暴露到客户端
  5. 输出检查报告,列出所有不符合规范的问题,并提供修复建议

检查要点:

  • 严格按照文档规则逐一检查,不遗漏任何规则
  • 区分强制规则和建议,明确指出违反强制规则的问题必须修复
  • 所有不符合规范的代码给出具体修复方案

---
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. 10d ago First seen · 37 lines · 15 tokens per session scan A 9b6382717ea3

Subscribe to this mod's changes

check-code-compliance is a command published in the GitHub repository 854771076/oh-my-claude-roles (22 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 470 once invoked, about $0.0001 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.