feat: add slash command and skill hooks support#233
feat: add slash command and skill hooks support#233connerohnesorge wants to merge 4 commits intomainfrom
Conversation
This implements the 'add-slash-command-skill-hooks' proposal. - Added --skill flag to all hook commands - Implemented hook injection for .claude/commands/*.md and .claude/skills/*.md - Added 'skill' field to StopCommand, SubagentStopCommand, ToolUsageRule, and UnEditableFileRule - Added matches_skill_pattern helper for glob-based skill matching - Hook handlers now receive skill context via CONCLAUDE_SKILL env var - Updated system notifications to include skill context - Updated README and default config with skill-specific examples - Regenerated schema and added unit/integration tests
WalkthroughThis PR introduces comprehensive "Slash Commands and Skills Hooks" support by implementing skill-scoped hook injection with a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can enforce grammar and style rules using `languagetool`.Configure the |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@spectr/changes/add-slash-command-skill-hooks/proposal.md`:
- Around line 85-88: The three numbered steps run together and lack end
punctuation, causing "needed Re-run" to read incorrectly; update the proposal by
adding proper punctuation and capitalization between items—e.g., end step 1 with
a period ("Add `skill` field to existing rules where needed."), end step 2 with
a period and keep "Re-run `conclaude init`..." capitalized, and end step 3 with
a period, and ensure `CONCLAUDE_SKILL` remains uppercase in the text.
In `@spectr/changes/add-slash-command-skill-hooks/specs/configuration/spec.md`:
- Around line 198-209: The spec uses a nonexistent MODIFIED delta for "Agent
Frontmatter Hook Injection (Extended)"; update the delta to a valid form by
either (a) changing the delta type to ADDED if this is a new requirement, or (b)
if you intended to modify an existing requirement, replace the partial MODIFIED
entry with the full original requirement text (header + all original scenarios)
and then apply your edits to that complete block; ensure the file still includes
the scenario lines referencing conclaude init, --agent flag, and the
CONCLAUDE_AGENT / CONCLAUDE_SKILL env var rules so Spectr validation succeeds.
In `@spectr/changes/add-slash-command-skill-hooks/tasks.md`:
- Around line 1-84: The tasks.md checklist currently shows every item as
unchecked; update the file so every task and subtask (e.g., items labeled
1.1–1.12, 2.1–2.8, 3.1–3.6, 4.1–4.6, 5.1–5.3, 6.1–6.2, 7.1–7.4, 8.1–8.9,
9.1–9.6) is marked complete by replacing each "- [ ]" with "- [x]" across the
document to reflect completion. Ensure no other text or formatting is changed
and keep the existing headings and ordering intact.
In `@tests/skill_hooks_tests.rs`:
- Around line 58-127: The test test_skill_flag_sets_env_var uses the wrong env
var name; update the config command that writes the env var (the string passed
to run in the generated config) to echo $CONCLAUDE_SKILL (not
$CONCLAUDE_SKILL_NAME), and adjust any related expectations (the output_file
read/assertion) if necessary so the assertion assert_eq!(env_output.trim(),
"tester") still validates that CONCLAUDE_SKILL was propagated when running the
binary_path with args ["Hooks","Stop","--skill","tester"].
| **For users wanting skill-specific rules:** | ||
| 1. Add `skill` field to existing rules where needed | ||
| 2. Re-run `conclaude init` to update command/skill files with hooks | ||
| 3. Use `CONCLAUDE_SKILL` environment variable in custom scripts |
There was a problem hiding this comment.
Add punctuation between the numbered steps.
This avoids the “needed Re-run” phrasing that reads like a double modal.
✏️ Suggested tweak
-1. Add `skill` field to existing rules where needed
+1. Add `skill` field to existing rules where needed.🧰 Tools
🪛 LanguageTool
[style] ~87-~87: The double modal “needed Re-run” is nonstandard (only accepted in certain dialects). Consider “to be Re-run”.
Context: ...field to existing rules where needed 2. Re-run conclaude init to update command/skil...
(NEEDS_FIXED)
🤖 Prompt for AI Agents
In `@spectr/changes/add-slash-command-skill-hooks/proposal.md` around lines 85 -
88, The three numbered steps run together and lack end punctuation, causing
"needed Re-run" to read incorrectly; update the proposal by adding proper
punctuation and capitalization between items—e.g., end step 1 with a period
("Add `skill` field to existing rules where needed."), end step 2 with a period
and keep "Re-run `conclaude init`..." capitalized, and end step 3 with a period,
and ensure `CONCLAUDE_SKILL` remains uppercase in the text.
| fn test_skill_flag_sets_env_var() { | ||
| use std::io::Write; | ||
|
|
||
| let temp_dir = tempdir().expect("Failed to create temp directory"); | ||
| let temp_path = temp_dir.path(); | ||
| let config_path = temp_path.join(".conclaude.yaml"); | ||
|
|
||
| // Create a config that outputs CONCLAUDE_SKILL_NAME to a file | ||
| let output_file = temp_path.join("skill_env.txt"); | ||
| let config = format!( | ||
| r#" | ||
| stop: | ||
| commands: | ||
| - run: "echo $CONCLAUDE_SKILL_NAME > {}" | ||
| skill: "tester" | ||
| preToolUse: | ||
| preventRootAdditions: false | ||
| "#, | ||
| output_file.to_string_lossy() | ||
| ); | ||
|
|
||
| fs::write(&config_path, config).expect("Failed to write config file"); | ||
|
|
||
| // Create a Stop hook payload | ||
| let payload = serde_json::json!({ | ||
| "session_id": "test-session", | ||
| "transcript_path": "/tmp/test-transcript.jsonl", | ||
| "hook_event_name": "Stop", | ||
| "cwd": temp_path.to_string_lossy().to_string(), | ||
| "permission_mode": "default", | ||
| "stop_hook_active": true | ||
| }); | ||
|
|
||
| let payload_json = serde_json::to_string(&payload).expect("Failed to serialize payload"); | ||
|
|
||
| // Get binary path from cargo | ||
|
|
||
| let binary_path = env!("CARGO_BIN_EXE_conclaude"); | ||
|
|
||
| // Execute the Stop hook with --skill tester | ||
|
|
||
| let mut child = Command::new(binary_path) | ||
| .args(["Hooks", "Stop", "--skill", "tester"]) | ||
| .current_dir(temp_path) | ||
| .stdin(Stdio::piped()) | ||
| .stdout(Stdio::piped()) | ||
| .stderr(Stdio::piped()) | ||
| .spawn() | ||
| .expect("Failed to spawn Stop hook"); | ||
|
|
||
| // Write payload to stdin | ||
| { | ||
| let stdin = child.stdin.as_mut().expect("Failed to open stdin"); | ||
| stdin | ||
| .write_all(payload_json.as_bytes()) | ||
| .expect("Failed to write to stdin"); | ||
| } | ||
|
|
||
| let result = child | ||
| .wait_with_output() | ||
| .expect("Failed to wait for command"); | ||
| if !result.status.success() { | ||
| eprintln!("STDOUT: {}", String::from_utf8_lossy(&result.stdout)); | ||
| eprintln!("STDERR: {}", String::from_utf8_lossy(&result.stderr)); | ||
| } | ||
| assert!(result.status.success()); | ||
|
|
||
| // Verify env var was set and used | ||
| let env_output = fs::read_to_string(&output_file).expect("Failed to read output file"); | ||
| assert_eq!(env_output.trim(), "tester"); |
There was a problem hiding this comment.
Use CONCLAUDE_SKILL consistently in the env var test.
The test echoes CONCLAUDE_SKILL_NAME, which doesn’t match the documented CONCLAUDE_SKILL contract in this PR. This can hide a real mismatch or fail when the hook sets only CONCLAUDE_SKILL.
✅ Suggested fix
- // Create a config that outputs CONCLAUDE_SKILL_NAME to a file
+ // Create a config that outputs CONCLAUDE_SKILL to a file
let output_file = temp_path.join("skill_env.txt");
let config = format!(
r#"
stop:
commands:
- - run: "echo $CONCLAUDE_SKILL_NAME > {}"
+ - run: "echo $CONCLAUDE_SKILL > {}"
skill: "tester"
preToolUse:
preventRootAdditions: false
"#,
output_file.to_string_lossy()
);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fn test_skill_flag_sets_env_var() { | |
| use std::io::Write; | |
| let temp_dir = tempdir().expect("Failed to create temp directory"); | |
| let temp_path = temp_dir.path(); | |
| let config_path = temp_path.join(".conclaude.yaml"); | |
| // Create a config that outputs CONCLAUDE_SKILL_NAME to a file | |
| let output_file = temp_path.join("skill_env.txt"); | |
| let config = format!( | |
| r#" | |
| stop: | |
| commands: | |
| - run: "echo $CONCLAUDE_SKILL_NAME > {}" | |
| skill: "tester" | |
| preToolUse: | |
| preventRootAdditions: false | |
| "#, | |
| output_file.to_string_lossy() | |
| ); | |
| fs::write(&config_path, config).expect("Failed to write config file"); | |
| // Create a Stop hook payload | |
| let payload = serde_json::json!({ | |
| "session_id": "test-session", | |
| "transcript_path": "/tmp/test-transcript.jsonl", | |
| "hook_event_name": "Stop", | |
| "cwd": temp_path.to_string_lossy().to_string(), | |
| "permission_mode": "default", | |
| "stop_hook_active": true | |
| }); | |
| let payload_json = serde_json::to_string(&payload).expect("Failed to serialize payload"); | |
| // Get binary path from cargo | |
| let binary_path = env!("CARGO_BIN_EXE_conclaude"); | |
| // Execute the Stop hook with --skill tester | |
| let mut child = Command::new(binary_path) | |
| .args(["Hooks", "Stop", "--skill", "tester"]) | |
| .current_dir(temp_path) | |
| .stdin(Stdio::piped()) | |
| .stdout(Stdio::piped()) | |
| .stderr(Stdio::piped()) | |
| .spawn() | |
| .expect("Failed to spawn Stop hook"); | |
| // Write payload to stdin | |
| { | |
| let stdin = child.stdin.as_mut().expect("Failed to open stdin"); | |
| stdin | |
| .write_all(payload_json.as_bytes()) | |
| .expect("Failed to write to stdin"); | |
| } | |
| let result = child | |
| .wait_with_output() | |
| .expect("Failed to wait for command"); | |
| if !result.status.success() { | |
| eprintln!("STDOUT: {}", String::from_utf8_lossy(&result.stdout)); | |
| eprintln!("STDERR: {}", String::from_utf8_lossy(&result.stderr)); | |
| } | |
| assert!(result.status.success()); | |
| // Verify env var was set and used | |
| let env_output = fs::read_to_string(&output_file).expect("Failed to read output file"); | |
| assert_eq!(env_output.trim(), "tester"); | |
| fn test_skill_flag_sets_env_var() { | |
| use std::io::Write; | |
| let temp_dir = tempdir().expect("Failed to create temp directory"); | |
| let temp_path = temp_dir.path(); | |
| let config_path = temp_path.join(".conclaude.yaml"); | |
| // Create a config that outputs CONCLAUDE_SKILL to a file | |
| let output_file = temp_path.join("skill_env.txt"); | |
| let config = format!( | |
| r#" | |
| stop: | |
| commands: | |
| - run: "echo $CONCLAUDE_SKILL > {}" | |
| skill: "tester" | |
| preToolUse: | |
| preventRootAdditions: false | |
| "#, | |
| output_file.to_string_lossy() | |
| ); | |
| fs::write(&config_path, config).expect("Failed to write config file"); | |
| // Create a Stop hook payload | |
| let payload = serde_json::json!({ | |
| "session_id": "test-session", | |
| "transcript_path": "/tmp/test-transcript.jsonl", | |
| "hook_event_name": "Stop", | |
| "cwd": temp_path.to_string_lossy().to_string(), | |
| "permission_mode": "default", | |
| "stop_hook_active": true | |
| }); | |
| let payload_json = serde_json::to_string(&payload).expect("Failed to serialize payload"); | |
| // Get binary path from cargo | |
| let binary_path = env!("CARGO_BIN_EXE_conclaude"); | |
| // Execute the Stop hook with --skill tester | |
| let mut child = Command::new(binary_path) | |
| .args(["Hooks", "Stop", "--skill", "tester"]) | |
| .current_dir(temp_path) | |
| .stdin(Stdio::piped()) | |
| .stdout(Stdio::piped()) | |
| .stderr(Stdio::piped()) | |
| .spawn() | |
| .expect("Failed to spawn Stop hook"); | |
| // Write payload to stdin | |
| { | |
| let stdin = child.stdin.as_mut().expect("Failed to open stdin"); | |
| stdin | |
| .write_all(payload_json.as_bytes()) | |
| .expect("Failed to write to stdin"); | |
| } | |
| let result = child | |
| .wait_with_output() | |
| .expect("Failed to wait for command"); | |
| if !result.status.success() { | |
| eprintln!("STDOUT: {}", String::from_utf8_lossy(&result.stdout)); | |
| eprintln!("STDERR: {}", String::from_utf8_lossy(&result.stderr)); | |
| } | |
| assert!(result.status.success()); | |
| // Verify env var was set and used | |
| let env_output = fs::read_to_string(&output_file).expect("Failed to read output file"); | |
| assert_eq!(env_output.trim(), "tester"); |
🤖 Prompt for AI Agents
In `@tests/skill_hooks_tests.rs` around lines 58 - 127, The test
test_skill_flag_sets_env_var uses the wrong env var name; update the config
command that writes the env var (the string passed to run in the generated
config) to echo $CONCLAUDE_SKILL (not $CONCLAUDE_SKILL_NAME), and adjust any
related expectations (the output_file read/assertion) if necessary so the
assertion assert_eq!(env_output.trim(), "tester") still validates that
CONCLAUDE_SKILL was propagated when running the binary_path with args
["Hooks","Stop","--skill","tester"].
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/src/content/docs/reference/config/pre-tool-use.md (1)
132-141:⚠️ Potential issue | 🟡 MinorFix table column count for
skillrow.The new
skillrow trips MD056 (too many cells). Ensure the row has exactly 4 columns and no stray|in the description.Proposed fix
-| `skill` | `string | null` | `null` | Optional skill pattern to scope this rule to specific skills (e | +| `skill` | `string \| null` | `null` | Optional skill pattern to scope this rule to specific skills (e.g., "tester", "commit", or glob patterns like "test*") |docs/src/content/docs/reference/config/stop.md (1)
49-59:⚠️ Potential issue | 🟡 MinorFix table column count for
skillrow.MD056 indicates too many cells in the row. Ensure the row is 4 columns with no stray
|.Proposed fix
-| `skill` | `string | null` | `null` | Optional skill pattern to scope this command to specific skills (e | +| `skill` | `string \| null` | `null` | Optional skill pattern to scope this command to specific skills (e.g., "tester", "commit", or glob patterns like "test*") |
🤖 Fix all issues with AI agents
In `@docs/src/content/docs/reference/config/subagent-stop.md`:
- Line 56: The table row for the `skill` field is truncated and contains an
unescaped pipe in the type column (`string | null`) that breaks the Markdown
table; update the `skill` row so the type column escapes the pipe (e.g., use
`string \| null` or wrap the entire type in backticks) and restore the full
description text (complete the parenthetical that starts with "(e", e.g., "(e.g.
to restrict the command to specific skills)"), ensuring the table columns remain
correctly aligned.
In `@GEMINI.md`:
- Around line 89-145: The two fenced code blocks in GEMINI.md (the block
starting with `User: "Build a React todo app"` and the block starting with `USER
gives project`) are missing language identifiers; update each opening
triple-backtick to include a language (e.g., change ``` to ```text or a more
specific language) so markdownlint MD040 is satisfied and the fences become
```text ... ```; no other content changes needed.
In `@spectr/changes/add-slash-command-skill-hooks/specs/initialization/spec.md`:
- Around line 7-19: The MODIFIED requirement block "Agent Frontmatter Hook
Injection" is incomplete and must include the full prior requirement text and
all existing scenarios rather than a partial delta; either replace the current
partial MODIFIED section with the complete original requirement header plus
every previous scenario and then apply the new edits (ensuring "Agents still
work independently" remains and that rules reference CONCLAUDE_AGENT and
CONCLAUDE_SKILL and the CLI behavior for "conclaude init" is preserved), or
convert this change to an ADDED requirement if it represents a new orthogonal
capability; locate the "Agent Frontmatter Hook Injection" requirement and update
it accordingly so the spec shows the original text unchanged except for the
intended addition.
🧹 Nitpick comments (1)
src/main.rs (1)
542-576: Consider extracting a shared discovery helper.
discover_command_files,discover_skill_files, anddiscover_agent_filesare nearly identical. A generic helper could reduce duplication:fn discover_markdown_files(dir: &Path) -> Result<Vec<PathBuf>> { ... }This is a minor improvement and can be deferred.
| | `showCommand` | `boolean | null` | `true` | Whether to show the command being executed to the user and Claude | | ||
| | `showStderr` | `boolean | null` | `null` | Whether to show the command's standard error output to the user and Claude | | ||
| | `showStdout` | `boolean | null` | `null` | Whether to show the command's standard output to the user and Claude | | ||
| | `skill` | `string | null` | `null` | Optional skill pattern to scope this command to specific skills (e | |
There was a problem hiding this comment.
Fix truncated description and escape pipe character in type column.
The description is cut off at "(e" and the unescaped | in string | null creates an extra table column (flagged by markdownlint MD056). Escape the pipe or use backticks consistently, and complete the description.
📝 Suggested fix
-| `skill` | `string | null` | `null` | Optional skill pattern to scope this command to specific skills (e |
+| `skill` | `string \| null` | `null` | Optional skill pattern to scope this command to specific skills (e.g., `test*`) |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `skill` | `string | null` | `null` | Optional skill pattern to scope this command to specific skills (e | | |
| | `skill` | `string \| null` | `null` | Optional skill pattern to scope this command to specific skills (e.g., `test*`) | |
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 56-56: Table column count
Expected: 4; Actual: 5; Too many cells, extra data will be missing
(MD056, table-column-count)
🤖 Prompt for AI Agents
In `@docs/src/content/docs/reference/config/subagent-stop.md` at line 56, The
table row for the `skill` field is truncated and contains an unescaped pipe in
the type column (`string | null`) that breaks the Markdown table; update the
`skill` row so the type column escapes the pipe (e.g., use `string \| null` or
wrap the entire type in backticks) and restore the full description text
(complete the parenthetical that starts with "(e", e.g., "(e.g. to restrict the
command to specific skills)"), ensuring the table columns remain correctly
aligned.
| ``` | ||
| User: "Build a React todo app" | ||
|
|
||
| YOU (Orchestrator): | ||
| 1. Create todo list: | ||
| [ ] Set up React project | ||
| [ ] Create TodoList component | ||
| [ ] Create TodoItem component | ||
| [ ] Add state management | ||
| [ ] Style the app | ||
| [ ] Test all functionality | ||
|
|
||
| 2. Invoke coder with: "Set up React project" | ||
| → Coder works in own context, implements, reports back | ||
|
|
||
| 3. Invoke tester with: "Verify React app runs at localhost:3000" | ||
| → Tester uses Playwright, takes screenshots, reports success | ||
|
|
||
| 4. Mark first todo complete | ||
|
|
||
| 5. Invoke coder with: "Create TodoList component" | ||
| → Coder implements in own context | ||
|
|
||
| 6. Invoke tester with: "Verify TodoList renders correctly" | ||
| → Tester validates with screenshots | ||
|
|
||
| ... Continue until all todos done | ||
| ``` | ||
|
|
||
| ## The Orchestration Flow | ||
|
|
||
| ``` | ||
| USER gives project | ||
| ↓ | ||
| YOU analyze & create todo list (TodoWrite) | ||
| ↓ | ||
| YOU invoke coder(todo #1) | ||
| ↓ | ||
| ├─→ Error? → Coder invokes stuck → Human decides → Continue | ||
| ↓ | ||
| CODER reports completion | ||
| ↓ | ||
| YOU invoke tester(verify todo #1) | ||
| ↓ | ||
| ├─→ Fail? → Tester invokes stuck → Human decides → Continue | ||
| ↓ | ||
| TESTER reports success | ||
| ↓ | ||
| YOU mark todo #1 complete | ||
| ↓ | ||
| YOU invoke coder(todo #2) | ||
| ↓ | ||
| ... Repeat until all todos done ... | ||
| ↓ | ||
| YOU report final results to USER | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Add language identifiers to fenced code blocks.
markdownlint MD040 flags missing languages for the two fences. Add text (or a more specific language if desired).
Proposed fix
-```
+```text
User: "Build a React todo app"
...
-```
+```
-```
+```text
USER gives project
↓
...
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 89-89: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 120-120: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In `@GEMINI.md` around lines 89 - 145, The two fenced code blocks in GEMINI.md
(the block starting with `User: "Build a React todo app"` and the block starting
with `USER gives project`) are missing language identifiers; update each opening
triple-backtick to include a language (e.g., change ``` to ```text or a more
specific language) so markdownlint MD040 is satisfied and the fences become
```text ... ```; no other content changes needed.
| ## MODIFIED Requirements | ||
|
|
||
| ### Requirement: Agent Frontmatter Hook Injection | ||
|
|
||
| The existing agent hook injection SHALL remain unchanged while command/skill injection is added. | ||
|
|
||
| #### Scenario: Agents still work independently | ||
|
|
||
| - **GIVEN** agent files with existing hooks using `--agent` flag | ||
| - **WHEN** `conclaude init` runs | ||
| - **THEN** agent hooks SHALL NOT be affected by skill injection | ||
| - **AND** agent-specific rules SHALL use `CONCLAUDE_AGENT` env var | ||
| - **AND** skill-specific rules SHALL use `CONCLAUDE_SKILL` env var |
There was a problem hiding this comment.
MODIFIED requirement must include the full prior requirement text and scenarios.
Right now this reads like a partial delta. Please copy the entire existing requirement (header + all scenarios) and edit it, or switch to ADDED if this is a new orthogonal capability.
Based on learnings: “When using MODIFIED for delta specs, copy the entire existing requirement (header + all scenarios) and edit it; do not use partial deltas that drop previous details.”
🤖 Prompt for AI Agents
In `@spectr/changes/add-slash-command-skill-hooks/specs/initialization/spec.md`
around lines 7 - 19, The MODIFIED requirement block "Agent Frontmatter Hook
Injection" is incomplete and must include the full prior requirement text and
all existing scenarios rather than a partial delta; either replace the current
partial MODIFIED section with the complete original requirement header plus
every previous scenario and then apply the new edits (ensuring "Agents still
work independently" remains and that rules reference CONCLAUDE_AGENT and
CONCLAUDE_SKILL and the CLI behavior for "conclaude init" is preserved), or
convert this change to an ADDED requirement if it represents a new orthogonal
capability; locate the "Agent Frontmatter Hook Injection" requirement and update
it accordingly so the spec shows the original text unchanged except for the
intended addition.
|
@greptile |
1 similar comment
|
@greptile |
Resolves merge conflicts by accepting main's implementation from PR #235, which superseded the older approach in this branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 469-470: Docs and implementation disagree on the skill env var
name: README uses CONCLAUDE_SKILL while src/hooks.rs (function
build_skill_start_env_vars()) exports CONCLAUDE_SKILL_NAME; make them consistent
by choosing one name and updating the other. Either change the exported constant
in src/hooks.rs from CONCLAUDE_SKILL_NAME to CONCLAUDE_SKILL (and update any
references to that constant), or update README to document CONCLAUDE_SKILL_NAME;
ensure build_skill_start_env_vars() and any consumers use the chosen symbol and
run tests or search to update all references.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| - **Environment Variable**: Hook handlers receive the current skill name via `CONCLAUDE_SKILL`. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify documented vs implemented skill env variable names.
set -euo pipefail
echo "== README mentions =="
rg -n "CONCLAUDE_SKILL(_NAME)?|--skill" README.md -C 1
echo
echo "== Implementation mentions =="
rg -n "CONCLAUDE_SKILL(_NAME)?|build_skill_start_env_vars|env_vars.insert" src/hooks.rs -C 2
echo
echo "Expected:"
echo "- Either runtime exports CONCLAUDE_SKILL consistently,"
echo "- or README should document CONCLAUDE_SKILL_NAME where applicable."Repository: connerohnesorge/conclaude
Length of output: 11079
Align skill environment variable naming between docs and implementation.
README (lines 469–470 and 1289–1290) documents the skill name environment variable as CONCLAUDE_SKILL, but src/hooks.rs exports CONCLAUDE_SKILL_NAME in the build_skill_start_env_vars() function (lines 2498–2501). Update either the documentation or the code to use a consistent name.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 469 - 470, Docs and implementation disagree on the
skill env var name: README uses CONCLAUDE_SKILL while src/hooks.rs (function
build_skill_start_env_vars()) exports CONCLAUDE_SKILL_NAME; make them consistent
by choosing one name and updating the other. Either change the exported constant
in src/hooks.rs from CONCLAUDE_SKILL_NAME to CONCLAUDE_SKILL (and update any
references to that constant), or update README to document CONCLAUDE_SKILL_NAME;
ensure build_skill_start_env_vars() and any consumers use the chosen symbol and
run tests or search to update all references.
This implements the 'add-slash-command-skill-hooks' proposal.
Summary by CodeRabbit
Release Notes
New Features
--skillflagDocumentation