agentregistry-inventory
CLAUDE.md26 starsChanged 10 months agoApache-2.0View on GitHub
CRITICAL: Pre-commit checklist - ALWAYS run these commands before EVERY commit: If ANY of these fail, fix the issues before committing. NEVER commit or push code that fails formatting, linting, or tests. CRITICAL: NEVER push before user tests! After committing, WAIT for the user to test and explicitly ask to push. IMPORTANT: Commit Messages Agent Registry is a Kubernetes-native controller that provides a centralized registry to curate, discover, deploy, and manage agentic infrastructure including MCP servers, agents, and skills. Single…
The file
We split this CLAUDE.md into the rules it gives an agent
12 rules. About 0 are common, 2 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
If ANY of these fail, fix the issues before committing.
- Distinctive: line 15
CRITICAL: NEVER push before user tests!: After committing, WAIT for the user to test and explicitly ask to push.
- Very specific: line 19
Follow conventional commits (feat:, fix:, docs:, refactor:, test:, chore:)
- Very specific: line 20
Do NOT add Co-Authored-By: lines to commit messages
- Very specific: line 74
All Agent Registry resources live in the agentregistry namespace.
- Very specific: line 111
Use envtest, NOT fake clients: All controller tests use SetupTestEnv from testhelper_test.go:
- Very specific: line 124
Update controller in internal/controller/
- Very specific: line 125
Update API handlers in internal/httpapi/handlers/
- Very specific: line 126
Update UI in ui/components/
- Very specific: line 130
Create handler in internal/httpapi/handlers/
- Very specific: line 135
Create reconciler in internal/controller/
- Very specific: line 137
Add tests in internal/controller/*_test.go
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/claude-code) when working with code in this repository.
Git Workflow
CRITICAL: Pre-commit checklist - ALWAYS run these commands before EVERY commit:
make fmt- Format all code (gofmt, prettier)make lint- Check for linting issues (gofmt + go vet)make test- Run all tests
If ANY of these fail, fix the issues before committing. NEVER commit or push code that fails formatting, linting, or tests.
CRITICAL: NEVER push before user tests! After committing, WAIT for the user to test and explicitly ask to push.
IMPORTANT: Commit Messages
- Follow conventional commits (
feat:,fix:,docs:,refactor:,test:,chore:) - Do NOT add
Co-Authored-By:lines to commit messages
Project Overview
Agent Registry is a Kubernetes-native controller that provides a centralized registry to curate, discover, deploy, and manage agentic infrastructure including MCP servers, agents, and skills.
Architecture
Single binary controller with embedded HTTP API and static UI.
Directory Structure
agentregistry/
├── cmd/controller/ # Controller entry point (ONLY binary)
├── api/v1alpha1/ # CRD type definitions
├── internal/
│ ├── controller/ # 5 K8s reconcilers
│ ├── httpapi/ # HTTP API server (Huma) + UI embedding
│ │ ├── handlers/ # API endpoint handlers
│ │ └── server.go # Huma API setup + import logic
│ ├── runtime/ # Deployment logic (translation to K8s resources)
│ ├── cluster/ # Remote cluster client factory (GCP workload identity)
│ ├── config/ # Namespace and config helpers
│ ├── validation/ # Input validation
│ ├── utils/ # Shared utilities
│ └── version/ # Version info
├── ui/ # Next.js 16 frontend (static export)
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ └── lib/ # API client (admin-api.ts)
├── config/
│ ├── crd/ # Generated CRD YAML
│ ├── external-crds/ # Vendored upstream CRDs (kagent, kmcp)
│ ├── rbac/ # RBAC manifests
│ └── samples/ # Example resources
└── charts/agentregistry/ # Helm chartCRDs
agentregistry.dev/v1alpha1:
MCPServerCatalog, AgentCatalog, SkillCatalog, ModelCatalog
RegistryDeployment
DiscoveryConfig (namespace-scoped, multi-cluster autodiscovery)
External (vendored):
kagent.dev/v1alpha2: Agent, RemoteMCPServer, ModelConfig
kmcp.agentregistry.dev/v1alpha1: MCPServerDefault Namespace
All Agent Registry resources live in the agentregistry namespace. Use config.GetNamespace() (respects POD_NAMESPACE env var) when referencing it in code.
Ports
:8080- HTTP API + UI:8081- Metrics:8082- Health probes
Build Commands
make build # Build everything (UI + controller)
make dev # Start controller + UI dev server
make dev-controller # Controller only
make dev-ui # UI dev server only (:3000)
make test # Run all tests
make lint # gofmt + go vet
make fmt # Format Go + JS code
make generate # Regenerate deepcopy + CRD manifests
make push # Build UI + push container with koTesting
Coverage: 37.7%
| Package | Coverage |
internal/validation | 100% |
internal/config | 100% |
internal/runtime/translation/kagent | 81.7% |
internal/httpapi | 47.7% |
internal/controller | 39.4% |
internal/cluster | 28.3% |
internal/httpapi/handlers | 25.9% |
internal/runtime | 8.7% |
Use envtest, NOT fake clients. All controller tests use SetupTestEnv from testhelper_test.go:
helper := SetupTestEnv(t, 60*time.Second, false)
defer helper.Cleanup(t)Common Tasks
Adding a New CRD Field
- Update
api/v1alpha1/*_types.go make generate- Update controller in
internal/controller/ - Update API handlers in
internal/httpapi/handlers/ - Update UI in
ui/components/
Adding a New API Endpoint
- Create handler in
internal/httpapi/handlers/ - Register route in handler's
RegisterRoutes()method
Adding a New Reconciler
- Create reconciler in
internal/controller/ - Register in
cmd/controller/main.go - Add tests in
internal/controller/*_test.go
Environment
- Go: 1.26+
- Node.js: 18+
- Kubernetes: 1.27+
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

