rb:secrets

rb:secrets is a skill for Claude Code from slbug/claude-ruby-grape-rails. It costs 36 tokens per session (483 once invoked), scanned B, original, MIT.

A code-scanning guide for finding leaked secrets such as API keys, passwords, tokens, database connection strings, and private keys. It uses Betterleaks and can check both current files and Git history.

In plain words
What is it for?
Use it to scan a project, ignore known findings with a baseline, validate detected credentials, or inspect the Git history for leaks.
Why use it?
It helps catch credentials that could be exposed through source code, configuration files, or past commits.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the ruby-grape-rails plugin — 52 skills, 19 agents, 17 hooks shipped together

Good fit Use it to scan a project, ignore known findings with a baseline, validate detected credentials, or inspect the Git history for leaks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/slbug/claude-ruby-grape-rails/secrets-scan
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add slbug/claude-ruby-grape-rails --skill secrets-scan
Clone the repo
git clone --depth 1 https://github.com/slbug/claude-ruby-grape-rails

Made for: Claude Code.

Or install ruby-grape-rails, the plugin that ships this one along with the rest of its 52 skills, 19 agents, 17 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rb:secrets

README.md
[![agentmods](https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/secrets-scan/github.svg)](https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/secrets-scan)
Your own site
<a href="https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/secrets-scan"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/secrets-scan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rb:secrets

Your own site · 80×15
<a href="https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/secrets-scan"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/secrets-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 483 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00036 $0.00483
Opus 5.5 $0.00014 $0.00193
Sonnet 5.5 $0.00007 $0.00097
Haiku 4.5 $0.00004 $0.00048

Measured 1mo ago against content hash d6194089fb51, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

rb:secrets scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Linux: `sudo dnf install betterleaks`
plugins/ruby-grape-rails/skills/secrets-scan/SKILL.md · 81 lines

What it actually says

Secrets Scan

Detect leaked secrets in your codebase using betterleaks.

Requirements

Requires betterleaks to be installed:

  • macOS: brew install betterleaks
  • Linux: sudo dnf install betterleaks
  • Or download from the betterleaks releases page

Usage

/rb:secrets                           # Scan current directory
/rb:secrets app/                      # Scan specific path
/rb:secrets --baseline leaks.json     # Use baseline to ignore known issues
/rb:secrets --validate                # Validate secrets against live APIs
/rb:secrets --git                     # Scan git history

What It Scans

  • API keys (GitHub, AWS, Stripe, etc.)
  • Database connection strings
  • Passwords and tokens
  • Private keys
  • Environment files (.env)
  • Configuration files

Iron Laws

  1. Never commit .env files - Add to .gitignore
  2. Use Rails credentials - Rails.application.credentials
  3. No secrets in code - Use environment variables
  4. Rotate exposed keys immediately - If found, rotate them

Output

Returns findings with severity:

## Secrets Scan Results

### Critical
- config/database.yml: Contains production password
- .env.staging: AWS access key exposed

### High
- app/services/stripe.rb: Hardcoded API key

### Recommendations
- Move secrets to Rails credentials
- Add .env* to .gitignore
- Rotate exposed API keys

Configuration

Create .betterleaks.toml in project root for custom rules:

[[rules]]
id = "custom-api-key"
description = "Custom API key pattern"
regex = '''api-key-[a-zA-Z0-9]{32}'''
keywords = ["api-key"]

[[allowlists]]
description = "Test fixtures"
paths = ['''test/fixtures/.*''']
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 81 lines · 36 tokens per session scan B d6194089fb51

Subscribe to this mod's changes

rb:secrets is a skill published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed 16d ago), licensed MIT. It adds 36 tokens to every session and 483 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

omh-github-issue-intake

This is an OMH github-issue-intake workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 79 tokens

omh-commit-pr-authoring

This is an OMH commit-pr-authoring workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 90 tokens

git-wrapup

Land working-tree changes as logical commits — the work grouped by concern, topped by a release commit (version bump, changelog, regenerated artifacts). The work commits land first, then the version bump, verification, and the release commit on top. Stops at "committed locally on main" — or, when the project releases…

cyanheads/obsidian-mcp-server · 120 tokens

git-flow

Use this skill when committing, branching, opening a pull request, resolving conflicts, or recovering from a git mistake in any repository. Triggers: user mentions "commit", "branch", "PR", "pull request", "merge", "rebase", "conflict", "stash", "cherry-pick", "revert", "bisect", "reflog", "force push".

WrongStack/WrongStack · 83 tokens

core-workflow

Detailed development workflow patterns, checklists, and standards. Auto-loads for complex tasks, planning, debugging, or when explicit patterns are needed. Contains session protocols, git conventions, security checklists, review-based validation, and communication standards.

travisjneuman/.claude · 52 tokens

pre-commit-audit

Deliver a fast pre-commit safety scan: file size, anonymity (author / affiliation strings in tex/bib), hardcoded secrets, and invisible-Unicode carriers. Use when the user requests a fast pre-commit safety scan: file size, anonymity (author / affiliation strings in tex/bib), hardcoded secrets, and invisible-Unicode…

flonat/flonat-research · 100 tokens