| name | krammehooksconfigure-links |
| description | Configure the context-links hook by updating hooks/context-links.config with workspace, team key, issue regex, and GitLab remote regex overrides. Use when end users want to set up or change context-links behavior without manually editing files. Use when this capability is needed. |
| metadata | {"author":"abildtoft"} |
Configure Context Links
Configure the context-links hook using a local config file:
- File:
${CLAUDE_PLUGIN_ROOT}/hooks/context-links.config
- Template:
${CLAUDE_PLUGIN_ROOT}/hooks/context-links.config.example
- Git status: ignored by
.gitignore (local-only overrides)
Supported Keys
CONTEXT_LINKS_LINEAR_WORKSPACE_SLUG
CONTEXT_LINKS_LINEAR_TEAM_KEYS
CONTEXT_LINKS_LINEAR_ISSUE_REGEX
CONTEXT_LINKS_GITLAB_REMOTE_REGEX
Usage
-
/kramme:hooks:configure-links:
- Create config from example if missing
- Show current values
- Ask which values to update, then apply changes
-
/kramme:hooks:configure-links show:
- Show current config file content and effective values from supported keys
-
/kramme:hooks:configure-links reset:
- Delete
hooks/context-links.config if present
- Confirm fallback to built-in defaults
-
/kramme:hooks:configure-links KEY=VALUE [KEY=VALUE ...]:
- Upsert each supported key into
hooks/context-links.config
- Preserve unrelated comments/lines where practical
Argument Rules
- Parse
$ARGUMENTS by spaces.
- Recognize
show and reset as exclusive commands.
- Treat remaining tokens with
= as KEY=VALUE updates.
- Reject unknown keys with a clear message and list of supported keys.
Update Workflow
- Ensure
${CLAUDE_PLUGIN_ROOT}/hooks/context-links.config exists:
- If missing and template exists, copy from
.example.
- If template missing, create file with a short header comment.
- For each
KEY=VALUE:
- Escape value safely for shell replacement.
- If key exists (commented or uncommented), replace the line with
KEY="VALUE".
- If key does not exist, append
KEY="VALUE" at end of file.
- Print final config file content.
- Confirm changes are active immediately for the hook.
Interactive Mode (No Arguments)
If no arguments are provided:
- Run
show behavior first.
- Prompt user for 1-4 updates in
KEY=VALUE format (or blank to cancel).
- Apply updates with the same upsert workflow.
Output Expectations
- Report:
- config file path
- keys changed
- keys unchanged
- keys rejected (if any)
- When
reset is used, confirm the hook will use defaults from hooks/context-links.sh.
Examples
/kramme:hooks:configure-links show
/kramme:hooks:configure-links CONTEXT_LINKS_LINEAR_WORKSPACE_SLUG=acme
/kramme:hooks:configure-links CONTEXT_LINKS_LINEAR_TEAM_KEYS=ENG,OPS,PLAT
/kramme:hooks:configure-links CONTEXT_LINKS_GITLAB_REMOTE_REGEX=git\\.example\\.com
/kramme:hooks:configure-links reset
Converted and distributed by TomeVault — claim your Tome and manage your conversions.