ahhc 1.0.0

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 (3) hide show
  1. package/README.md +12 -0
  2. package/package.json +13 -0
  3. package/src/bin.js +36 -0
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # ahhc
2
+
3
+ [![npm](https://img.shields.io/npm/v/ahhc)](https://www.npmjs.com/package/ahhc)
4
+
5
+ CLI to install Hai-Ching's Claude Code Skills.
6
+
7
+ ## Install Skills
8
+
9
+ ```bash
10
+ npx ahhc install
11
+ npx ahhc uninstall
12
+ ```
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "ahhc",
3
+ "version": "1.0.0",
4
+ "description": "Hai-Ching's Claude Code Skill CLI",
5
+ "bin": {
6
+ "ahhc": "./src/bin.js"
7
+ },
8
+ "files": [
9
+ "src/bin.js",
10
+ "README.md"
11
+ ],
12
+ "license": "MIT"
13
+ }
package/src/bin.js ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require("child_process");
4
+
5
+ const REPO = "ahueee/ahhc";
6
+ const CLAUDE_MD_URL = `https://raw.githubusercontent.com/${REPO}/main/CLAUDE.md`;
7
+
8
+ const commands = {
9
+ install: () => {
10
+ console.log("Installing skills...");
11
+ execSync(`npx openskills install ${REPO} --global -y`, {
12
+ stdio: "inherit",
13
+ });
14
+ console.log("Installing global CLAUDE.md...");
15
+ execSync(`curl -o ~/.claude/CLAUDE.md ${CLAUDE_MD_URL}`, {
16
+ stdio: "inherit",
17
+ });
18
+ console.log("Done!");
19
+ },
20
+ uninstall: () => {
21
+ console.log("Removing skills...");
22
+ execSync("rm -rf ~/.claude/skills/*", { stdio: "inherit" });
23
+ console.log("Removing global CLAUDE.md...");
24
+ execSync("rm -f ~/.claude/CLAUDE.md", { stdio: "inherit" });
25
+ console.log("Done!");
26
+ },
27
+ };
28
+
29
+ const aliases = { i: "install", u: "uninstall" };
30
+ const cmd = aliases[process.argv[2]] || process.argv[2];
31
+ if (!cmd || cmd === "-h" || cmd === "--help" || !commands[cmd]) {
32
+ console.log("Usage: aaiii <install|uninstall> (i, u)");
33
+ process.exit(0);
34
+ }
35
+
36
+ commands[cmd]();