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.
npx skills add terrylica/cc-skills --skill code-hardcode-auditgit clone --depth 1 https://github.com/terrylica/cc-skillsWrote 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.
[](https://agentmods.dev/skills/terrylica/cc-skills/code-hardcode-audit)<a href="https://agentmods.dev/skills/terrylica/cc-skills/code-hardcode-audit"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/code-hardcode-audit.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Rogue Agent · line 175 Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.02045 |
| Opus 5 | $0.00019 | $0.01022 |
| Sonnet 5 | $0.00008 | $0.00409 |
| Haiku 4.5 | $0.00004 | $0.00204 |
Grade A, and why
code-hardcode-audit scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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/
# Entropy-based secret detection (catches secrets regex can't)
uv run --python 3.14 --script scripts/run_trufflehog.py -- src/
# Config file secrets (YAML, JSON, Dockerfile, .env, .properties)
uv run --python 3.14 --script scripts/run_whispers.py -- src/
# AST-based hardcode detection (numeric args, URLs, paths, sleep)
uv run --python 3.14 --script scripts/run_ast_grep.py -- src/
# Python magic numbers only (fastest)
uv run --python 3.14 --script scripts/run_ruff_plr.py -- src/
# Pattern-based detection (URLs, ports, paths, sleep, circuit breaker)
uv run --python 3.14 --script scripts/run_semgrep.py -- src/
# Env-var coverage audit (BaseSettings cross-reference)
uv run --python 3.14 --script scripts/audit_env_coverage.py -- src/
# Copy-paste detection
uv run --python 3.14 --script scripts/run_jscpd.py -- src/
# Regex-based secret scanning (API keys, tokens, passwords)
uv run --python 3.14 --script scripts/run_gitleaks.py -- src/
What ships with it
21 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/ast-grep-hardcode/rules/python/hardcoded-numeric-arg.yml 385 B
- assets/ast-grep-hardcode/rules/python/hardcoded-path-string.yml 348 B
- assets/ast-grep-hardcode/rules/python/hardcoded-sleep.yml 439 B
- assets/ast-grep-hardcode/rules/python/hardcoded-url-string.yml 322 B
- assets/ast-grep-hardcode/sgconfig.yml 20 B
- assets/semgrep-hardcode-rules.yaml 7.0 KB
- references/evolution-log.md 683 B
- references/output-schema.md 3.9 KB
- references/tool-comparison.md 3.8 KB
- references/troubleshooting.md 3.7 KB
- scripts/audit_env_coverage.py 9.3 KB runs code
- scripts/audit_hardcodes.py 27 KB runs code
- scripts/preflight.py 8.5 KB runs code
- scripts/run_ast_grep.py 4.6 KB runs code
- scripts/run_bandit.py 4.0 KB runs code
- scripts/run_gitleaks.py 3.9 KB runs code
- scripts/run_jscpd.py 4.3 KB runs code
- scripts/run_ruff_plr.py 2.2 KB runs code
- scripts/run_semgrep.py 2.8 KB runs code
- scripts/run_trufflehog.py 6.3 KB runs code
- scripts/run_whispers.py 4.1 KB runs code
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.
- 2d ago First seen · 178 lines · 38 tokens per session scan A a9f96440668d
code-hardcode-audit is a skill published in the GitHub repository terrylica/cc-skills (62 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 2,045 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
debug-systematic
Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.
backpropagation
Trace runtime bugs back to spec gaps — identify missing acceptance criteria, update specs, generate regression tests, and detect patterns.
investigate-root-cause
Use when encountering ANY bug, error, test failure, or unexpected behavior. Activate for keywords like "bug", "error", "failing", "broken", "doesn't work", "unexpected", "crash", "exception", "TypeError", "undefined", stack traces, or any error message. Also trigger when tests fail unexpectedly, when behavior differs…
evidence-driven-debugging
Use during active debugging when you have a hypothesis to test or need to instrument a running system. Activate for keywords like "debug", "instrument", "log", "trace", "breakpoint", "what's happening at runtime", "production behavior". Pair to investigate-root-cause for the doing-it phase. Always record what you…
map-codebase
Use when entering an unfamiliar codebase or area, before making non-trivial changes, when onboarding to a new system, or when planning a refactor that touches multiple modules. Activate for keywords like "explore", "map", "find where", "trace", "how does X work", "what calls Y", "scope of change". Produces an…
github-actions-silent-failures
Diagnose GitHub Actions workflows that fail silently — a reusable-workflow run that shows zero jobs and no logs (startupfailure), a gh-aw cross-repo import that mis-resolves when the source repo is literally named .github, and self-hosted-runner traps (a shared-tmp race across containers, docker exec landing as an…