terrylica avatar

Code Hardcode Audit

Runs a battery of nine static analysis tools to find hardcoded values, magic numbers, and leaked secrets in your codebase. It's overkill in a good way: combines Python-specific tools like Ruff PLR2004 and Bandit with language-agnostic scanners like ast-grep, Semgrep, TruffleHog for entropy detection, and Gitleaks for regex-based secret scanning. You get both JSON and compiler-style text output showing exactly where constants need extraction or credentials are exposed. Use it when you're doing a security audit, tracking down configuration that should be in environment variables, or just want to find all those mystery numbers scattered through the code. The preflight check is smart, the tool matrix is well documented, and it respects .gitignore so you won't scan node_modules for an hour.

skills.sh installs
166
GitHub stars
2
last updated
Aug 21, 2026

Install

$ npx -y skills add terrylica/cc-skills --skill code-hardcode-audit --agent claude-code

Installs into .claude/skills of the current project.

Files

Code Hardcode Audit

Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

When to Use This Skill

Use this skill when the user mentions:

  • "hardcoded values", "hardcodes", "magic numbers"
  • "constant detection", "find constants"
  • "duplicate constants", "DRY violations"
  • "code audit", "hardcode audit"
  • "PLR2004", "semgrep", "jscpd", "gitleaks", "ast-grep", "SSoT violations"
  • "secret scanning", "leaked secrets", "API keys", "bandit", "trufflehog", "whispers"
  • "passwords in code", "credential leaks", "entropy detection"
  • "config file secrets", "hardcoded credentials"

Quick Start

# Preflight — verify all tools installed and configured
uv run --python 3.14 --script scripts/preflight.py -- .

# Full audit (all 9 tools, preflight + both outputs)
uv run --python 3.14 --script scripts/audit_hardcodes.py -- src/

# Individual tools (all respect .gitignore):

# Python credential detection (passwords, tokens, API keys in variable names)
uv run --python 3.14 --script scripts/run_bandit.py -- src/

Sponsors

Details

Repository
github.com/terrylica/cc-skills
First seen
Jun 3, 2026

More from terrylica/cc-skills

All 15

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs