Files
baozaotumao fb8761a546
docs-check / docs-sync (push) Has been cancelled
feat: 项目级 /coauthor 斜杠命令切换 Claude 署名开关
- template/.claude/commands/coauthor.md.jinja:生成项目自带 /coauthor on|off|status,
  薄包装调用 ./scripts/claude-attribution.sh,Claude Code 里打 / 即可发现
- 仅本项目生效,不装全局、不影响用户其它项目(install-skill.sh 未改)
- 两个脚本不变(开关 + 门禁);终端/CI 仍可直接用脚本
- README 署名章节补 /coauthor 用法 + 文件树补 coauthor.md.jinja

验证:仅后端/全栈两配置均生成 coauthor.md + 两脚本;命令体动作 off/on/status
读写 git config 正确;~/.claude/commands 未受影响;check-docs 通过。
2026-06-02 03:22:00 -07:00

26 lines
978 B
Django/Jinja
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
设置本项目提交是否包含 Claude 署名(`Co-Authored-By: Claude`)。
参数:$ARGUMENTS
## 行为
按参数运行开关脚本并回报结果(参数为空时默认 `status`):
```bash
./scripts/claude-attribution.sh <on|off|status>
```
- `off` —— 提交移除 Claude 署名(**默认**
- `on` —— 提交保留 Claude 署名
- `status` —— 查看当前策略
## 步骤
1. 解析参数为 `on` / `off` / `status` 之一;无参或无法识别时用 `status`。
2. 运行 `./scripts/claude-attribution.sh <参数>`,把输出原样回报给用户。
3. 一句话说明:策略存于 `git config scaffold.includeClaude`**仅本项目生效**;由 commit-msg 门禁(pre-commit)每次提交强制执行——`off` 时自动剥除任何 Claude 署名行。
## 注意
- 只改本项目设置,不碰其它项目、不碰全局。
- 不要手改 `.pre-commit-config.yaml` 或门禁脚本来达到目的——用本命令切换即可。