githits 0.6.6 → 0.7.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 (39) hide show
  1. package/.claude-plugin/marketplace.json +21 -3
  2. package/.claude-plugin/plugin.json +16 -2
  3. package/.codex-plugin/plugin.json +42 -0
  4. package/.cursor-plugin/plugin.json +29 -0
  5. package/.mcp.json +2 -2
  6. package/.plugin/plugin.json +16 -2
  7. package/AGENTS.md +201 -0
  8. package/README.md +23 -6
  9. package/dist/cli.js +30 -24
  10. package/dist/index.js +1 -1
  11. package/dist/shared/{chunk-ffqa4bpw.js → chunk-mysf4hjt.js} +18 -3
  12. package/dist/shared/{chunk-pwfqg90m.js → chunk-ncsgqtj1.js} +1 -1
  13. package/dist/shared/{chunk-qh0kv76d.js → chunk-p8dg49ey.js} +1 -1
  14. package/gemini-extension.json +2 -3
  15. package/mcp_config.json +7 -0
  16. package/package.json +23 -14
  17. package/plugin.json +3 -0
  18. package/server.json +5 -2
  19. package/skills/githits-code/SKILL.md +10 -7
  20. package/skills/githits-code/references/code-and-docs.md +3 -1
  21. package/skills/githits-onboarding/SKILL.md +54 -10
  22. package/GEMINI.md +0 -83
  23. package/commands/example.md +0 -27
  24. package/commands/help.md +0 -52
  25. package/commands/login.md +0 -36
  26. package/commands/logout.md +0 -16
  27. package/commands/search.md +0 -27
  28. package/commands/status.md +0 -22
  29. package/plugins/claude/.claude-plugin/plugin.json +0 -12
  30. package/plugins/claude/.mcp.json +0 -8
  31. package/plugins/claude/commands/example.md +0 -27
  32. package/plugins/claude/commands/help.md +0 -52
  33. package/plugins/claude/commands/login.md +0 -36
  34. package/plugins/claude/commands/logout.md +0 -16
  35. package/plugins/claude/commands/search.md +0 -27
  36. package/plugins/claude/commands/status.md +0 -22
  37. package/plugins/claude/skills/githits-mcp/SKILL.md +0 -40
  38. package/plugins/claude/skills/onboarding/SKILL.md +0 -123
  39. package/plugins/claude/skills/search/SKILL.md +0 -44
@@ -1,123 +0,0 @@
1
- ---
2
- name: onboarding
3
- description: >-
4
- Set up GitHits from Claude Code: detect supported tools, install GitHits MCP,
5
- start sign-in/signup, verify auth, and recover from setup issues.
6
- metadata:
7
- internal: true
8
- ---
9
-
10
- Use this skill when the user asks to install, connect, set up, sign up for, or start using GitHits. This is a new-user onboarding skill: assume the user wants to create or connect a GitHits account and configure GitHits unless they explicitly say otherwise.
11
-
12
- ## Current Boundary
13
-
14
- - GitHits sign-in/signup currently uses browser OAuth. You can start and monitor login, but the user may need to approve GitHits in a browser tab.
15
- - Never ask the user to paste passwords, OAuth codes, cookies, access tokens, refresh tokens, or API keys into chat.
16
-
17
- ## Execution Mode
18
-
19
- - Use `npx -y githits@latest ...` for every normal onboarding command. This guarantees the latest published GitHits CLI behavior for new users.
20
- - Do not use a globally installed `githits` binary for onboarding unless the user explicitly asks to test a local, dev, or pinned CLI build.
21
- - If the user explicitly asks for local/dev/pinned testing, preserve the command and environment they provide.
22
- - Run onboarding commands inline in the current agent session.
23
- - Do not use subagents, background agents, background terminals, or long-running background tasks for onboarding.
24
- - Do not delegate `githits`, `npx`, `npm`, `codex`, `claude`, detection, login, or setup commands to subagents or background agents.
25
- - Do not start `npx -y githits@latest init --detect-agents --json` as a background task. Wait for the result before continuing.
26
- - Do not run `pkill`, `ps`, process inspection, or package-source inspection as part of normal onboarding.
27
- - If `npx -y githits@latest ...` fails because of network, DNS, or package-fetch errors, stop and report that GitHits CLI is unavailable.
28
- - If official detection fails or appears stuck, do not inspect package internals, manually probe tools to infer install IDs, or ask the user to type inferred IDs. Report the detection failure and offer to retry, switch setup scope, or stop.
29
-
30
- ## Flow
31
-
32
- 1. Choose setup scope with a structured choice. Do not ask the user to type a freeform response.
33
-
34
- Ask: `Where should GitHits be configured?`
35
-
36
- Options:
37
-
38
- - `My user account (Recommended)` — configures detected tools globally/user-level on this machine so GitHits is available wherever the user works with those agents.
39
- - `This project only` — writes project-local MCP files into this repo; files may be committed.
40
-
41
- 2. Detect supported tools and current MCP state for the selected scope.
42
-
43
- Project-level detection:
44
-
45
- ```bash
46
- npx -y githits@latest init --project --detect-agents --json
47
- ```
48
-
49
- User-level detection:
50
-
51
- ```bash
52
- npx -y githits@latest init --detect-agents --json
53
- ```
54
-
55
- Run detection inline, not in a background terminal. Wait for JSON before continuing.
56
-
57
- Do not offer tools with `unsupported_project_config` for project-level setup.
58
-
59
- 3. If `installableIds` is non-empty, use structured choices for tool selection. Do not ask the user to type comma-separated tool IDs unless no structured choice UI is available.
60
-
61
- Present `Configure all detected tools (Recommended)` as the first option, then list individual tools for selective setup. Do not present "configure none" as a normal onboarding choice.
62
-
63
- Ask before writing configuration: `I recommend configuring all detected tools so GitHits works wherever you use an agent. Proceed with all, or choose specific tools?`
64
-
65
- Do not run `init -y` or `init --yes` unless the user explicitly asks to configure every detected tool.
66
-
67
- 4. Install only approved IDs using the selected scope.
68
-
69
- Guidance is installed by default. It adds the `githits-mcp` skill and a short instruction pointer for tools with verified guidance paths. Add `--no-guidance` only when the user explicitly asks for plain MCP without supporting instructions.
70
-
71
- Project-level install:
72
-
73
- ```bash
74
- npx -y githits@latest init --project --install-agents <comma-separated-approved-ids> --json
75
- ```
76
-
77
- User-level install:
78
-
79
- ```bash
80
- npx -y githits@latest init --install-agents <comma-separated-approved-ids> --json
81
- ```
82
-
83
- 5. Start GitHits sign-in/signup as part of onboarding. Do not ask whether the user wants to log in; login creates or connects the GitHits account.
84
-
85
- Check whether login can be skipped because auth is already active:
86
-
87
- ```bash
88
- npx -y githits@latest auth status
89
- ```
90
-
91
- If not authenticated or expired, ask before launching browser login, then run:
92
-
93
- ```bash
94
- npx -y githits@latest login
95
- ```
96
-
97
- Normal login opens the browser when possible and also prints a fallback sign-in URL. If command output is hidden from the user, relay the URL verbatim.
98
-
99
- Use this only when browser launch fails or the environment is headless:
100
-
101
- ```bash
102
- npx -y githits@latest login --no-browser
103
- ```
104
-
105
- With `--no-browser`, surface the printed sign-in URL clearly so the user can open it in a browser. If command output is hidden from the user, relay the URL verbatim. Do not ask them to paste secrets or OAuth codes back into chat.
106
-
107
- 6. Verify with the selected scope.
108
-
109
- Project-level verification:
110
-
111
- ```bash
112
- npx -y githits@latest auth status
113
- npx -y githits@latest init --project --detect-agents --json
114
- ```
115
-
116
- User-level verification:
117
-
118
- ```bash
119
- npx -y githits@latest auth status
120
- npx -y githits@latest init --detect-agents --json
121
- ```
122
-
123
- Report configured tools, auth state, failures, and whether the user should open a new Claude Code session so MCP config changes load.
@@ -1,44 +0,0 @@
1
- ---
2
- name: search
3
- description:
4
- Use GitHits MCP tools to find real-world code examples when model knowledge
5
- is insufficient.
6
- metadata:
7
- internal: true
8
- ---
9
-
10
- Use GitHits when:
11
-
12
- - You are blocked, uncertain about an API, or need up-to-date OSS usage.
13
- - You have attempted a solution twice and it still fails - search for a working example before trying again.
14
- - The user asks to search for examples or explicitly mentions GitHits.
15
- - You are implementing non-trivial code in languages where confidence is lower.
16
-
17
- Authentication:
18
-
19
- - If any GitHits tool returns an authentication error, immediately run
20
- `npx -y githits login` in the terminal. This opens the user's browser for
21
- quick OAuth approval. Wait for the command to complete, then retry the
22
- original tool call.
23
- - If the environment has no display (SSH, containers), use
24
- `npx -y githits login --no-browser` instead, which prints a URL for the
25
- user to open on another device.
26
- - Do NOT ask the user to run login manually -- handle it automatically.
27
- - If login fails, inform the user of the error and suggest they set the
28
- `GITHITS_API_TOKEN` environment variable as an alternative.
29
-
30
- Guidelines:
31
-
32
- - Prefer existing search context if it already answers the problem.
33
- - Pass `language` only when you need to force a specific language; use
34
- `search_language` first if the exact language name is uncertain.
35
- - Use `get_example` for one focused example-search question at a time.
36
- - When the task is about indexed dependency or repository internals, prefer
37
- unified `search` instead of
38
- `get_example`.
39
- - Prefer the default compact text output. Request JSON only when exact
40
- structured fields are necessary.
41
- - After using results, send `feedback` with helpful/unhelpful outcome.
42
-
43
- Tool argument details and rich query guidance are provided directly in the MCP
44
- tool descriptions; follow those descriptions as the source of truth.