Source: https://learn-ai.digitalbricks.io/part-0/staying-safe
Summary: What a plugin, a connector and a hook can do on your computer, and the few checks to make before you install one.

# Staying Safe

## TLDR

Claude Code can be extended with things other people wrote. Each one is useful. Each one also runs on your computer with your permissions. Before you install any of them:

- Install from the author's own page only. Check the name letter for letter.
- Read what it will run, or ask Claude to read it for you.
- Keep the number small. Every connector takes space in every conversation.
- Never let a key or password end up in a file that's committed.

Claude asks before it does most things. An extension you installed doesn't have to.

---

## The three kinds of extension

**A plugin** is a bundle you install in one go. It can contain skills, commands, extra agents, connectors and hooks. Some have hundreds of pieces. The popular ones are shared on GitHub and installed with one command.

**A connector** (an MCP server) gives Claude tools for one outside thing: your calendar, a database, a visual app builder. NodeGX is one. Each connector sends Claude its list of tools at the start of every conversation.

**A hook** is a command that runs by itself at a set moment, such as before Claude edits a file. It doesn't ask. [Hooks](https://learn-ai.digitalbricks.io/part-5/hooks) shows how to write your own. The point here is that a plugin can bring its own.

---

## Before you install

**Check the source.** A plugin is installed from a GitHub address or a package name. Get it from the author's own repository or their own page, not from a link in a video or a post. Copies of popular projects get uploaded under similar names. A copy can contain anything. If the name in the install command isn't exactly the one on the author's page, stop.

**Read what runs.** A plugin's hooks are in a file called `hooks.json` in its repository. Open it. If you can't read it, paste it to Claude:

```text
Here is the hooks file of a plugin I'm thinking of installing. Tell me, in plain English, what commands it would run on my computer, when, and whether any of them send data anywhere.
```

Do the same for any script the install instructions tell you to run.

**After installing, look.** `/plugin` lists what's installed. `/hooks` lists every hook that's active and where it came from. Make a habit of looking at both after you install anything.

---

## Keep the number small

Every connector adds its tools to every conversation, in every project, whether or not that project uses them. Ten connectors can take a large share of the space Claude has to think in before you've typed a word. The signs are a Claude that forgets things mid-task and a conversation that compacts early.

Turn on a connector when a project needs it. Turn it off when it doesn't. If Claude feels slow or forgetful, type `/context` and look at what's taking the space.

---

## Keys and passwords

A connector often needs a key to log in to the service behind it. Where that key is written matters.

- Your personal connectors are recorded in a file in your home folder, `~/.claude.json`. It's yours and it stays on your computer.
- A project connector is recorded in `.mcp.json` inside the project folder. That file is usually committed, which means it goes to GitHub with the rest. Never put a key in it. Put the key in a `.env` file that's listed in `.gitignore`, and have the connector read it from there.

Don't paste a password into a conversation either. Claude doesn't need it. The conversation is also saved.

If a key has been committed, treat it as public. Change the key at the service, then remove it from the file. Removing it from the file alone does nothing, because the old version is still in the history.

::: everything Check your setup with Claude
Once a month, or after installing anything, ask:

```text
Audit my Claude Code setup. Read ~/.claude/settings.json, this project's .claude/settings.json, .claude/settings.local.json and .mcp.json, and list: every hook and the command it runs; every connector and whether its config holds a key or token in plain text; every plugin. Flag anything that would run a command I haven't seen, or that would commit a secret.
```

Then act on what it flags. The one that comes up most is a token in a committed `.mcp.json`.
:::

---

## Quick reference

- Plugins and hooks run on your computer without asking. Read them first.
- Install from the author's own page, with the exact name.
- `/plugin` and `/hooks` show what's installed. Look after every install.
- Few connectors. Turn them off per project when they're not needed.
- Keys go in `.env`, never in `.mcp.json`. A committed key is a public key.

---

**Next:** [Browser DevTools](https://learn-ai.digitalbricks.io/part-0/browser-devtools).
