How the Claude Code Plugin works

The problem it solves

Claude Code reads files one at a time. On large codebases, thousands of files, or a year's worth of business documents- it either takes too long or runs out of context.

The plugin builds a persistent, searchable copy of your project on CustomGPT.ai's servers. Claude Code searches that copy instead of reading files one by one, and gets a targeted answer in seconds.


What happens when you upload a project

Running /create-agent triggers a four-step process. The plugin scans the project folder, creates a new agent in your CustomGPT.ai account, uploads the eligible files to CustomGPT.ai's servers, then saves the agent ID and folder path to the meta information at the project root.

CustomGPT.ai processes and organizes the uploaded files in a way that makes semantic search possible. A question like "where is rate limiting handled?" returns a relevant answer even if those exact words don't appear in the code.


What happens when you search

/ask-agent sends your question to the agent, which searches across all your uploaded files, generates an answer, and returns it with source citations.


How the plugin knows which agent to use

The agent ID and folder path are stored in .customgpt-meta.json at the project root. Every command reads this file automatically. No manual agent ID needed.

Multiple projects each get their own .customgpt-meta.json. The plugin finds the right one by walking up from your current folder.

.customgpt-meta.json can be committed to share the agent with your team, or added to .gitignore to keep it local.


How your API key is stored

Stored locally - never committed to your project. The plugin checks in this order:

  1. $CUSTOMGPT_API_KEY environment variable
  2. A .env file in your project or any parent folder
  3. ~/.claude/customgpt-config.json

If none are found, the plugin prompts you and saves the key to the config file.


Your files do not stay in sync automatically

The plugin does not automatically watch for file changes, but agent is instructed to ask you to refresh the files after any major change that happens in the project.

Additionally, you can explicitly update it using /update-agent, /add-files, or /rebuild-agent.


Privacy

Files are uploaded to CustomGPT.ai's servers. The plugin uses your existing subscription's API quota. No additional charge.


Related articles