ai: commands and skills
- commit command
- pr command
- jj skill
- writing skill
diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
index ef7d2363..0b76eea9 120000
--- a/.claude/CLAUDE.md
+++ b/.claude/CLAUDE.md
@@ -1 +1 @@
-/Users/alpha/.dotfiles/ai/AI.md
\ No newline at end of file
+/Users/alpha.chen/.dotfiles/ai/AI.md
\ No newline at end of file
diff --git a/.claude/commands/commit.md b/.claude/commands/commit.md
new file mode 100644
index 00000000..27571575
--- /dev/null
+++ b/.claude/commands/commit.md
@@ -0,0 +1,24 @@
+# Commit Changes
+
+Commit changes using jj. Arguments can specify a fileset to include in
+the commit.
+
+Usage:
+- `/commit` - Commit all current changes
+- `/commit <fileset>` - Commit only files matching the fileset
+ expression
+
+When committing:
+1. Check if a fileset was provided as arguments
+2. If a fileset is provided, use `jj commit <fileset>` to commit only
+matching files
+3. If no fileset is provided, use `jj commit` to commit all changes
+4. Draft a clear, concise commit message:
+ - Focus on why the change was made, not what changed (the diff shows
+ what changed)
+ - Omit information that is obvious from the diff itself
+ - Follow repository conventions
+5. Include the "Assisted-by" footer with the current model and tool
+being used
+6. Use a HEREDOC for the commit message to ensure proper formatting
+7. Run `jj log` after committing to verify success
diff --git a/.claude/commands/pr.md b/.claude/commands/pr.md
new file mode 100644
index 00000000..7db7eab9
--- /dev/null
+++ b/.claude/commands/pr.md
@@ -0,0 +1,27 @@
+# Create Pull Request
+
+Create a pull request using gh for a bookmark that has already been
+pushed.
+
+Usage:
+- `/pr <bookmark-name>` - Create a PR for the specified bookmark
+
+When creating a pull request:
+1. Run `jj log -r <bookmark-name>::@` to see all commits that will be
+merged (from the bookmark to the current working copy)
+2. Run `jj diff -r <bookmark-name>::@` to understand all changes that
+will be included
+3. Analyze all commits and changes that will be included in the pull
+request
+4. Draft a pull request summary:
+ - Focus on why the changes were made and their impact
+ - Do NOT repeat information that is obvious from the diff itself
+ - The diff shows what changed; the PR description should explain why
+ and what the implications are
+ - Follow repository conventions
+5. Check if there are any .github templates for pull requests and follow
+them
+6. Create PR using `gh pr create --head <bookmark-name>` with the
+summary. Use a HEREDOC to pass the body and include an "Assisted-by"
+footer with the current model and tool being used
+7. Return the PR URL when done
diff --git a/ai/writing.md b/.claude/skills/writing/SKILL.md
similarity index 81%
rename from ai/writing.md
rename to .claude/skills/writing/SKILL.md
index 125b5a6d..795ed4df 100644
--- a/ai/writing.md
+++ b/.claude/skills/writing/SKILL.md
@@ -1,16 +1,24 @@
+---
+name: writing
+description: |
+ Writing assistant trained on Strunk & White's "Elements of Style"
+---
+
# Writing Assistant
+You are a writing assistant trained on William Strunk Jr.'s "Elements of
+Style." Apply these principles to produce clear, vigorous prose.
+
+Communicate directly. Eliminate emojis, filler words, conversational padding,
+soft asks, transitional phrases, and engagement-optimized language. Deliver
+precise information only.
+
## Personal Preferences
- Do not rewrite parts that are already fine
- Do not make unnecessary changes to formatting
-## Strunk & White Principles
-
-You are a writing assistant trained on William Strunk Jr.'s "Elements of
-Style." Apply these principles to produce clear, vigorous prose.
-
-### Grammar and Usage
+## Grammar and Usage
- Add 's to form possessives of singular nouns (Charles's, Burns's)
- Use commas after each term in series except the last (red, white, and blue)
@@ -20,7 +28,7 @@ Style." Apply these principles to produce clear, vigorous prose.
- Avoid breaking sentences where commas belong
- Make participial phrases refer to the grammatical subject
-### Composition Structure
+## Composition Structure
- Build each paragraph around one topic
- Begin paragraphs with topic sentences
@@ -30,7 +38,7 @@ Style." Apply these principles to produce clear, vigorous prose.
- Make definite assertions, avoid hesitating language
- Choose specific, concrete language over general abstractions
-### Style and Flow
+## Style and Flow
- Remove needless words—make every word count
- Vary sentence structures to prevent monotony
@@ -39,7 +47,7 @@ Style." Apply these principles to produce clear, vigorous prose.
- Maintain consistent tense in summaries
- Place emphatic words at sentence endings
-### Application Guidelines
+## Application Guidelines
1. Structure paragraphs around single topics
2. Choose strong, active verbs
diff --git a/ai/AI.md b/ai/AI.md
index 14dcbcab..a44e57de 100644
--- a/ai/AI.md
+++ b/ai/AI.md
@@ -48,13 +48,13 @@ claim. That was incorrect and should have been labeled.
- Bold text in lists is acceptable in other contexts
- Lists themselves are acceptable
-Read ~/.dotfiles/ai/writing.md for more writing guidelines.
+For detailed writing assistance, invoke the `writing` skill.
## Version Control
-Check for .jj directory in the repository root. If present, ALWAYS use jj
-commands instead of git commands for ALL version control operations. Never use
-git commands in a jj repository.
+CRITICAL: Check for .jj directory before ANY version control operation.
+
+If .jj exists, use ONLY jj commands. NEVER use git commands in jj repositories.
Use `jj commit` to commit the current change, not `jj describe`.