Altitude Generalization Guard

Altitude Generalization Guard is a skill for Claude Code from s977043/river-review. It costs 46 tokens per session (1,879 once invoked), scanned A, original, MIT.

A code-review checklist for finding caller-specific workarounds added to shared infrastructure. It asks whether two or more similar special cases should be replaced by a general rule or configuration.

In plain words
What is it for?
Use it when reviewing executable changes in shared functions, scripts, or runners, especially where multiple callers receive separate custom branches.
Why use it?
It helps prevent common code from becoming a growing collection of one-off exceptions that are harder to maintain.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the river-review plugin — 138 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit Use it when reviewing executable changes in shared functions, scripts, or runners, especially where multiple callers receive separate custom branches.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/altitude-generalization
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 s977043/river-review --skill altitude-generalization
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 138 skills, 18 commands, 5 agents, 3 hooks.

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 Altitude Generalization Guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/altitude-generalization/github.svg)](https://agentmods.dev/skills/s977043/river-review/altitude-generalization)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/altitude-generalization"><img src="https://agentmods.dev/badge/skills/s977043/river-review/altitude-generalization/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 Altitude Generalization Guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/altitude-generalization"><img src="https://agentmods.dev/badge/skills/s977043/river-review/altitude-generalization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,879 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.00046 $0.01879
Opus 5 $0.00023 $0.00940
Sonnet 5 $0.00009 $0.00376
Haiku 4.5 $0.00005 $0.00188

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

Security

Grade A, and why

Altitude Generalization Guard 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 5d 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/midstream/altitude-generalization/SKILL.md · 98 lines

How it starts

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

由来: Claude Code の /simplify(Altitude 観点)に由来(inspired by)。Issue #1452 P3 で、skills/agent-skills/river-review-code/references/SIMPLIFY.md から Altitude の詳細検出を本 registry skill へ委譲した。

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: 共有基盤への継ぎ接ぎ(bandaid)をチェックリストで評価するが、special-case の証拠が差分に無い変更では実行しない。

Goal / 目的

  • 共有基盤・共通関数に「特定の呼び出し元のためだけ」の分岐(bandaid)が積み上がるのを防ぐ。
  • 同種の special-case が2つ以上ある場合に、下層機構の一般化(設定テーブル / strategy / caller ごとの宣言的マップ)を促す。

Non-goals / 扱わないこと

  • correctness bug・セキュリティ欠陥は対象外(bug 系・security 系観点の責務)。
  • 設計思想への一般論(「もっと抽象化すべき」等、差分に証拠のない主張)は出さない。
  • リファクタ完了主張の反証は refactor-claim-audit の責務であり、本観点では扱わない。

applyTo に scripts/**runners/** を含める理由

applyTo の各 glob は拡張子で境界付けした midstream ソース限定(scoping ガイド「midstream (application source)」の範囲内)である。SIMPLIFY 観点は src/ だけでなく scripts/runners/ で実行されるコードにも special-case が生じ得る(P2 実地検証では scripts/** の hygiene / 検証ロジックが対象になった)。本 skill はその applyTo 経路差を解消するため、実行コードを持つ3ルートを対象にする。tests/**docs/**dist/** は含めない。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限り NO_REVIEW を返す。dispatcher 経路では Gate が強制されないため、実行時に本文の Gate を必ず自己適用する。

  • 差分にリポジトリ内で実行されるコードsrc/ / scripts/ / runners/ 配下の .ts / .tsx / .js / .jsx / .mjs / .cjs)の変更が含まれている。
  • 差分に呼び出し元を特定する special-case の証拠(呼び出し元判定の条件分岐・専用フラグ・型チェックによるバイパス)が少なくとも1つ含まれている。
  • inputContextdiff が含まれている。
  • ビルド成果物・生成物(dist/***.map・lockfile・自動生成 manifest)のみの差分ではない。

ゲート不成立時の出力: NO_REVIEW: altitude-generalization — 共有基盤への caller special-case の証拠が差分に検出されない

False-positive guards / 抑制条件

Gate を通過した上で、以下は指摘しない(黙る)。

  • 意図的な host opt-in: 分岐が呼び出し元 ID ではなく、任意の呼び出し元が渡せる第一級の公開オプション/フラグ(例: options.compact のような公開整形オプション)を条件にしている場合。これは bandaid ではなく正当な API 拡張である。
  • special-case が差分内に1つのみで、同種の先行 special-case が差分外にも存在しない場合(単発の分岐は「正しい深さ」の可能性が高く、一般化を急がない)。証拠のある同種の special-case が2つ以上そろって初めて一般化を提案する。
  • 指摘行(finding の file:line)が差分内に無い場合。
  • 意図的な非 DRY(過度な抽象化の回避)が差分・コメントから読み取れる場合。

Read the full file on GitHub · 98 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. 5d ago First seen · 98 lines · 46 tokens per session scan A 411182c4c16a

Subscribe to this mod's changes

Altitude Generalization Guard is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 46 tokens to every session and 1,879 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-03.

Related

Other skills, from other repositories

review-all

Multi-agent code review for diffs (project-agnostic). Covers standards, bugs, security, DRY, smells, perf, tests, API contracts, a11y/i18n. Verifies each finding to eliminate false positives. Use for /review-all, pre-PR/pre-commit review, or auditing uncommitted/staged changes.

ncoevoet/claude-review-all · 74 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens

logic-diff

Compare two code versions for semantic equivalence via semi-formal tracing of both versions side-by-side. Trigger when the user shares a refactor, rewrite, migration, or A/B implementation and wants to confirm behavior is unchanged — "did I break anything", "is this equivalent", "are these equivalent", "semantically…

hyhmrright/logic-lens · 192 tokens

omnicheck-gitlab

Use when checking if MR review findings have been applied — verifies both OmniForge-generated and human reviewer comments against the current diff, posts nudge replies on unaddressed threads.

nexiouscaliver/OmniForge · 41 tokens

omnicheck-github

Use when checking if PR review findings have been applied — verifies both OmniForge-generated and human reviewer comments against the current diff, posts nudge replies on unaddressed threads.

nexiouscaliver/OmniForge · 40 tokens

omnicreate-gitlab

Use when creating a GitLab merge request (OmniForge). Auto-populates title and description from commits, supports draft MRs, labels, assignees, reviewers, and issue linking.

nexiouscaliver/OmniForge · 45 tokens