@tryglen/cli 0.52.52 → 0.52.54

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 (74) hide show
  1. package/README.md +7 -7
  2. package/dist/bin.js +1 -1
  3. package/dist/bin.js.map +1 -1
  4. package/dist/clients/agents/agents-table.js +2 -2
  5. package/dist/clients/agents/agents-table.js.map +1 -1
  6. package/dist/clients/agents/plugin-status.js +8 -3
  7. package/dist/clients/agents/plugin-status.js.map +1 -1
  8. package/dist/clients/cursor/cursor-local-plugin.js +128 -0
  9. package/dist/clients/cursor/cursor-local-plugin.js.map +1 -0
  10. package/dist/clients/glen-api/glen-api.js +2 -3
  11. package/dist/clients/glen-api/glen-api.js.map +1 -1
  12. package/dist/clients/telemetry/send-events.js +33 -19
  13. package/dist/clients/telemetry/send-events.js.map +1 -1
  14. package/dist/commands/_utils/doctor-findings.js +8 -6
  15. package/dist/commands/_utils/doctor-findings.js.map +1 -1
  16. package/dist/commands/doctor/index.js +4 -0
  17. package/dist/commands/doctor/index.js.map +1 -1
  18. package/dist/commands/install/_utils/finish-install.js +6 -0
  19. package/dist/commands/install/_utils/finish-install.js.map +1 -1
  20. package/dist/commands/install/index.js +56 -18
  21. package/dist/commands/install/index.js.map +1 -1
  22. package/dist/commands/login/_utils/complete-login.js +10 -2
  23. package/dist/commands/login/_utils/complete-login.js.map +1 -1
  24. package/dist/commands/login/_utils/poll-for-approval.js +10 -6
  25. package/dist/commands/login/_utils/poll-for-approval.js.map +1 -1
  26. package/dist/commands/login/index.js +2 -0
  27. package/dist/commands/login/index.js.map +1 -1
  28. package/dist/commands/logout/index.js +4 -0
  29. package/dist/commands/logout/index.js.map +1 -1
  30. package/dist/commands/telemetry/index.js +6 -4
  31. package/dist/commands/telemetry/index.js.map +1 -1
  32. package/dist/commands/uninstall/index.js +6 -4
  33. package/dist/commands/uninstall/index.js.map +1 -1
  34. package/dist/commands/update/index.js +25 -7
  35. package/dist/commands/update/index.js.map +1 -1
  36. package/dist/core/state/credentials.js +11 -4
  37. package/dist/core/state/credentials.js.map +1 -1
  38. package/dist/core/system/env.js +2 -0
  39. package/dist/core/system/env.js.map +1 -1
  40. package/dist/core/system/files.js +21 -2
  41. package/dist/core/system/files.js.map +1 -1
  42. package/dist/core/telemetry/events-store.js +65 -10
  43. package/dist/core/telemetry/events-store.js.map +1 -1
  44. package/dist/core/telemetry/finish-telemetry.js +11 -6
  45. package/dist/core/telemetry/finish-telemetry.js.map +1 -1
  46. package/dist/core/telemetry/install-id-header.js +7 -0
  47. package/dist/core/telemetry/install-id-header.js.map +1 -0
  48. package/dist/core/telemetry/install-id.js +28 -6
  49. package/dist/core/telemetry/install-id.js.map +1 -1
  50. package/dist/core/telemetry/record-product-event.js +11 -0
  51. package/dist/core/telemetry/record-product-event.js.map +1 -0
  52. package/dist/core/telemetry/telemetry-context.js +1 -0
  53. package/dist/core/telemetry/telemetry-context.js.map +1 -1
  54. package/dist/cursor/.cursor-plugin/plugin.json +15 -0
  55. package/dist/cursor/LICENSE +21 -0
  56. package/dist/cursor/hooks/hooks.json +9 -0
  57. package/dist/cursor/rules/glen.md +19 -0
  58. package/dist/cursor/skills/cloud-setup/SKILL.md +24 -0
  59. package/dist/cursor/skills/code-search/SKILL.md +62 -0
  60. package/dist/cursor/skills/controls/SKILL.md +66 -0
  61. package/dist/cursor/skills/create-artifact/SKILL.md +46 -0
  62. package/dist/cursor/skills/create-skill/SKILL.md +77 -0
  63. package/dist/cursor/skills/feedback/SKILL.md +81 -0
  64. package/dist/cursor/skills/forget/SKILL.md +70 -0
  65. package/dist/cursor/skills/import-transcripts/SKILL.md +50 -0
  66. package/dist/cursor/skills/invite/SKILL.md +45 -0
  67. package/dist/cursor/skills/onboard/SKILL.md +53 -0
  68. package/dist/cursor/skills/search/SKILL.md +70 -0
  69. package/dist/cursor/skills/session-takeover/SKILL.md +83 -0
  70. package/dist/cursor/skills/setup/SKILL.md +47 -0
  71. package/dist/cursor/skills/use-artifact/SKILL.md +42 -0
  72. package/dist/cursor/skills/use-skill/SKILL.md +42 -0
  73. package/dist/jcode/plugin.json +1 -1
  74. package/package.json +4 -3
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [{ "command": "glen session-start --agent cursor" }],
5
+ "beforeSubmitPrompt": [{ "command": "glen ingest --agent cursor" }],
6
+ "afterAgentResponse": [{ "command": "glen ingest --agent cursor" }],
7
+ "afterShellExecution": [{ "command": "glen pr-link --agent cursor" }]
8
+ }
9
+ }
@@ -0,0 +1,19 @@
1
+ # Glen: shared team memory
2
+
3
+ This machine records coding-agent conversations to the team's shared Glen memory
4
+ and recalls from it.
5
+
6
+ If a Glen session-start block is present in context, it already covers when to run
7
+ `glen search` and `glen code-search`; follow it. Otherwise, when the user references
8
+ past team work (a decision, a prior discussion, an earlier fix, "what did we decide
9
+ about X"), run `glen search "<topic>"` in the shell and treat its answer, plus the
10
+ "Sources:" list beneath it, as team memory. Cite sources when relevant.
11
+
12
+ - If `glen search` prints "No active organization", tell the user to run
13
+ `glen org switch`. If glen is not set up, offer the glen setup skill.
14
+ - Only when the user asks to review a pull request in Glen's local reviewer, run
15
+ `glen review <number> --detach` from a clone of its repo and share the URL it
16
+ prints. If it says the PR changes its packages, ask the user before rerunning
17
+ with `--install-deps`. For a repo with no clone here, ask the user "Clone
18
+ <owner>/<repo> to review this PR?" first, and pass `--clone` to
19
+ `glen review <url>` only after they say yes.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: cloud-setup
3
+ description: Set up glen to record Cursor or Grok cloud agents (Cursor's Cloud Agents, Grok's dashboard Cloud Agents) that work on this repo. Use when the user asks to "set up glen for cloud agents", "record my Cursor cloud agents", "make glen work in Grok's cloud", or says cloud agent sessions don't show up in glen.
4
+ ---
5
+
6
+ Cloud agents run only the hooks committed to the repo, never plugin hooks, so
7
+ glen's hooks have to live in the repo itself.
8
+
9
+ 1. From the repo's root, run `glen install --agent cursor --cloud` via Bash.
10
+ It writes `.cursor/hooks.json` (keeping any hooks already there) and
11
+ `.cursor/glen-hook.sh`, and prints the remaining steps.
12
+ 2. Show the user the diff. Commit and push the two files only if they say so.
13
+ 3. Tell the user the one step only they can do: open Connect an agent in the
14
+ glen dashboard, pick "Cursor & Grok cloud agents", and add the
15
+ `GLEN_ORG_ID`, `GLEN_BASE_URL` and `GLEN_API_KEY` it shows as Secrets on
16
+ the repo's environment at grok.com/dashboard/cloud-agents.
17
+ Never ask them to paste the key into this chat.
18
+ 4. Tell them what to expect: hooks apply to cloud agents started after the
19
+ push; the first hook run installs glen on the VM, so it takes about a
20
+ second; and a session's first turn starts before the hooks run, so glen
21
+ records from the second turn on.
22
+
23
+ Teammates who open the repo in Cursor locally are unaffected: without
24
+ `GLEN_API_KEY` the hook script exits without doing anything.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: code-search
3
+ description: Trace a specific piece of code to the agent conversations that produced it. Use it whenever the user asks about the prior semantics of code, such as "why is this code like this", "why was this done this way", "what's the history of this block", "who decided this". NOT for org-wide memory questions (that's glen search).
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Answer "why is this code like this" from the conversations behind the commits that
9
+ last touched those lines, found through git blame. Glen owns code-provenance
10
+ questions, so do not guess from the current code alone. For org-wide questions,
11
+ use the search skill instead.
12
+
13
+ ## Prerequisites
14
+
15
+ Code search needs a local checkout of the repo with its git history and an origin
16
+ remote, and a shell to run git. Without them, as in a cloud chat or an MCP-only
17
+ session with no repo, tell the user code search needs a local session in the
18
+ repo, and offer the search skill with a question that names the repo, file and
19
+ behavior instead.
20
+
21
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
22
+ list. With no shell tool, use the glen MCP tools and run no shell command.
23
+ With a shell, run `glen status`. When it shows glen connected with an org,
24
+ use the CLI for every glen call in this task, even if a glen MCP server is
25
+ also connected. If `glen` is not installed or not logged in, use the MCP
26
+ tools. If neither works, stop and tell the user what is missing: a terminal
27
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
28
+ signed in, wrong role, no plan), report the refusal as written; never retry
29
+ it over the other transport.
30
+
31
+ The CLI command is `glen code-search`. The MCP tool is `glen_code_search`, and
32
+ the glen MCP connection in Codex and ChatGPT does not offer it; treat that as no
33
+ MCP.
34
+
35
+ For "No active organization", tell the user to run `glen org switch` (CLI) or
36
+ reconnect the MCP server and pick an org.
37
+
38
+ ## Supported actions
39
+
40
+ Resolve the file and line range the user is asking about, then:
41
+
42
+ - CLI: `glen code-search <path:start-end> "<the user's question>"`, for example
43
+ `glen code-search src/api/rate-limit.ts:40-85 "why is this rate-limited?"`.
44
+ - MCP: follow the `glen_code_search` tool description. Run
45
+ `git blame -w -M -C --porcelain -L <start>,<end> -- <path>`, pass the distinct
46
+ commit SHAs as `shas` (drop the all-zero SHA), any `Glen-Conversation:` trailer
47
+ values from those commits' messages as `trailerConversationIds`, the origin
48
+ remote as `repoUrl` in the form `https://<host>/<owner>/<repo>` (lowercase host,
49
+ no `.git`, SSH remotes converted), and the question as `query`.
50
+
51
+ The result (CLI output, or MCP `markdown`) lists the conversations most relevant
52
+ to the question, then their transcripts. Answer from those transcripts and cite
53
+ them: name the conversation, author and date behind each claim.
54
+
55
+ ## Limits
56
+
57
+ - "no Glen trace found" (CLI) or `state: "no_anchor"` (MCP) means no recorded
58
+ conversation produced those lines. The code predates glen or was committed
59
+ without recording. Say so plainly and do not invent a history.
60
+ - Uncommitted lines have no history yet.
61
+ - It only sees commits in the local checkout. Pull first if the user asks about
62
+ code you do not have.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: controls
3
+ description: Control glen memory - turn glen on/off, go off the record (incognito, account-wide), go silent (keep recording, surface nothing), toggle glen's skill suggestions or PR review offers, or switch which organization's memory is active. Use ONLY when the user explicitly asks (e.g. "turn glen off", "go off the record", "stop recording", "stop suggesting skills", "stop offering PR reviews", "just record, don't inject anything", "switch to my personal org").
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Change how glen records and recalls for this user, only when they explicitly
9
+ ask. Every mode and suggestion setting is account-wide and server-enforced: it
10
+ applies on every machine, agent, and connected client. The mode and skill
11
+ suggestion switches also live in the dashboard under Settings > Memory.
12
+
13
+ ## Prerequisites
14
+
15
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
16
+ list. With no shell tool, use the glen MCP tools and run no shell command.
17
+ With a shell, run `glen status`. When it shows glen connected with an org,
18
+ use the CLI for every glen call in this task, even if a glen MCP server is
19
+ also connected. If `glen` is not installed or not logged in, use the MCP
20
+ tools. If neither works, stop and tell the user what is missing: a terminal
21
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
22
+ signed in, wrong role, no plan), report the refusal as written; never retry
23
+ it over the other transport.
24
+
25
+ ## Supported actions
26
+
27
+ | Intent | MCP tool | CLI |
28
+ | --- | --- | --- |
29
+ | Show current settings | `glen_status` (mode and suggestion settings) | `glen status` (org and mode; it does not show suggestion settings) |
30
+ | On: recall and record (the default) | `glen_set_recording` `{mode: "on"}` | `glen on` |
31
+ | Off: recall nothing, record nothing | `glen_set_recording` `{mode: "off"}` | `glen off` |
32
+ | Incognito: keep recalling, record nothing ("go off the record", "stop recording") | `glen_set_recording` `{mode: "incognito"}` | `glen incognito` |
33
+ | Silent: keep recording, surface nothing ("just record, stay out of my way") | `glen_set_recording` `{mode: "silent"}` | `glen silent` |
34
+ | Skill suggestions on or off | `glen_set_suggestions` `{skillCreation}` and/or `{skillUse}` | `glen suggestions skill-create on\|off`, `glen suggestions skill-use on\|off` |
35
+ | PR review offers on or off (glen offering to open a PR the agent just created in the local reviewer; off by default) | `glen_set_suggestions` `{review}` | `glen suggestions review on\|off` |
36
+ | See or switch the active org | `glen_list_orgs` (read only) | `glen org list`, `glen org switch <slug>` |
37
+
38
+ **Before turning capture on** (on, or silent, from off or incognito), tell the
39
+ user in a few lines:
40
+
41
+ - **Recording vs silent vs incognito.** On records and recalls. Silent records
42
+ everything but surfaces nothing: no recall, no suggestions, and search
43
+ returns nothing. Incognito recalls but adds nothing to team memory.
44
+ - **Which org receives it.** The active org: the `org:` line of `glen status`,
45
+ or the `active: true` entry of `glen_list_orgs`. Everyone in that org can
46
+ search what is recorded.
47
+ - **What leaves the machine.** Where the glen plugin's hooks run, each turn is
48
+ sent to the glen server: the user's prompts, the agent's replies, its
49
+ thinking where the agent exposes it, tool calls and tool results, plus the
50
+ agent name, model, working directory, repo, branch, commit, and git remote.
51
+ Secrets are redacted on the server before anything is stored. A session with only the MCP connection
52
+ and no hooks is not captured; glen receives only what the agent passes to a
53
+ glen tool.
54
+
55
+ Then make the change and confirm the new state to the user.
56
+
57
+ Switch orgs only when the user explicitly asks: it changes which org receives
58
+ their data. An MCP connection cannot switch orgs; the user reconnects and picks
59
+ another org (or runs `glen org switch` on a machine with the CLI).
60
+
61
+ ## Limits
62
+
63
+ - Every change must reach the glen server. If the tool or command fails, the
64
+ setting did NOT change; tell the user.
65
+ - Owners and admins can see each member's current mode and suggestion
66
+ settings in the dashboard under Admin > Controls.
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: create-artifact
3
+ description: Save a document you produced (a report, runbook, spec, dashboard, HTML page) to your Glen artifact library, private to you by default, sharable with teammates or the whole org. Use when the user says "save this as an artifact", or asks to share or delete an artifact they saved. When you've generated a substantial standalone document, offer to save it; don't save it unasked.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Save a durable, standalone document to the user's Glen artifact library: Markdown prose, or a self-contained HTML+CSS page with no JavaScript. It is private to the user by default and can be shared with teammates or the whole org. Skip ephemeral chat answers.
9
+
10
+ ## Prerequisites
11
+
12
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
13
+ list. With no shell tool, use the glen MCP tools and run no shell command.
14
+ With a shell, run `glen status`. When it shows glen connected with an org,
15
+ use the CLI for every glen call in this task, even if a glen MCP server is
16
+ also connected. If `glen` is not installed or not logged in, use the MCP
17
+ tools. If neither works, stop and tell the user what is missing: a terminal
18
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
19
+ signed in, wrong role, no plan), report the refusal as written; never retry
20
+ it over the other transport.
21
+
22
+ The tools are `glen_artifact_*`; your client may prefix the names.
23
+
24
+ ## Supported actions
25
+
26
+ Save only when the user clearly asked for it. Sharing and deleting need their own clear request too.
27
+
28
+ | Action | MCP tool | CLI |
29
+ | --- | --- | --- |
30
+ | Save | `glen_artifact_create` with `title`, `format` (`markdown` or `html`), `content` | `glen artifact create --file <path> --title "<title>" --format auto` |
31
+ | Overwrite your own artifact | add `update: true` | add `--update` |
32
+ | Share with the whole org on save | add `shareWithOrg: true` | add `--org` |
33
+ | Share later | `glen_artifact_share` with `slug`, `emails` and/or `org: true` | `glen artifact share <slug> --with <email>[,<email>…]` and/or `--org` |
34
+ | Delete | `glen_artifact_delete` with `slug` | `glen artifact delete <slug>` |
35
+
36
+ 1. **Prepare the document.** To link another artifact or skill, write `[label](glen:artifact/<slug>)` or `[label](glen:skill/<slug>)`. Over MCP, pass the document as `content`. Over the CLI, write it to a local file (`.md` or `.html`) first, or pipe it with `--file -` (then `--title` is required).
37
+ 2. **Save it.** Over MCP, call `glen_artifact_create` with `title`, `format` and `content`. Over the CLI, run `glen artifact create --file <path> --title "<title>" --format auto`. The title goes only in `--title`, never as a bare word.
38
+ 3. **Check references.** If the result lists unresolved references (`unresolvedSlugs`), a linked slug does not exist yet. Tell the user, then fix the link or create the missing artifact or skill.
39
+ 4. **Confirm.** Tell the user the slug and its visibility: private by default (only they can see it, at `https://app.tryglen.com/artifacts/<slug>`), or shared with the whole org. To share with specific teammates or get a link, they can also click **Share** on the artifact's page.
40
+ 5. **Share or delete (author only, when asked).** Sharing is additive: existing access is kept, and removing access is done in the dashboard's Share dialog. Deleting is permanent: confirm the slug with the user first.
41
+
42
+ ## Limits
43
+
44
+ - Markdown or HTML+CSS only, no JavaScript, up to 200,000 characters. Over MCP, `format` must be `markdown` or `html`; only the CLI infers it (`auto`).
45
+ - The title becomes the slug, unique in the org. A taken name is a conflict: pick another title, or pass update for an artifact you authored.
46
+ - Only the author can update, share or delete an artifact. An update without the org flag keeps the current sharing.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: create-skill
3
+ description: Turn what you just did (or a markdown prompt the user provides) into a reusable skill, either a local SKILL.md on this machine or a shared Glen skill saved to the org's library. Use when the user says "make this a skill", "save this as a skill", "save this as a Glen skill", or wants to capture a repeatable workflow. Also use when the user asks to share or delete a Glen skill they authored.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Author a reusable **skill**: a focused markdown prompt another agent will follow later, with no memory of this session. It is either a **local `SKILL.md`** on this machine (a Cursor skill, visible only to the user) or a **Glen skill** in the user's Glen library (private to them by default, sharable with teammates or the whole org).
9
+
10
+ ## Prerequisites
11
+
12
+ A local skill needs write access to this machine's files and nothing from glen.
13
+
14
+ A Glen skill needs a glen connection.
15
+
16
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
17
+ list. With no shell tool, use the glen MCP tools and run no shell command.
18
+ With a shell, run `glen status`. When it shows glen connected with an org,
19
+ use the CLI for every glen call in this task, even if a glen MCP server is
20
+ also connected. If `glen` is not installed or not logged in, use the MCP
21
+ tools. If neither works, stop and tell the user what is missing: a terminal
22
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
23
+ signed in, wrong role, no plan), report the refusal as written; never retry
24
+ it over the other transport.
25
+
26
+ The tools are `glen_skill_*`; your client may prefix the names.
27
+
28
+ ## Supported actions
29
+
30
+ | Action | MCP tool | CLI |
31
+ | --- | --- | --- |
32
+ | Find related memory | `glen_search` | `glen search "<topic>"` |
33
+ | Find a dependency | `glen_dependency_search` | `glen dependency search "<tool>"` |
34
+ | Find a skill to reference | `glen_skill_search` | `glen skill search "<intent>"` |
35
+ | Save | `glen_skill_create` | `glen skill create` |
36
+ | Share | `glen_skill_share` with `slug`, `emails` and/or `org: true` | `glen skill share <slug> --with <email>[,<email>…]` and/or `--org` |
37
+ | Delete | `glen_skill_delete` with `slug` | `glen skill delete <slug>` |
38
+
39
+ 1. **Pick the destination first.** A request for a "glen skill", a "team skill", or a skill in their library or org is a Glen skill: save it to glen with step 5, and never write it as a local skill instead. A request for a local or personal skill file is a local skill. If the user hasn't said, ask which they want, and don't start writing until they answer. If you can't write local files (for example, a session with only the MCP tools), a Glen skill is the only destination; you can also give the user the finished `SKILL.md` text. Save a Glen skill only when the user clearly asked for it.
40
+ 2. **Gather the real workflow.** Read this conversation for the steps that actually worked. For anything done in an earlier session, search glen memory. Ask one or two clarifying questions only if the goal or trigger is genuinely ambiguous.
41
+ 3. **Name and describe it.** A short imperative name and a one-sentence description that says _exactly when to trigger it_ (this drives discovery).
42
+ 4. **Write a tight SKILL.md body.**
43
+ - Lead with _when to use it_ and the end goal.
44
+ - Give concrete, ordered steps (exact commands, file paths, gotchas), not vague advice.
45
+ - Keep it self-contained: assume zero prior context. Cut anything that isn't actionable.
46
+ - **Reference other skills** when a step is itself a saved skill: write a markdown link `[Display text](glen:<slug>)` (find the slug with skill search). The reader gets a runnable `glen skill use <slug>` command exactly there. Say _when_ to reach for it. Reserve this for genuinely **shared** skills that also get used on their own.
47
+ - **Bundle supporting material in one skill directory, not separate subskills.** Put long reference material in `references/*.md` and executable helpers in `scripts/` beside `SKILL.md`, and point to them from the body as `${GLEN_SKILL_DIR}/references/<name>.md` or `${GLEN_SKILL_DIR}/scripts/<name>`. When a reader fetches the skill through the CLI, `glen skill use` caches the directory locally and replaces `${GLEN_SKILL_DIR}` with its absolute path.
48
+ 5. **Finish based on the destination.**
49
+
50
+ **Local skill.** Nothing leaves the machine.
51
+ - Save it to `.cursor/skills/<name>/SKILL.md` in this project, or `~/.cursor/skills/<name>/SKILL.md` for a personal skill that follows you across every project.
52
+ - Start the file with YAML frontmatter (`name`, and the `description` from step 3), then the body.
53
+ - Confirm the saved path to the user.
54
+
55
+ **Glen skill.**
56
+ - **Declare its dependencies.** List the external tools, runtimes or MCP servers the skill needs. Search each one with dependency search. If a confident match exists, reuse it as `{ "dependencyId": "<id>" }`; otherwise find the canonical install page and add `{ "name", "description", "sourceUrl", "kind" }` (kind is `mcp`, `cli`, `runtime`, `library` or `service`).
57
+ - **Save it over MCP:** call `glen_skill_create` with `name`, `description`, `content` (the body), and `dependencies` if any. For bundled files, add `files`: each has a `path` under `scripts/`, `references/` or `assets/`, `contentType`, `content` (text) or `contentBase64` (binary), and `isExecutable: true` for scripts.
58
+ - **Save it over the CLI:** write the dependency list to a JSON file (for example `/tmp/glen-deps.json`). For a text-only skill, write the body to a file and run:
59
+
60
+ ```
61
+ glen skill create --name "<name>" --description "<one-line>" --file /tmp/glen-skill.md --deps /tmp/glen-deps.json
62
+ ```
63
+
64
+ For a skill from an existing folder, or with bundled files, pass the folder with `--dir` (it needs `SKILL.md` at its root; the CLI reads the body from there). To build one, make a directory with `SKILL.md` at its root plus whichever of `scripts/`, `references/`, `assets/` it needs, then run:
65
+
66
+ ```
67
+ glen skill create --name "<name>" --description "<one-line>" --dir /tmp/glen-skill-pkg --deps /tmp/glen-deps.json
68
+ ```
69
+
70
+ `--file` and `--dir` are mutually exclusive. Drop `--deps` when there are none.
71
+ - **Confirm and offer sharing.** The skill is private to the user by default. Ask whether to share it with the whole org (`org: true` / `--org` on save, or share later) or with specific teammates (share with their emails). Confirm the saved slug and its visibility.
72
+ 6. **Share or delete (author only, when asked).** Sharing is additive. Deleting is permanent and removes the skill for everyone it was shared with: confirm the slug with the user first.
73
+
74
+ ## Limits
75
+
76
+ - A name that is taken in the org is a conflict: pick another name, or pass update (`update: true` / `--update`) for a skill the user authored. Only the author can update, share or delete a skill.
77
+ - Bundled files: only `scripts/`, `references/` and `assets/`, at most 100 files. Keep them small; glen rejects an oversized bundle and names the file.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: feedback
3
+ description: Send a bug report or product feedback about glen itself to the Glen team. Use when the user says things like "tell the glen team", "file a bug about glen", "glen search is useless, report it", "give feedback on glen", or when YOU hit a concrete, reproducible glen malfunction worth reporting.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ File a ticket with the Glen team about **glen itself**: the CLI, the memory,
9
+ the search, the dashboard. It is NOT for bugs in the user's own project; those
10
+ belong in their issue tracker.
11
+
12
+ ## Prerequisites
13
+
14
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
15
+ list. With no shell tool, use the glen MCP tools and run no shell command.
16
+ With a shell, run `glen status`. When it shows glen connected with an org,
17
+ use the CLI for every glen call in this task, even if a glen MCP server is
18
+ also connected. If `glen` is not installed or not logged in, use the MCP
19
+ tools. If neither works, stop and tell the user what is missing: a terminal
20
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
21
+ signed in, wrong role, no plan), report the refusal as written; never retry
22
+ it over the other transport.
23
+
24
+ ## Supported actions
25
+
26
+ A ticket carries the user's identity and, when glen recorded this
27
+ conversation, a link to it. Never paste secrets, tokens, or file contents into
28
+ a ticket.
29
+
30
+ **Bug.** Title, what is wrong, optional steps to reproduce, severity (low,
31
+ medium, high, critical; the CLI defaults to medium, the MCP tool requires it).
32
+
33
+ - MCP: `glen_feedback` with `ticket: {kind: "bug", title, description,
34
+ stepsToReproduce, severity}`.
35
+ - CLI:
36
+
37
+ ```
38
+ glen bug "<title>" --description "<what is wrong>" [--steps "<repro>"] [--severity <level>] [--agent <agent>]
39
+ ```
40
+
41
+ **Feedback.** Title, the concrete change wanted, and why it matters.
42
+
43
+ - MCP: `glen_feedback` with `ticket: {kind: "feedback", title,
44
+ requestedChange, motivation, context}`.
45
+ - CLI:
46
+
47
+ ```
48
+ glen feedback "<title>" --wants "<change>" --why "<why>" [--context "<extra>"] [--agent <agent>]
49
+ ```
50
+
51
+ `--agent` takes your agent type as listed in `glen bug --help`.
52
+
53
+ Write in the user's own words where you have them. Infer the why when it is
54
+ obvious rather than interrogating the user.
55
+
56
+ **Who it is from.** When the user asked, file on their behalf (MCP
57
+ `onBehalfOf: "user"`; CLI default). When the observation is yours, file as the
58
+ agent (MCP `onBehalfOf: "agent"`; CLI `--from agent`). Over MCP, also pass
59
+ `agentName` and your session id as `conversationId`.
60
+
61
+ **Filing without being asked** (MCP `proactive: true`; CLI `--proactive`).
62
+ Only for something concrete and attributable:
63
+
64
+ - a glen command or tool failed or returned a malformed result
65
+ - glen search returned results that clearly contradict the code you just read
66
+ - a glen hook misfired, or injected context that was plainly wrong
67
+
68
+ Not for: a search that found nothing, a preference about output format, a
69
+ hunch, or anything you cannot state as a specific observed behaviour. When in
70
+ doubt, mention it to the user and let them decide.
71
+
72
+ ## Limits
73
+
74
+ - While the user is off the record (incognito), self-initiated tickets are not
75
+ sent: the CLI says so, and the MCP tool returns `skipped: "incognito"`. Tell
76
+ the user and let them decide whether to file it.
77
+ - On success, tell the user it went in; if the MCP result has `posted: false`,
78
+ say it was recorded but not delivered. On failure, relay the error and its
79
+ fix (for example "no active organization" means `glen org switch`) and stop.
80
+ - Never retry a failed filing in a loop, and never re-file the same ticket
81
+ with different wording.
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: forget
3
+ description: Correct glen's memory by forgetting evidence that is wrong, outdated, or no longer relevant, so the team stops being told it. Use when the user says things like "that's wrong, forget it", "glen has the wrong X", "that memory is out of date", or "stop remembering that", or when YOU verify that recalled evidence is contradicted by current code or state.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Stop glen from recalling evidence that is wrong, outdated, or no longer relevant,
9
+ so the team stops being told it. A stale memory gets caught two ways: the user
10
+ points at it, or you verify it yourself.
11
+
12
+ ## Prerequisites
13
+
14
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
15
+ list. With no shell tool, use the glen MCP tools and run no shell command.
16
+ With a shell, run `glen status`. When it shows glen connected with an org,
17
+ use the CLI for every glen call in this task, even if a glen MCP server is
18
+ also connected. If `glen` is not installed or not logged in, use the MCP
19
+ tools. If neither works, stop and tell the user what is missing: a terminal
20
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
21
+ signed in, wrong role, no plan), report the refusal as written; never retry
22
+ it over the other transport.
23
+
24
+ The CLI commands are `glen forget` and `glen restore`; the MCP tools are
25
+ `glen_forget` and `glen_restore`. Forget over the transport that ran the search:
26
+ evidence references only exist in the org that returned them.
27
+
28
+ For "No active organization", tell the user to run `glen org switch` (CLI) or
29
+ reconnect the MCP server and pick an org.
30
+
31
+ ## Supported actions
32
+
33
+ **User-initiated.** The user says a remembered fact is wrong or outdated:
34
+
35
+ 1. Find the source references. Search results end each source with an exact
36
+ `observation:<id>` or `message:<id>` reference (`forgetReference` in MCP
37
+ citations). If the result is not already in context, use the search skill.
38
+ 2. Confirm which evidence is wrong. Do not forget every source in a synthesized
39
+ answer. When several sources repeat the same stale claim, select all of them.
40
+ 3. Forget them in one call, with the references unchanged:
41
+ `glen_forget` with `references: ["observation:<id>", "message:<id>"]`, or
42
+ `glen forget observation:<id> message:<id>`.
43
+
44
+ **Agent-detected.** Recalled evidence is contradicted by current code or state:
45
+
46
+ 1. Verify the contradiction directly. Never forget on suspicion, a partial view,
47
+ or because two memories disagree. Surface uncertain conflicts to the user.
48
+ 2. Forget only the contradicted references.
49
+
50
+ Then tell the user exactly what you forgot and why: quote what each piece of
51
+ evidence said and where it came from (conversation, author, date), and what
52
+ current source contradicts it. State the correct fact in the conversation so glen
53
+ can record the correction.
54
+
55
+ Undo with `glen_restore` or `glen restore <reference...>`.
56
+
57
+ ## Limits
58
+
59
+ - Only forget evidence a search returned. Without a reference, say there is no
60
+ evidence to forget rather than guessing an id.
61
+ - Forgetting an observation hides that distilled memory from recall.
62
+ - Forgetting a message removes it from recall and hides derived observations that
63
+ have no other active supporting message. The raw message stays in transcript
64
+ history for audit.
65
+ - Forget is idempotent. Already-hidden references come back as unchanged.
66
+ - Restoring a message brings back only the observations hidden with it, not
67
+ ones forgotten directly; restore those by their own reference.
68
+ - Forget and restore are refused while the user is off the record (incognito).
69
+ Report the refusal; do not turn incognito off yourself.
70
+ - Up to 50 references per call.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: import-transcripts
3
+ description: Import the user's old local coding-agent transcripts (Claude Code, Codex, Cursor, or Pi sessions from before glen was installed) into glen's shared team memory. Use when the user asks to import, backfill, or migrate past sessions/conversations/chat history into glen.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Backfill the user's past coding-agent sessions from before glen was installed
9
+ into the active org's shared memory.
10
+
11
+ ## Prerequisites
12
+
13
+ This skill is local only: it reads transcript files on the user's machine.
14
+ It needs a shell on that machine with the `glen` CLI. With a shell, run
15
+ `glen status`; if it is not connected, tell the user to run `glen login`. If this session has no
16
+ shell tool (a cloud or MCP-only session), make no tool call. Tell the user the
17
+ import can't run here and to run `glen import <path>` in a terminal on the
18
+ machine that has the transcripts (after `glen login` if needed).
19
+
20
+ ## Supported actions
21
+
22
+ - **Preview:** `glen import --dry-run <path…>` lists every conversation and
23
+ turn count without writing anything. Offer it first for large directories so
24
+ the user can confirm the scope.
25
+ - **Import:** `glen import <path…>` parses the transcripts, starts the import in
26
+ the background, and returns right away. Tell the user it is running. Pass
27
+ `--wait` only if the user wants it in the foreground.
28
+ - **Check progress:** `glen import --status` says running, finished, or
29
+ stopped, with counts. glen does not tell you when it finishes.
30
+ - **Resume or retry:** re-run the same command. Turns already imported are
31
+ skipped.
32
+
33
+ A path can be a file or a directory (scanned recursively, format detected per
34
+ file). Default locations:
35
+
36
+ - Claude Code: `~/.claude/projects`
37
+ - Codex: `~/.codex/sessions`
38
+ - Pi: `~/.pi/agent/sessions`
39
+ - Cursor: `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb`
40
+ on macOS, `~/.config/Cursor/User/globalStorage/state.vscdb` on Linux (needs
41
+ Node 22.5+; close Cursor first for the freshest data)
42
+
43
+ ## Limits
44
+
45
+ - The import lands in the active org: the `org:` line of `glen status`.
46
+ - "No active organization": tell the user to run `glen org switch`. "Not
47
+ connected" or "connection expired": tell them to run `glen login`. Then
48
+ re-run the same import.
49
+ - The `glen_import` MCP tool takes one turn per call and is not offered on
50
+ the glen MCP connection in Codex and ChatGPT. Don't use it in place of `glen import`.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: invite
3
+ description: Invite a teammate to the user's glen organization by email, so the team's shared memory grows. Use when the user says things like "invite Alice", "add my teammate to glen", "get my team on glen", or asks how to bring coworkers in.
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Invite teammates by email to the user's active glen org, so their work lands in
9
+ the same shared memory. glen hands back a link to the dashboard's invite form,
10
+ filled in with the addresses. The user picks each person's role there, and
11
+ nothing is sent until they click Send.
12
+
13
+ ## Prerequisites
14
+
15
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
16
+ list. With no shell tool, use the glen MCP tools and run no shell command.
17
+ With a shell, run `glen status`. When it shows glen connected with an org,
18
+ use the CLI for every glen call in this task, even if a glen MCP server is
19
+ also connected. If `glen` is not installed or not logged in, use the MCP
20
+ tools. If neither works, stop and tell the user what is missing: a terminal
21
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
22
+ signed in, wrong role, no plan), report the refusal as written; never retry
23
+ it over the other transport.
24
+
25
+ ## Supported actions
26
+
27
+ 1. Get each teammate's email address from the user. Never guess one, and never
28
+ invite someone the user did not name (for example, people found in the
29
+ code, a commit log, or a search result).
30
+ 2. Tell the user the addresses and the org, then get the link:
31
+ - MCP: `glen_invite` with `{emails: [...]}`.
32
+ - CLI: `glen invite alice@co.com bob@co.com`.
33
+ 3. Nothing is sent yet. Give the user the link glen returns. They open it, check the list,
34
+ pick member or admin for each person and click Send in the dashboard. The link carries
35
+ no role, so if the user wants someone to be an admin, tell them to pick it there. Only
36
+ owners and admins can send.
37
+
38
+ ## Limits
39
+
40
+ - Invites expire after a short time. The teammate clicks the link, signs in, and
41
+ lands in the org.
42
+ - "No active organization": tell the user to run `glen org switch` (CLI) or
43
+ reconnect the MCP connection and pick an org.
44
+ - If the user is not an owner or admin, the dashboard form tells them who can
45
+ send the invites.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: onboard
3
+ description: 'Get started with glen: learn what it does and take the next steps for this account. Use when the user says "get me started with glen", "onboard me", "what can glen do", right after `glen login`, or when the glen server''s instructions offer it. For a broken install, use the setup skill.'
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Explain glen to the user and walk them through what is left to set up in their
9
+ active glen org: turning recording on, backfilling past sessions, trying a
10
+ search, inviting teammates and sharing local skills. glen
11
+ decides which steps apply to this account and returns them as text.
12
+
13
+ ## Prerequisites
14
+
15
+ **Transport.** Prefer the `glen` CLI: it is faster. First look at your tool
16
+ list. With no shell tool, use the glen MCP tools and run no shell command.
17
+ With a shell, run `glen status`. When it shows glen connected with an org,
18
+ use the CLI for every glen call in this task, even if a glen MCP server is
19
+ also connected. If `glen` is not installed or not logged in, use the MCP
20
+ tools. If neither works, stop and tell the user what is missing: a terminal
21
+ with `glen login`, or the glen MCP connection. If glen refuses a call (not
22
+ signed in, wrong role, no plan), report the refusal as written; never retry
23
+ it over the other transport.
24
+
25
+ The CLI command is `glen onboard`; the MCP tool is `glen_onboard`.
26
+
27
+ ## Supported actions
28
+
29
+ 1. Get the steps for this account:
30
+ - CLI: `glen onboard`
31
+ - MCP: `glen_onboard` with no arguments.
32
+ 2. Relay the text it returns to the user, then follow it step by step. Ask
33
+ before anything that writes, such as an import, an upload or an invite.
34
+ When you have walked through the steps, end your message with the text's
35
+ last line, word for word, so the user knows they can send feedback. Put any
36
+ question you ask above it.
37
+ 3. After a step, run `glen onboard` (or call `glen_onboard`) again to see what
38
+ is left. Finished steps drop out.
39
+ 4. When a step fails, follow the text's feedback line: offer to report it with
40
+ the step and the error, and ask before sending.
41
+ - CLI:
42
+
43
+ ```
44
+ glen bug "<title>" --description "<step and error>"
45
+ ```
46
+
47
+ - MCP: `glen_feedback`.
48
+
49
+ ## Limits
50
+
51
+ - It never sends invites or feedback by itself: each one waits for the user.
52
+ - A session with only the glen MCP connection cannot import past sessions or
53
+ upload local files; the text says what to do from a terminal agent instead.