Skip to content

Commit 016b99b

Browse files
jfrog-agentic-release-bot[bot]yanivt-jfrogcursoragentYoniMelki
authored
feat(skills): sync skills to v0.22.0 (#25)
* [patch] chore: sync skills to v0.22.0 * docs: align README with plugin template and add SECURITY.md Restructure the README to match the Claude/Codex JFrog plugin layout (Features table, Prerequisites with pinned skills Requirements link, Installation + Local development, numbered Authentication, Usage tables, Troubleshooting, Updating the vendored skills) and add SECURITY.md. Co-authored-by: Cursor <cursoragent@cursor.com> * docs: update VENDOR.md for the v0.22.0 skill tree List all six vendored skills (incl. jfrog-mcp-management), correct the example pin to v0.22.0, and note the mise-free `node scripts/sync-skills.mjs`. Co-authored-by: Cursor <cursoragent@cursor.com> * test: update EXPECTED_SKILLS for v0.22.0 skill tree jfrog-skills v0.22.0 added jfrog-mcp-management, jfrog-reference-architecture, and jfrog-setup-package-managers alongside the existing three skills. --------- Co-authored-by: jfrog-agentic-release-bot[bot] <276080306+jfrog-agentic-release-bot[bot]@users.noreply.github.com> Co-authored-by: yanivt <yanivt@jfrog.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Yoni Melki <yonim@jfrog.com>
1 parent 56abf59 commit 016b99b

31 files changed

Lines changed: 2812 additions & 130 deletions

README.md

Lines changed: 207 additions & 101 deletions
Large diffs are not rendered by default.

SECURITY.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Security
2+
3+
## Reporting a vulnerability
4+
5+
Please report security issues responsibly so we can address them before public disclosure.
6+
7+
- **Email:** [security@jfrog.com](mailto:security@jfrog.com) or follow the process described on [JFrog's security page](https://jfrog.com/trust/report-vulnerability/).
8+
9+
Include steps to reproduce, affected versions or commits, and impact if known.
10+
11+
## Scope
12+
13+
This repository ships an OpenCode plugin (a thin config hook plus vendored skills, published to npm).
14+
15+
Do not commit secrets, API keys, or credentials. Skill runtime data under `**/local-cache/` must not be checked into git.

VENDOR.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The vendoring source is declared in `sync-skills-vendor.json` at the repo root:
1515
```json
1616
{
1717
"repo": "jfrog/jfrog-skills",
18-
"pin": "v0.16.0",
18+
"pin": "v0.22.0",
1919
"paths": ["skills"]
2020
}
2121
```
@@ -40,8 +40,16 @@ The result is a flat, committed tree:
4040
skills/
4141
jfrog/SKILL.md (+ references/ scripts/ assets/)
4242
jfrog-package-safety-and-download/SKILL.md
43+
jfrog-setup-package-managers/SKILL.md
44+
jfrog-ai-catalog-skills/SKILL.md
45+
jfrog-mcp-management/SKILL.md
46+
jfrog-reference-architecture/SKILL.md
4347
```
4448

49+
> **Note:** the exact set of skill directories is whatever the pinned `jfrog/jfrog-skills` release
50+
> ships under `skills/` — the sync copies the whole tree. `jfrog-mcp-management/` (JFrog Agent Guard
51+
> MCP management, including the OpenCode harness) is included as of the pinned `v0.22.0`.
52+
4553
The script is dependency-free Node ESM and makes no changes outside the vendored `paths`.
4654

4755
## Bumping the pin
@@ -50,7 +58,7 @@ The script is dependency-free Node ESM and makes no changes outside the vendored
5058
2. Re-vendor:
5159

5260
```bash
53-
mise run sync-skills
61+
mise run sync-skills # or, without mise: node scripts/sync-skills.mjs
5462
```
5563

5664
3. Review the diff under `skills/` and commit the regenerated tree **together with** the updated

skills/jfrog-ai-catalog-skills/SKILL.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,15 @@ Pick the row matching the user's intent and read that reference file.
5656
same `<SID>` to Agent Guard as `--server "<SID>"` so it targets the same server
5757
as your `jf` calls. Agent Guard also reads `JFROG_URL` / `JF_URL` directly when
5858
set, so make sure the `<SID>` you resolved points at that same host.
59-
- **Resolve the project (`<PROJECT>`) only when needed, and always to a key.**
60-
`<PROJECT>` must be the JFrog **project key**, not the display name. It is
61-
required for `--list-skills`, `--list-skill-versions`, and
62-
`--provision-skills-repository`. Take the value from `JF_PROJECT` or the user,
63-
then resolve it to a key against the projects list (see *List all projects* in
64-
the base `jfrog` skill's [`references/projects-api.md`](../jfrog/references/projects-api.md)):
65-
```bash
66-
jf api '/access/api/v1/projects' --server-id "<SID>" \
67-
| jq -r '.[] | select(.project_key=="<value>" or .display_name=="<value>") | .project_key'
68-
```
69-
Use the printed key. If it prints nothing, ask the user for the key. Never
70-
assume `default`, never invent one. Install, update, remove, and publishing to
59+
- **Resolve the project (`<PROJECT>`) only when needed.**
60+
It is required for `--list-skills`, `--list-skill-versions`, and
61+
`--provision-skills-repository`. Take it from `JF_PROJECT` or the user.
62+
There is no non-admin way to look up or validate project keys (the
63+
`/access/api/v1/projects` list endpoint needs admin), so you cannot
64+
silently correct a display name to a key. If the value looks like a
65+
display name (spaces, mixed case) rather than a short slug, ask the
66+
user to confirm the project **key** specifically. Never assume
67+
`default`, never invent one. Install, update, remove, and publishing to
7168
an explicit `--repo` are keyed by skill **name** and/or **repo**, not a
7269
project.
7370

skills/jfrog-ai-catalog-skills/references/publishing-skills.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ template and do not run `jf skills publish` until the user agrees:
137137

138138
> Publishing skill `<slug>` uploads it to repository `<repo>` on server `<SID>`. Do you want to publish it?
139139
140+
Never combine this final confirmation step with the previous signing step into one prompt.
141+
140142
If the user says no or names a different repo/name, use that instead and confirm
141143
again. Only proceed to *Publish* after an explicit "yes".
142144

skills/jfrog-mcp-management/SKILL.md

Lines changed: 388 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Agent Guard activation — Step 0 exit codes
2+
3+
Reference for the Step 0 check (`scripts/jfrog-agent-guard-check.mjs`) run by
4+
the `jfrog-mcp-management` skill.
5+
6+
Run the check FRESH on every activation — NEVER cache or reuse a previous
7+
result. Do not tell the user you are running it, and never mention the Agent
8+
Guard or this script. Key off the EXIT CODE, not the text it prints.
9+
10+
| Exit | Meaning | Action |
11+
| --- | --- | --- |
12+
| 0 | Agent Guard enabled | Proceed with the skill. |
13+
| 2 | Platform reachable but the MCP registry is disabled on the account | **Install / List → Available to install:** tell the user the MCP registry is turned off on their JFrog platform and they must contact their JFrog administrator or IT to enable it, then stop. **List → Currently installed / Remove:** proceed — local config only, no catalog (see SKILL.md). |
14+
| other non-zero | Disabled for any other reason (no credentials, timeout, network/DNS error) | **Install / List → Available to install:** silently abort — do not mention the Agent Guard or this script; answer using general knowledge as if this skill never loaded (you MAY discuss MCPs in general terms). **List → Currently installed / Remove:** proceed — local config only, no catalog or network (see SKILL.md). |
15+
16+
## Local-only flows proceed on every exit code
17+
18+
Two flows are pure local-config reads/edits that NEVER call the catalog or the
19+
network, so no exit code can make them fail for lack of platform access — they
20+
proceed on Exit 0, Exit 2, and Exit 1 alike, and do not depend on Step 0:
21+
22+
- **Remove** — delete the entry from the harness's MCP config, then clean the
23+
OAuth cache key.
24+
- **List → Currently installed** — read the servers map from the harness's
25+
config files (live status is an optional add-on where the harness provides it).
26+
27+
Only **Install** and **List → Available to install** are gated on Exit 0 (they
28+
hit the catalog over the network); see the exceptions below.
29+
30+
## Exceptions — Install / List → Available to install proceed even on a non-zero exit
31+
32+
These exceptions apply ONLY to "other non-zero" exits (no credentials,
33+
timeout, network/DNS error). For **Install / List → Available to install** they
34+
do NOT apply to Exit 2: the platform explicitly reported the MCP registry is
35+
disabled, so no agent guard command can succeed — stop after telling the user to
36+
contact their admin/IT, even if an existing `mcpServers` entry is present.
37+
(Remove and List → Currently installed are not gated at all — see above.)
38+
39+
Continue with the skill when either holds:
40+
41+
- The user explicitly asked to use the JFrog Agent Guard anyway; or
42+
- The workspace is already on the Agent Guard — an existing entry in the
43+
harness's MCP config (see [harness-common.md](harness-common.md)) runs
44+
`@jfrog/agent-guard`.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Agent guard common — registry URL & pre-flight
2+
3+
Reference for the Install and List flows of the `jfrog-mcp-management` skill.
4+
Read this before running any `npx @jfrog/agent-guard` command
5+
(`--list-available`, `--inspect`, `--login`).
6+
7+
Terminology used throughout these skills:
8+
9+
- **project (workspace)** — the current working directory (CWD) where the agent
10+
is running. Project-level MCP config lives in the harness's project config
11+
file (see [harness-common.md](harness-common.md); e.g. `.mcp.json` for Claude
12+
Code).
13+
- **JFrog project key** (`<JFROG_PROJECT_KEY>`) — the key identifying a JFrog
14+
project. This is distinct from the workspace/CWD.
15+
16+
## Registry URL
17+
18+
Wherever `<REGISTRY_URL>` appears, substitute the value of the
19+
`JFROG_AGENT_GUARD_REPO` environment variable if it is set. Otherwise use
20+
`https://releases.jfrog.io/artifactory/api/npm/coding-agents-npm/`.
21+
22+
## Pre-flight (applies to every agent guard command — `--list-available`, `--inspect`, `--login`)
23+
24+
- **Live execution is MANDATORY — context reuse is FORBIDDEN.** Every time the
25+
user asks to list / show / inspect / check the catalog or a specific MCP —
26+
including a repeated question already answered earlier in the chat — you
27+
MUST physically re-run the command. NEVER reuse, copy, or re-display output
28+
from previous turns or context history; the catalog, headers, and required
29+
inputs change between prompts. (Applies to `--list-available` and
30+
`--inspect` only — NOT `--login`, which would re-open the OAuth browser, and
31+
NOT reading local config for *installed* state.)
32+
33+
- **`<JFROG_PROJECT_KEY>` is always mandatory.** Resolve via the project
34+
chain: existing Agent Guard MCP entries (any harness config file per
35+
[harness-common.md](harness-common.md); `_JF_ARGS``project=`) →
36+
`JF_PROJECT` env var → ASK the user. If none resolves, STOP and ask — NEVER
37+
guess, NEVER assume `default`, NEVER invent JFrog project keys.
38+
39+
- **`<SERVER_ID>` is auto-resolvable.** This extends the base skill's
40+
[server selection rules](../../jfrog/SKILL.md#server-selection-rules-mandatory)
41+
(resolve one default server, reuse it, one server per request) with the
42+
MCP-specific step of reading an existing Agent Guard entry first. Resolve in
43+
order, stop at the first match:
44+
1. An existing Agent Guard MCP entry's `--server <ID>` (project or user
45+
config, per [harness-common.md](harness-common.md)) — reuse it.
46+
2. `JFROG_URL` + `JFROG_ACCESS_TOKEN` set in the env (the Step 0 check and the
47+
agent guard also accept the legacy `JF_URL` + `JF_ACCESS_TOKEN` pair as a
48+
fallback) — use them and do NOT pass `--server` (the agent guard reads the
49+
env directly).
50+
3. List configured servers with the jf CLI — run `jf config show
51+
--format=json` (do NOT parse `~/.jfrog/jfrog-cli.conf.v6` yourself; the
52+
CLI masks tokens, so its output is safe to read). Exactly one → use it;
53+
two or more → use the one with `"isDefault": true`; if none is marked
54+
default → ASK the user which one. Then pass `--server <ID>`.
55+
4. None of the above → ask the user to run `jf c add <ID>` or export
56+
`JFROG_URL` + `JFROG_ACCESS_TOKEN` (or the legacy `JF_URL` +
57+
`JF_ACCESS_TOKEN`), then retry.
58+
59+
When the ID came from an existing Agent Guard MCP entry or jf config, always
60+
pass it as `--server <ID>`; only on the `JFROG_URL`+token env path, never pass
61+
`--server`.
62+
63+
> Note: the agent uses `jf config show --format=json` here only to *discover a
64+
> server ID* — a token is not needed, so the masked output is fine. The Step 0
65+
> gate script separately uses `jf config export`, which emits the access token
66+
> it needs to call the platform directly. These are deliberately different
67+
> commands for different jobs; do not "unify" them — `jf config show` cannot
68+
> feed the gate (no token) and `jf config export` is not needed just to pick an
69+
> ID.
70+
- The commands need network access to the npm registry and the JFrog
71+
platform. Grant the matching runtime permission (see
72+
[runtime-permissions.md](runtime-permissions.md)); a corporate proxy, VPN, or
73+
blocked registry can also surface as `Forbidden` / `403` errors.
74+
75+
Once both are determined, proceed. If either is still unknown, STOP — do NOT
76+
run the command with guesses.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Harness: Claude Code
2+
3+
Claude Code-specific config for the `jfrog-mcp-management` skill. Read this
4+
together with [harness-common.md](harness-common.md) (shared entry shape and
5+
success criterion). You reached this file because the harness is Claude Code
6+
(`CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT`).
7+
8+
## Config files
9+
10+
- **Default scope: project.** `.mcp.json` in the project root — shareable via
11+
git. Create if missing: `{ "mcpServers": {} }`.
12+
- **User (global):** `~/.claude.json`, top-level `mcpServers`. Use ONLY if the
13+
user says "personal only" / "do not commit". Do NOT use
14+
`projects.<path>.mcpServers` — that subkey is per-project runtime state, not a
15+
registry.
16+
- Do not ask which scope unless the user brings it up.
17+
18+
## Top-level key
19+
20+
`mcpServers`
21+
22+
## Value reference (env / secrets)
23+
24+
Plain `${VAR_NAME}`, resolved from the shell that launched Claude Code. For
25+
`Bearer` headers: `"Bearer ${TOKEN}"`. The user must export the variable in the
26+
launching shell (see [persisting-env-vars.md](persisting-env-vars.md)); values
27+
are picked up on next launch. Never write a raw secret — always `${VAR}`.
28+
29+
## Enable
30+
31+
Pre-approve to skip the per-server prompt: edit
32+
`<cwd>/.claude/settings.local.json` (create as `{}` if missing) — remove the
33+
package from `disabledMcpjsonServers`, add it to `enabledMcpjsonServers`.
34+
Team-wide (committed): write the same arrays to `<cwd>/.claude/settings.json`.
35+
If the write fails (permissions, missing dir), continue — the user approves the
36+
prompt on relaunch.
37+
38+
## Restart
39+
40+
`/exit` or `/reload-plugins` in the same directory. On first launch accept the
41+
workspace-trust prompt; if pre-approval succeeded the per-server prompt is
42+
skipped, otherwise approve the server.
43+
44+
## List installed
45+
46+
`claude mcp list` for live connection status (one row per server). For JFrog
47+
metadata, read `mcpServers` from `.mcp.json` (project) and `~/.claude.json`
48+
(user).
49+
50+
## Verify
51+
52+
`/mcp`**drill into the server entry** (arrow into it, not just the top-level
53+
row) → read `Capabilities:`. It MUST list at least one tool. Top-level
54+
`✓ connected` alone is NOT proof (green whenever the proxy started, even with 0
55+
upstream tools). Empty `Capabilities:` = Failed → see the "0 tools"
56+
troubleshooting in [key-rules-and-troubleshooting.md](key-rules-and-troubleshooting.md).
57+
58+
## Approval / stuck-state precedence
59+
60+
If a server "still appears approved (or won't go away)", approval state lives in
61+
plain JSON arrays read at session start (nothing cached; `npm cache clean` is
62+
unrelated). Check, in precedence order:
63+
64+
1. `<cwd>/.claude/settings.local.json` — per-user, gitignored (where Enable writes by default)
65+
2. `<cwd>/.claude/settings.json` — team-shared, committed to git
66+
3. `~/.claude/settings.json` — user-global, applies to every repo
67+
4. `~/.claude.json``projects["<absolute cwd>"].enabledMcpjsonServers` / `disabledMcpjsonServers` — runtime store on interactive approve/reject; NOT cleared by `reset-project-choices`
68+
5. Managed `managed-settings.json` (`/Library/Application Support/ClaudeCode/` on macOS, `/etc/claude-code/` on Linux, `%ProgramData%\ClaudeCode\` on Windows) — can't be overridden
69+
70+
Also check `enableAllProjectMcpServers: true` in any of (1)–(3) — it
71+
auto-approves every entry. To truly revoke, remove the entry from every file
72+
that lists it, then relaunch. A missing entry from `claude mcp list` is usually
73+
a JSON parse failure (undefined `${VAR}`) or an `allowedMcpServers` /
74+
`deniedMcpServers` policy in `managed-settings.json`.

0 commit comments

Comments
 (0)