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 skills add divinevideo/divine-mobile --skill git-worktree-precommit-hook-flutter-failuregit clone --depth 1 https://github.com/divinevideo/divine-mobileWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/divinevideo/divine-mobile/git-worktree-precommit-hook-flutter-failure)<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/git-worktree-precommit-hook-flutter-failure"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/git-worktree-precommit-hook-flutter-failure/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/divinevideo/divine-mobile/git-worktree-precommit-hook-flutter-failure"><img src="https://agentmods.dev/badge/skills/divinevideo/divine-mobile/git-worktree-precommit-hook-flutter-failure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What 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.1 | $0.00153 | $0.01023 |
| Opus 5.5 | $0.00061 | $0.00409 |
| Sonnet 5.5 | $0.00031 | $0.00205 |
| Haiku 4.5 | $0.00015 | $0.00102 |
Grade A, and why
git-worktree-precommit-hook-flutter-failure 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 1mo 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Git Worktree Pre-Commit Hook Flutter Failure
Problem
When using git worktree for parallel development, pre-commit hooks that run
flutter analyze fail during git commit even though:
- Running
flutter analyzedirectly in the worktree passes with no issues - Running the pre-commit hook script manually passes
- The hook passes in the main repo checkout
Root Cause
Git sets GIT_DIR, GIT_INDEX_FILE, and GIT_WORK_TREE environment variables
during hook execution. In a worktree, GIT_DIR points to
.git/worktrees/<name>/ instead of .git/. When flutter analyze internally
runs flutter pub get, pub chokes on this worktree-style GIT_DIR path and
fails to resolve dependencies.
The failure is invisible when the hook uses 2>/dev/null on stderr — you only
see "Resolving dependencies..." then the failure message, with the actual error
suppressed.
Context / Trigger Conditions
- Using
git worktree addfor parallel branch development - Pre-commit hook runs
flutter analyzeordart analyze - Hook output shows "Resolving dependencies..." then immediately fails
- No actual analysis errors are reported
- The hook uses
set -e(exit on error) 2>/dev/nullmay hide the actual failure cause
Diagnosis
Reproduce the exact failure by simulating git's hook environment:
# This will FAIL (simulates hook execution in worktree)
GIT_DIR=/path/to/main/.git/worktrees/<name> \
flutter analyze --no-fatal-infos 2>/dev/null
# This will PASS (without git env vars)
flutter analyze --no-fatal-infos
Solution
Add unset GIT_DIR GIT_INDEX_FILE GIT_WORK_TREE to the pre-commit hook
after all git commands but before any flutter/dart commands.
#!/bin/bash
set -e
cd "$(git rev-parse --show-toplevel)/mobile"
# Git operations (these NEED the git env vars)
STAGED_DART_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.dart$' || true)
if [ -z "$STAGED_DART_FILES" ]; then
echo "No Dart files staged, skipping checks"
exit 0
fi
# Unset git env vars BEFORE running flutter/dart commands.
# Git sets these during hook execution, and flutter pub get
# (called internally by flutter analyze) chokes on worktree-style
# GIT_DIR paths.
unset GIT_DIR GIT_INDEX_FILE GIT_WORK_TREE
# Now flutter/dart commands work in both main repo and worktrees
dart format --output=none --set-exit-if-changed lib test
flutter analyze --no-fatal-infos
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.
- 1mo ago First seen · 104 lines · 153 tokens per session scan A 10c5120e4cdc
git-worktree-precommit-hook-flutter-failure is a skill published in the GitHub repository divinevideo/divine-mobile (264 stars, last pushed today), licensed MPL-2.0. It adds 153 tokens to every session and 1,023 once invoked, about $0.0006 per session on Opus 5.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-09-03.
Other skills, from other repositories
git-advanced-workflows
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
enable-check-includes-strict
Enable and migrate Chromium targets and directories to checkincludesstrict = true, diagnosing and resolving header include violations as part of the checkincludesstrict LSC. Use when adding directories to the allowlist, enabling strict header checks on targets, or resolving CHECKINCLUDESSTRICTUNTRIAGED targets.
resolve-publish
Commit the validated fix and follow local-only, workflow-owned, or direct PR publication.
gsd-audit-fix
Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit.
fix-issue
Fixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to…
stage-payload-reverts
Create TRT JIRA bugs, open revert PRs, and trigger payload jobs for high-confidence revert candidates.