tokenfreez 0.1.0 → 0.1.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.
@@ -1,3 +1,19 @@
1
- // ponytail: empty entrypoint so npm package satisfies the opencode plugin contract;
2
- // all behavior lives in skills/ which opencode scans from the installed package.
3
- export default async () => ({})
1
+ // opencode does not auto-scan skills/ from installed plugin packages, so the
2
+ // plugin registers its own skills directory (same pattern ponytail uses).
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const skillsDir = path.resolve(
7
+ path.dirname(fileURLToPath(import.meta.url)),
8
+ "../../skills",
9
+ );
10
+
11
+ export default async () => ({
12
+ config: async (config) => {
13
+ config.skills = config.skills || {};
14
+ config.skills.paths = config.skills.paths || [];
15
+ if (!config.skills.paths.includes(skillsDir)) {
16
+ config.skills.paths.push(skillsDir);
17
+ }
18
+ },
19
+ });
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # TokenFreez
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/tokenfreez)](https://www.npmjs.com/package/tokenfreez)
4
+ ![License](https://img.shields.io/badge/license-MIT-blue)
5
+
3
6
  opencode skills that cut token waste in AI coding sessions. Each skill targets one of
4
7
  the four ways coding agents quietly burn tokens — so small tasks stop costing big money.
5
8
 
@@ -19,11 +22,13 @@ output — gets paid for again on every subsequent turn. TokenFreez attacks all
19
22
 
20
23
  ## Install
21
24
 
22
- Requires [opencode](https://opencode.ai).
25
+ Requires [opencode](https://opencode.ai). Published on
26
+ [npm](https://www.npmjs.com/package/tokenfreez).
23
27
 
24
28
  ### One line (recommended)
25
29
 
26
- Add the package to your `opencode.json`:
30
+ Add `"plugin": ["tokenfreez"]` to your `opencode.json` — per project, or globally at
31
+ `~/.config/opencode/opencode.json` to enable the skills in every project:
27
32
 
28
33
  ```json
29
34
  {
@@ -34,6 +39,9 @@ Add the package to your `opencode.json`:
34
39
 
35
40
  Restart opencode — all four skills are available in every project.
36
41
 
42
+ > Pick **one** install method: enabling the plugin while also copying the skills
43
+ > manually registers duplicate skill names.
44
+
37
45
  ### Manual
38
46
 
39
47
  Copy the skills you want into your project, or globally into `~/.config/opencode/skills/`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokenfreez",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "TokenFreez - opencode skills that cut token waste in AI coding sessions.",
5
5
  "keywords": [
6
6
  "opencode-plugin",