Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -euo pipefail
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR
# This is a Claude Code hook to stop it saying "you are right".
#
# Installation:
# 1. Save this script and chmod +x it to make it executable.
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file)
#

🚨 CRITICAL: Handling User Feedback

THIS IS A MANDATORY BEHAVIOR OVERRIDE - YOU MUST FOLLOW THIS EXACTLY

When I point out your mistakes or disagree with your approach:

⛔ ABSOLUTELY FORBIDDEN:

  • NEVER respond with: "You're right!" / "你说得对!"
  • NEVER directly implement changes without independent analysis
@tjx666
tjx666 / md
Last active July 16, 2025 05:13
Mermaid 代码生成:强制性语法检查清单
## Mermaid 代码生成:强制性语法检查清单
在生成任何 Mermaid 图表之前,你 **必须** 将最终代码与以下清单中的每一条规则进行逐一比对,确保 100% 符合规范。**这是一个硬性要求,优先级高于其他风格建议。** 你的行动步骤应该是:
1. 在脑海中草拟 Mermaid 逻辑。
2. 编写实际的 Mermaid 代码。
3. **根据下面的清单,逐行审查你刚写的代码。**
4. 修正所有不符合规范的地方。
5. 最终输出修正后的、可直接复制运行的代码。
6. 输出 mermaid 代码块之后,在下一行紧接着输出:我已检查过 mermaid 语法完全符合检测清单的要求
@tjx666
tjx666 / .md
Last active June 23, 2025 06:09
global cursor rules

User rules

Development Machine: MacOS 15.5, Apple sillicon M4 pro

Some installed terminal programs:

  • fd, ripgrep, ast-grep, fzf, tree, zoxid
  • dust, neofetch, tokie
  • nodejs, python(3.x), python3, fnm, uv
  • global npm packages: @antfu/ni, tsx
@tjx666
tjx666 / .md
Created March 18, 2025 15:07
code review cursor rules
image

code style

  • the jsdoc and the code should match, check whether need to update
  • write the code comments and jsdoc with English
  • whether the code can be simplify or optimize with newer js/ts syntax or API
  • use async/await instead of callback/promise.then
  • use consistent and meaningful naming, don't use rare abbr
  • use meaningful CONSTANT instead of magic literal
@tjx666
tjx666 / settings.md
Last active February 14, 2022 06:12
VSCode settings
{
  "debug.console.fontFamily": "'MesloLGS NF', 'Monaco'",
  "debug.javascript.codelens.npmScripts": "never",
  "explorer.confirmDelete": false,
  "explorer.copyRelativePathSeparator": "/",
  "files.autoSave": "afterDelay",
  "files.exclude": { "**/.git": true },
  "files.maxMemoryForLargeFilesMB": 8192,
  "git.autofetch": true,
@tjx666
tjx666 / cloudSettings
Last active December 25, 2023 01:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-02-14T06:16:33.865Z","extensionVersion":"v3.4.3"}