hook-install

A command that installs a Git pre-push hook, a script Git runs before sending changes to a remote repository. The hook automatically syncs pushed commits to Avos Memory.

In plain words
What is it for?
Use it to install or force-reinstall automatic commit syncing for a repository.
Why use it?
It removes the need to remember to sync commits manually after pushing, so teammates can query newly pushed work in Avos Memory.

Command

Install

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.

agentmods
npx agentmods add commands/avos-lab/git-aware-coding-agent/hook-install
Clone the repo
git clone --depth 1 https://github.com/Avos-Lab/git-aware-coding-agent
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00423
Opus 5 $0.00000 $0.00211
Sonnet 5 $0.00000 $0.00085
Haiku 4.5 $0.00000 $0.00042

Measured yesterday against content hash 000dc9800204, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hook-install 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 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.

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.

docs/user/commands/hook-install.md · 69 lines

What it actually says

avos hook-install

Install a git hook for automatic commit sync on push. When installed, every git push automatically syncs pushed commits to Avos Memory, enabling real-time team synchronization.

Usage

avos hook-install [--force]

Options

Option Description
--force, -f Overwrite existing pre-push hook

How It Works

  1. Installs a pre-push hook in .git/hooks/
  2. On every git push, the hook extracts commits being pushed
  3. Commits are synced to Avos Memory using the same format as avos ingest
  4. Team members can immediately query the new commits via avos ask

Examples

# Install the hook (one-time setup)
avos hook-install

# Force reinstall if a hook already exists
avos hook-install --force

Team Workflow

# Developer A pushes commits
git commit -m "feat: add login"
git push origin main
# [avos] Synced 1 commit(s) to memory

# Developer B can immediately query
avos ask "what was just pushed?"
# Shows Developer A's commit

Uninstalling

To remove the hook:

avos hook-uninstall

Or manually delete .git/hooks/pre-push.

Troubleshooting

  • CONFIG_NOT_INITIALIZED: Run avos connect org/repo first.
  • Hook already exists: Use --force to overwrite, or manually integrate avos hook-sync into your existing hook.
  • Commits not syncing: Ensure AVOS_API_KEY is set in your environment.

Technical Details

  • The hook uses pre-push (runs before data transfer to remote)
  • Commits are deduplicated using the same hash store as avos ingest
  • The hook never blocks git push - errors are logged but push continues
  • Works with git worktrees
Changes

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.

  1. yesterday First seen · 69 lines · 0 tokens per session scan A 000dc9800204

Subscribe to this mod's changes

hook-install is a command published in the GitHub repository Avos-Lab/git-aware-coding-agent (2 stars, last pushed 4mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 423 tokens. 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.