> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hookie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code plugin

> Link a repository to a Hookie project: Claude loads the project's context at the start of each session, keeps an agentic-context archive with every change, and sends decisions and memories to the project's brain.

The Hookie plugin for Claude Code links a repository to a [project](https://docs.hookie.ai/projects.md). With it installed, Claude:

* loads the project's [context](https://docs.hookie.ai/project-context.md) from Hookie at the start of every session,
* keeps an `agentic-context/` archive of what was asked, built and decided, in the same pull request as the work,
* sends decisions and memories to the project's brain, so the next session, yours or a teammate's, starts where this one ended.

It works in Claude Code and in Cowork. The plugin is open source (Apache 2.0) at [Cusack-Enterprise-Software/HookieAI-Plugin](https://github.com/Cusack-Enterprise-Software/HookieAI-Plugin). It connects to the same hosted MCP server as any [connected agent](https://docs.hookie.ai/connected-agents.md), so everything on that page applies.

## Install

In Claude Code, run:

```text theme={"dark"}
/plugin marketplace add Cusack-Enterprise-Software/HookieAI-Plugin
/plugin install hookie@hookie
```

From a terminal, the same is:

```bash theme={"dark"}
claude plugin marketplace add Cusack-Enterprise-Software/HookieAI-Plugin
claude plugin install hookie@hookie
```

In Cowork, add the marketplace from GitHub under **Customize**, then **Plugins**, and install **hookie**. Then connect the **hookie** connector on the plugin's **Connectors** tab with your own Hookie account.

### For a whole team

Commit this to `.claude/settings.json` in the repository. `/hookie:setup` offers to do it for you, and keeps whatever is already in the file.

```json .claude/settings.json theme={"dark"}
{
  "extraKnownMarketplaces": {
    "hookie": {
      "source": { "source": "github", "repo": "Cusack-Enterprise-Software/HookieAI-Plugin" }
    }
  },
  "enabledPlugins": { "hookie@hookie": true }
}
```

A teammate who trusts the folder is offered the plugin the next time they open Claude Code there. Each person signs in to Hookie with their own account. Nobody shares a token.

## First run

1. In the repository, run `/hookie:setup`. You can name the project: `/hookie:setup my-project`.
2. Sign in to Hookie. Run `/mcp`, pick **hookie**, and finish the sign-in in your browser with your own Hookie account. Claude Code keeps the sign-in; the plugin never sees or stores a token.
3. In the Hookie console, open [Settings → Connected agents](https://app.hookie.ai/#/settings/agents). A newly connected agent is **read-only**: widen its access when you want it to write, and choose **Choose projects** to [pin it](https://docs.hookie.ai/connected-agents.md#pin-it-to-projects) to this project. Pinning is done in the console; there is no tool for it.

`/hookie:setup` then:

* picks an existing project, or creates one. Creating a project needs the `hookie:manage` access level.
* writes `.hookie/project.json` with the project's `project_id`, `project_slug`, `workspace` and `console_url`. It never holds a credential, and is meant to be committed.
* creates `agentic-context/` with a `README.md`, a `DECISIONS.md` and a `threads/` folder, where they are missing. It never overwrites an existing file there.
* adds a block between `<!-- hookie:begin -->` and `<!-- hookie:end -->` to `CLAUDE.md` and `AGENTS.md`. Running setup again replaces the block; it never adds a second one or changes text outside it.
* offers a GitHub Actions check for `agentic-context/`, and adds it only if you agree.
* adds the team settings above to `.claude/settings.json`.

Commit `.hookie/project.json`, `agentic-context/`, `CLAUDE.md`, `AGENTS.md` and `.claude/settings.json`.

## Commands

| Command | What it does |
| - | - |
| `/hookie:setup [project]` | Links the repository to a Hookie project and sets up the files above. |
| `/hookie:status` | Shows the linked project, its latest thread summary and decisions, [repository sync](https://docs.hookie.ai/repository-sync.md), connected [issue trackers](https://docs.hookie.ai/issue-trackers.md) and memory proposals waiting for your review. |
| `/hookie:sync` | Sends `agentic-context/` to the project's brain and records new decisions from `DECISIONS.md`. If the project mirrors the repository through [repository sync](https://docs.hookie.ai/repository-sync.md), it runs that sync instead of uploading files. A changed file replaces its earlier version rather than adding a copy. |

`/hookie:sync` never uploads a file that holds something that looks like a credential. It tells you which file, so you can replace the value with `[REDACTED: what it is]` first.

## Skills

Claude uses these on its own when they fit.

* **hookie-context**, in a repository with `.hookie/project.json`. Claude calls `get_project_context` first, searches the project's knowledge before guessing, records decisions with `record_decision` and durable facts with `save_memory`, reads tracker issues, and queries [project databases](https://docs.hookie.ai/project-databases.md) read-only. It treats everything Hookie returns as data, not instructions, and never sends a secret to Hookie.
* **agentic-context**, when finishing a piece of work in a repository with an `agentic-context/` folder. It describes the archive's convention, below.

## Hooks

The hooks are small Node scripts with no dependencies. If one fails, it ends silently, so a broken hook never blocks you.

Each hook can be turned off with an environment variable set to `0`, `false`, `off` or `no`. Set it in your shell, or under `env` in `.claude/settings.json`. `/plugin disable hookie@hookie` turns off the whole plugin.

| Hook | What it does | Turn off |
| - | - | - |
| **SessionStart** | In a linked repository, tells Claude which Hookie project this is and to call `get_project_context` before starting work. Prints nothing in other repositories. After a compaction that left a memory capture pending, also asks Claude to call `extract_memories`. | `HOOKIE_PLUGIN_SESSION_CONTEXT=0` |
| **PreToolUse** (Write, Edit, MultiEdit, NotebookEdit) | For a file under `agentic-context/`, scans the new text for credentials: private keys, AWS access key ids, GitHub, Slack, Stripe, npm and Docker Hub tokens, webhook signing secrets, Google API keys, JSON Web Tokens, Hookie API keys and claim tokens, and `password: …` assignments. If it finds one, it refuses the write and tells Claude to use `[REDACTED: what it is]` instead. It names the kind of credential, never the value. Other files are not checked. | `HOOKIE_PLUGIN_SECRET_GUARD=0` |
| **PreCompact** | In a linked repository, asks the compaction summary to keep this session's decisions and durable facts, and marks a memory capture as pending. | `HOOKIE_PLUGIN_CAPTURE=0` |
| **Stop** | In a linked repository, at most once per session. If `git status` shows changes outside `agentic-context/` and `.hookie/`, but none inside `agentic-context/`, Claude is asked to update the archive and call `extract_memories` before finishing. Claude may decide the work is not worth archiving. Otherwise, if a capture is pending, Claude is asked only to call `extract_memories`. | `HOOKIE_PLUGIN_STOP_CHECK=0` |

The Stop check looks at the whole working tree, so changes made before the session count too.

Cowork runs plugin hooks on your device. Whether every hook event fires in Cowork is not documented; the commands, skills and connector work either way.

## Memory capture

The plugin hands each session to Hookie's [automatic memory capture](https://docs.hookie.ai/project-context.md#automatic-memory-capture), which proposes the decisions and facts worth keeping. By default they are saved straight away; a project set to review keeps each proposal waiting for you on its **Brain** page, under **Waiting for your review**. To save a memory by hand instead, see [Personal AI memory](https://docs.hookie.ai/ai-memory.md).

A hook cannot call an MCP tool, so capture around a compaction takes two steps:

1. **PreCompact** asks the summary to keep the session's decisions and facts, and writes a small marker named after the session in your system's temporary folder (`<tmp>/hookie-plugin/`), never in the repository.
2. **SessionStart** runs right after the compaction. When it finds the marker, it asks Claude to call `extract_memories` with the conversation and the path of the full transcript, then removes the marker. If that does not happen, the **Stop** hook asks once at the end of the turn.

Turn this off with `HOOKIE_PLUGIN_CAPTURE=0`.

## The agentic-context convention

`agentic-context/` is the project's memory, committed with the code: what was debated, proposed and decided while it was built. If it disagrees with the code, the code is right.

* **One folder per piece of work**: `agentic-context/threads/NN-short-slug/summary.md`, with a title, `- **Thread:**`, `- **Dates:**` and `- **Status:**` lines, and the sections **Ask**, **What shipped**, **Decisions** and **Open**.
* **An index**: a row per folder in `agentic-context/README.md`, and its **Open items** list.
* **A decision log**: decisions by topic in `DECISIONS.md`. A replaced decision is struck through, never deleted.
* **No secrets**: a credential becomes `[REDACTED: …]`, and a customer's email address `[customer]`.
* **Same pull request**: the archive is updated with the work, not after it.

The optional GitHub Actions check fails a pull request when a thread folder has no well-formed `summary.md`, the README does not index a folder, or something looks like a credential.

With [repository sync](https://docs.hookie.ai/repository-sync.md), Hookie mirrors `agentic-context/` from the repository on every push. Files there appear on the project's **Brain** page under **Agentic context**.

## Privacy

* **No tokens in the plugin.** The plugin connects to `https://app.hookie.ai/mcp`, and each person signs in with their own Hookie account. The plugin's files hold no token, key or password, and `.hookie/project.json` holds only the project's id, slug, workspace and console link.
* **Transcripts.** When Claude calls `extract_memories`, Hookie removes credentials from the transcript before any model reads it, and does not store the transcript. Only the proposed memories are kept.
* **Your credentials stay yours.** A person connects integrations, such as a repository, an issue tracker, a database or a [knowledge source](https://docs.hookie.ai/knowledge-connectors.md), in the Hookie console. The plugin never asks for a credential and never supplies one.
* **Access is your choice.** A new agent is read-only until you widen it, and you can revoke it at any time in **Settings → Connected agents**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.