weak-type-strengthener

weak-type-strengthener is an agent for Claude Code from luongnv89/skills. It costs 18 tokens per session (1,241 once invoked), scanned A, original, MIT.

A type-cleanup agent that replaces vague type declarations with specific types supported by the actual data and its uses.

In plain words
What is it for?
Use it to inspect weak types such as any, unknown, interface{}, Object, dynamic, and unchecked generics across several programming languages.
Why use it?
It reduces unchecked values and unclear interfaces that make code harder to understand and type-check safely.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions subagents.

Good fit Use it to inspect weak types such as any, unknown, interface{}, Object, dynamic, and unchecked generics across several programming languages.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/luongnv89/skills/weak-type-strengthener
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.

Clone the repo
git clone --depth 1 https://github.com/luongnv89/skills

Made for: Claude Code.

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 weak-type-strengthener

README.md
[![agentmods](https://agentmods.dev/badge/agents/luongnv89/skills/weak-type-strengthener/github.svg)](https://agentmods.dev/agents/luongnv89/skills/weak-type-strengthener)
Your own site
<a href="https://agentmods.dev/agents/luongnv89/skills/weak-type-strengthener"><img src="https://agentmods.dev/badge/agents/luongnv89/skills/weak-type-strengthener/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 weak-type-strengthener

Your own site · 80×15
<a href="https://agentmods.dev/agents/luongnv89/skills/weak-type-strengthener"><img src="https://agentmods.dev/badge/agents/luongnv89/skills/weak-type-strengthener.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,241 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.00018 $0.01241
Opus 5 $0.00009 $0.00620
Sonnet 5 $0.00004 $0.00248
Haiku 4.5 $0.00002 $0.00124

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

Security

Grade A, and why

weak-type-strengthener 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 10d 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/code-review/agents/weak-type-strengthener.md · 94 lines

How it starts

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

Weak Type Strengthener Subagent

Find weak type escape hatches — any, unknown, interface{}, Object, dynamic, unchecked generics — and replace them with the specific type the value actually has at that location. Do not guess. Research the call sites and the source of the data to establish the real type.

Input

{
  "repo_path": "/abs/path",
  "stack": {"language": "ts|py|go|rust|java|...", "typecheck_cmd": "..."},
  "output_report": ".slop-cleanup/wave-1/weak-type-strengthener.md"
}

Weak Type Signatures by Language

  • TS/JS: any, unnecessary unknown (keep unknown only at true external boundaries with runtime validation), object, Function, {}, as any casts, @ts-ignore, @ts-expect-error, missing generics (Array instead of Array<T>)
  • Python: Any, object parameter types, missing annotations, # type: ignore, cast(Any, ...), overly broad Callable / dict / list
  • Go: interface{} (or any in Go 1.18+), unconstrained type parameters
  • Rust: Box<dyn Any>, &dyn Any, overuse of trait objects where generics would do
  • Java: raw generic types (List instead of List<String>), Object parameters
  • C#: object, dynamic

Note: unknown (TS) and any (Python Any) are legitimate at real boundaries — deserialized JSON, FFI, user input before validation. The rule: if a weak type represents a place where validation should have occurred, replace the weak type with the validated type and move validation to the boundary. Do not strip unknown from a boundary without adding validation.

Research Before Replacing

For each weak type occurrence:

  1. Trace the value's origin. Where does it come from?
    • Another function in the codebase → read that function's return type and use it.
    • An external library → consult the library's types. Use Context7 MCP if available to fetch current SDK docs. Don't trust memory — check the current version in package.json / requirements.txt / etc.
    • A schema (zod, pydantic, JSON Schema) → the schema's inferred type is the answer.
    • Runtime JSON/network → define a schema, parse at the boundary, and the weak type goes away.
  2. Trace the value's use. What methods/properties are accessed on it? The union of accessed members is the minimum type.
  3. Reconcile origin and use. If the origin is broader than the use, the code is already narrowing somehow — use the narrowed type. If the use is broader than the origin, you've found a latent bug — flag it.

Read the full file on GitHub · 94 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. 10d ago First seen · 94 lines · 18 tokens per session scan A 6c1616d80f56

Subscribe to this mod's changes

weak-type-strengthener is an agent published in the GitHub repository luongnv89/skills (123 stars, last pushed yesterday), licensed MIT. It adds 18 tokens to every session and 1,241 once invoked, about $0.0001 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-30.

Related

Other agents, from other repositories

cf-reviewer-quality

Code quality review specialist. Checks naming, complexity, duplication, error handling, edge cases, and slop detection (AI over-generation). Dispatched by cf-reviewer orchestrator as part of parallel multi-agent review.

dinhanhthi/coding-friend · 48 tokens

cf-reviewer-security

Security review specialist. Performs deep security analysis of code changes including input validation, auth, secrets/crypto, code execution, data exposure, and prompt injection. Dispatched by cf-reviewer orchestrator as part of parallel multi-agent review. Includes exploit scenarios for Critical findings. Traces data…

dinhanhthi/coding-friend · 73 tokens

cf-reviewer-plan

Plan alignment review specialist. Checks whether code changes match the implementation plan. Dispatched by cf-reviewer orchestrator as part of parallel multi-agent review. Flags unexpected out-of-scope changes, missing planned items, and plan deviations. Skipped in QUICK review mode.

dinhanhthi/coding-friend · 58 tokens

cf-reviewer-reducer

Review reducer agent. Deduplicates and severity-ranks findings from multiple specialist review agents into a single unified report. Dispatched by cf-reviewer orchestrator after all specialist agents complete.

dinhanhthi/coding-friend · 43 tokens

cf-reviewer-rules

Project rules compliance specialist. Checks code changes against AGENTS.md project rules. Only flags violations of rules with MUST/SHOULD/ALWAYS/NEVER language. Dispatched by cf-reviewer orchestrator as part of parallel multi-agent review. Skipped in QUICK review mode.

dinhanhthi/coding-friend · 63 tokens

cf-reviewer

Code review orchestrator. Dispatches 5 specialist review agents in parallel (plan alignment, security, code quality, test coverage, project rules) then merges results via a reducer agent. Dispatched by cf-review and cf-ship for thorough review before merge. Trigger this agent when the user asks to review code changes…

dinhanhthi/coding-friend · 214 tokens