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 Kevin-Liu-01/Agent-Machines --skill fix-typesgit clone --depth 1 https://github.com/Kevin-Liu-01/Agent-MachinesWrote 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/kevin-liu-01/agent-machines/fix-types)<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/fix-types"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/fix-types/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.
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/fix-types"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/fix-types.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00068 | $0.01016 |
| Opus 5 | $0.00034 | $0.00508 |
| Sonnet 5 | $0.00014 | $0.00203 |
| Haiku 4.5 | $0.00007 | $0.00102 |
Grade A, and why
fix-types 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.
How it starts
The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Fix Types
Make invalid states unrepresentable. All possible types and states should be defined upfront ahead of time. Every bare primitive that carries domain meaning is a bug waiting for a call site to swap two arguments of the same type. The compiler/type-checker is free; runtime debugging is not!
1. Newtypes / branded types over bare primitives
If a value means different things in different parameters of the same function, wrap each in a distinct type.
Rust:
struct AccountId(u64);
struct Cents(u64);
fn transfer(from: AccountId, to: AccountId, amount: Cents);
TypeScript:
type AccountId = string & { readonly __brand: "AccountId" };
type Cents = number & { readonly __brand: "Cents" };
function transfer(from: AccountId, to: AccountId, amount: Cents): void;
Python:
from typing import NewType
AccountId = NewType("AccountId", int)
Cents = NewType("Cents", int)
def transfer(from_: AccountId, to: AccountId, amount: Cents) -> None: ...
Go:
type AccountId uint64
type Cents uint64
func Transfer(from, to AccountId, amount Cents) error
Apply when a bare primitive appears in 3+ function signatures with different semantics. Common candidates: identifiers, indices, offsets, sizes, timestamps, currency amounts, ports, sequence numbers.
2. Checked casts at trust boundaries
When converting between signed/unsigned or narrowing width, validate at the boundary where untrusted data enters. Silent truncation or wraparound is a corruption vector.
// Bad: silent wraparound on corrupt input.
let id = row.get::<_, i64>(0)? as u64;
// Good: fails loud on negative.
let id = u64::try_from(raw).map_err(|_| Error::Corrupt(raw))?;
# Bad: silently wraps on overflow.
port = int(raw_value) & 0xFFFF
# Good: explicit bounds check.
port = int(raw_value)
if not (0 <= port <= 65535):
raise ValueError(f"port out of range: {port}")
// Bad: silent truncation.
port := uint16(rawPort)
// Good: bounds check.
if rawPort < 0 || rawPort > math.MaxUint16 {
return fmt.Errorf("port out of range: %d", rawPort)
}
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.
- 10d ago First seen · 138 lines · 68 tokens per session scan A b6c0997d0f16
fix-types is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (27 stars, last pushed today), licensed MIT. It adds 68 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-30.
Other skills, from other repositories
dx-roaster
Brutally honest developer-experience audit for a GitHub repo. Scores 10 DX dimensions (time-to-first-success, README clarity, visual proof, install, quick-start, docs, examples, community, trust, marketing), writes a shareable roast in the requested tone (brutal/honest/kind), produces a prioritized action plan ranked…
mcp-review
Review MCP server specifications and updates for compliance, security, and quality. Use when evaluating server.json files, PRs adding/updating servers, or assessing MCP server changes. NOT for creating new entries (use add-mcp-server instead).
code-review
When the user wants a thorough code review of changes, a PR, a file, or a feature branch. Use when the user says "review this," "code review," "check my code," "what's wrong with this," "review my PR," "look over this," "critique this," "review before merge," or when submitting code for quality assessment. Performs…
holix-cron
Schedule recurring agent tasks via Holix built-in gateway cron (not crontab or custom scripts).
quick-review
Review a code diff or file for correctness bugs, security issues, and clear simplifications. One finding per line, severity-tagged. Use when user wants fast, focused code review.
review-guidelines
Additional code review guidelines specific to this codebase. Auto-loaded by the review agent during PR reviews to enforce project conventions.