{"owner":"examples","slug":"repo-digest","channel":"examples/repo-digest","version":"1.0.1","artifact_sha256":"9b9b86ebf92a26ebe9a784484a30302e3274a332e33c90a5405942319fa82fa6","published_at":"2026-08-30T10:14:21.995Z","price_micro":"9000000","update_price_micro":"5000000","resource_endpoint":"https://x402git.com/api/r/examples/repo-digest","version_url":"https://x402git.com/api/v/examples/repo-digest","computed":{"artifact_class":"Toolkit","component_inventory":[{"kind":"skills","count":1},{"kind":"scripts","count":1},{"kind":"docs","count":2},{"kind":"config","count":1},{"kind":"other","count":1}],"file_count":6,"dir_depth":1,"bytes_text":24415,"bytes_binary":0,"languages":{"JavaScript":14527},"tree":[{"path":".gitignore","size":30,"binary":false},{"path":"LICENSE","size":1068,"binary":false},{"path":"README.md","size":4728,"binary":false},{"path":"package.json","size":511,"binary":false},{"path":"scripts/digest.mjs","size":14527,"binary":false},{"path":"skills/repo-digest.md","size":3551,"binary":false}],"readme_html":"<h2>repo-digest</h2>\n<p>A one-page markdown summary of a repository: size, shape, languages, dependencies, history, and what is missing.</p>\n<p>For the thirty seconds before you open an unfamiliar codebase, and for giving an agent enough context to start without reading every file.</p>\n<p>Read-only. No dependencies. Node 18 or newer.</p>\n<h3>Usage</h3>\n<pre><code class=\"language-sh\">node scripts/digest.mjs                  # this repo, to stdout\nnode scripts/digest.mjs ../other-repo    # somewhere else\nnode scripts/digest.mjs . --out DIGEST.md\nnode scripts/digest.mjs . --json         # the same facts, machine-readable\n</code></pre>\n<h3>What it produces</h3>\n<pre><code class=\"language-markdown\"># my-service\n\n**412** tracked files · **38,204** lines · **1.9 MB** · mostly **TypeScript**.\n\n**History.** 1,284 commits by 9 authors on `main`, 2023-04-02 → 2026-08-14. 31 tags,\nlatest `v4.2.0`.\n\n## Languages\n\n| Language | Files | Lines | Share |\n|---|---:|---:|---:|\n| TypeScript | 231 | 24,918 | 65.2% |\n| Markdown | 44 | 6,110 | 16.0% |\n| CSS | 18 | 3,401 | 8.9% |\n\n## Layout\n\n- `src/` — 231 files\n- `tests/` — 88 files\n- `docs/` — 41 files\n- `package.json`\n\n## Dependencies\n\n**npm** (`package.json`) — 14 runtime, 22 dev.\n\n`fastify`, `pino`, `zod`, `postgres`, …\n\n## Signals\n\nPresent: **Readme**, **Licence**, **Tests**, **CI**, **Lockfile**.\nAbsent: Contributing guide, Changelog, Dockerfile, Types.\n</code></pre>\n<h3>What it counts</h3>\n<table><thead><tr><th scope=\"col\">Section</th><th scope=\"col\">Source</th></tr></thead><tbody><tr><td>Files</td><td><code>git ls-files</code> in a checkout, so <code>.gitignore</code> is honoured and <code>node_modules</code> is never walked. A plain directory walk otherwise, skipping the usual build and vendor directories.</td></tr><tr><td>Languages</td><td>Extension, plus the handful of files named rather than suffixed (<code>Dockerfile</code>, <code>Makefile</code>, <code>Gemfile</code>). Lines are <strong>counted</strong>, not estimated — but only for text files under 2 MB, so a checked-in bundle cannot dominate the table.</td></tr><tr><td>Primary language</td><td>The most lines among things that are actually code. Markdown, JSON, YAML and TOML are counted but never named the primary language.</td></tr><tr><td>Layout</td><td>Top-level entries with a file count under each, biggest first.</td></tr><tr><td>Dependencies</td><td>The manifest, not the lockfile: <code>package.json</code>, <code>pyproject.toml</code> or <code>requirements.txt</code>, <code>go.mod</code>, <code>Cargo.toml</code>, <code>Gemfile</code>. Declared intent, not the resolved tree.</td></tr><tr><td>Signals</td><td>Presence of a readme, a licence, a contributing guide, a changelog, tests, CI, a Dockerfile, type declarations, a lockfile — and, deliberately, the list of which of those are <strong>absent</strong>.</td></tr><tr><td>History</td><td><code>git rev-list</code>, <code>git shortlog</code>, <code>git tag</code>: commit count, author count, first and last commit dates, tag count and the latest tag. Omitted for a non-git directory.</td></tr></tbody></table>\n<h3>Design decisions, and why</h3>\n<p><strong>No score.</strong> There is no health grade, no percentile, no letter. Every field is a count of something you could verify by hand. A number that has been through a weighting function looks like a fact and is not one; deciding what &quot;412 files&quot; means about a repo is a human judgement, and the digest declines to make it for you.</p>\n<p><strong>Absences are reported.</strong> &quot;No tests, no CI, no licence&quot; is the most useful sentence the tool can produce, and it only exists if you print what is missing rather than only what is there.</p>\n<p><strong>Lines are counted, not sampled.</strong> Reading every text file under 2 MB costs milliseconds on any repo a person would open, and an estimate would be wrong in exactly the cases that matter.</p>\n<p><strong>Untracked files are invisible.</strong> In a git checkout, if it is not tracked, it is not in the digest. That is what makes two runs on two clones comparable.</p>\n<h3>Using it as a skill</h3>\n<p><code>skills/repo-digest.md</code> turns the output into a procedure: read the sections in a specific order, then open the four files the numbers point at — the README, the entry point, the largest file in the primary language, and one test. It also carries the rules for writing an onboarding brief from the digest: quote the numbers rather than characterising them, list absences as facts rather than criticism, and say what you did not check.</p>\n<p>Drop it into wherever your agent reads skills from.</p>\n<h3>Limitations</h3>\n<ul><li>Language detection is by extension. A <code>.h</code> file is called C whether or not it is C++, and a <code>.m</code> is called Objective-C whether or not it is MATLAB.</li><li>The dependency parsers are deliberately shallow: enough to list names, not enough to resolve a version range. <code>pyproject.toml</code> reads only PEP 621 <code>[project] dependencies</code>, so a Poetry-only project shows zero.</li><li>Binary files count towards bytes and files, never lines.</li><li>Submodules and sparse checkouts appear in <code>git ls-files</code> but not on disk; those entries are skipped rather than crashing the run.</li><li>Monorepos are summarised as one repo. Point it at a workspace directory for a per-package view.</li></ul>\n<h3>Licence</h3>\n<p>MIT. See <code>LICENSE</code>.</p>","dependencies":[],"licence":{"spdx":"MIT","verdict":"pass"},"scan":{"verdict":"pass","scanner_version":"2026.08.1","at":"2026-08-30T10:14:23.639Z","checks":[{"id":"secrets","tool":"x402git/secrets","tool_version":"2026.08.1","status":"pass","at":"2026-08-30T10:14:23.639Z","findings":0},{"id":"limits","tool":"x402git/limits","tool_version":"2026.08.1","status":"pass","at":"2026-08-30T10:14:23.639Z","findings":0},{"id":"known_vulns","tool":"osv.dev","tool_version":"2026-09-16","status":"pass","at":"2026-09-16T04:01:09.374Z","findings":0,"packages":0},{"id":"known_malware","tool":"osv.dev/MAL","tool_version":"2026-09-16","status":"pass","at":"2026-09-16T04:01:09.374Z","findings":0,"packages":0},{"id":"dep_behaviour","tool":"socket.dev","tool_version":"2026-09-14","status":"findings","at":"2026-09-14T09:53:31.515Z","findings":1,"packages":1},{"id":"capabilities","tool":"x402git/caps","tool_version":"2026.09.1","status":"findings","at":"2026-09-14T09:52:34.441Z","findings":2},{"id":"injection","tool":"x402git/inject","tool_version":"2026.09.1","status":"pass","at":"2026-09-14T09:52:34.441Z","findings":0}],"findings":[{"kind":"capability","check":"capabilities","tier":"disclosed","rule_id":"script","severity":"LOW","description":"Ships the script scripts/digest.mjs","path":"scripts/digest.mjs"},{"kind":"capability","check":"capabilities","tier":"disclosed","rule_id":"env","severity":"LOW","description":"Reads the environment variable JSON","path":"scripts/digest.mjs"},{"kind":"behaviour","check":"dep_behaviour","tier":"disclosed","rule_id":"missingLockfile","severity":"LOW","description":"Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible","package":{"ecosystem":"generic","name":"Socket SBOM Resolver","direct":false,"dev":false},"source":"socket.dev"}],"capabilities":{"tools":[],"runs":[{"path":"scripts/digest.mjs","kind":"script"}],"hosts":[],"env":[{"name":"JSON","paths":["scripts/digest.mjs"]}],"install_runs":false,"summary":"runs a script · reads 1 environment variable · nothing runs at install"},"counts":{"blocking":0,"disclosed":3,"review":0},"advisories_refreshed_at":"2026-09-16T04:01:09.374Z"},"cadence_sentence":"One release so far.","originality":{"blob_overlap_ratio":0.2,"blobs_seen_elsewhere":1,"blobs_total":5,"nearest_listing":"examples/humanizer","derivative_of":null},"engineering":{"unique_5gram_ratio":0.665,"type_token_ratio":0.353,"effective_code_lines":206,"effective_doc_words":1218,"code_files":1,"test_files":0,"padding_suspected":false},"cadence":{"releases":1,"median_days_between_releases":null,"on_time_fraction":null,"days_since_last":0.1,"score":null,"finished":false},"inventory_sentence":"1 skill · 1 script · 2 docs · 1 config file","extensions":{"md":2,"mjs":1,"json":1,"(none)":2},"lines_of_code":310,"warnings":["sbom_unavailable"],"repo_meta":{"repo_id":1351175923,"name":"x402git-example-repo-digest","full_name":"pcmarts/x402git-example-repo-digest","description":null,"homepage":null,"topics":[],"language":"JavaScript","default_branch":"main","size_kb":11,"created_at":"2026-08-30T06:58:10Z","pushed_at":"2026-08-30T07:00:21Z","licence_spdx":"MIT","open_issues":null,"stars":null,"forks":null,"watchers":null,"archived":false,"private":true,"html_url":null},"owner":{"login":"pcmarts","name":"Paul Martin","avatar_url":"https://avatars.githubusercontent.com/u/53514319?v=4","bio":"GTM, Marketing and Growth by day\r\nVibe Coding by night","blog":"https://paulmartin.link/","company":null,"location":null,"twitter_username":"pcmarts","followers":null,"public_repos":5,"created_at":"2019-07-31T09:12:36Z","html_url":"https://github.com/pcmarts"},"computed_at":"2026-08-30T10:14:23.976Z","analyzer_version":"0.1.0"},"self_reported":{"description":"Summarises any repository into a one-page markdown digest.","trigger_hint":"Fetch this when you need to size up an unfamiliar repo before working in it."}}