@kurokeita/add-skill 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/cli.js CHANGED
@@ -1690,7 +1690,7 @@ async function remove(type, options) {
1690
1690
  }
1691
1691
 
1692
1692
  // package.json
1693
- var version = "2.5.0";
1693
+ var version = "2.5.1";
1694
1694
 
1695
1695
  // bin/cli.ts
1696
1696
  var program = new Command();
@@ -75,7 +75,7 @@ Print exactly: **"Commit as-is, edit the message, or skip?"**
75
75
 
76
76
  Steps 2 and 3 are your final chat message, using the exact headings and bullet labels above. Put the commit message in a code fence directly under its heading. The fence is the message's only boundary, so any note after the fence stays out of the approved message. End the turn there, with no tool call after the proposal. The `~/.claude/hooks/commit-gate.py` Stop hook checks the message and either lists what is missing or records the proposal and sends you back. Then ask through AskUserQuestion with that text as the question and "Commit as-is" as the first option. The preview can hold just the commit message. The same hook denies a commit question with no recorded proposal, and denies `git commit` until the user picks "Commit as-is". Each approval covers one commit. Commit with the approved message verbatim in a quoted heredoc (`-m "$(cat <<'EOF' ... EOF)"`), with no attribution trailers: the hook denies a changed message, `-F`, the editor, `--amend` without `-m`, and any `Co-Authored-By` or "Generated with Claude Code" line.
77
77
 
78
- **When the commit-gate hook is disabled**, the Stop hook never sends you back, so ending the turn would leave the user with no question. To turn the hook off for one session, the user starts Claude Code with `COMMIT_GATE_OFF=1` set. Before emitting the proposal, run `printenv COMMIT_GATE_OFF; grep -s 'commit-gate.py\|"disableAllHooks": true' ~/.claude/settings.json .claude/settings.json .claude/settings.local.json`. The hook is disabled when `COMMIT_GATE_OFF` prints a value, when no line names `commit-gate.py`, or when a line sets `"disableAllHooks": true`. In that case, emit the proposal, then call AskUserQuestion right away in the same turn with the same question, options, and preview. Every other rule still holds: one approval per commit, the approved message verbatim in a quoted heredoc, no attribution trailers. Nothing enforces them, so apply them yourself.
78
+ **When the commit-gate hook is disabled**, the Stop hook never sends you back, so ending the turn would leave the user with no question. To turn the hook off for one session, the user starts Claude Code with `COMMIT_GATE_OFF=1` or `COMMIT_GATE_OFF=true` set. Before emitting the proposal, run `printenv COMMIT_GATE_OFF; grep -s 'commit-gate.py\|"disableAllHooks": true' ~/.claude/settings.json .claude/settings.json .claude/settings.local.json`. The hook is disabled when `COMMIT_GATE_OFF` prints `1` or `true` (any other value leaves it on), when no line names `commit-gate.py`, or when a line sets `"disableAllHooks": true`. In that case, emit the proposal, then call AskUserQuestion right away in the same turn with the same question, options, and preview. Every other rule still holds: one approval per commit, the approved message verbatim in a quoted heredoc, no attribution trailers. Nothing enforces them, so apply them yourself.
79
79
 
80
80
  **Standing approval.** The user can tell you in this session to commit without asking, for example so they can step away. That approval applies only while the hook is disabled. For each commit, still emit the proposal so the user can review it later, then skip AskUserQuestion and commit with that message. Standing approval covers new commits only, made with `git commit -m`. Every other gated command (`--amend`, force push, `--tags`, `reset --hard`, `rebase`, `gh pr create`, `gh pr merge`) still needs its own approval. Never infer standing approval from a plan approval or an earlier "go ahead".
81
81
 
@@ -199,7 +199,7 @@ def deny(reason):
199
199
 
200
200
 
201
201
  def main():
202
- if os.environ.get("COMMIT_GATE_OFF"):
202
+ if os.environ.get("COMMIT_GATE_OFF") in ("1", "true"):
203
203
  return
204
204
  payload = json.load(sys.stdin)
205
205
  path = os.path.join(STATE_DIR, f"{payload.get('session_id', 'unknown')}.json")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kurokeita/add-skill",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "CLI to install AI agent skills to various platforms",
5
5
  "type": "module",
6
6
  "bin": {