Skip to content
Skills Library
AI & agents · Analysis

ctxrent

/ctxrent

Context rent of the user's coding-agent sessions, turned into approved rules for CLAUDE.md or AGENTS.md. Use when the user runs /ctxrent, asks where their tokens or context go, why sessions are slow or expensive, or wants hygiene rules from their own session history.

Repository
ctxrent ↗
Licence
MIT
Last repository change
30.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
1
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 30.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (1). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Context rent of the user's coding-agent sessions, turned into approved rules for CLAUDE.md or AGENTS.md. Use when the user runs /ctxrent, asks where their tokens or context go, why sessions are slow or expensive, or wants hygiene rules from their own session history.

Original author description

Context rent of the user's coding-agent sessions, turned into approved rules for CLAUDE.md or AGENTS.md. Use when the user runs /ctxrent, asks where their tokens or context go, why sessions are slow or expensive, or wants hygiene rules from their own session history.

How it works

  1. 1. Get the command
  2. 2. Measure
  3. 3. Write the rules
  4. 4. Get approval
  5. Other requests
Original SKILL.md headings · 94 lines, 682 words
SKILL.md preview
---
name: ctxrent
description: Context rent of the user's coding-agent sessions, turned into approved rules for CLAUDE.md or AGENTS.md. Use when the user runs /ctxrent, asks where their tokens or context go, why sessions are slow or expensive, or wants hygiene rules from their own session history.
license: MIT
compatibility: Node 20 or newer. Reads Claude Code and Codex session records under the user's home directory. Runs the ctxrent CLI from PATH, or the latest release from npm through npx when it is not installed.
metadata:
  version: "0.1.2"
  category: developer-tools
allowed-tools: Bash(ctxrent *) Bash(npx -y ctxrent@latest *)
---

# ctxrent

Content kept in a context is re-sent on every request, so it costs its size times the turns it
survives: its rent. `ctxrent` measures rent and returns findings. You turn the findings into rules;
the user approves them on a page. Run the whole flow yourself, start to finish; the only thing the
user does is tick and press Apply.

If the user asked for something narrower (a gate, a shareable report, a comparison), skip to
[Other requests](#other-requests).

## 1. Get the command

If `ctxrent --help` succeeds, the command is `ctxrent`. Otherwise it is:

```bash
npx -y ctxrent@latest
```

That runs the latest release from npm without installing anything; npx checks for a newer one on every run. Below, `ctxrent` means whichever one works.

Done when `ctxrent --help` prints the usage.

## 2. Measure

```bash
ctxrent findings --json
```

Narrow it if the user asked: `--since <date>`, a session path as the first argument,
`--min-sessions <n>` (default 3).

Each finding has `id`, `label` (what was observed, as data), `lever`, `saving` (token-turns),
`claims`, `sessions` and `example` (the real command that caused it).

If `findings` is empty, run `ctxrent` alone, show the user the last session's rent, score and top
carriers, and stop: there is nothing recurring to write a rule for.

If the target (see step 4) has a managed block that says `applied <date>`, judge the rules already
there: run `ctxrent check --all --since <date> --max-waste 100 --json` and the same without
`--since`, and tell the user the waste share (`actual`) since the rules against all sessions. Exit 2
with `--since` means no session since then: say it is too early to tell.

Done when you hold the JSON, and the comparison when the block has a date.

## 3. Write the rules

One rule per finding whose `lever` is `instruction`. A `configuration` finding gets no rule: it is
caused by a hook or a setting, and the page shows it to the user as such.

Write them to `ctxrent-rules.md` in the system temp directory, outside the user's project, one per
line, exactly:

```
- <the rule> <!-- id: <finding id> -->
```

Each rule is imperative, addressed to the agent, at most 20 words, in the language the user writes
in. Decide what it says from `label`, `example` and the numbers. Leave a finding out when you are
not confident about its rule: a missing rule beats a wrong one. Copy ids from the JSON only;
`ctxrent` drops any line whose id it does not know.

When the target already has a rule for a finding, write a new one only if it should change: the
page offers it as a rewrite, unticked, and the current wording stays unless the user ticks it.

Done when every `instruction` finding has one line or was left out on purpose, and the file holds
nothing else.

## 4. Get approval

The target is the global instruction file of the harness you run in: `~/.claude/CLAUDE.md` for
Claude Code, `~/.codex/AGENTS.md` for Codex, or the file the user named.

```bash
ctxrent review --rules <rules file> --write <target>
```

It prints a loopback URL, opens the browser, and waits up to ten minutes for the user to press
Apply. Run it in the background or with a timeout of at least ten minutes, because a shorter
timeout kills the page. As soon as the URL is printed, give it to the user with one line per
finding: the amount, the example, and for `configuration` findings the hook or setting to turn off.

The page is the only writer of the instruction file. Your edits stop at the rules file.

Done when the command exits. Report its last line: `applied N rule(s) to <file>`, or
`closed without changes`.

## Other requests

- A gate: `ctxrent check --max-waste <n>`, or `--all --since <date>` for the archive. Exit 0 under
  the threshold, 1 over, 2 when the record cannot be measured.
- A shareable report: `ctxrent audit <path> --html <file>`, one self-contained file.
- A comparison of two variants: `ctxrent init`, then `ctxrent diff ctxrent.json --a <dir> --b <dir>`.

Versions

The database has no other skills named ctxrent.

Database snapshot: 13.11.2026 · package version 9d73d7ba0de8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100context-rent
    Find out what is eating the context window and token budget of Claude Code and Codex CLI sessions, and fix it. Use when the user asks why they hit usage limits, why sessions get slow or expensive, where their tokens go, how to save tokens, whether their CLAUDE.md, AGENTS.md or…
  • 100context-cost
    Measure how many tokens your coding agent reads before you type anything (CLAUDE.md and AGENTS.md chains, imports, memory files, always-on Cursor rules, skills and MCP servers), find what is stale, duplicated or only needed in one folder, and show how much each cut saves. Use…
  • 100lean-context
    Keep coding-agent sessions cheap on large, multi-repo projects. Use when setting up or auditing a project for Claude Code (CLAUDE.md, project map, settings, tools), when sessions start with a large context, or before long multi-day tasks.
  • 86setup
    Install and connect memry, the persistent memory for AI coding agents. Use when the user wants to set up memry, asks why memry tools are missing, or wants Claude Code to remember context between sessions.
  • 100harness-creator
    Build, audit, and improve harnesses that make AI coding agents reliable: AGENTS.md/CLAUDE.md instruction files, feature/state tracking, verification gates, scope boundaries, session handoff, memory persistence, context budgets, tool-permission safety, and multi-agent…
  • 100coding-agent-sessions
    Finds, reads, and reconstructs coding-agent sessions across Codex, Claude, OpenCode, OMO/Senpi, and other local agent logs. Use when asked to find or search past sessions, transcripts, or subagent runs, or to recover what an earlier session did.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.