terrylica/cc-skills/code-hardcode-audit
Claude Code and agent skill by terrylica/cc-skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Detect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.
Install
npx vskill@latest install terrylica/cc-skills/code-hardcode-auditSKILL.md
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
Tool Overview
| Tool | Detection Focus | Language Support | Speed | |
|---|---|---|---|---|
| Preflight | Tool availability + config validation | N/A | Instant | |
| Bandit | Hardcoded passwords, tokens in Python (B105-7) | Python | Fast | |
| TruffleHog | Entropy-based secret + API verification | Any (file-based) | Medium | |
| Whispers | Config file secrets (YAML, JSON, Docker, .env) | Config files | Medium | |
| ast-grep | Hardcoded literals in args, sleep, URLs, paths | Multi-language | Fast | |
| Ruff PLR2004 | Magic value comparisons | Python | Fast | |
| Semgrep | URLs, ports, paths, credentials, retry config | Multi-language | Medium | |
| Env-coverage | BaseSettings cross-reference, coverage gaps | Python | Fast | |
| jscpd | Duplicate code blocks | Multi-language | Slow | |
| gitleaks | Regex-based secrets, API keys, passwords | Any (file-based) | Fast |
Output Formats
JSON (--output json)
Compiler-like Text (--output text)
CLI Options
References
- Tool Comparison - Detailed tool capabilities
- Output Schema - JSON schema specification
- Troubleshooting - Common issues and fixes
Related
- ADR-0046: Semantic Constants Abstraction
- ADR-0047: Code Hardcode Audit Skill
code-clone-assistant- PMD CPD-based clone detection (DRY focus)
Troubleshooting
| Issue | Cause | Solution | |
|---|---|---|---|
| Ruff PLR2004 zero output | PLR2004 globally suppressed | Run preflight: uv run --python 3.14 --script scripts/preflight.py -- . | |
| Ruff PLR2004 not found | Ruff not installed or old | uv tool install ruff or upgrade | |
| ast-grep not found | Binary not installed | cargo install ast-grep or brew install ast-grep | |
| Semgrep timeout | Large codebase scan | Use --exclude to limit scope | |
| jscpd memory error | Too many files | Increase Node heap: NODE_OPTIONS=--max-old-space-size=4096 | |
| gitleaks false positives | Test data flagged | Add patterns to .gitleaks.toml allowlist | |
| Env-coverage misses | Not using BaseSettings | Only detects pydantic BaseSettings; other config patterns skipped | |
| No findings in output | Wrong directory specified | Verify path exists and contains source files | |
| JSON parse error | Tool output malformed | Run tool individually with --output text | |
| Missing tool in PATH | Tool not installed globally | Run preflight first, then install missing tools | |
| Bandit false positives | password = '' in init | Filter B105 by confidence: --confidence HIGH | |
| TruffleHog timeout | Scanning .venv/node_modules | All tools respect .gitignore; ensure large dirs are gitignored | |
| TruffleHog regex error | Glob patterns in .gitignore | Complex globs (**/*.rs.bk) are auto-skipped; only simple names used | |
| Whispers slow scan | Large directories | Exclude via .gitignore; whispers config auto-generated from it | |
| Whispers zero findings | No config files in scope | Whispers targets YAML/JSON/Docker/INI; use on project root, not src/ | |
| Severity filter empty | No findings at that level | Use --severity all to see all findings |
Post-Execution Reflection
After this skill completes, check before closing:
- Did the command succeed? — If not, fix the instruction or error table that caused the failure.
- Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
- Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.
Only update if the issue is real and reproducible — not speculative.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/itp/skills/code-hardcode-audit/SKILL.md
Popularity
- Repository stars
- 62
- Repository forks
- 10
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/terrylica/cc-skills/code-hardcode-audit)