Skip to content

Commit 1ace628

Browse files
committed
chore(claude): refine skills and switch statusline
- switch statusline from ccusage to ccstatusline with zero padding - add issue-start skill symlink in claude.nix - drop model pinning from commit and create-pr skills - require bullet-pointed body in every commit with no exceptions - add scope-language rule so Japanese scopes are allowed for Japanese commits and PRs - document HEREDOC quoting pitfalls and recommend `<<'EOF'` when messages contain backticks
1 parent 562fdb7 commit 1ace628

4 files changed

Lines changed: 33 additions & 8 deletions

File tree

home/claude.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
".claude/commands/kiro.md".source = ./claude/commands/kiro.md;
1010
".claude/skills/parallel-review/SKILL.md".source = ./claude/skills/parallel-review/SKILL.md;
1111
".claude/skills/review-merge/SKILL.md".source = ./claude/skills/review-merge/SKILL.md;
12+
".claude/skills/issue-start/SKILL.md".source = ./claude/skills/issue-start/SKILL.md;
1213
".claude/skills/web-design-guidelines/SKILL.md".source =
1314
./claude/skills/web-design-guidelines/SKILL.md;
1415
};

home/claude/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
},
4343
"statusLine": {
4444
"type": "command",
45-
"command": "bunx ccusage@latest statusline"
45+
"command": "bunx -y ccstatusline@latest",
46+
"padding": 0
4647
},
4748
"enabledPlugins": {
4849
"code-simplifier@claude-plugins-official": true,

home/claude/skills/commit/SKILL.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git branch:*), Bash(git commit:*)
33
argument-hint: [additional explanation]
44
description: Create a git commit
5-
model: claude-sonnet-4-6
65
---
76

87
## Context
@@ -45,10 +44,10 @@ Based on the above context:
4544
- Use the **imperative mood** in the description (e.g., "add", not "added" or "adds").
4645
- Keep the **summary concise** (max ~72 characters).
4746
- **Body rules**:
48-
- By default, always include a body.
49-
- Exception: if the change is extremely simple and self-explanatory, a summary alone is acceptable.
50-
- Insert one blank line after the summary, then write the body in **bullet points**.
51-
- Each bullet should describe a reason, context, or detail of the change.
47+
- **Always include a body — no exceptions**, even for trivial-looking changes
48+
- Insert one blank line after the summary, then write the body
49+
- The body **must** be written as bullet points — **never** use prose paragraphs or a single free-form line
50+
- Each bullet should describe a reason, context, or detail of the change
5251
- Example:
5352

5453
```
@@ -62,12 +61,24 @@ Based on the above context:
6261
- **Language rule**:
6362
- Use the same language as the majority of recent commits
6463
- If `$ARGUMENTS` includes a language instruction, follow that instead
64+
- **Scope language matches the message language**: for Japanese commits, the scope may also be written in Japanese (e.g., `feat(認証): OAuth2 ログインを追加`). For English commits, keep the scope in English.
6565
- **Focus rule**:
6666
- Do **not** write vague phrases like "fixed review comments", or "minor fix".
6767
- Always describe **what was actually changed** (e.g., "remove unused import", "fix null check in auth flow").
6868
- **Arguments rule**:
6969
- Treat `$ARGUMENTS` as additional context or instruction for the commit message
7070
71+
## HEREDOC Handling for Commit Messages
72+
73+
When composing a multi-line commit message with `git commit -m "$(cat <<...EOF ... EOF)"`, the HEREDOC quoting style affects how backticks are interpreted:
74+
75+
- **Single-quoted HEREDOC (`<<'EOF'`)**: No shell expansion happens, so write raw backticks directly (e.g., inline `` `functionName` `` or `` `file.ts` `` is safe)
76+
- **Double-quoted or unquoted HEREDOC (`<<"EOF"` / `<<EOF`)**: Bash may interpret backticks as command substitution. Avoid inline single backticks — use triple-backtick fenced blocks (```` ``` ````) if a code span is needed
77+
78+
**Rationale**: In double-quoted/unquoted HEREDOC, backticks sometimes get auto-escaped as `` \` ``, which leaks literal backslashes into the commit message.
79+
80+
**Recommendation**: Prefer `<<'EOF'` whenever the commit message contains backticks or code identifiers — it is the safest default.
81+
7182
## Important Notes
7283
7384
- Do not execute `git add`

home/claude/skills/create-pr/SKILL.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git log:*), Bash(git push:*), Bash(git branch:*), Bash(gh pr:*), Bash(gh repo:*)
33
argument-hint: [additional context]
44
description: Create a GitHub pull request
5-
model: claude-sonnet-4-6
65
---
76

87
## Context
@@ -102,7 +101,9 @@ N/A - [brief description of the purpose]
102101
- **Title format**:
103102
- Follow the same convention as commit messages if applicable
104103
- Be descriptive but concise (max ~72 characters)
105-
- Example: `feat(auth): Add user authentication with OAuth2`
104+
- **Scope language matches the title language**: for Japanese PRs the scope may be written in Japanese; for English PRs keep the scope in English
105+
- Example (English): `feat(auth): Add user authentication with OAuth2`
106+
- Example (Japanese): `feat(認証): OAuth2 ログイン機能を追加`
106107

107108
- **Issue section**:
108109
- Use `fixes #<number>` to automatically close related issues
@@ -137,6 +138,17 @@ N/A - [brief description of the purpose]
137138
- **Arguments rule**:
138139
- Treat `$ARGUMENTS` as additional context or instruction for the PRtitle/description
139140

141+
## HEREDOC Handling for PR Body
142+
143+
When composing the PR body with `gh pr create --body "$(cat <<...EOF ... EOF)"`, the HEREDOC quoting style affects how backticks are interpreted:
144+
145+
- **Single-quoted HEREDOC (`<<'EOF'`)**: No shell expansion happens, so write raw backticks directly (both inline `` ` `` and fenced ```` ``` ````)
146+
- **Double-quoted or unquoted HEREDOC (`<<"EOF"` / `<<EOF`)**: Bash may try to interpret backticks as command substitution. Avoid inline single backticks — use triple-backtick fenced code blocks (```` ``` ````) instead
147+
148+
**Rationale**: In double-quoted/unquoted HEREDOC, backticks sometimes get auto-escaped as `` \` ``, which breaks Markdown rendering on GitHub (the code block fails to display properly).
149+
150+
**Recommendation**: Prefer `<<'EOF'` whenever the PR body contains backticks, code identifiers, or code blocks — it is the safest default.
151+
140152
## Important Notes
141153

142154
- Always ensure all changes are committed before creating a PR

0 commit comments

Comments
 (0)