hone:magic-number-hunt

hone:magic-number-hunt is a skill for Claude Code from ckorhonen/hone-skills. It costs 63 tokens per session (1,016 once invoked), scanned A, original, MIT.

A code review check that finds unexplained literal values, such as hardcoded numbers, URLs, timeouts, thresholds, or configuration strings.

In plain words
What is it for?
Use it for weekly repository scans, before releases, or when learning an unfamiliar codebase. It reports locations, the value found, and a possible constant or configuration name.
Why use it?
Unnamed values can hide important settings and make code harder to understand or change; this report points them out without changing the code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hone-skills plugin — 8 skills shipped together

Good fit Use it for weekly repository scans, before releases, or when learning an unfamiliar codebase. It reports locations, the value found, and a possible constant or configuration name.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ckorhonen/hone-skills/magic-number-hunt
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 ckorhonen/hone-skills --skill magic-number-hunt
Clone the repo
git clone --depth 1 https://github.com/ckorhonen/hone-skills

Made for: Claude Code.

Or install hone-skills, the plugin that ships this one along with the rest of its 8 skills.

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 hone:magic-number-hunt

README.md
[![agentmods](https://agentmods.dev/badge/skills/ckorhonen/hone-skills/magic-number-hunt/github.svg)](https://agentmods.dev/skills/ckorhonen/hone-skills/magic-number-hunt)
Your own site
<a href="https://agentmods.dev/skills/ckorhonen/hone-skills/magic-number-hunt"><img src="https://agentmods.dev/badge/skills/ckorhonen/hone-skills/magic-number-hunt/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 hone:magic-number-hunt

Your own site · 80×15
<a href="https://agentmods.dev/skills/ckorhonen/hone-skills/magic-number-hunt"><img src="https://agentmods.dev/badge/skills/ckorhonen/hone-skills/magic-number-hunt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,016 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00063 $0.01016
Opus 5 $0.00032 $0.00508
Sonnet 5 $0.00013 $0.00203
Haiku 4.5 $0.00006 $0.00102

Measured 12d ago against content hash bee5cc33e219, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hone:magic-number-hunt 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 12d 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.

skills/magic-number-hunt/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Magic Number Hunt

What This Skill Does

Scans source files for literal values that lack explanatory names: numeric magic numbers, unexplained string constants, hardcoded URLs, embedded credentials patterns, timeout/retry values, threshold values, and configuration buried inline. Produces a prioritized list of findings with file paths, line numbers, the offending literal, and a suggested named constant or config key.

When To Use

  • Weekly scheduled sweep of an entire repository or workspace.
  • Before a release to catch newly introduced unnamed literals.
  • When onboarding a new codebase to understand hidden configuration.

Do Not Use

  • For style, formatting, or linting issues (use a linter).
  • For security credential scanning (use a secrets scanner).
  • For type-checking or correctness analysis.
  • As a replacement for a full code review.

Inputs To Confirm

  1. Scope -- which directories or file patterns to scan (default: entire repo, excluding vendored/generated code).
  2. Severity threshold -- whether to report all findings or only high-confidence ones (default: all).
  3. Language hints -- any languages to prioritize if the repo is polyglot (default: auto-detect).

Instructions

  1. Identify the repository root and enumerate source files, excluding vendored directories (vendor/, node_modules/, .git/, third_party/), generated files, and binary assets.
  2. For each source file, scan for literal values that meet any of these criteria:
    • Numeric literals other than 0, 1, -1, 2, and common mathematical constants (pi, e) that appear outside of constant declarations or enum definitions.
    • String literals longer than 3 characters that look like URLs, file paths, hostnames, API endpoints, version strings, or configuration keys, and are not already in a constants file or config module.
    • Timeout, retry, and threshold values -- any number used as a duration, count, size limit, or boundary that is not assigned to a named constant.
    • Hardcoded booleans in function calls -- e.g., foo(true, false) where the meaning is unclear without a named parameter.
  3. For each finding, record:
    • File path and line number.
    • The literal value.
    • The surrounding code context (2-3 lines).
    • A severity tag: high (likely config leak or unexplained threshold), medium (unnamed numeric/string constant), or low (borderline case, may be intentional).
    • A suggested constant name and placement (e.g., "extract to MAX_RETRY_ATTEMPTS = 3 in config module").
  4. Group findings by file, then sort by severity descending within each file.
  5. Exclude known false positives:
    • Array indices and loop bounds of 0 or 1.
    • Test fixture data clearly scoped to test files.
    • String literals used only in log messages or error messages (unless they contain URLs or config).
    • Enum or constant definitions themselves.
  6. Produce the output report.

Read the full file on GitHub · 110 lines

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. 12d ago First seen · 110 lines · 63 tokens per session scan A bee5cc33e219

Subscribe to this mod's changes

hone:magic-number-hunt is a skill published in the GitHub repository ckorhonen/hone-skills (0 stars, last pushed 4mo ago), licensed MIT. It adds 63 tokens to every session and 1,016 once invoked, about $0.0003 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-08-31.