Skip to content
Research
Hook

Hooks

What synthadoc runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
synthadoc
2k10 skills1 hook

Claude Code

$ npx -y skills add axoviq-ai/synthadoc --agent claude-code

Where it lives

  • hooks/git-auto-commit.pyGitHub
    Read the script
    #!/usr/bin/env python3
    """
    Hook: git-auto-commit
    Event: on_ingest_complete
    Description: Commits wiki changes to a local git repo after every successful ingest.
    Dependencies: git (must be installed; wiki root must be a git repository)
    
    Setup:
      1. Copy this script to your wiki root:
           cp hooks/git-auto-commit.py /path/to/your/wiki/
    
      2. Initialise git in the wiki root (one-time, skip if already a repo):
           cd /path/to/your/wiki
           git init
           git add .
           git commit -m "init: initial wiki snapshot"
    
      3. Add to .synthadoc/config.toml:
           [hooks]
           on_ingest_complete = "python git-auto-commit.py"
    
      4. Restart the server:
           synthadoc serve -w <wiki-name>
    
    After each ingest you will find a new commit in `git log` with a message like:
      wiki: ingest report.pdf → created alan-turing, updated computing-history
    """
    import json
    import os
    import subprocess
    import sys
    
    
    def main() -> None:
        ctx = json.load(sys.stdin)
    
        wiki_root   = ctx.get("wiki", ".")
        source      = ctx.get("source", "unknown")
        created     = ctx.get("pages_created", [])
        updated     = ctx.get("pages_updated", [])
    
        # Build a meaningful commit message from the ingest result
        parts = []
        if created:
            parts.append(f"created {', '.join(created)}")
        if updated:
            parts.append(f"updated {', '.join(updated)}")
        summary = "; ".join(parts) if parts else "no page changes"
    
        source_name = os.path.basename(source)
        msg = f"wiki: ingest {source_name} → {summary}"
    
        # Stage all changes under wiki/
        subprocess.run(
            ["git", "-C", wiki_root, "add", "wiki/"],
            check=True,
            capture_output=True,
        )
    
        # Commit — tolerate "nothing to commit" gracefully
        result = subprocess.run(
            ["git", "-C", wiki_root, "commit", "-m", msg],
            capture_output=True,
            text=True,
        )
    
        if result.returncode == 0:
            # Print the short commit hash so it appears in the server log
            first_line = result.stdout.strip().splitlines()[0] if result.stdout.strip() else ""
            print(f"git-auto-commit: {first_line}", file=sys.stderr)
        elif "nothing to commit" in (result.stdout + result.stderr):
            print("git-auto-commit: nothing to commit — skipped", file=sys.stderr)
        else:
            print(f"git-auto-commit error: {result.stderr.strip()}", file=sys.stderr)
            sys.exit(1)
    
    
    if __name__ == "__main__":
        main()
    

Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.

@axoviq-ai
Ships withsynthadoc

Document version: v1.5.3 Engineered for solo users and enterprises alike, providing a domain-specific knowledge base that scales seamlessly while maintaining accuracy through autonomous self-optimization.

Stars on GitHub

Momentum

stars in total
2.0k
Star history of axoviq-ai/synthadoc on GitHub, a chart by star-history.com

More plugins that ship hooks.

academic-research-skills

academic-research-skil…

Helps researchers move a project through the academic pipeline, from literature search and citation handling to drafting, reviewing and checking a paper, with you confirming each stage. You stay the author of every claim.

42 agents+258k
@imbad0202@imbad0202
Install Plugin
science-superpowers

science-superpowers

Guides your AI research agent through a disciplined analysis workflow, from framing a question and planning the analysis before touching data, to investigating anomalies, running parallel checks and executing a pre-registered plan with review checkpoints.

16 skills1 hook373
@k-dense-ai@k-dense-ai
Install Plugin
co-researcher

co-researcher

Co-Researcher is an academic research plugin for Claude Code, Gemini CLI, OpenAI Codex and OpenCode. It runs literature reviews, systematic reviews, peer review and citation checks inside the AI assistant you already use.

15 skills+2139
@poemswe@poemswe
Install Plugin
research-council

research-council

A Claude Code plugin that orchestrates deep research across two coding agents, Claude Code and Codex CLI (OpenAI), running in parallel with cross-pollination refinement and final synthesis.

1 hook+1108
@hamelsmu@hamelsmu
Install Plugin

Questions about the hooks in synthadoc.

Which coding agents can use the hooks in synthadoc?
The hooks in synthadoc install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.