Expert assistant for working with nanogit, a lightweight cloud-native Git implementation in Go. Helps with code generation, testing, linting, and understanding the stateless HTTPS-only architecture.
Expert assistant for working with nanogit, a lightweight, HTTPS-only Git implementation written in Go by Grafana. Designed for cloud-native environments with pluggable storage backends and minimal dependencies.
This skill helps you work effectively with the nanogit codebase by:
**nanogit** is a minimal Git implementation optimized for server-side usage in multitenant cloud services. It provides essential Git operations over HTTPS only, with no local .git directory dependency and pluggable storage backends.
**Key Differences from go-git:**
Identify whether the user wants to:
**Format code:**
```bash
make fmt
```
**Run linters:**
```bash
make lint
make lint-staticcheck
```
**Generate mocks:**
```bash
make generate
```
**Quick unit tests (no Docker required):**
```bash
make test-unit
```
**Integration tests (requires Docker):**
```bash
make test-integration
```
**All tests:**
```bash
make test
```
**Provider compatibility tests:**
```bash
make test-providers
```
**Coverage reports:**
```bash
make test-coverage # Generate reports
make test-coverage-html # View in browser
```
Navigate to `perf/` directory for performance operations:
**One-time setup:**
```bash
cd perf && make test-perf-setup
```
**Quick consistency tests:**
```bash
cd perf && make test-perf-simple
```
**Full benchmark suite:**
```bash
cd perf && make test-perf-all
```
**Profiling workflow:**
```bash
cd perf && make profile-baseline # Create baseline before changes
cd perf && make profile-cpu # Profile CPU performance
cd perf && make profile-mem # Profile memory usage
cd perf && make profile-compare # Compare against baseline
```
**See all performance targets:**
```bash
cd perf && make help
```
When explaining code or design decisions, reference these key components:
**Core Interfaces** (`client.go`, `writer.go`):
**Protocol Layer** (`protocol/`):
**Storage System** (`storage/`):
Ensure all contributions follow:
**Unit Tests:**
**Integration Tests** (`tests/`):
**Performance Tests** (`perf/`):
**Example 1: User asks to run tests before committing**
```bash
make fmt
make lint
make test-unit
```
**Example 2: User wants to add a new feature with tests**
1. Read relevant code in `client.go`, `writer.go`, or `protocol/`
2. Implement feature following Go standards
3. Generate mocks if interfaces changed: `make generate`
4. Write unit tests using `testify/require`
5. Add integration tests in `tests/` using Ginkgo/Gomega
6. Run quality checks: `make fmt && make lint && make test`
**Example 3: User wants to profile performance impact**
```bash
cd perf
make profile-baseline # Before changes
make profile-cpu # Profile CPU
make profile-compare # Compare results
```
**Example 4: User asks about architecture decisions**
Explain the stateless design principle: nanogit operates without a local .git directory, making it ideal for ephemeral cloud environments where persistent filesystem state is undesirable. Storage is abstracted via context, allowing custom backends (object storage, databases, etc.) instead of requiring local disk access.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/nanogit-development-assistant/raw