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 skills/cdbattags/ai/submodule-worktreenpx skills add cdbattags/ai --skill submodule-worktreegit clone --depth 1 https://github.com/cdbattags/aiWhat 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.00062 | $0.01131 |
| Opus 5 | $0.00031 | $0.00566 |
| Sonnet 5 | $0.00012 | $0.00226 |
| Haiku 4.5 | $0.00006 | $0.00113 |
Grade A, and why
submodule-worktree scanned grade A with 0 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 2d ago.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Submodule & Repo Worktree Management
Worktrees let you check out multiple branches simultaneously — each worktree is a separate directory backed by the same .git store. This skill handles worktrees for both the top-level repo and any submodules within it.
Layout
workspace/
├── worktrees/ # All worktrees (gitignored)
│ ├── _root/ # Top-level repo worktrees
│ │ └── feature-something/ # branch: feature/something
│ ├── my-submodule/ # Submodule worktrees (by basename)
│ │ └── feature-branch/ # branch: feature/branch
│ └── another-submodule/
│ └── fix-bug/
Script
All operations use the portable script shipped with this skill:
WORKTREE_SH="$HOME/.cursor/skills/submodule-worktree/scripts/worktree.sh"
Run it from anywhere inside the workspace.
First-time setup
The script auto-detects the git root and submodules. You only need to ensure:
worktrees/is in the workspace.gitignore- Submodules are initialized (
git submodule update --init)
echo 'worktrees/' >> .gitignore
git submodule update --init --recursive
Create a worktree
# Top-level repo worktree
$WORKTREE_SH add _root feature/my-branch
# Submodule worktree (use submodule basename, not full path)
$WORKTREE_SH add mdxjs-rs feature/vite-plugin
# Explicitly create a new branch
$WORKTREE_SH add mdxjs-rs feature/new-thing --new
# Base a new branch off a specific ref
$WORKTREE_SH add mdxjs-rs feature/speed-up --base main
# Combine flags
$WORKTREE_SH add mdxjs-rs hotfix/urgent --new --base v2.1.0
List active worktrees
# All targets with worktrees
$WORKTREE_SH list
# Specific target
$WORKTREE_SH list mdxjs-rs
$WORKTREE_SH list _root
Remove a worktree
$WORKTREE_SH remove mdxjs-rs feature/vite-plugin
$WORKTREE_SH remove _root feature/my-branch
Status overview
$WORKTREE_SH status
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago First seen · 141 lines · 62 tokens per session scan A 3d2db4eaaa1b
submodule-worktree is a skill published in the GitHub repository cdbattags/ai (4 stars, last pushed 6mo ago), licensed MIT. It adds 62 tokens to every session and 1,131 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
android-feature
Workflow for implementing a new Android feature, screen, fragment, activity, dialog, adapter, or enhancement in this XML/MVVM template. Use whenever the user asks to add, build, implement, or extend functionality — before writing any code. Covers planning, the MVVM/MVI skeleton, the Android configuration checklist…
template-helpers
Catalog of the reusable building blocks shipped with this Android template — BaseActivity/BaseFragment, the helpers/ extension files (navigation, lifecycle, toast, snackbar, dialogs, images, permissions, theme, locale, settings intents, date, delay), common/ (Firebase, network, observers), and…
android-new-project
Workflow for turning a fresh copy of this Android template into a new app — renaming the package/namespace/applicationId, branding (icons, splash, palette, fonts), Firebase setup, signing config, stripping unused sample screens, and verifying the foundation. Use when the user says they are starting a new app…
android-preflight
Final verification checklist to run before declaring Android work finished — build, both themes, string resources, lifecycle and leak risks, registered permissions and components, resource parity between values and values-night, and honest reporting of what was and was not verified. Use at the end of any feature, fix…
android-ui-theming
Rules for Android XML layouts, Material 3 components, semantic color tokens, light/dark theming, dimensions (sdp/ssp), string resources and localization, accessibility, and edge-to-edge insets. Use when creating or editing any layout, drawable, style, color, vector, or string resource, or when a screen must work in…
android-upgrade
Workflow for changing an existing working Android project — upgrading dependencies, AGP/Gradle or SDK levels, migrating deprecated APIs, refactoring, and fixing bugs, without breaking what already works. Covers baseline verification, scoping the diff, targetSdk behaviour changes, SharedPreferences/Room data…