From 37f35ce0a0f62b302df109c77b23d6811185195e Mon Sep 17 00:00:00 2001 From: rootiest Date: Fri, 8 May 2026 13:37:41 -0400 Subject: [PATCH] feat(functions): add claude-docs and claude-pr helper functions Add two Claude Code helper functions to streamline common dev workflows: - `claude-docs`: triggers Claude to sync README.md with recent session changes - `claude-pr`: triggers Claude to create a branch, commit, push, and open a PR Also add `.claude` to .gitignore and document both functions in README.md. Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 1 + README.md | 2 ++ functions/claude-docs.fish | 3 +++ functions/claude-pr.fish | 3 +++ 4 files changed, 9 insertions(+) create mode 100644 functions/claude-docs.fish create mode 100644 functions/claude-pr.fish diff --git a/.gitignore b/.gitignore index 3e7aca0..ac7181e 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ OLD/ # Auto-managed by fish; contains machine-local state and universal vars fish_variables +.claude diff --git a/README.md b/README.md index 8e7ffcb..e2aaa0d 100644 --- a/README.md +++ b/README.md @@ -299,6 +299,8 @@ rm -f file.txt # Falls through to standard rm -f | `gemini-resume` | Resume Gemini CLI session from `.gemini_session` in CWD | | `code-resume` | Smart resume — tries Claude then Gemini, falls back to picker | | `superpowers [on\|off]` | Enable/disable the Superpowers extension for Claude and Gemini | +| `claude-docs` | Ask Claude to sync `README.md` with recent session changes | +| `claude-pr` | Create a branch, commit, push, and open a PR via Claude | ### Fetch & Info diff --git a/functions/claude-docs.fish b/functions/claude-docs.fish new file mode 100644 index 0000000..db795cc --- /dev/null +++ b/functions/claude-docs.fish @@ -0,0 +1,3 @@ +function claude-docs --description 'Claude-code: Sync README with recent changes' + claude "Analyze the recent changes and update the README.md to ensure all features, setup instructions, and examples are 100% accurate. Prune any obsolete information." +end diff --git a/functions/claude-pr.fish b/functions/claude-pr.fish new file mode 100644 index 0000000..4b272a9 --- /dev/null +++ b/functions/claude-pr.fish @@ -0,0 +1,3 @@ +function claude-pr --description 'Claude-code: New branch, commit, push, and PR' + claude "Act as a senior engineer. Execute this sequence: 1. Create a new git branch (kebab-case). 2. Stage changes and write a Conventional Commit message. 3. Self-verify the changes by running relevant build/test commands or linting. 4. Push to remote. 5. Create a PR to 'main' including a summary of changes and a 'Manual Verification' section containing a Markdown checklist (- [ ]) of specific, bite-sized steps required to manually verify the functionality." +end -- 2.52.0