项目简介
为AI编程助手提供一套规则,使其回答更简洁、直接。去掉多余客套话,步骤编号,以下一步行动开头。专为ADHD用户设计,但对任何想要直接答案的开发者都有帮助。
README 预览
\n \n\n\n ADHD-friendly outputs. No ADHD diagnosis needed!\n\n\n \n\n\n\n## Install\n\n\nClaude Code\n\n```bash\nclaude plugin marketplace add ayghri/i-have-adhd\nclaude plugin install i-have-adhd@i-have-adhd\n```\n\nThen type `/i-have-adhd`. No local clone needed: Claude Code fetches the repo and keeps it updated.\n\nWant it on every session? `touch ~/.claude/.i-have-adhd-always` (see [INSTALL.md](./INSTALL.md)).\n\n\n\n\nCodex\n\n```bash\ncodex plugin marketplace add ayghri/i-have-adhd --ref main\ncodex plugin add i-have-adhd@i-have-adhd\n```\n\nThen type `$i-have-adhd` to apply the output style explicitly. The skill can also be invoked implicitly when Codex sees a task that benefits from it.\n\n\n\nInstall instructions for other coding agents live in [INSTALL.md](./INSTALL.md).\n\n## What it does\n\nA skill for your coding assistant that stops it from burying the answer. Action first. Steps numbered. No "Hope this helps!"\n\n\n## What changes\n\n\n\n\n\n\n## Before\n\n> Great question! Let me think about this. Your auth flow has a few moving pieces: the middleware, the token verification, and the cookie handling. Looking at `src/auth.ts`, the `verifyToken` function (around lines 42-58) seems to be using an older `jsonwebtoken` API. One approach would be to update the package and rewrite that function. After making the change, you'd want to run the auth tests to confirm nothing breaks. By the way, you might also want to look at your dependency versions overall. Hope this helps! Let me know if you want to dig deeper.\n\n\n\n\n\n## After\n\n> Run `npm install jsonwebtoken@latest`, then edit `src/auth.ts:42`.\n>\n> 1. Open `src/auth.ts`\n> 2. Replace `verifyToken` (lines 42–58) with the snippet below\n> 3. Run `npm test -- auth.spec.ts`\n>\n> Next: paste the first failing line if any test fails.\n\n\n\n\n\n\n## The rules\n\n10 rules. Full text in [SKILL.md](./skills/i-have-adhd/SKILL.md).\n\n1. Lead with the next action.\n2. Number multi-step tasks.\n3. End with o
常见问题 (5)
故障排除为什么在 Hermes 中安装技能后 `/i-have-adhd` 不起作用?
Hermes 不会将单个技能注册为斜杠命令。安装命令是正确的:
hermes skills install ayghri/i-have-adhd/skills/i-have-adhd
该技能会被安装到 ~/.hermes/skills/ 目录下,但它是通过直接向智能体提出要求来激活的,例如:
use i-have-adhd mode
当对话内容与该技能的描述相匹配时,Hermes 也可能会自动加载它。若要禁用它,可以说:
stop adhd mode
不要输入 /i-have-adhd;Hermes 会将其报告为无法识别的命令。
故障排除如何修复在运行 claude plugin update 后仍然是旧版本的 Claude Code 插件,即使 SKILL.md 已在 main 分支上发生更改?
当插件文件发生变化,而 .claude-plugin/plugin.json 中的 version 没有改变时,就会出现这种情况。Claude Code 会保留缓存的版本,直到版本字符串发生变化。要解决此问题,请在每个保持一致的 manifest 中提升版本号(例如从 0.3.0 提升到 0.3.1),然后运行:
claude plugin marketplace update i-have-adhd
claude plugin update i-have-adhd@i-have-adhd
作为针对现有安装的即时解决方法,请卸载并重新安装该插件:
claude plugin uninstall i-have-adhd@i-have-adhd
claude plugin marketplace update i-have-adhd
claude plugin install i-have-adhd@i-have-adhd
今后,每当 SKILL.md 或其他随插件分发的内容发生变化时,都要提升插件版本号。
故障排除如何修复 Windows 上 Claude Code 的 SessionStart 钩子错误:在 PowerShell 中找不到 'sh' 且 ${CLAUDE_PLUGIN_ROOT} 为空?
随附的 hook 使用 POSIX 语法,但 Windows 会通过 PowerShell 来运行它。PowerShell 找不到 sh,而且 ${CLAUDE_PLUGIN_ROOT} 是 PowerShell 变量语法——并非环境变量引用——因此会展开为空字符串。在 PowerShell 中应使用 $env:CLAUDE_PLUGIN_ROOT,或者将 shell hook 替换为 Node/PowerShell 实现。
临时解决方法:创建一个 PowerShell 版本,例如在插件根目录中创建 i-have-adhd-always.ps1:
$flag = Join-Path $HOME '.claude\.i-have-adhd-always'
if (-not (Test-Path $flag -PathType Leaf)) { exit 0 }
$skill = Get-ChildItem -Path $PSScriptRoot -Recurse -Filter SKILL.md -File |
Sort-Object LastWriteTime -Descending |
Select-Object -First 1
if (-not $skill) { exit 0 }
$text = Get-Content -Raw $skill.FullName
$text = [regex]::Replace($text, '(?s)\A---\r?\n.*?\r?\n---\r?\n?', '')
Write-Output $text
exit 0
然后将 hook 命令指向其绝对路径:
"command": "powershell -NoProfile -ExecutionPolicy Bypass -File \"C:\\path\\to\\plugin\\i-have-adhd-always.ps1\""
重启 Claude Code。当标志文件不存在时,脚本会以退出码 0 静默退出。
永久性的跨平台修复:将 always-on.sh 移植为 always-on.mjs,并使用 Node 运行它(Claude Code 环境中已自带 Node)。在 Windows 上,使用 PowerShell 安全的命令,例如:
"command": "node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\always-on.mjs\""
分别为 Windows 和 POSIX 使用针对操作系统的 hook 条目,或者提供一个优先使用 Node、并回退到 sh 的启动器。不要在 PowerShell hook 命令中直接使用 ${CLAUDE_PLUGIN_ROOT}。
故障排除如何修复文档中的 npm install 示例导致的 `unpinned_npm_install` 供应链警告?
将未锁定版本的示例(例如 npm install jsonwebtoken 或 npm install jsonwebtoken@latest)替换为以动作开头、且不安装第三方包的指令——例如:Edit src/auth.ts:42 to update the token validation.。更新所有同步副本,包括 skills/i-have-adhd/SKILL.md、.cursor/skills/i-have-adhd/SKILL.md、README.md 以及各翻译版 README 文件;如适用,请从源文件重新生成它们。如果必须保留安装命令,请使用 npm install --save-exact jsonwebtoken@<version> 锁定版本,但移除不必要的示例更为简单,也能避免版本文档过时。
故障排除如何修复全局安装 OpenCode 插件后 `/i-have-adhd` 命令未显示的问题?
在 OpenCode 1.18.27 中,.opencode/command/ 中的命令只有在从该项目检出目录运行 OpenCode 时才会被发现;来自 skill 的命令也会从 TUI 斜杠命令菜单中隐藏。对于全局安装,请通过 ~/.config/opencode/commands/ 暴露该命令:
mkdir -p ~/.config/opencode/commands
ln -sf ~/.config/opencode/vendor/i-have-adhd/.opencode/command/i-have-adhd.md \
~/.config/opencode/commands/i-have-adhd.md
重启 OpenCode,然后输入 /;/i-have-adhd 应该会出现。一个永久性的插件端修复方法是在插件的 config 钩子中通过 config.command["i-have-adhd"] 注册该命令,并提供 description 和 template。