@bichpham/agent-s 0.0.0-stage → 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.
package/README.md CHANGED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
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.
File without changes
package/hooks/.gitkeep ADDED
File without changes
package/install.sh ADDED
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env bash
2
+ # Install agents, skills, rules and hooks from this repo into ~/.claude.
3
+ #
4
+ # Usage: ./install.sh [--copy] or npx agent-s
5
+ # --copy copy files instead of symlinking them (default: symlink, so
6
+ # edits in this repo take effect immediately)
7
+ #
8
+ # Set CLAUDE_DIR to install somewhere other than ~/.claude.
9
+ # Existing files that would be replaced are moved to $CLAUDE_DIR/backups/<timestamp>/.
10
+
11
+ set -euo pipefail
12
+
13
+ # Resolve symlinks so this works when run via npx (node_modules/.bin/agent-s).
14
+ SOURCE="${BASH_SOURCE[0]}"
15
+ while [ -L "$SOURCE" ]; do
16
+ DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
17
+ SOURCE="$(readlink "$SOURCE")"
18
+ case "$SOURCE" in /*) ;; *) SOURCE="$DIR/$SOURCE" ;; esac
19
+ done
20
+ REPO_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
21
+ CLAUDE_DIR="${CLAUDE_DIR:-$HOME/.claude}"
22
+ MODE="link"
23
+
24
+ # Installed from npm (npx cache or node_modules): links would point at a
25
+ # directory npm may delete, so always copy.
26
+ case "$REPO_DIR" in
27
+ */_npx/*|*/node_modules/*) MODE="copy" ;;
28
+ esac
29
+ BACKUP_DIR="$CLAUDE_DIR/backups/$(date +%Y%m%d%H%M%S)"
30
+
31
+ for arg in "$@"; do
32
+ case "$arg" in
33
+ --copy) MODE="copy" ;;
34
+ -h|--help) sed -n '2,10p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
35
+ *) echo "Unknown option: $arg" >&2; exit 1 ;;
36
+ esac
37
+ done
38
+
39
+ installed=0
40
+ for dir in agents skills rules hooks; do
41
+ [ -d "$REPO_DIR/$dir" ] || continue
42
+ mkdir -p "$CLAUDE_DIR/$dir"
43
+
44
+ for src in "$REPO_DIR/$dir"/* "$REPO_DIR/$dir"/.[!.]*; do
45
+ [ -e "$src" ] || continue
46
+ name="$(basename "$src")"
47
+ [ "$name" = ".gitkeep" ] && continue
48
+ dest="$CLAUDE_DIR/$dir/$name"
49
+
50
+ if [ "$MODE" = "link" ] && [ -L "$dest" ] && [ "$(readlink "$dest")" = "$src" ]; then
51
+ echo "ok $dir/$name"
52
+ continue
53
+ fi
54
+
55
+ if [ -e "$dest" ] || [ -L "$dest" ]; then
56
+ mkdir -p "$BACKUP_DIR/$dir"
57
+ mv "$dest" "$BACKUP_DIR/$dir/$name"
58
+ echo "backup $dir/$name -> $BACKUP_DIR/$dir/$name"
59
+ fi
60
+
61
+ if [ "$MODE" = "link" ]; then
62
+ ln -s "$src" "$dest"
63
+ echo "linked $dir/$name"
64
+ else
65
+ cp -R "$src" "$dest"
66
+ echo "copied $dir/$name"
67
+ fi
68
+ installed=$((installed + 1))
69
+ done
70
+ done
71
+
72
+ # Make hook scripts executable so Claude Code can run them.
73
+ if [ -d "$REPO_DIR/hooks" ]; then
74
+ find "$REPO_DIR/hooks" -type f \( -name '*.sh' -o -name '*.py' -o -name '*.js' \) -exec chmod +x {} +
75
+ fi
76
+
77
+ echo
78
+ echo "Installed $installed item(s) into $CLAUDE_DIR ($MODE mode)."
79
+ if [ -n "$(find "$REPO_DIR/hooks" -type f ! -name .gitkeep 2>/dev/null)" ]; then
80
+ echo "Note: hooks still need to be registered in $CLAUDE_DIR/settings.json."
81
+ fi
package/package.json CHANGED
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "name": "@bichpham/agent-s",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "My personal Claude Code setup: agents, skills, rules, hooks",
5
+ "bin": {
6
+ "agent-s": "install.sh"
7
+ },
8
+ "files": [
9
+ "install.sh",
10
+ "agents",
11
+ "skills",
12
+ "rules",
13
+ "hooks"
14
+ ],
15
+ "scripts": {
16
+ "setup": "./install.sh",
17
+ "test": "echo \"Error: no test specified\" && exit 1"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/motchiecbichpham/agent-s.git"
22
+ },
23
+ "keywords": [],
24
+ "author": "",
25
+ "license": "ISC",
26
+ "bugs": {
27
+ "url": "https://github.com/motchiecbichpham/agent-s/issues"
28
+ },
29
+ "homepage": "https://github.com/motchiecbichpham/agent-s#readme",
30
+ "publishConfig": {
31
+ "access": "public"
32
+ }
33
+ }
package/rules/.gitkeep ADDED
File without changes
File without changes