clare-ai 0.0.0-stage → 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 reveer-ai
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
@@ -1,3 +1,33 @@
1
- # Temporary Holding Version
1
+ # clare
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ clare explains a subject in whatever form gets it across fastest: an interactive page, a few slides, a diagram, an image, a set of flashcards. Paragraphs are a last resort.
4
+
5
+ It ships as a set of skills that any coding assistant can use.
6
+
7
+ > **Not usable yet.** The only skill so far is a placeholder that does nothing.
8
+
9
+ ## Install
10
+
11
+ In your project:
12
+
13
+ ```sh
14
+ npx clare-ai init
15
+ ```
16
+
17
+ Note the package name: it's **`clare-ai`**. The `clare` package on npm is unrelated, so `npx clare init` won't run this.
18
+
19
+ `init` copies clare's skills into `.agents/skills/`, the folder that Codex, Copilot, Cursor, Gemini CLI and others read. It changes only clare's own folders there.
20
+
21
+ Claude Code reads only `.claude/skills/`. If your project has a `.claude/` folder, `init` also links `.claude/skills/<skill>` to the copy in `.agents/skills/`, so there's still one copy. If you add `.claude/` later, run `init` again.
22
+
23
+ To update, run the latest version:
24
+
25
+ ```sh
26
+ npx clare-ai@latest init
27
+ ```
28
+
29
+ This replaces clare's skill folders, including any edits you made to them.
30
+
31
+ ## License
32
+
33
+ MIT
package/bin/clare.js ADDED
@@ -0,0 +1,97 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
7
+ const packagedSkills = path.join(packageRoot, 'skills');
8
+
9
+ const usage = `Usage: clare <command>
10
+
11
+ Commands:
12
+ init Install clare's skills into this project's .agents/skills/
13
+ (and link them into .claude/skills/ if .claude/ exists)
14
+
15
+ Options:
16
+ --help Show this help
17
+ --version Show the installed version
18
+ `;
19
+
20
+ function version() {
21
+ return JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8')).version;
22
+ }
23
+
24
+ function warn(message) {
25
+ process.stderr.write(`warning: ${message}\n`);
26
+ }
27
+
28
+ // Point .claude/skills/<name> at the .agents/skills/<name> copy, so Claude Code
29
+ // finds the same files. Never fails the install: problems become warnings.
30
+ function linkForClaudeCode(cwd, name) {
31
+ const linkDir = path.join(cwd, '.claude', 'skills');
32
+ const linkPath = path.join(linkDir, name);
33
+ const shown = path.join('.claude', 'skills', name);
34
+ const target = path.join('..', '..', '.agents', 'skills', name);
35
+
36
+ try {
37
+ fs.mkdirSync(linkDir, { recursive: true });
38
+
39
+ let existing = null;
40
+ try {
41
+ existing = fs.lstatSync(linkPath);
42
+ } catch (error) {
43
+ if (error.code !== 'ENOENT') throw error;
44
+ }
45
+ if (existing && !existing.isSymbolicLink()) {
46
+ warn(`${shown} already exists and isn't a link, so it was left alone. Claude Code won't see clare's ${name} skill.`);
47
+ return;
48
+ }
49
+ if (existing) fs.unlinkSync(linkPath);
50
+
51
+ if (process.platform === 'win32') {
52
+ // Junctions need no admin rights, but they must use an absolute target.
53
+ fs.symlinkSync(path.resolve(linkDir, target), linkPath, 'junction');
54
+ } else {
55
+ fs.symlinkSync(target, linkPath, 'dir');
56
+ }
57
+ console.log(`linked ${shown} -> ${target.split(path.sep).join('/')}`);
58
+ } catch (error) {
59
+ warn(`couldn't link ${shown} (${error.code ?? error.message}). The skill is installed in .agents/skills/, but Claude Code won't see it.`);
60
+ }
61
+ }
62
+
63
+ function init(cwd) {
64
+ const skillsDir = path.join(cwd, '.agents', 'skills');
65
+ const names = fs
66
+ .readdirSync(packagedSkills, { withFileTypes: true })
67
+ .filter((entry) => entry.isDirectory())
68
+ .map((entry) => entry.name)
69
+ .sort();
70
+ const useClaude = fs.existsSync(path.join(cwd, '.claude'));
71
+
72
+ fs.mkdirSync(skillsDir, { recursive: true });
73
+ for (const name of names) {
74
+ const dest = path.join(skillsDir, name);
75
+ const replacing = fs.existsSync(dest);
76
+ // Replace clare's own folder outright; nothing else in .agents/skills/ is touched.
77
+ fs.rmSync(dest, { recursive: true, force: true });
78
+ fs.cpSync(path.join(packagedSkills, name), dest, { recursive: true });
79
+ console.log(`${replacing ? 'replaced ' : 'installed'} ${path.join('.agents', 'skills', name)}`);
80
+
81
+ if (useClaude) linkForClaudeCode(cwd, name);
82
+ }
83
+ }
84
+
85
+ const args = process.argv.slice(2);
86
+
87
+ if (args.length === 1 && args[0] === '--help') {
88
+ process.stdout.write(usage);
89
+ } else if (args.length === 1 && args[0] === '--version') {
90
+ console.log(version());
91
+ } else if (args.length === 1 && args[0] === 'init') {
92
+ init(process.cwd());
93
+ } else {
94
+ if (args.length > 0) process.stderr.write(`Unknown command: ${args.join(' ')}\n\n`);
95
+ process.stderr.write(usage);
96
+ process.exitCode = 1;
97
+ }
package/package.json CHANGED
@@ -1,6 +1,26 @@
1
1
  {
2
2
  "name": "clare-ai",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "description": "Skills that help any coding assistant explain a subject in the form that gets it across fastest. Run with npx clare-ai init.",
5
+ "type": "module",
6
+ "bin": {
7
+ "clare": "bin/clare.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "skills/",
12
+ "README.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=22"
16
+ },
17
+ "scripts": {
18
+ "test": "node --test"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/reveer-ai/clare.git"
23
+ },
24
+ "homepage": "https://github.com/reveer-ai/clare#readme",
25
+ "license": "MIT"
26
+ }
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: clare
3
+ description: TBD. Placeholder for clare, which isn't implemented yet. It does nothing.
4
+ ---
5
+
6
+ TBD.