# Repository Maintenance

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-mishrashardendu22-agent-skills-repository-maintenance`
- **Verified:** Pending review
- **Seller:** [MishraShardendu22](https://agentstack.voostack.com/s/mishrashardendu22)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MishraShardendu22](https://github.com/MishraShardendu22)
- **Source:** https://github.com/MishraShardendu22/agent-skills/tree/main/.agents/skills/repository-maintenance
- **Website:** https://github.mishrashardendu22.is-a.dev

## Install

```sh
agentstack add skill-mishrashardendu22-agent-skills-repository-maintenance
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Repository Maintenance Skill

This skill provides procedures for maintaining database integrity, executing database backups, applying schema migrations, and managing dependencies across the **GitHub Backup Automation System**.

## 1. Branch-First Development

> [!IMPORTANT]
> **CREATE A LOCAL BRANCH FIRST**: Always start by creating a local branch from `main`:
> ```bash
> git switch -c MishraShardendu22/main/
> ```
> Never apply maintenance or schema changes directly on `main`.

---

## 2. Database Schema Integrity & Migrations

> [!CAUTION]
> **CRITICAL RULE**: Never execute destructive SQL statements (`DROP TABLE`, `TRUNCATE`). Production data has historical backup logs spanning months.

### Migration Rules
* All migrations MUST be located in `backend/db/migrations/` using versioned naming `NNNNNN_.up.sql` and `NNNNNN_.down.sql`.
* All SQL statements MUST be idempotent:
  * `CREATE TABLE IF NOT EXISTS ...`
  * `CREATE INDEX IF NOT EXISTS ...`
  * `ALTER TABLE ... ADD COLUMN IF NOT EXISTS ...`
* Schema migrations are orchestrated exclusively by Go backend startup (`backend/db/migrator.go`).

---

## 2. Backup & Disaster Recovery Runbook

PostgreSQL database dumps are automated with SHA-256 integrity verification:

```bash
# 1. Execute an automated database backup (stored in backups/postgres/ with 14-day retention)
make backup-db

# 2. Restore database from a backup file
make restore-db BACKUP_FILE=backups/postgres/gbm_pg_backup_YYYYMMDD_HHMMSS.sql.gz
```

---

## 3. Dependency Management

* **Go Dependencies**: Managed via `go.mod`. Update with `go get -u` and clean with `go mod tidy`.
* **Python Observatory**: Managed via `uv` in `agentic-observatory/`. Update with `uv lock --upgrade` and sync with `uv sync`.
* **Frontend Dashboard**: Managed via `pnpm` in `frontend/`. Update with `pnpm update`. Ensure native modules like `sharp` and `@biomejs/biome` remain authorized in `frontend/pnpm-workspace.yaml`.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MishraShardendu22](https://github.com/MishraShardendu22)
- **Source:** [MishraShardendu22/agent-skills](https://github.com/MishraShardendu22/agent-skills)
- **License:** MIT
- **Homepage:** https://github.mishrashardendu22.is-a.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mishrashardendu22-agent-skills-repository-maintenance
- Seller: https://agentstack.voostack.com/s/mishrashardendu22
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
