@drunkcoding/agents-and-skills 0.0.28 → 0.0.30

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.
@@ -12,7 +12,7 @@
12
12
  "name": "tech-graph",
13
13
  "source": "./plugins/tech-graph",
14
14
  "description": "6-step wizard for technical diagrams (SVG/PNG) via fireworks-tech-graph",
15
- "version": "0.0.28",
15
+ "version": "0.0.30",
16
16
  "category": "diagram",
17
17
  "keywords": [
18
18
  "diagram",
@@ -26,7 +26,7 @@
26
26
  "name": "html-effectiveness",
27
27
  "source": "./plugins/html-effectiveness",
28
28
  "description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
29
- "version": "0.0.28",
29
+ "version": "0.0.30",
30
30
  "category": "reports",
31
31
  "keywords": [
32
32
  "html",
@@ -41,7 +41,7 @@
41
41
  "name": "plugin-validator",
42
42
  "source": "./plugins/plugin-validator",
43
43
  "description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
44
- "version": "0.0.28",
44
+ "version": "0.0.30",
45
45
  "category": "tooling",
46
46
  "keywords": [
47
47
  "validation",
@@ -56,14 +56,15 @@
56
56
  {
57
57
  "name": "team-share",
58
58
  "source": "./plugins/team-share",
59
- "description": "Share Claude plugin settings with a team, scaffold CLAUDE.md when needed, refresh the Understand-Anything graph, and stage the onboarding artifacts for review.",
60
- "version": "0.0.28",
59
+ "description": "Onboard your team with an interactive setup menu: install CodeGraph, build the Understand-Anything knowledge graph, and share Claude Code settings run any combination, all idempotent.",
60
+ "version": "0.0.30",
61
61
  "category": "tooling",
62
62
  "keywords": [
63
63
  "onboarding",
64
64
  "team",
65
65
  "claude",
66
66
  "settings",
67
+ "codegraph",
67
68
  "understand-anything",
68
69
  "git-lfs"
69
70
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drunkcoding/agents-and-skills",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "Personal collection of Claude Code skills and agents, installable via `npx skills`.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "html-effectiveness",
3
3
  "displayName": "HTML Effectiveness Reports",
4
- "version": "0.0.28",
4
+ "version": "0.0.30",
5
5
  "description": "Generate self-contained interactive HTML reports from 20 upstream templates via a conversational agent.",
6
6
  "author": {
7
7
  "name": "Steven Hoang"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "plugin-validator",
3
3
  "displayName": "Plugin Validator",
4
- "version": "0.0.28",
4
+ "version": "0.0.30",
5
5
  "description": "Orchestrated validator for Claude Code plugins — validates skills, agents, commands, and hooks across every plugin under plugins/**.",
6
6
  "author": {
7
7
  "name": "Steven Hoang"
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "team-share",
3
3
  "displayName": "Team Share",
4
- "version": "0.0.28",
5
- "description": "Share Claude plugin settings with a team, scaffold CLAUDE.md when needed, refresh the Understand-Anything graph, and stage the onboarding artifacts for review.",
4
+ "version": "0.0.30",
5
+ "description": "Onboard your team with an interactive setup menu: install CodeGraph, build the Understand-Anything knowledge graph, and share Claude Code settings run any combination, all idempotent.",
6
6
  "author": {
7
7
  "name": "Steven Hoang"
8
8
  },
@@ -11,6 +11,7 @@
11
11
  "team",
12
12
  "claude",
13
13
  "settings",
14
+ "codegraph",
14
15
  "understand-anything",
15
16
  "git-lfs"
16
17
  ]
@@ -1,30 +1,46 @@
1
1
  # team-share
2
2
 
3
- Share repo-level Claude Code onboarding artifacts with your team in one pass.
3
+ Onboard your team with an interactive setup menu. Run `/team-share` and choose which actions to execute — only selected actions run.
4
4
 
5
5
  ## What it does
6
6
 
7
- The `team-share` agent prepares a repository for teammates by:
7
+ The `team-share` agent presents a multi-select menu with four options:
8
8
 
9
- 1. Writing a shareable `.claude/settings.json` from the maintainer's enabled plugins and marketplaces.
10
- 2. Ensuring `CLAUDE.md` exists when the project does not already have one.
11
- 3. Refreshing the Understand-Anything knowledge graph with auto-update enabled.
12
- 4. Tracking the graph with `git-lfs` and staging the resulting onboarding files for human review.
9
+ | Option | What runs |
10
+ |--------|-----------|
11
+ | **Default (CodeGraph + Claude config)** *(Recommended)* | `codegraph-setup` + `claude-config` |
12
+ | Setup CodeGraph | `codegraph-setup` |
13
+ | Setup Understand-Anything | `understand-setup` |
14
+ | Setup team Claude config | `claude-config` |
13
15
 
14
- It is designed to be idempotent and intentionally stops short of committing or pushing.
16
+ ## Skills (independently invocable)
15
17
 
16
- ## Usage
18
+ Each action is also available as a standalone skill:
19
+
20
+ ### `/codegraph-setup`
21
+
22
+ Installs the [CodeGraph](https://github.com/colbymchenry/codegraph) CLI, wires it to Claude Code via MCP (`codegraph install`), and initialises the current project (`codegraph init`). Works on macOS, Linux, and Windows.
23
+
24
+ ### `/understand-setup`
17
25
 
18
- Run:
26
+ Installs the [Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) plugin, builds the knowledge graph with `--auto-update`, generates `docs/wiki`, git-lfs tracks the graph, and stages all artefacts.
27
+
28
+ ### `/claude-config`
29
+
30
+ Merges `enabledPlugins` and `extraKnownMarketplaces` from the maintainer's user settings into `.claude/settings.json`, scaffolds `CLAUDE.md` when missing, injects the Understand-Anything code-research section, and stages the result.
31
+
32
+ ## Usage
19
33
 
20
34
  ```text
21
35
  /team-share [--force] [--language <lang>]
22
36
  ```
23
37
 
24
- Arguments are passed through to `/understand` alongside the default `--auto-update` behavior.
38
+ Arguments are forwarded to `/understand` when `understand-setup` is selected.
25
39
 
26
40
  ## Notes
27
41
 
28
- - The command expects `git-lfs` and `jq` to be installed.
29
- - It stages files for review but does not create commits.
30
- - The knowledge graph flow depends on the `understand-anything` plugin being available to teammates.
42
+ - `codegraph-setup` requires internet access to download the CLI.
43
+ - `understand-setup` requires `git-lfs` and `jq` to be installed.
44
+ - `claude-config` requires `jq` to be installed.
45
+ - All skills stage files but never commit or push — a human reviews and commits.
46
+ - All skills are idempotent — safe to re-run.
@@ -1,228 +1,53 @@
1
1
  ---
2
2
  name: team-share
3
3
  description: Share Claude plugin settings with the team, build or refresh the Understand-Anything knowledge graph, initialize the docs wiki, and git-lfs track it before staging everything for review.
4
- argument-hint: "[--force] [--language <lang>] (passed through to /understand)"
5
- allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Skill
4
+ argument-hint: "[--force] [--language <lang>] (forwarded to understand-setup → /understand)"
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Skill, AskUserQuestion
6
6
  ---
7
7
 
8
8
  # /team-share
9
9
 
10
- Make this repo onboarding-ready for the team in one pass:
10
+ Make this repo onboarding-ready for the team in one pass. Choose which setup actions to run.
11
11
 
12
- 1. Generate a **shareable `.claude/settings.json`** (plugins + marketplaces) from the maintainer's live setup.
13
- 2. Build/refresh the **Understand-Anything knowledge graph** with auto-update enabled.
14
- 3. Initialize the **docs wiki** for Understand-Anything under `docs/wiki`.
15
- 4. **git-lfs track** the graph and **stage** everything — leaving the commit to a human.
12
+ ## Step 0 Interactive menu
16
13
 
17
- This command is **idempotent** safe to re-run. It **never commits or pushes**; it only stages.
18
- `$ARGUMENTS` (e.g. `--force`, `--language zh`) is forwarded to `/understand`.
14
+ Before any work begins, use AskUserQuestion with `multiSelect: true` and these four options:
19
15
 
20
- Plugin source: Understand-Anything (Egonex fork) — <https://github.com/Egonex-AI/Understand-Anything>
16
+ | Label | Description |
17
+ |-------|-------------|
18
+ | Default (CodeGraph + Claude config) *(Recommended)* | Install CodeGraph CLI + init project, then share .claude/settings.json and scaffold CLAUDE.md. Best starting point for most repos. |
19
+ | Setup CodeGraph | Install the CodeGraph CLI, wire it to Claude Code MCP, and run codegraph init in this project. |
20
+ | Setup Understand-Anything | Install the Understand-Anything plugin, build the knowledge graph with auto-update, and generate docs/wiki. |
21
+ | Setup team Claude config | Merge enabledPlugins + marketplaces into .claude/settings.json, scaffold CLAUDE.md, and stage. |
21
22
 
22
- ---
23
-
24
- ## Step 0 — Preconditions (stop on any failure, fail loud)
25
-
26
- ```bash
27
- git rev-parse --is-inside-work-tree # must be a git repo
28
- git rev-parse --abbrev-ref HEAD # report branch; warn if it is the default/protected branch
29
- command -v git-lfs || echo "MISSING: git-lfs — install it (brew install git-lfs) before continuing"
30
- command -v jq || echo "MISSING: jq — install it (brew install jq) before continuing"
31
- ```
23
+ If the user selects nothing, print `"Nothing selected — exiting."` and stop immediately.
32
24
 
33
- - If not a git repo, or `git-lfs`/`jq` are missing → **report and STOP**. Do not partially apply.
34
- - If on a protected branch (e.g. `develop`/`main`), warn and ask the user to switch to a feature branch first.
25
+ ## Step 1 Build run-list
35
26
 
36
- ---
37
-
38
- ## Step 1 — Generate the shareable `.claude/settings.json` **and ensure `CLAUDE.md` exists**
39
-
40
- Goal: teammates who clone the repo get the **same plugins + marketplaces** the maintainer uses, with **no machine-specific data leaked** — *and* a project-level `CLAUDE.md` is scaffolded if it is missing.
41
-
42
- ### 1a — Merge plugin + marketplace settings
43
-
44
- Copy **only** `enabledPlugins` and `extraKnownMarketplaces` from the maintainer's user settings into the repo settings. Do **NOT** copy `hooks`, `permissions`, `env`, or any key holding absolute paths or machine-local secrets.
45
-
46
- ```bash
47
- USER_SETTINGS="$HOME/.claude/settings.json"
48
- REPO_SETTINGS=".claude/settings.json"
49
-
50
- mkdir -p .claude
51
- [ -f "$REPO_SETTINGS" ] || echo '{}' > "$REPO_SETTINGS"
52
-
53
- # Merge: repo settings win on scalar keys; the two plugin maps are unioned
54
- # (user entries layered on top of any existing repo entries). Only these two
55
- # keys are taken from user settings — nothing else crosses over.
56
- jq -s '
57
- .[0] as $repo | .[1] as $user
58
- | $repo
59
- + { enabledPlugins: (($repo.enabledPlugins // {}) + ($user.enabledPlugins // {})) }
60
- + { extraKnownMarketplaces: (($repo.extraKnownMarketplaces // {}) + ($user.extraKnownMarketplaces // {})) }
61
- ' "$REPO_SETTINGS" "$USER_SETTINGS" > "$REPO_SETTINGS.tmp" && mv "$REPO_SETTINGS.tmp" "$REPO_SETTINGS"
62
-
63
- jq '{enabledPlugins, extraKnownMarketplaces}' "$REPO_SETTINGS" # show the result for review
64
- ```
65
-
66
- Notes:
67
- - This shares **currently-enabled** plugins (the in-use set). It does not pull disabled-but-installed plugins.
68
- - Some marketplaces may be **private** (require repo/org access). Flag any private marketplace so the user can confirm teammates can reach it.
69
- - Confirm `understand-anything@understand-anything` is present in `enabledPlugins` (needed for Step 2's auto-update hook to work on teammates' machines). If absent, tell the user to install it:
70
- `/plugin marketplace add Egonex-AI/Understand-Anything` then `/plugin install understand-anything`.
71
-
72
- ### 1b — Scaffold `CLAUDE.md` if missing
73
-
74
- The `claude-code-setup` plugin (from the `claude-plugins-official` marketplace) generates a project-savvy `CLAUDE.md` when one does not yet exist. Running the install command is **idempotent** — if the file already exists, this step is skipped.
75
-
76
- ```bash
77
- # Only create CLAUDE.md when it does not already exist.
78
- if [ -f CLAUDE.md ]; then
79
- echo "✅ CLAUDE.md already exists — skipping plugin install."
80
- else
81
- echo "📝 CLAUDE.md not found — installing claude-code-setup plugin to scaffold it…"
82
- claude plugin install claude-code-setup@claude-plugins-official
83
- if [ -f CLAUDE.md ]; then
84
- echo "✅ CLAUDE.md created by claude-code-setup."
85
- else
86
- echo "⚠️ claude-code-setup did not produce CLAUDE.md — you may need to run it manually or create the file yourself."
87
- fi
88
- fi
89
- ```
90
-
91
- Notes:
92
- - The plugin must already be available in the `claude-plugins-official` marketplace (it is already listed in `enabledPlugins` in the repo settings).
93
- - If the team prefers a custom `CLAUDE.md` template, commit one *before* running this command so the guard `[ -f CLAUDE.md ]` skips the plugin step.
94
-
95
- ### 1c — Inject the Understand-Anything code-research section into `CLAUDE.md`
96
-
97
- Goal: every teammate's AI assistant knows to use the Understand-Anything commands when doing code research, without duplicating the section on re-runs.
98
-
99
- ```bash
100
- # Only append when the section marker is not already present (idempotent).
101
- if grep -qF '## Code research with Understand-Anything' CLAUDE.md 2>/dev/null; then
102
- echo "✅ Understand-Anything section already in CLAUDE.md — skipping."
103
- else
104
- cat >> CLAUDE.md << 'EOF'
105
-
106
- ## Code research with Understand-Anything
107
-
108
- This project uses the [Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) plugin to maintain an interactive knowledge graph of the codebase. **Always prefer these commands over raw file-by-file exploration when doing code research:**
109
-
110
- | Goal | Command |
111
- |------|---------|
112
- | Explore the full codebase graph | `/understand` |
113
- | Ask a free-form question about the code | `/understand-chat <question>` |
114
- | Deep-dive into a specific file or function | `/understand-explain <path/symbol>` |
115
- | See impact of your current changes before committing | `/understand-diff` |
116
- | Open the interactive visual dashboard | `/understand-dashboard` |
117
- | Extract business-domain knowledge (domains, flows, steps) | `/understand-domain` |
118
- | Generate an onboarding guide for new teammates | `/understand-onboard` |
119
- | Generate or refresh wiki knowledge under `docs/wiki` | `/understand-knowledge docs/wiki` |
120
-
121
- The knowledge graph lives in `.understand-anything/knowledge-graph.json` and is kept up-to-date automatically on every commit (auto-update is enabled). Re-run `/understand` after large refactors to force the graph to catch up, and re-run `/understand-knowledge docs/wiki` when you want to refresh the generated wiki content.
122
- EOF
123
- echo "✅ Understand-Anything code-research section appended to CLAUDE.md."
124
- fi
125
- ```
126
-
127
- Notes:
128
- - The section is appended at the end of `CLAUDE.md` so it does not disturb existing content.
129
- - The marker string `## Code research with Understand-Anything` is used as the idempotency guard — do not rename the heading without updating the guard.
130
- - If `MIRRORS.md` / `AGENTS.md` or other agent-config files exist alongside `CLAUDE.md` (e.g. for non-Claude runtimes), apply the same append to them so all agent runtimes get the guidance. The loop below appends the same section only when missing.
131
-
132
- ```bash
133
- # Mirror to AGENTS.md / MIRRORS.md if they exist (non-Claude runtimes).
134
- for f in AGENTS.md MIRRORS.md; do
135
- if [ -f "$f" ] && ! grep -qF '## Code research with Understand-Anything' "$f" 2>/dev/null; then
136
- cat >> "$f" << 'EOF'
137
-
138
- ## Code research with Understand-Anything
139
-
140
- This project uses the [Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) plugin to maintain an interactive knowledge graph of the codebase. **Always prefer these commands over raw file-by-file exploration when doing code research:**
141
-
142
- | Goal | Command |
143
- |------|---------|
144
- | Explore the full codebase graph | `/understand` |
145
- | Ask a free-form question about the code | `/understand-chat <question>` |
146
- | Deep-dive into a specific file or function | `/understand-explain <path/symbol>` |
147
- | See impact of your current changes before committing | `/understand-diff` |
148
- | Open the interactive visual dashboard | `/understand-dashboard` |
149
- | Extract business-domain knowledge (domains, flows, steps) | `/understand-domain` |
150
- | Generate an onboarding guide for new teammates | `/understand-onboard` |
151
- | Generate or refresh wiki knowledge under `docs/wiki` | `/understand-knowledge docs/wiki` |
152
-
153
- The knowledge graph lives in `.understand-anything/knowledge-graph.json` and is kept up-to-date automatically on every commit (auto-update is enabled). Re-run `/understand` after large refactors to force the graph to catch up, and re-run `/understand-knowledge docs/wiki` when you want to refresh the generated wiki content.
154
- EOF
155
- echo "✅ Understand-Anything section also appended to $f."
156
- fi
157
- done
158
- ```
27
+ From the selected options, assemble a deduplicated run-list. Mapping:
159
28
 
160
- ---
29
+ - "Default (CodeGraph + Claude config)" → `codegraph-setup`, `claude-config`
30
+ - "Setup CodeGraph" → `codegraph-setup`
31
+ - "Setup Understand-Anything" → `understand-setup`
32
+ - "Setup team Claude config" → `claude-config`
161
33
 
162
- ## Step 2 Build / refresh the knowledge graph (auto-update on)
163
-
164
- Run the skill **in the main thread** (it dispatches its own analyzer subagents — do not wrap it in a subagent):
165
-
166
- ```
167
- /understand --auto-update $ARGUMENTS
168
- ```
169
-
170
- - `--auto-update` writes `{"autoUpdate": true}` to `.understand-anything/config.json`. The plugin's bundled hook then incrementally patches the graph whenever a `git commit` is made (and on stale Session resume, depending on the plugin version).
171
- - If a graph already exists, `/understand` runs incrementally. Pass `--force` (via `$ARGUMENTS`) to rebuild from scratch.
172
- - After it finishes, confirm these exist: `.understand-anything/knowledge-graph.json`, `.understand-anything/meta.json`, `.understand-anything/config.json` (with `autoUpdate: true`).
173
-
174
- ---
34
+ Deduplication: if a skill appears more than once (e.g. "Default" + "Setup CodeGraph" both selected), keep it once. Final order is always: `codegraph-setup` → `understand-setup` → `claude-config`.
175
35
 
176
- ## Step 3Initialize the docs wiki from Understand-Anything
36
+ ## Step 2Dispatch
177
37
 
178
- Create the wiki folder if needed, then generate or refresh the wiki content in the main thread:
38
+ Invoke each skill in the run-list in order using the Skill tool:
179
39
 
180
- ```bash
181
- mkdir -p docs/wiki
182
- ```
40
+ - `codegraph-setup` → `team-share:codegraph-setup` (no arguments)
41
+ - `understand-setup` → `team-share:understand-setup` with `$ARGUMENTS` forwarded
42
+ - `claude-config` → `team-share:claude-config` (no arguments)
183
43
 
184
- ```
185
- /understand-knowledge docs/wiki
186
- ```
44
+ The agent does no implementation work itself — all logic lives in the skills.
187
45
 
188
- - `mkdir -p docs/wiki` is idempotent and ensures the target directory exists before wiki generation.
189
- - Re-running `/understand-knowledge docs/wiki` should refresh the generated wiki content in place.
190
- - After it finishes, confirm `docs/wiki/` exists and contains generated wiki files before staging.
191
-
192
- ---
193
-
194
- ## Step 4 — Ignore scratch, git-lfs track the graph, and stage
195
-
196
- Scratch outputs must stay local (never committed):
197
-
198
- ```bash
199
- # .gitignore — append only if missing (idempotent)
200
- for p in ".understand-anything/intermediate/" ".understand-anything/tmp/" ".understand-anything/diff-overlay.json"; do
201
- grep -qxF "$p" .gitignore 2>/dev/null || echo "$p" >> .gitignore
202
- done
203
-
204
- # Large graphs (10 MB+) belong in LFS; tracking is harmless for small ones too.
205
- git lfs install
206
- git lfs track ".understand-anything/*.json"
207
-
208
- # Stage — but DO NOT commit. A human reviews and commits.
209
- git add .gitattributes .gitignore .claude/settings.json .understand-anything/ docs/wiki/ CLAUDE.md
210
- # Also stage AGENTS.md / MIRRORS.md if they were modified.
211
- for f in AGENTS.md MIRRORS.md; do [ -f "$f" ] && git add "$f"; done
212
-
213
- git status
214
- git lfs ls-files # confirm the graph json is LFS-tracked
215
- ```
216
-
217
- ---
46
+ ## Done summary
218
47
 
219
- ## Done report, do not commit
48
+ After all selected skills complete, print a summary:
220
49
 
221
- Summarize for the user:
222
- - Which plugins/marketplaces were written into `.claude/settings.json` (call out any private ones).
223
- - `CLAUDE.md` status: already existed vs created by `claude-code-setup`; Understand-Anything section added vs already present.
224
- - `AGENTS.md` status (if applicable): Understand-Anything section added vs already present / not found.
225
- - Graph status: created vs incrementally updated; `autoUpdate` on/off.
226
- - Wiki status: `docs/wiki` created vs already existed; `/understand-knowledge docs/wiki` run successfully vs failed.
227
- - What is staged and confirmed LFS-tracked.
228
- - Remind them: **review, then commit yourself** (e.g. `git commit -m "chore: share team onboarding (claude settings + CLAUDE.md + understand graph + wiki)"`). The auto-update hook keeps the graph fresh on every future commit, and the wiki can be refreshed by re-running `/understand-knowledge docs/wiki` whenever needed.
50
+ - Which actions ran (in order).
51
+ - Any failures or warnings reported by individual skills.
52
+ - Reminder: **review staged changes, then commit yourself** for example:
53
+ `git commit -m "chore: team onboarding setup (codegraph + claude config)"`
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: claude-config
3
+ description: Write a shareable .claude/settings.json from the maintainer's enabled plugins and marketplaces, scaffold CLAUDE.md when missing, inject the Understand-Anything code-research section, and stage the result. Idempotent — safe to re-run.
4
+ allowed-tools: Bash, Read, Write, Edit
5
+ ---
6
+
7
+ # claude-config
8
+
9
+ Set up repo-level Claude Code configuration for teammates.
10
+
11
+ ## Preconditions (stop on any failure)
12
+
13
+ ```bash
14
+ git rev-parse --is-inside-work-tree || { echo "ERROR: not a git repo"; exit 1; }
15
+ command -v jq || echo "MISSING: jq — install it (brew install jq / apt install jq / choco install jq) before continuing"
16
+ ```
17
+
18
+ If not a git repo or `jq` is missing → report and STOP. Do not partially apply.
19
+
20
+ Check current branch and warn if on a protected branch:
21
+
22
+ ```bash
23
+ BRANCH=$(git rev-parse --abbrev-ref HEAD)
24
+ case "$BRANCH" in
25
+ main|master|develop|dev)
26
+ echo "⚠️ You are on branch '$BRANCH'. Consider switching to a feature branch before continuing."
27
+ ;;
28
+ esac
29
+ ```
30
+
31
+ ## Step 1 — Merge plugin + marketplace settings
32
+
33
+ Copy only `enabledPlugins` and `extraKnownMarketplaces` from the maintainer's user settings into the repo settings. Do NOT copy `hooks`, `permissions`, `env`, or any key with absolute paths.
34
+
35
+ ```bash
36
+ USER_SETTINGS="$HOME/.claude/settings.json"
37
+ REPO_SETTINGS=".claude/settings.json"
38
+
39
+ mkdir -p .claude
40
+ [ -f "$REPO_SETTINGS" ] || echo '{}' > "$REPO_SETTINGS"
41
+
42
+ jq -s '
43
+ .[0] as $repo | .[1] as $user
44
+ | $repo
45
+ + { enabledPlugins: (($repo.enabledPlugins // {}) + ($user.enabledPlugins // {})) }
46
+ + { extraKnownMarketplaces: (($repo.extraKnownMarketplaces // {}) + ($user.extraKnownMarketplaces // {})) }
47
+ ' "$REPO_SETTINGS" "$USER_SETTINGS" > "$REPO_SETTINGS.tmp" && mv "$REPO_SETTINGS.tmp" "$REPO_SETTINGS"
48
+
49
+ jq '{enabledPlugins, extraKnownMarketplaces}' "$REPO_SETTINGS"
50
+ ```
51
+
52
+ Inspect the result: flag any marketplace URL that looks private (contains org names, auth tokens, or is not a well-known public registry).
53
+
54
+ ## Step 2 — Scaffold CLAUDE.md if missing
55
+
56
+ ```bash
57
+ if [ -f CLAUDE.md ]; then
58
+ echo "✅ CLAUDE.md already exists — skipping."
59
+ else
60
+ echo "📝 CLAUDE.md not found — installing claude-code-setup plugin to scaffold it…"
61
+ claude plugin install claude-code-setup@claude-plugins-official
62
+ if [ -f CLAUDE.md ]; then
63
+ echo "✅ CLAUDE.md created by claude-code-setup."
64
+ else
65
+ echo "⚠️ claude-code-setup did not produce CLAUDE.md — create it manually or commit a template first."
66
+ fi
67
+ fi
68
+ ```
69
+
70
+ ## Step 3 — Inject Understand-Anything section into CLAUDE.md
71
+
72
+ Append only when the section marker is absent (idempotent guard):
73
+
74
+ ```bash
75
+ if grep -qF '## Code research with Understand-Anything' CLAUDE.md 2>/dev/null; then
76
+ echo "✅ Understand-Anything section already in CLAUDE.md — skipping."
77
+ else
78
+ cat >> CLAUDE.md << 'UASECTION'
79
+
80
+ ## Code research with Understand-Anything
81
+
82
+ This project uses the [Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) plugin to maintain an interactive knowledge graph of the codebase. **Always prefer these commands over raw file-by-file exploration when doing code research:**
83
+
84
+ | Goal | Command |
85
+ |------|---------|
86
+ | Explore the full codebase graph | `/understand` |
87
+ | Ask a free-form question about the code | `/understand-chat <question>` |
88
+ | Deep-dive into a specific file or function | `/understand-explain <path/symbol>` |
89
+ | See impact of your current changes before committing | `/understand-diff` |
90
+ | Open the interactive visual dashboard | `/understand-dashboard` |
91
+ | Extract business-domain knowledge (domains, flows, steps) | `/understand-domain` |
92
+ | Generate an onboarding guide for new teammates | `/understand-onboard` |
93
+ | Generate or refresh wiki knowledge under `docs/wiki` | `/understand-knowledge docs/wiki` |
94
+
95
+ The knowledge graph lives in `.understand-anything/knowledge-graph.json` and is kept up-to-date automatically on every commit (auto-update is enabled). Re-run `/understand` after large refactors to force a rebuild, and `/understand-knowledge docs/wiki` to refresh the wiki.
96
+ UASECTION
97
+ echo "✅ Understand-Anything section appended to CLAUDE.md."
98
+ fi
99
+ ```
100
+
101
+ Mirror to AGENTS.md / MIRRORS.md if they exist:
102
+
103
+ ```bash
104
+ for f in AGENTS.md MIRRORS.md; do
105
+ if [ -f "$f" ] && ! grep -qF '## Code research with Understand-Anything' "$f" 2>/dev/null; then
106
+ cat >> "$f" << 'UASECTION'
107
+
108
+ ## Code research with Understand-Anything
109
+
110
+ This project uses the [Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) plugin to maintain an interactive knowledge graph of the codebase. **Always prefer these commands over raw file-by-file exploration when doing code research:**
111
+
112
+ | Goal | Command |
113
+ |------|---------|
114
+ | Explore the full codebase graph | `/understand` |
115
+ | Ask a free-form question about the code | `/understand-chat <question>` |
116
+ | Deep-dive into a specific file or function | `/understand-explain <path/symbol>` |
117
+ | See impact of your current changes before committing | `/understand-diff` |
118
+ | Open the interactive visual dashboard | `/understand-dashboard` |
119
+ | Extract business-domain knowledge (domains, flows, steps) | `/understand-domain` |
120
+ | Generate an onboarding guide for new teammates | `/understand-onboard` |
121
+ | Generate or refresh wiki knowledge under `docs/wiki` | `/understand-knowledge docs/wiki` |
122
+
123
+ The knowledge graph lives in `.understand-anything/knowledge-graph.json` and is kept up-to-date automatically on every commit (auto-update is enabled). Re-run `/understand` after large refactors to force a rebuild, and `/understand-knowledge docs/wiki` to refresh the wiki.
124
+ UASECTION
125
+ echo "✅ Section also appended to $f."
126
+ fi
127
+ done
128
+ ```
129
+
130
+ ## Step 4 — Stage
131
+
132
+ ```bash
133
+ git add .claude/settings.json CLAUDE.md
134
+ for f in AGENTS.md MIRRORS.md; do [ -f "$f" ] && git add "$f"; done
135
+ git status
136
+ ```
137
+
138
+ ## Done — report
139
+
140
+ - Which plugins/marketplaces were written to `.claude/settings.json` (flag any private ones).
141
+ - `CLAUDE.md` status: already existed vs created; Understand-Anything section added vs already present.
142
+ - `AGENTS.md` / `MIRRORS.md` status (if applicable).
143
+ - Files staged. Remind: **review then commit yourself.**
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: codegraph-setup
3
+ description: Install the CodeGraph CLI, wire it to Claude Code via MCP (codegraph install), and initialise the current project (codegraph init). Works on macOS, Linux, and Windows (Git Bash / PowerShell). Idempotent — skips install if codegraph is already in PATH.
4
+ allowed-tools: Bash
5
+ ---
6
+
7
+ # codegraph-setup
8
+
9
+ Install CodeGraph and initialise it for this project.
10
+
11
+ ## Precondition
12
+
13
+ Must be inside a git repo:
14
+
15
+ ```bash
16
+ git rev-parse --is-inside-work-tree || { echo "ERROR: not a git repo — run this from your project root"; exit 1; }
17
+ ```
18
+
19
+ ## Step 1 — Install CLI if not present (OS-aware, idempotent)
20
+
21
+ Run this as a single bash block so variables persist:
22
+
23
+ ```bash
24
+ if command -v codegraph >/dev/null 2>&1; then
25
+ echo "✅ codegraph already installed: $(codegraph --version 2>/dev/null || echo 'version unknown')"
26
+ echo "Skipping install — proceeding to wire and init."
27
+ else
28
+ if command -v uname >/dev/null 2>&1; then
29
+ _OS=$(uname -s)
30
+ else
31
+ _OS="Windows"
32
+ fi
33
+
34
+ case "$_OS" in
35
+ Darwin|Linux)
36
+ curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
37
+ ;;
38
+ *)
39
+ _PS=$(command -v pwsh 2>/dev/null || command -v powershell 2>/dev/null)
40
+ if [ -n "$_PS" ]; then
41
+ "$_PS" -Command "irm https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.ps1 | iex"
42
+ else
43
+ echo "ERROR: cannot detect OS or find PowerShell."
44
+ echo "Install manually: https://github.com/colbymchenry/codegraph#installation"
45
+ exit 1
46
+ fi
47
+ ;;
48
+ esac
49
+
50
+ command -v codegraph >/dev/null 2>&1 || { echo "ERROR: codegraph install failed — not found in PATH after install"; exit 1; }
51
+ echo "✅ codegraph installed: $(codegraph --version 2>/dev/null || echo 'version unknown')"
52
+ fi
53
+ ```
54
+
55
+ Note: on Windows with Git Bash, `uname -s` returns `MINGW64_NT-*` or similar, which falls through to the `*)` case and attempts PowerShell. This is correct behaviour.
56
+
57
+ ## Step 3 — Wire to Claude Code
58
+
59
+ Register the CodeGraph MCP server with Claude Code:
60
+
61
+ ```bash
62
+ codegraph install
63
+ ```
64
+
65
+ This makes CodeGraph's context tools available inside Claude Code sessions.
66
+
67
+ ## Step 4 — Initialise the project
68
+
69
+ Build the code knowledge graph for this repo:
70
+
71
+ ```bash
72
+ codegraph init
73
+ ```
74
+
75
+ This creates a local SQLite index of symbols, dependencies, and cross-file relationships.
76
+
77
+ ## Done — report
78
+
79
+ - Install: new install vs already present (version).
80
+ - Wire: `codegraph install` output.
81
+ - Init: `codegraph init` output, any errors.
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: understand-setup
3
+ description: Install the Understand-Anything plugin, build the knowledge graph with auto-update enabled, generate docs/wiki, git-lfs track the graph, and stage all artefacts. Idempotent — safe to re-run.
4
+ argument-hint: "[--force] [--language <lang>] (passed through to /understand)"
5
+ allowed-tools: Bash, Read, Write, Edit, Skill
6
+ ---
7
+
8
+ # understand-setup
9
+
10
+ Install Understand-Anything and build the knowledge graph for this repo.
11
+
12
+ ## Preconditions (stop on any failure)
13
+
14
+ ```bash
15
+ git rev-parse --is-inside-work-tree || { echo "ERROR: not a git repo"; exit 1; }
16
+ command -v git-lfs || echo "MISSING: git-lfs — install it (brew install git-lfs / apt install git-lfs) before continuing"
17
+ command -v jq || echo "MISSING: jq — install it (brew install jq / apt install jq / choco install jq) before continuing"
18
+ ```
19
+
20
+ If not a git repo, or `git-lfs`/`jq` are missing → report and STOP. Do not partially apply.
21
+
22
+ Check current branch and warn if on a protected branch:
23
+
24
+ ```bash
25
+ BRANCH=$(git rev-parse --abbrev-ref HEAD)
26
+ case "$BRANCH" in
27
+ main|master|develop|dev)
28
+ echo "⚠️ You are on branch '$BRANCH'. Consider switching to a feature branch first."
29
+ ;;
30
+ esac
31
+ ```
32
+
33
+ ## Step 1 — Install the plugin
34
+
35
+ Install via the Claude Code plugin system (idempotent):
36
+
37
+ ```
38
+ /plugin marketplace add Egonex-AI/Understand-Anything
39
+ /plugin install understand-anything
40
+ ```
41
+
42
+ After install, confirm `understand-anything@understand-anything` appears in `.claude/settings.json`:
43
+
44
+ ```bash
45
+ jq '.enabledPlugins["understand-anything@understand-anything"]' .claude/settings.json 2>/dev/null || echo "⚠️ understand-anything not found in .claude/settings.json — teammates may need to install manually."
46
+ ```
47
+
48
+ ## Step 2 — Build / refresh the knowledge graph
49
+
50
+ Run the skill **in the main thread** (it dispatches its own analyzer subagents — do not wrap it in a subagent):
51
+
52
+ ```
53
+ /understand --auto-update $ARGUMENTS
54
+ ```
55
+
56
+ - `--auto-update` writes `{"autoUpdate": true}` to `.understand-anything/config.json`.
57
+ - If a graph already exists, `/understand` runs incrementally. Pass `--force` (via `$ARGUMENTS`) to rebuild from scratch.
58
+
59
+ After it finishes, confirm these files exist:
60
+
61
+ ```bash
62
+ test -f .understand-anything/knowledge-graph.json && echo "✅ knowledge-graph.json" || echo "❌ knowledge-graph.json missing"
63
+ test -f .understand-anything/meta.json && echo "✅ meta.json" || echo "❌ meta.json missing"
64
+ jq '.autoUpdate' .understand-anything/config.json 2>/dev/null | grep -q true && echo "✅ autoUpdate: true" || echo "❌ autoUpdate not set"
65
+ ```
66
+
67
+ ## Step 3 — Initialize the docs wiki
68
+
69
+ ```bash
70
+ mkdir -p docs/wiki
71
+ ```
72
+
73
+ Run wiki generation in the main thread:
74
+
75
+ ```
76
+ /understand-knowledge docs/wiki
77
+ ```
78
+
79
+ After it finishes, confirm `docs/wiki/` contains generated files:
80
+
81
+ ```bash
82
+ ls docs/wiki/ | head -5 || echo "❌ docs/wiki is empty or missing"
83
+ ```
84
+
85
+ ## Step 4 — Ignore scratch outputs, git-lfs track, and stage
86
+
87
+ Append scratch paths to .gitignore (idempotent):
88
+
89
+ ```bash
90
+ for p in ".understand-anything/intermediate/" ".understand-anything/tmp/" ".understand-anything/diff-overlay.json"; do
91
+ grep -qxF "$p" .gitignore 2>/dev/null || echo "$p" >> .gitignore
92
+ done
93
+ ```
94
+
95
+ Track large graph files with git-lfs (harmless for small graphs):
96
+
97
+ ```bash
98
+ git lfs install
99
+ git lfs track ".understand-anything/*.json"
100
+ ```
101
+
102
+ Stage all artefacts:
103
+
104
+ ```bash
105
+ git add .gitattributes .gitignore .understand-anything/ docs/wiki/
106
+ git status
107
+ git lfs ls-files
108
+ ```
109
+
110
+ ## Done — report
111
+
112
+ - Graph status: created vs incrementally updated; `autoUpdate` on/off.
113
+ - Wiki status: `docs/wiki/` created vs already existed; generation successful vs failed.
114
+ - Staged files; LFS-tracked files confirmed.
115
+ - Remind: **review then commit yourself.**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tech-graph",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "Step-by-step wizard for generating technical diagrams as SVG+PNG.",
5
5
  "author": {
6
6
  "name": "steven"