app

A code-measurement method that assigns scores to parts of a program, such as variables, function calls, conditions, loops, and assignments.

In plain words
What is it for?
Use it to calculate code mass, compare alternative implementations, and guide refactoring after tests pass.
Why use it?
It gives developers a consistent way to compare two implementations. A lower total score suggests simpler code, all else being equal, especially during TDD, or test-driven development.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/t1/tdder/app
Any agent
npx skills add t1/tdder --skill app
Clone the repo
git clone --depth 1 https://github.com/t1/tdder

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 776 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00062 $0.00776
Opus 5 $0.00031 $0.00388
Sonnet 5 $0.00012 $0.00155
Haiku 4.5 $0.00006 $0.00078

Measured 2d ago against content hash d63bc6cea6ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

app 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.

skills/app/SKILL.md · 84 lines

How it starts

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

Absolute Priority Premise (APP)

Objective heuristic for comparing code quality by assigning mass values to code components. Lower total mass indicates simpler code.

The Six Components

Component Mass Examples
Constant 1 5, "hello", true, []
Binding 1 amount, userName, result
Invocation 2 calculate(), Math.max(a, b)
Conditional 4 if, switch, case, ?:
Loop 5 while, for, forEach, map
Assignment 6 x = 5, count++, list.add()

Calculation

Total Mass = (constants x 1) + (bindings x 1) + (invocations x 2)
           + (conditionals x 4) + (loops x 5) + (assignments x 6)

Lower mass = Better code (all else being equal).

Special Counting Rules

  • Method declarations count as Constant (1) + Binding (1)
  • Class definitions count as Constant (1) + Binding (1) (usually ignored in comparisons)
  • final fields and local variables are Bindings (1), not Assignments (6)
  • Only re-assignments that modify values count as Assignment (6)

Integration with TDD

  • Red Phase: Mass is irrelevant (focus on passing tests)
  • Green Phase: Minimal code naturally has low mass
  • Refactor Phase: Use APP to guide toward simpler solutions

Integration with Simple Design

  1. Tests Pass (Rule #1) - Always highest priority
  2. Reveals Intent (Rule #2) - May increase mass for clarity
  3. No Duplication (Rule #3) - Extract to reduce mass
  4. Fewest Elements (Rule #4) - Aligns with low mass goal

Simple Design Rule #2 trumps APP - Choose clarity over low mass. APP helps choose between equivalent clear solutions.

When to Apply

  • During refactoring to choose between working solutions
  • When comparing algorithms of similar functionality
  • To guide toward simpler implementations

When NOT to Apply

Read the full file on GitHub · 84 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. 2d ago First seen · 84 lines · 62 tokens per session scan A d63bc6cea6ce

Subscribe to this mod's changes

app is a skill published in the GitHub repository t1/tdder (14 stars, last pushed 2d ago), licensed Apache-2.0. It adds 62 tokens to every session and 776 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.

Related

Other skills, from other repositories

nunit-testing

Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.

nunit/nunit · 51 tokens

software-test-execution

Run scoped tests for a TDD slice, determine the appropriate test framework and command, and report structured pass/fail results. Use when tests need to be executed after writing, implementing, or refactoring code. Reads test metadata, discovers the test framework if needed, executes the scoped test command, parses…

stencila/stencila · 97 tokens

nunit-api-design

Use when adding or modifying public API surface in NUnit — new or changed constraints, attributes, assertions, helpers, or any type/member visibility change. Covers the conventions NUnit maintainers enforce for types that ship to consumers of the framework.

nunit/nunit · 51 tokens

nw-at-completeness-check

Canonical AT completeness gate — research-anchored 7-category taxonomy (C1-C7) + 15-item mechanical checklist. Paradigm-neutral. Drives acceptance-designer reviewer verdict deterministically.

nWave-ai/nWave · 46 tokens

nw-ab-critique-dimensions

Review dimensions for validating agent quality - template compliance, safety, testing, and priority validation.

nWave-ai/nWave · 26 tokens

re0-git

Rewrite a finished commit's message into a clean, handoff-ready form in your own log style, so git log alone tells the story. User-invoked: run it after a commit.

LilMGenius/paperthin · 46 tokens