Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/christopher-buss/bedrock/worktree-addgit clone --depth 1 https://github.com/christopher-buss/bedrockWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00024 | $0.03987 |
| Opus 5 | $0.00012 | $0.01994 |
| Sonnet 5 | $0.00005 | $0.00797 |
| Haiku 4.5 | $0.00002 | $0.00399 |
Grade D, and why
worktree-add scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- prettier-ignore-start --> Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
<destination>${parent_path}/${branch_name}/.claude/settings.local.json</destination> This is a copy
91% identical to worktree-add — 80 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Setup
Create a new git worktree for branch: $ARGUMENTS
<current_state>
Current branch: git branch --show-current
Current worktrees: git worktree list
Remote branches: git branch -r
Uncommitted changes: git status --short
</current_state>
<execution_steps> <step_0> Ask user for setup mode How would you like to set up the worktree? Quick Just create the worktree (skip deps, settings, IDE) Full setup Install dependencies, copy settings, open in IDE <set_variable>$SETUP_MODE = user selection ("quick" or "full")</set_variable> Allow quick worktree creation when user just needs the branch </step_0>
<step_0b> Detect git hosting provider (only needed if argument is an issue URL) Only run this step if first argument looks like a git hosting URL <detect_provider> <check_remote_url>git remote get-url origin</check_remote_url> <identify_host> - github.com → Use gh CLI - gitlab.com → Use glab CLI - Other → Ask user which CLI tool to use </identify_host> <store_as>$GIT_HOST_CLI (e.g., "gh", "glab")</store_as> </detect_provider>
Detect git hosting provider and select appropriate CLI tool for issue lookup </step_0b>
<step_1> Detect current IDE environment Only if $SETUP_MODE is "full" <detection_methods> <method_1> mcp__ide__getDiagnostics <vs_code_insiders>Check for paths containing "Code - Insiders"</vs_code_insiders> <vs_code>Check for paths containing "Code/" or "Code.app"</vs_code> Check for paths containing "Cursor" Check for paths containing "Zed" </method_1> <method_2> <fallback_detection>Use which command to find available IDEs</fallback_detection> which code-insiders code zed cursor <priority_order>code-insiders > cursor > zed > code</priority_order> </method_2> </detection_methods> <set_variables> <ide_command>Detected command (code-insiders|code|zed|cursor)</ide_command> <ide_name>Human-readable name</ide_name> <supports_tasks>true for VS Code variants, false for others</supports_tasks> </set_variables> Automatically detect which IDE to use for opening the new worktree </step_1>
<step_2> Determine default branch and parse arguments <find_default_branch> git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' git remote show origin | grep 'HEAD branch' | cut -d: -f2 | tr -d ' ' <store_as>$DEFAULT_BRANCH (typically "main" or "master")</store_as> </find_default_branch> The user-provided arguments <expected_format>branch-name-or-issue-url [optional-base-branch]</expected_format> fix/issue-123-main-content-area-visually-clipped main <example_issue_url>https://github.com/owner/project/issues/123 main</example_issue_url> <base_branch>Use provided base branch, or $DEFAULT_BRANCH if not specified</base_branch> </step_2>
<step_2_5> Handle issue URLs from git hosting provider If first argument matches issue URL pattern (detected in step_0) <url_detection> Check if argument contains "github.com" and "/issues/" Check if argument contains "gitlab.com" and "/-/issues/" Check if argument contains "bitbucket.org" and "/issues/" </url_detection> <url_parsing> <github_pattern>https://github.com/{owner}/{repo}/issues/{issue_number}</github_pattern> <gitlab_pattern>https://gitlab.com/{owner}/{repo}/-/issues/{issue_number}</gitlab_pattern> <bitbucket_pattern>https://bitbucket.org/{owner}/{repo}/issues/{issue_number}</bitbucket_pattern> owner, repo, issue_number from URL </url_parsing> <fetch_issue_details> Use $GIT_HOST_CLI from step_0b (e.g., gh issue view, glab issue view) get issue details issue_number </fetch_issue_details> <generate_branch_name> <determine_type>Analyze issue title/labels to determine type (feat/fix/refactor/chore)</determine_type> {type}/issue-{issue_number}-{kebab-case-title} <kebab_case>Convert title to lowercase, replace spaces/special chars with hyphens</kebab_case> Always use lowercase for branch names Replace # with - (hash symbol not allowed in git branch names) Remove or replace other special characters: @, $, %, ^, &, *, (, ), [, ], {, }, , |, ;, :, ", ', <, >, ?, /, ~, ` Replace multiple consecutive hyphens with single hyphen Trim leading/trailing hyphens Limit total branch name to reasonable length (~60 chars) </generate_branch_name> <user_confirmation> Show generated branch name and ask for confirmation "Yes, proceed" or "No, exit" or "Edit branch name" <if_no>Exit command gracefully</if_no> <if_edit>Allow user to modify the branch name</if_edit> <if_yes>Continue with generated/modified branch name</if_yes> </user_confirmation> https://github.com/owner/project/issues/456 "Fix duplicate items in list view" fix/issue-456-duplicate-items-in-list-view </step_2_5>
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 344 lines · 24 tokens per session scan D 7bdc3f5aa6ff
worktree-add is a command published in the GitHub repository christopher-buss/bedrock (13 stars, last pushed 2d ago), licensed MIT. It adds 24 tokens to every session and 3,987 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (hidden instructions, reads agent configuration directories). It is 91% identical to worktree-add, differing in 80 lines, and is treated as a copy.
Other commands, from other repositories
sicario.verify
Run deterministic verification.
create-plan
Important: ALL phases must use checkmarks for their tasks. Each checkmark should correspond to a single commit. The checkmark should be marked - [x] in the same commit that completes the task. Phase tasks should be prefixed with parent phase number and letters (a, b, c, etc.).
sicario.controls
Generate or update docs/compliance/control-applicability.md.
sicario.assess
Assess the repository against SicarioSpec guardrails.
sicario.init
Initialize SicarioSpec files in the current repository.
sicario.review
Review the active spec, plan, tasks, staged changes, or branch for security and governance gaps.