一键导入
commit
Stage and commit current changes with an auto-generated conventional-commits message. From main, first creates a feature branch. Does NOT push.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Stage and commit current changes with an auto-generated conventional-commits message. From main, first creates a feature branch. Does NOT push.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Push unpushed commits on the current branch to GitHub and open a PR via gh CLI. Aborts if there are no unpushed commits. Ignores working tree state entirely — for uncommitted changes use /commit first.
Search arxiv for academic papers on a given topic, return structured summaries
Compare multiple agent memory systems by analyzing their code, benchmarks, and architecture
Deep-dive into a GitHub repo - analyze architecture, code patterns, and design decisions
Conduct a structured research survey on a topic, combining academic papers and open-source projects
基于 SOC 职业分类
| name | commit |
| description | Stage and commit current changes with an auto-generated conventional-commits message. From main, first creates a feature branch. Does NOT push. |
| user_invocable | true |
| arguments | [{"name":"message","description":"Optional full commit message override. If omitted, generated from diff in conventional-commits format. Must start with a valid type.","required":false},{"name":"type","description":"Optional commit type hint (feat, fix, refactor, docs, chore, perf, test, build, ci, style). Overrides auto-detection.","required":false},{"name":"scope","description":"Optional scope override (e.g. server, retrieval, eval). Overrides auto-detection from paths.","required":false},{"name":"paths","description":"Optional space-separated list of paths to include. If omitted, includes everything from `git status` after sensitive-file check.","required":false}] |
Stage and commit pending changes with a conventional-commits message. Does not push. For push + PR, use /push-to-github after.
This repo follows conventional-commits for a consistent history that maps cleanly onto the manually-maintained CHANGELOG.md sections (Added / Fixed / Performance / Changed / Documentation). Releases are manual — versioning and the changelog are bumped by hand on release (the release-please automation was removed).
feat, fix, refactor, perf, docs, chore, test, build, ci, style, revert.git commit --amend, git reset, git push, git config, git rebase -i, git commit --no-verify..env*, *.key, *.pem, id_rsa*, credentials*, secrets*, *.db (incl. hebb.db), .claude/scheduled_tasks.lock, any file with secret / password / token in the name. If git status shows any, abort and ask the user.git add <paths>) — never bare git add . / git add -A. List what will be staged first.main (or master). MUST NOT commit directly to main.git commit.CLAUDE.md — but this skill only ships code that's already in the working tree; it does not author new code.git rev-parse --git-dir # in a git repo?
git rev-parse --abbrev-ref HEAD # current branch
git status --porcelain # working tree state
git log -5 --pretty=format:'%s' # recent commit style reference
If not a git repo → exit.
From git status --porcelain:
Scan the porcelain output for these patterns:
.env .env.* *.key *.pem id_rsa* credentials* secrets* *.db hebb.db
*secret* *password* *token* .claude/scheduled_tasks.lock
If any match, abort:
⚠️ Detected potentially-sensitive paths:
<list>Aborting to avoid leaking secrets. Tell me which paths to include (e.g.paths="file1 file2") or add them to.gitignorefirst.
git diff --staged # already-staged changes
git diff # unstaged tracked changes
git status --porcelain # for path classification
Cap each diff output by paths if it's huge — read just enough to classify type/scope.
Priority: ${message} argument > auto-generated.
If ${message} is provided:
/push-to-github)If auto-generating:
Type (priority: ${type} argument > auto-detect):
feat — new functionality, new public API, new CLI command, new endpoint, new modulefix — bug fix, corrected behavior, error handling fixrefactor — code change with no behavior change (rename, extract, restructure)perf — performance improvementdocs — only changes under repo_pages/, README*, *.md, or docstringstest — only changes under tests/ or eval/chore — deps, lockfiles, .gitignore, build config, tooling, .claude/**build — only pyproject.toml build section, Dockerfile, packagingci — only .github/workflows/**, .github/dependabot.ymlstyle — formatting only (whitespace, quotes), no logic changeWhen multiple types apply, pick the most user-visible one (feat > fix > refactor > perf > docs > test > chore).
Scope (priority: ${scope} argument > auto-detect):
| Most-changed path | Scope |
|---|---|
src/hebb/server/** | server |
src/hebb/cli/** | cli |
src/hebb/retrieval/** | retrieval |
src/hebb/storage/** | storage |
src/hebb/integrations/claude_code/** | claude-code |
src/hebb/embedding/** | embedding |
src/hebb/graph/** | graph |
eval/** | eval |
tests/** | tests |
.github/** | ci |
repo_pages/** | docs |
.claude/** | claude |
| mixed / unclear | omit scope |
Subject (after <type>(<scope>): or <type>:):
Body (only if non-obvious): one short paragraph on why. Skip for self-evident changes.
Breaking change: if the diff removes/renames a public function, CLI flag, __all__ export, or HTTP endpoint, append ! after the scope (feat(cli)!: rename X to Y) AND add a BREAKING CHANGE: footer describing the migration.
Multiple unrelated changes: if the working tree has 2+ unrelated concerns (e.g. a feature + a docs fix), ask the user whether to:
Show the user:
About to commit:
Branch: <current-or-new-branch>
Files (N):
M src/hebb/foo.py
A src/hebb/bar.py
...
Message:
feat(scope): subject line
Optional body paragraph explaining why.
OK to proceed? [respond yes / edit / cancel]
If user says edit → take their revised message verbatim. If user says cancel → stop, don't commit. If user says yes → continue.
CURRENT=$(git rev-parse --abbrev-ref HEAD)
CURRENT ∉ {main, master} → reuse it. Skip branch creation.SLUG from the commit message:
<type>(<scope>): (the subject)-, trim leading/trailing -<type>/ (e.g. feat/add-health-endpoint, fix/fts5-stemming)git rev-parse --verify "refs/heads/$SLUG" succeeds (branch exists locally) OR git ls-remote --exit-code --heads origin "$SLUG" succeeds (exists on remote), append -2, -3, … until uniquegit switch -c "$SLUG"Determine the path list:
${paths} provided → use those exact pathsgit status --porcelain (excluding the sensitive ones already rejected in Step 2)Print exactly what will be staged:
Staging:
M eval/benchmarks/convomem_bench.py
M src/hebb/retrieval/searcher.py
A src/hebb/retrieval/lexical_signals.py
...
Then:
git add <path1> <path2> ...
Re-check no sensitive files snuck in:
git diff --cached --name-only | grep -E '\.(env|key|pem|db)$|credentials|secrets|password|token|id_rsa' && echo "ABORT"
Use HEREDOC for safe quoting:
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
<optional body>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
EOF
)"
If a pre-commit hook fails:
Editgit add <paths>--amend)If the hook reports a non-fixable issue (e.g. a hook config error), abort and tell the user.
Output:
git rev-parse --short HEAD/push-to-github to push and open a PR."working tree clean? ── yes → "nothing to commit", done
│
no
▼
sensitive files in changes? ── yes → ABORT, ask user
│
no
▼
generate conventional-commits message ── show to user, get confirmation
│
▼
on main? ── yes → git switch -c <slug-from-message>
│
no → reuse current branch
▼
git add <explicit paths> (re-check no secrets in staged)
│
▼
git commit (HEREDOC; no --amend, no --no-verify)
│
pre-commit hook fails? ── yes → fix root cause, re-stage, NEW commit
│
no
▼
report branch / SHA / subject; hint /push-to-github
| Failure | Action |
|---|---|
| Pre-commit hook fails | Show stderr; fix root cause; re-stage; new commit (no --amend) |
| Sensitive file detected | Abort; ask user which paths to include |
| Branch slug collision | Append -2, -3, … |
| User cancels at confirmation | Stop cleanly; don't stage or commit |
| Multiple unrelated changes | Ask user: split into multiple commits, or bundle |
Provided ${message} invalid | Show the regex; ask user to fix |
| Detached HEAD | Abort; tell user to checkout a branch first |