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_SLUGCONTEXT_LINKS_LINEAR_TEAM_KEYSCONTEXT_LINKS_LINEAR_ISSUE_REGEXCONTEXT_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.configif present - Confirm fallback to built-in defaults
- Delete
/kramme:hooks:configure-links KEY=VALUE [KEY=VALUE ...]:- Upsert each supported key into
hooks/context-links.config - Preserve unrelated comments/lines where practical
- Upsert each supported key into
Argument Rules
- Parse
$ARGUMENTSby spaces. - Recognize
showandresetas exclusive commands. - Treat remaining tokens with
=asKEY=VALUEupdates. - Reject unknown keys with a clear message and list of supported keys.
Update Workflow
- Ensure
${CLAUDE_PLUGIN_ROOT}/hooks/context-links.configexists:- If missing and template exists, copy from
.example. - If template missing, create file with a short header comment.
- If missing and template exists, copy from
- 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
showbehavior first. - Prompt user for 1-4 updates in
KEY=VALUEformat (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
resetis used, confirm the hook will use defaults fromhooks/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.