haimen: Skill for Claude Code

.agents/skills/check/SKILL.md

check is a skill for Claude Code, Codex from shenjingnan/haimen. It costs 48 tokens per session (541 once invoked), scanned A, original, MIT.

A command for checking Rust code through formatting, linting, tests and compilation. Rust is a programming language; linting finds likely mistakes and style problems.

In plain words
What is it for?
Use it to run or interpret `cargo fmt`, Clippy, tests and builds, fix reported issues in order, and verify that all checks pass.
Why use it?
It gathers the main code-quality checks in one workflow and identifies problems that could prevent the project from building or passing tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is shenjingnan/haimen's own configuration. It tells Claude Code and Codex how to work on haimen itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything haimen configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shenjingnan/haimen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shenjingnan/haimen/main/.agents/skills/check/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/haimen

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/shenjingnan/haimen/check.svg)](https://agentmods.dev/skills/shenjingnan/haimen/check)
Your own site
<a href="https://agentmods.dev/skills/shenjingnan/haimen/check"><img src="https://agentmods.dev/badge/skills/shenjingnan/haimen/check.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 541 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.00048 $0.00541
Opus 5 $0.00024 $0.00270
Sonnet 5 $0.00010 $0.00108
Haiku 4.5 $0.00005 $0.00054

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

Security

Grade A, and why

check 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 8d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/run-checks.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/check/SKILL.md · 61 lines

What it actually says

Check Command

运行完整的代码质量检查,包括格式化检查、Lint、测试和编译检查。

上下文获取

以下命令将在技能加载时自动执行,结果将注入到上下文中供分析:

  • 全部检查结果: !bash .agents/skills/check/scripts/run-checks.sh

你的任务

根据上方注入的检查结果,按以下步骤处理:

1. 分析结果

逐项检查每个命令的输出,判断哪些检查未通过。

2. 修复问题

按以下优先级依次处理:

  1. 格式化问题 — 运行 cargo fmt 自动修复
  2. Lint 问题 — 分析 cargo clippy 输出并修复代码中的问题
  3. 测试失败 — 分析 cargo test 输出并修复失败的测试
  4. 编译错误 — 分析 cargo build 输出并修复编译错误

3. 最终验证

修复完成后,重新运行完整检查确认全部通过:

cargo fmt --check && cargo clippy -- -D warnings && cargo test -- --test-threads=1 && cargo build

配置参考

工具 配置方式 用途
Cargo fmt rustfmt.toml 代码格式化
Clippy clippy.toml / Cargo.toml Lint 检查
Cargo test Cargo.toml 测试运行
Cargo check Cargo.toml 编译检查

代码风格

  • 缩进: 2 空格
  • 行宽: 100 字符
  • cargo fmt 强制执行

测试规范

  • 测试文件: src/*.rs 中的 #[cfg(test)] mod tests
  • 框架: Rust 内置 #[test] + assert_eq! / assert!
  • 运行: cargo test(单线程: cargo test -- --test-threads=1
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 61 lines · 48 tokens per session scan A bcab57085e91

Subscribe to this mod's changes

check is a skill published in the GitHub repository shenjingnan/haimen (7 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 541 once invoked, about $0.0002 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-31.