reflex-skills 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -4
  3. package/dist/reflex.js +1404 -576
  4. package/package.json +2 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Reflex contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -55,6 +55,8 @@ alias reflex="node $PWD/apps/cli/dist/reflex.js"
55
55
  | `bench <task>` | Run one task on several Claude Code models, each in a fresh copy of the current repository, scored by `--check "<command>"`. `--models`, `--setup`, `--runs`, `--timeout`, `--keep`, `--yes` |
56
56
  | `improve [skill]` | For skills you already have: lists them with the sessions that loaded each; with a name, compares the skill with those sessions and proposes an edit (asks before reading the skill and before changing it; keeps a backup). `--file`, `--yes` |
57
57
  | `agents` | Sessions that launched agents (Cursor): how many, which kinds, and how many tool calls the agents made |
58
+ | `handbook` | How work is done in the current repository, learned from past sessions: test, build and lint commands that worked (and ones that kept failing), and corrections you repeated, with the situation they came up in and the sessions behind each. `show <id>`, `ask "<question>"`, `export` (Markdown for a teammate, no request text), `--project`, `--all`, `--json`. Read-only, so agents can call it |
59
+ | `cursor-usage [on\|off]` | Record Cursor's token counts locally through a Cursor hook, since Cursor saves none in its transcripts. `on` adds Reflex's hook to `~/.cursor/hooks.json` (asks first, keeps your other hooks, backs the file up); `off` removes it |
58
60
  | `stats` | Counts from local data |
59
61
  | `reset` | Delete Reflex's own data (not installed skills or the model) |
60
62
  | `model [status\|fetch\|use\|remove]` | Optional local embedding model for matching requests by meaning. `fetch` downloads bge-m3 (multilingual, 587 MB); `fetch --light` the English-only all-MiniLM-L6-v2 (23 MB); `use <name>` switches between installed ones |
@@ -75,9 +77,9 @@ tool, model and project, the most expensive sessions, what caching saved), gener
75
77
  suggestions waiting for review, every repeated workflow with the evidence behind it, router
76
78
  suggestions (which model was cheapest and about as reliable, per kind of task), and a search over
77
79
  each session's opening request and steps. Enter reopens a Claude Code or Codex session, or opens a
78
- Cursor chat's workspace in Cursor. Cursor records no tokens, so its sessions have no cost; if you
79
- allow it, Reflex reads which model each Cursor chat used and Tokens counts Cursor sessions per
80
- model. Usage
80
+ Cursor chat's workspace in Cursor. Cursor saves no tokens in its transcripts, so its sessions have
81
+ no cost unless you turn on `reflex cursor-usage` (below); if you allow it, Reflex reads which model
82
+ each Cursor chat used and Tokens counts Cursor sessions per model. Usage
81
83
  limits are not recorded, so that block says `not measured yet`. Run `reflex scan` again (or press
82
84
  `r`) after upgrading: costs need the model of each session, which older scans did not store.
83
85
 
@@ -183,7 +185,8 @@ both sides have at least 3 runs, and never predicts savings in advance.
183
185
 
184
186
  - Tokens are whole-session totals as Claude Code and Codex record them, cache reads included, so
185
187
  other work in the same session counts too.
186
- - Cursor doesn't record tokens. Cursor runs count tool calls only.
188
+ - Cursor saves no tokens in its transcripts. Cursor runs count tool calls only, unless
189
+ `reflex cursor-usage` was on during them.
187
190
  - The skill's own cost is shown as an estimate from its file size (4 characters per token).
188
191
 
189
192
  ## Routing tasks to models
@@ -249,6 +252,14 @@ Threat model and mitigations: [docs/security.md](docs/security.md).
249
252
  | Codex | `$CODEX_HOME/sessions/YYYY/MM/DD/rollout-*.jsonl` | `~/.codex/skills/<name>/SKILL.md` | Parser follows the Codex protocol types and is tested on fixtures; not yet run against real rollouts or a live Codex session |
250
253
  | Cursor | `~/.cursor/projects/*/agent-transcripts/*/*.jsonl` | `~/.cursor/skills/<name>/SKILL.md` | Parser tested on fixtures and on real agent transcripts. Cursor doesn't record tool results, so pass/fail outcomes aren't available for its sessions |
251
254
 
255
+ **Cursor token usage.** Cursor's transcripts and app database have no token counts (every
256
+ `tokenCount` is 0), but Cursor passes each agent turn's counts to its hooks. `reflex cursor-usage on`
257
+ adds one hook (`stop`, with `afterAgentResponse` as fallback) that appends the chat and turn ids, the
258
+ model and the four token counts to `~/.reflex/cursor-usage.jsonl`; never the prompt or the answer, no
259
+ network. The chat id is the transcript's file name, so `reflex scan` attaches those counts to each
260
+ Cursor chat and prices them like other sessions. Only turns from while the hook is on are counted;
261
+ Cursor's command-line agent in `-p` mode sends no end-of-turn hook. Not available on Windows yet.
262
+
252
263
  **Agents a session launched.** When a Cursor chat launches agents (its `Task` / `Subagent` tool),
253
264
  Reflex records each one (kind, model, background or not, its short description) and reads the
254
265
  agents' transcripts (`<chat>/subagents/*.jsonl`). Their commands, files and tool calls count toward
@@ -297,3 +308,7 @@ by the tests; it is not part of the published CLI.
297
308
  - Each source reads at most its 2,000 most recent files per scan.
298
309
  - Sponsor integrations (Alike, Darwin) are not included: no public API documentation was available
299
310
  to build against, and the product works without them.
311
+
312
+ ## License
313
+
314
+ MIT. See [LICENSE](LICENSE).