# GitLab Stack Secrets Manager

GitLab Stack Secrets Manager keeps GitLab stack passwords and keys in ./secrets via Docker secrets, then checks permissions and hunts leaks in .env, compose files and git history.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 295 installs · ★ 93 repo stars
- Author: rknall
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rknall/claude-skills/tree/HEAD/secrets-manager/SKILL.md
- Updated: 2025-10-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/gitlab-stack-secrets-manager

## What it does

This skill stores secrets for a GitLab stack project as Docker secrets. Each value gets its own file under `./secrets`; the directory holds 700 permissions, every file 600. In `docker-compose.yml` only the file reference stays, never the value. Secret-looking names in `.env` or in a service's environment block are treated as a problem to fix.

The agent runs in phases. First it inspects the project: does `./secrets` exist, what is declared in compose, are there tokens or passwords in `.env`. Then it writes the files, wires them into the compose secrets block and checks `.gitignore`. Validation covers permissions with `stat`, staged files with `git status --porcelain | grep secrets/`, and history with `git log --all --full-history -- ./secrets/`. Output is a report with a pass or fail status.

A file left at 644 instead of 600 lands in that report as a warning, so permission drift shows up before containers start. Secrets in `.env` count as a critical finding, and the agent lists them at the top of the report.

## Requirements
- Works with: GitLab, Docker

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add rknall/claude-skills --skill gitlab-stack-secrets-manager -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/secrets-manager/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/secrets-manager/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add rknall/claude-skills --skill gitlab-stack-secrets-manager -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/secrets-manager/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add rknall/claude-skills --skill gitlab-stack-secrets-manager -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/secrets-manager/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install rknall/claude-skills secrets-manager
```

2. **Manually: put the files in place**
- File: `.github/skills/secrets-manager/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add rknall/claude-skills --skill gitlab-stack-secrets-manager -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/rknall/claude-skills --path secrets-manager
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/secrets-manager/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add rknall/claude-skills --skill gitlab-stack-secrets-manager -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/rknall/claude-skills/tree/HEAD/secrets-manager/SKILL.md

## When to use it
- move passwords out of `.env` into Docker secrets
- create a secret file at 600 with `./secrets` at 700
- check whether secrets reached the git index or history
- spot passwords written into compose environment variables
- match service secret references against files in `./secrets`

## Example prompts
- Create a `db_password` secret in `./secrets` and attach it to the `app` service in `docker-compose.yml`.
- Validate the secrets setup in this project and show me the report.
- Find secrets in `.env` and migrate them to Docker secrets.

## Similar
- [gitlab-ci-patterns](https://affpapa.org/en/nevibecode/skills/gitlab-ci-patterns.md) — skill · 13112 installs
- [gitlab-cicd-pipeline](https://affpapa.org/en/nevibecode/skills/gitlab-cicd-pipeline.md) — skill · 673 installs
- [secrets-in-git-history](https://affpapa.org/en/nevibecode/skills/secrets-in-git-history.md) — skill · 1900 installs
- [amc-setup-calibration-stack](https://affpapa.org/en/nevibecode/skills/amc-setup-calibration-stack.md) — skill · 652 installs
- [gitlab-workflow](https://affpapa.org/en/nevibecode/skills/gitlab-workflow.md) — skill · 1100 installs
- [docker-patterns](https://affpapa.org/en/nevibecode/skills/docker-patterns.md) — skill · 8600 installs

From the same set: [rknall/claude-skills](https://affpapa.org/en/nevibecode/by/rknall/claude-skills.md) — 9 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
