MCPInstall

codometer-measure

Run a codometer measurement, decide where its report goes, or read a badge block or JSON report it produced. Use when running codometer or npx @codometer/cli, choosing --output-json/--output-markdown and --check flags, wiring codometer into a CI step, splicing a badge block into a README, or reading a codometer JSON report's metrics, limits, or failures. Covers the command-line host directly, without assuming any task runner.

Installs
268
Last 24h
+11
Trending rank
#8157
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/organizzolini/codebase --skill codometer-measure
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads codometer-measure automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Running a codometer measurement

Codometer walks a directory, parses everything it recognizes, and reports what it counted — as console output, a JSON report, a markdown document, or a badge block spliced into an existing file. It counts languages the way any analyzer would — files, lines, classes, functions — and also the declared conventions a repository holds itself to, which is usually the more interesting number.

One directory at a time

Codometer measures one directory and knows nothing about workspaces, task runners, or project graphs. Pointed at a project, it measures that project's own sources and whatever inputs its configuration declares — nothing else, and nothing about sibling projects. There is no --directory: a run always measures the process's working directory, with no per-invocation override.

cd packages/widgets && codometer --config codometer.config.ts --check limits

Do not assume it takes a project name, a package name, or anything a task runner would resolve. If a workspace runs it per project, that iteration is the runner's job, not codometer's. --inputs [globs...] narrows a single run to exactly the globs given, running only language analysis over them, with no configured input — not even the built-in codebase one — active.

Naming the configuration

--config <path> is required. Codometer never searches for a configuration file and has no default one: a run without the flag is refused with an error naming it. The named file answers alone — nothing from any other file is folded into it — and a relative path is resolved against the working directory, then the repository root. In this repository the workspace file is configuration/codometer.config.ts; a project's own is its codometer.config.ts. A configuration file is always read as a plain object — exporting a function is not recognized and falls back to an empty configuration.

.gitignore is already in force through file discovery — a build directory or virtual environment pruned by an ignore file needs no exclusion naming it again — and git itself is never invoked, so an unversioned directory measures the same way a repository does.

Every flag is independent

--output-json, --output-markdown, --check, and --format are asked for separately, and none of them turns another on:

InvocationWritesFails on stalenessFails on a breach
codometer --config <path>nonono
codometer --config <path> --check limitsnonoyes
codometer --config <path> --check reportsnoyesno
codometer --config <path> --check limits,reportsnoyesyes
codometer --config <path> --output-jsonyesnono
codometer --config <path> --output-json --check limitsyesnoyes, after writing

--output-json/--output-markdown passed bare write wherever the resolved configuration's own output of that kind declares, and are refused before anything is measured when the configuration names no such output — there is then nowhere to write it. Passed with a path, that path is used for this run alone, whether or not the configuration declares an output of that kind: codometer --config <path> --output-json report.json writes there regardless of what outputs says.

Combining an --output-* flag with --check reports is refused rather than obeyed: nothing can be stale in the run that just wrote it. A run that both writes and gates still produces every resolved output before it fails, so the report on disk reflects the current measurement even when the run's exit code says no.

A breach and staleness are different findings, never reported as one. A warn-severity breach prints and leaves the exit code alone; a fail-severity breach exits 1, and only where --check limits asked for a gate at all. For what to do about either, reach for the codometer-triage skill.

- run: npx @codometer/cli --config codometer.config.ts --check limits,reports

Reading a report

The JSON report groups metrics by target. Every metric carries its value, its path within its target, a unit ("bytes" or null), every limit declared against it, and — for a comment selector's metric — the instances where each breaching block was found:

{
  "failures": [],
  "targets": [
    {
      "empty": false,
      "files": 42,
      "name": "codebase",
      "metrics": [
        {
          "instances": null,
          "limits": [{ "breached": false, "label": null, "severity": "fail", "value": 500 }],
          "name": "codebase.typescript.interfaces",
          "path": "typescript.interfaces",
          "unit": null,
          "value": 118
        },
        {
          "instances": [{ "file": "src/main.ts", "line": 4, "measured": 214 }],
          "limits": [{ "breached": true, "label": null, "severity": "fail", "value": 0 }],
          "name": "codebase.custom.TypeScript Comment Budget",
          "path": "custom.TypeScript Comment Budget",
          "unit": null,
          "value": 1
        }
      ]
    }
  ]
}

A limit that held is written out exactly like one that did not, so a consumer can render headroom, not only failures. A comment selector's value counts the blocks that broke its own budget, and instances names each one's file and line — null on any metric that only counts. failures holds what the run could not do at all — a target that matched no files despite carrying a limit, a limit bound to a metric nothing measured — and is unrelated to a breach or staleness.

Where output goes

What a run prints and what it writes are asked for separately. --format json prints the report and --format markdown prints the rendered badges; a path always names a file, never the console. Left off, --format falls back to the resolved configuration's own required format field — never inferred from which other flags are present.

Two file sinks — --output-json [path] and --output-markdown [path] — neither of which implies the other or implies printing.

--output-markdown writes into a file somebody else may have written the rest of. The block sits between two markers, named <!-- codometer:start --> / <!-- codometer:end --> unless the configuration renames them; it is spliced between them when they are there, appended with them when they are not, and the file is created when it does not exist.

Every file codometer would write is excluded from what it measures, on every run regardless of flags — a written report left in the count would be stale the instant it landed, and a splice would move the very markdown metrics it just wrote into.

A runtime detail that reads like a bug

Compressed sizes are Node-version dependent, because the bundled zlib differs between releases. A report written on one Node runtime and checked on another reads as stale even when nothing in the source changed. Run --check reports on the same runtime the repository pins for everything else, and reach for the codometer-triage skill before concluding a stale report is a real regression.

FAQ

What does the codometer-measure skill do?

Run a codometer measurement, decide where its report goes, or read a badge block or JSON report it produced. Use when running codometer or npx @codometer/cli, choosing --output-json/--output-markdown and --check flags, wiring codometer into a CI step, splicing a badge block into a README, or reading a codometer JSON report's metrics, limits, or failures. Covers the command-line host directly, without assuming any task runner.

How do I install codometer-measure?

Run npx skills add https://github.com/organizzolini/codebase --skill codometer-measure in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/codometer-measure/ (personal) or .claude/skills/codometer-measure/ (project).

Which AI agents can use codometer-measure?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is codometer-measure safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains codometer-measure?

It is published by organizzolini in organizzolini/codebase. It has 268 recorded installs.

More from organizzolini/codebase

View all →

conformetry-generate

organizzolini/codebase

Scaffold code with a conformetry generator instead of writing it by hand. Use when adding a module, component, service, application, or package to a workspace that has a conformetry configuration; when deciding whether a generator exists for the shape you are about to create; when a generator run overwrote or misplaced files; or when a conformance run reports a file that a generator should have produced. Covers both the Nx plugin and the conformetry command-line host, whose input contracts differ.

Frontend & Design577 installs

conformetry-configure

organizzolini/codebase

Add or change a conformetry generator, and write the template it renders. Use when a needed generator does not exist yet; when editing a conformetry configuration file; when writing or changing files under a template directory; when choosing placeholders or naming-case variants; when a generated file came out with an empty value or an odd path segment; or when a conformetry command refuses to run because the emitted generator plugin is out of date.

conformetry-validate

organizzolini/codebase

Run a conformetry conformance check and act on what it reports. Use when a conformetry-validate target fails; when a composite lint run reports conformance differences; when a report names a missing file, a missing declaration, a missing comment, a placeholder it could not infer, an ambiguous instance, or an unmatched instance; when deciding whether to edit an instance or regenerate it; or before claiming generated code is finished. Covers both the Nx plugin and the conformetry command-line host.

codependix-navigate

organizzolini/codebase

Open the skill to read its SKILL.md instructions.

codependix-export

organizzolini/codebase

Run a codependix dependency graph export or boundary check, choose between --check boundaries, --check reports, and --write, point a run at a workspace root or a configuration file, or read a Mermaid block or JSON graph it produced. Use when running codependix or npx codependix, when a run exits 0 having written nothing, when --check is refused for carrying no value, when looking for a flag that selects one graph type, when wiring codependix into a CI step or an Nx task, when a codependix-gate target failed, or when reading an exported Nx Neighborhood, NestJS module graph, or file-level import graph. Covers the command-line host directly, without assuming any task runner.

codependix-configure

organizzolini/codebase

Open the skill to read its SKILL.md instructions.

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs