ctxmedic 0.1.0 → 0.2.1
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.
- package/README.md +39 -1
- package/dist/index.js +326 -210
- package/package.json +18 -7
- package/public/assets/index-DIUIzBMS.js +15 -0
- package/public/assets/index-DLwaDGT3.css +1 -0
- package/public/index.html +2 -2
- package/public/assets/index-Bqo1oFYC.css +0 -1
- package/public/assets/index-CuWHlsFL.js +0 -130
package/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# ctxmedic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/ctxmedic)
|
|
4
|
+
[](https://www.npmjs.com/package/ctxmedic)
|
|
5
|
+
[](https://github.com/ponomarenko/ctxmedic/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/ctxmedic)
|
|
7
|
+
[](https://github.com/ponomarenko/ctxmedic/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
> The context medic for your AI coding setup: a linter, auto-fixer and
|
|
10
|
+
> token-cost analyzer for `CLAUDE.md`, `AGENTS.md`, Cursor rules, skills and MCP configs.
|
|
4
11
|
|
|
5
12
|
ctxmedic examines the AI configuration of a project like a doctor examines a
|
|
6
13
|
patient. It reads your `CLAUDE.md`, `AGENTS.md`, Cursor/Windsurf/Copilot/Cline
|
|
@@ -11,6 +18,11 @@ save tokens and money.
|
|
|
11
18
|
Works with Claude Code, Cursor, Windsurf, Codex CLI, OpenCode, GitHub Copilot
|
|
12
19
|
and Cline. 100% local: nothing leaves your machine.
|
|
13
20
|
|
|
21
|
+
**Why:** AI coding tools load your rules, skills and MCP tool schemas into every
|
|
22
|
+
request. Bloated or duplicated `CLAUDE.md` files, broken links, leaked secrets and
|
|
23
|
+
long sessions without `/compact` quietly cost tokens, money and answer quality.
|
|
24
|
+
ctxmedic finds them, explains them, and fixes them safely.
|
|
25
|
+
|
|
14
26
|
```bash
|
|
15
27
|
npx ctxmedic checkup
|
|
16
28
|
```
|
|
@@ -36,6 +48,7 @@ npx ctxmedic checkup
|
|
|
36
48
|
|---|---|
|
|
37
49
|
| `ctxmedic checkup [path]` | Full examination. `--json` for machines, exit code 1 on 🔴 findings (CI gate). |
|
|
38
50
|
| `ctxmedic treat RX-01` | Apply one prescription. `--all`, `--dry-run`, `--force`, `-y`. |
|
|
51
|
+
| `ctxmedic restore [backup\|latest]` | Undo a fix from `.ctxmedic/backups`. No argument lists backups. `--dry-run`, `--force`. |
|
|
39
52
|
| `ctxmedic savings` | FinOps only: spend, run rate, cache hit ratio, savings. |
|
|
40
53
|
| `ctxmedic consult [--ai]` | Interactive appointment: your priorities, budget and main tool shape the treatment plan. `--ai` asks local Ollama or your own Anthropic/OpenAI key for a second opinion. |
|
|
41
54
|
| `ctxmedic history` | Health Score over time. |
|
|
@@ -43,6 +56,31 @@ npx ctxmedic checkup
|
|
|
43
56
|
|
|
44
57
|
Common options: `--days 30`, `--no-finops`, `--no-global`.
|
|
45
58
|
|
|
59
|
+
## GitHub Action
|
|
60
|
+
|
|
61
|
+
Gate pull requests on the health of your AI configs. The action runs
|
|
62
|
+
`ctxmedic checkup --no-global --no-finops`, writes the cards to the job summary,
|
|
63
|
+
annotates the files, and fails the job on 🔴 findings.
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
# .github/workflows/ctxmedic.yml
|
|
67
|
+
name: ctxmedic
|
|
68
|
+
on: pull_request
|
|
69
|
+
jobs:
|
|
70
|
+
checkup:
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
- uses: ponomarenko/ctxmedic@v0 # or pin an exact release, e.g. @v0.2.0
|
|
75
|
+
with:
|
|
76
|
+
fail-on: critical # or "warning" to fail on 🟡 too
|
|
77
|
+
# path: . # project folder
|
|
78
|
+
# version: 0.1.0 # ctxmedic version from npm (default: latest)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Nothing leaves the runner: no telemetry, no network calls besides installing the
|
|
82
|
+
package from npm.
|
|
83
|
+
|
|
46
84
|
## Diagnoses
|
|
47
85
|
|
|
48
86
|
| Code | Diagnosis | Auto-fix |
|