Skip to content

Mark skills that need a newer CLI in skills list - #8138

Open
simonfaltum wants to merge 37 commits into
mainfrom
skills/kminver-skills-list-decide-how-skills-that-need
Open

simonfaltum wants to merge 37 commits into
mainfrom
skills/kminver-skills-list-decide-how-skills-that-need

Conversation

@simonfaltum

@simonfaltum simonfaltum commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Changes

skills list keeps a skill whose min_cli_version is newer than the running CLI, and marks its line.

  • Text: future-skill: A skill that needs a newer CLI. (needs CLI 99.0.0 or newer). When the description is left out to fit the output, the mark follows the name.
  • JSON: an entry gets min_cli_version when the skill declares one. The other fields are unchanged.

Both match skills read, which warns about the same skill and still prints it. The skills group stays behind DATABRICKS_SKILLS_PREVIEW, so nothing changes for users until that variable is set. No changelog entry while the feature is gated.

Why

skills read warns about a skill that needs a newer CLI, but skills list showed the same skill with no sign of that. Hiding the skill instead would let an agent read a name that list never showed. Keeping the line and marking it keeps the two commands consistent and tells the reader what to do.

Decisions to review

  • Marked rather than hidden, which differs from the installer. Hiding would shorten the list, but the skill would still be readable by name, so the mark keeps list and read consistent.
  • The version check is the same semver comparison skills read uses. A development build sorts below the release it is building toward, so it marks skills that need that release. The installer skips the check on development builds.

Tests

  • TestRenderTextMarksSkillThatNeedsNewerCLI and TestRenderTextMarksNamesOnlyLineThatNeedsNewerCLI cover the text marks. TestRenderTextNoMarkWhenCLIIsNewEnough covers a skill the running CLI satisfies.
  • TestRunListJSONCarriesMinCLIVersion covers the JSON field.
  • acceptance/cmd/skills/list shows the marked lines and min_cli_version for future-skill.
  • acceptance/cmd/skills/disabled shows the group is not registered when the variable is unset.
  • go test ./cmd/skills/..., go test ./acceptance -run 'TestAccept/cmd/skills' and ./task --force fmt-q lint-q pass.

This pull request and its description were written by Isaac.

simonfaltum and others added 29 commits November 25, 2026 18:43
Skill sources need the manifest type and its path checks, and the
libs-no-aitools lint rule keeps shared libs from importing the installer.
Move Manifest, SkillMeta, NormalizeManifest, CheckManifestPaths, EscapesDir
and ErrUnsafeManifestPath down into libs/skills; the installer uses them
from there through aliases. Add the Skill and Catalog types, the Source
interface, sentinel errors, and NewFSSource over any fs.FS laid out like a
skills release. The manifest accepts optional per-skill commands and a
top-level catalog_rules file.

Co-authored-by: Isaac <no-reply@databricks.com>
The installer and libs/skills both reserve .state.json. Define the name once in
libs/skills and have the installer use it.

Co-authored-by: Isaac <no-reply@databricks.com>
The Windows CI checkout turns the LF fixtures into CRLF, so the exact
content assertions failed. Normalize line endings before comparing.

Co-authored-by: Isaac <no-reply@databricks.com>
Clean catalog_rules before reading it, expose min_cli_version on Skill,
document the Catalog fields and the release-relative paths the manifest
may name.

Co-authored-by: Isaac <no-reply@databricks.com>
Register the hidden skills command group only when DATABRICKS_SKILLS_PREVIEW
is set. Its five subcommands are stubs that report they are not implemented
yet. Add guards for the feature and for its hints switch, DATABRICKS_SKILLS_HINTS,
and a resolver for the folder in DATABRICKS_SKILLS_DIR, with an acceptance
fixture release that later changes reuse.

With the variable unset, the command group is not registered and nothing
else changes.

Co-authored-by: Isaac <no-reply@databricks.com>
The text output shows the catalog rules, one line per skill and a line on
how to read a skill. Descriptions are cut at a word boundary to the widest
width that keeps the output under a fixed budget, and only names are printed
when the names alone do not fit. The JSON output carries the full catalog.
Experimental skills are listed only with --experimental. A stale catalog
prints a provenance line on stderr.

The shared release fixture gains a catalog rules file and an experimental
skill.

Co-authored-by: Isaac <no-reply@databricks.com>
Skill sources need the manifest type and its path checks, and the
libs-no-aitools lint rule keeps shared libs from importing the installer.
Move Manifest, SkillMeta, NormalizeManifest, CheckManifestPaths, EscapesDir
and ErrUnsafeManifestPath down into libs/skills; the installer uses them
from there through aliases. Add the Skill and Catalog types, the Source
interface, sentinel errors, and NewFSSource over any fs.FS laid out like a
skills release. The manifest accepts optional per-skill commands and a
top-level catalog_rules file.

Co-authored-by: Isaac <no-reply@databricks.com>
The installer and libs/skills both reserve .state.json. Define the name once in
libs/skills and have the installer use it.

Co-authored-by: Isaac <no-reply@databricks.com>
The Windows CI checkout turns the LF fixtures into CRLF, so the exact
content assertions failed. Normalize line endings before comparing.

Co-authored-by: Isaac <no-reply@databricks.com>
Clean catalog_rules before reading it, expose min_cli_version on Skill,
document the Catalog fields and the release-relative paths the manifest
may name.

Co-authored-by: Isaac <no-reply@databricks.com>
Keep the path helper unexported since only libs/skills calls it, reject a
catalog_rules path that cleans to a directory, and test a missing rules
file. Drop the min_cli_version field, which is not in the skill interface
the package needs yet.

Co-authored-by: Isaac <no-reply@databricks.com>
Skill now has MinCLIVer, read from the manifest's min_cli_version, so a
caller can apply the same rule install uses. The fixture covers it.

Co-authored-by: Isaac <no-reply@databricks.com>
Register the hidden skills command group only when DATABRICKS_SKILLS_PREVIEW
is set. Its five subcommands are stubs that report they are not implemented
yet. Add guards for the feature and for its hints switch, DATABRICKS_SKILLS_HINTS,
and a resolver for the folder in DATABRICKS_SKILLS_DIR, with an acceptance
fixture release that later changes reuse.

With the variable unset, the command group is not registered and nothing
else changes.

Co-authored-by: Isaac <no-reply@databricks.com>
…ar-w

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
…ests

Check the skills group in the root command uniqueness test, even though it
is registered only behind DATABRICKS_SKILLS_PREVIEW. Clear both guard
variables in the guard tests so an exported value does not leak in.
LocalCatalog calls Resolve first and maps ErrNoSource to no catalog.
Route the acceptance help check to LOG.help.

Co-authored-by: Isaac <no-reply@databricks.com>
Text output shows the catalog rules, then one line per skill with its
description cut to fit a fixed budget, then how to read a skill. JSON
output carries the full catalog with empty lists as []. Experimental
skills are listed only with --experimental.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Stop the description search at the narrowest width that keeps the first
word of every description, so no line is left as "name: ...". Print the
"left out" hint only when a description is actually left out. Render the
JSON through cmdio.Render like other commands, and drop the unit test that
duplicated the acceptance output. The list keeps the order the source
serves, which is sorted by name.

Co-authored-by: Isaac <no-reply@databricks.com>
Takes main's version of the skills command group (c2) and keeps this
branch's list implementation, its fixtures and the experimental preview
skill in the release fixture.

Co-authored-by: Isaac <no-reply@databricks.com>
Keep the skills list fixtures on top of the merged release fixture:
the enabled script no longer stubs list, the release manifest keeps the
experimental preview skill next to the read fixtures, and the resolve
test counts the whole catalog.

Co-authored-by: Isaac <no-reply@databricks.com>
skills list now runs, so the test's skills list call fails with the
no-source error instead of the not-implemented stub message. The test
only checks that no hint is printed, so update the comment and golden.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Drop the enabled script's stubs for list-files and read-file, which are
implemented now, and remove the unused notImplemented helper. Regenerate
the list golden for the release fixture's demo-skill commands.

Co-authored-by: Isaac <no-reply@databricks.com>
- Cut each description at a word boundary. A skill whose description has no
  boundary within the width is listed by name alone, so one long description
  does not drop the rest of the catalog.
- Collapse whitespace in text output so every skill takes one line.
- Print the provenance line through cmdio.LogString, and leave out the fetch
  time when it is unknown, as for a bundled copy.
- Use forward slashes in the JSON source label, as skills search does.
- Hint at --experimental when every skill is experimental.
- Drop the acceptance test.toml that repeats the parent's settings.

Co-authored-by: Isaac <no-reply@databricks.com>
The text length is not monotonic in width: a wider width can drop the
search hint, so a binary search could settle on a narrower width than
one that fits. Try each width from the widest down instead, and add a
test whose widths 35 to 37 are over the budget and 38 fits.

Co-authored-by: Isaac <no-reply@databricks.com>
When the names alone do not fit the budget, no description width can fit
either, so return the names-only text without trying each width. The early
return only applies when the names do not fit even with the search hint,
since a wider width can leave that hint out.

Change the widest-width test data so that a binary search settles on a
narrower width whose output differs. The old search passed this test by
landing on a width whose output matched the widest fitting one.

Co-authored-by: Isaac <no-reply@databricks.com>
skills list keeps a skill whose min_cli_version is newer than this CLI,
and marks its line with the version it needs, as skills read does with its
warning. The text line gets "(needs CLI <version> or newer)" after the
description, or after the name when the description is left out. The JSON
entry gets min_cli_version, and only skills that declare one carry it.

Co-authored-by: Isaac <no-reply@databricks.com>
Keep both sides of the merge. The shared acceptance release gains a
hyphen-prefixed file for guide-skill, so the list golden is regenerated
for the file list it prints.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: ab4e2c77a | Workflow run

Selected 1 changed tests (limit=20, 0 not selected)

1 tests: regression=1 unreleased=0 coverage=0 failing=0
test branch main (05f2997) latest (v1.28.0)
TestAccept/cmd/skills/list ✅ ❌ ❌
TestAccept/cmd/skills/list: branch ✅ | main (05f2997) ❌ | latest (v1.28.0) ❌

main (05f2997):

acceptance_test.go:1402: Diff:
        --- cmd/skills/list/output.txt
        +++ /tmp/TestAcceptcmdskillslist29153090/002/output.txt
        @@ -5,7 +5,7 @@
         
         -foo: A skill whose name starts with a hyphen.
         demo-skill: A skill for tests.
        -future-skill: A skill that needs a newer CLI. (needs CLI 99.0.0 or newer)
        +future-skill: A skill that needs a newer CLI.
         guide-skill: A skill with a supporting file.
         To read a skill, run: databricks skills read <name>
         
        @@ -15,7 +15,7 @@
         
         -foo: A skill whose name starts with a hyphen.
         demo-skill: A skill for tests.
        -future-skill: A skill that needs a newer CLI. (needs CLI 99.0.0 or newer)
        +future-skill: A skill that needs a newer CLI.
         guide-skill: A skill with a supporting file.
         preview-skill: An experimental skill for tests.
         To read a skill, run: databricks skills read <name>
        @@ -52,7 +52,6 @@
               "name": "future-skill",
               "description": "A skill that needs a newer CLI.",
               "version": "0.0.1",
        -      "min_cli_version": "99.0.0",
               "files": [
                 "SKILL.md"
               ],
        @@ -104,7 +103,6 @@
               "name": "future-skill",
               "description": "A skill that needs a newer CLI.",
               "version": "0.0.1",
        -      "min_cli_version": "99.0.0",
               "files": [
                 "SKILL.md"
               ],
        
FAIL

latest (v1.28.0):

acceptance_test.go:1402: Diff:
        --- cmd/skills/list/output.txt
        +++ /tmp/TestAcceptcmdskillslist2135037563/002/output.txt
        @@ -1,134 +1,5 @@
         
         >>> [CLI] skills list
        -Pick the skill whose description matches the task.
        -Read the skill before you act on it.
        +Error: unknown command "skills" for "databricks"
         
        --foo: A skill whose name starts with a hyphen.
        -demo-skill: A skill for tests.
        -future-skill: A skill that needs a newer CLI. (needs CLI 99.0.0 or newer)
        -guide-skill: A skill with a supporting file.
        -To read a skill, run: databricks skills read <name>
        -
        ->>> [CLI] skills list --experimental
        -Pick the skill whose description matches the task.
        -Read the skill before you act on it.
        -
        --foo: A skill whose name starts with a hyphen.
        -demo-skill: A skill for tests.
        -future-skill: A skill that needs a newer CLI. (needs CLI 99.0.0 or newer)
        -guide-skill: A skill with a supporting file.
        -preview-skill: An experimental skill for tests.
        -To read a skill, run: databricks skills read <name>
        -
        ->>> [CLI] skills list --output json
        -{
        -  "source": "[TESTROOT]/cmd/skills/release",
        -  "release_version": "0.0.1",
        -  "skills": [
        -    {
        -      "name": "-foo",
        -      "description": "A skill whose name starts with a hyphen.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": [
        -        "jobs"
        -      ]
        -    },
        -    {
        -      "name": "demo-skill",
        -      "description": "A skill for tests.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": [
        -        "fs",
        -        "air"
        -      ]
        -    },
        -    {
        -      "name": "future-skill",
        -      "description": "A skill that needs a newer CLI.",
        -      "version": "0.0.1",
        -      "min_cli_version": "99.0.0",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": []
        -    },
        -    {
        -      "name": "guide-skill",
        -      "description": "A skill with a supporting file.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md",
        -        "references/guide.md",
        -        "-notes.md"
        -      ],
        -      "commands": []
        -    }
        -  ]
        -}
        -
        ->>> [CLI] skills list --output json --experimental
        -{
        -  "source": "[TESTROOT]/cmd/skills/release",
        -  "release_version": "0.0.1",
        -  "skills": [
        -    {
        -      "name": "-foo",
        -      "description": "A skill whose name starts with a hyphen.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": [
        -        "jobs"
        -      ]
        -    },
        -    {
        -      "name": "demo-skill",
        -      "description": "A skill for tests.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": [
        -        "fs",
        -        "air"
        -      ]
        -    },
        -    {
        -      "name": "future-skill",
        -      "description": "A skill that needs a newer CLI.",
        -      "version": "0.0.1",
        -      "min_cli_version": "99.0.0",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": []
        -    },
        -    {
        -      "name": "guide-skill",
        -      "description": "A skill with a supporting file.",
        -      "version": "0.0.1",
        -      "files": [
        -        "SKILL.md",
        -        "references/guide.md",
        -        "-notes.md"
        -      ],
        -      "commands": []
        -    },
        -    {
        -      "name": "preview-skill",
        -      "description": "An experimental skill for tests.",
        -      "version": "0.0.2",
        -      "files": [
        -        "SKILL.md"
        -      ],
        -      "commands": []
        -    }
        -  ]
        -}
        +Exit code: 1
        
FAIL

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: ab4e2c7

Run: 46438509056

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 90 7 1:44
💚​ aws-windows-latest-4core-16gb 1 90 7 3:17
💚​ azure linux-2core-8gb 1 90 7 1:52
💚​ azure-windows-latest-4core-16gb 1 90 7 3:21
💚​ gcp linux-2core-8gb 1 90 7 1:55
💚​ gcp-windows-latest-4core-16gb 1 90 7 3:34
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:32 gcp-windows-latest-4core-16gb TestAccept
3:19 azure-windows-latest-4core-16gb TestAccept
3:16 aws-windows-latest-4core-16gb TestAccept

@simonfaltum
simonfaltum marked this pull request as ready for review November 27, 2026 19:12
@simonfaltum
simonfaltum requested a review from a team as a code owner November 27, 2026 19:12

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review at 3055330. Each finding was verified against the code.

No blocking issues found. 2 non-blocking comment(s) and 1 question(s) below.

This PR keeps skills whose min_cli_version is newer than the running CLI in skills list, adds a "(needs CLI X or newer)" note to their text line, and adds min_cli_version to the JSON entries. The behavior looks correct. The version check is now a second copy of the one in skills read, so the two commands can drift apart. One new unit test only repeats what the acceptance golden already records.

Questions

  1. The text output marks a skill only when this CLI is too old, but JSON includes min_cli_version whenever a skill declares one and doesn't give the running CLI version. A JSON consumer has to repeat the semver comparison, including the rule that dev builds sort below their release, to learn what the text reader is told. Should JSON also carry a computed field such as needs_newer_cli, or the running version, or is the raw field enough for agents? (non-blocking)

Comment thread cmd/skills/list.go Outdated
// the running one, or "" when this CLI is new enough. The skill stays listed,
// as `skills read` still serves it with a warning.
func newerCLINote(s libskills.Skill) string {
if s.MinCLIVer == "" || semver.Compare("v"+build.GetInfo().Version, "v"+s.MinCLIVer) >= 0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nice to have] This repeats the condition in runRead (cmd/skills/read.go:76): MinCLIVer != "" && semver.Compare("v"+Version, "v"+MinCLIVer) < 0. The point of the mark is that list agrees with read, but nothing keeps the two copies in sync. For example, if one of them later skips development builds the way the installer does, the two commands will disagree about the same skill. Can we pull this into one helper in the package, say needsNewerCLI(s libskills.Skill) bool, and call it from both places?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in beeb396. The min_cli_version comparison now lives in one helper, needsNewerCLI, in cmd/skills/list.go. The list marker and the warning in skills read both call it, so the two commands use the same check.

Comment thread cmd/skills/list_test.go
func TestRenderTextNoMarkWhenCLIIsNewEnough(t *testing.T) {
list := []libskills.Skill{{Name: "current", Description: "Current.", MinCLIVer: build.GetInfo().Version}}
assert.Equal(t, "current: Current.\n"+readHint+"\n", renderText("", list))
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] acceptance/cmd/skills/list/output.txt already shows "min_cli_version": "99.0.0" on future-skill and no such key on the other skills. This test wires up a cobra command and a cmdio context only to check the same two facts again. testing.md says not to add a unit test that only duplicates acceptance coverage. Can we drop it and keep the names-only and new-enough tests, which cover cases the golden doesn't?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in beeb396. Dropped TestRunListJSONCarriesMinCLIVersion. The acceptance golden for skills list --output json already checks min_cli_version on future-skill and its absence on the other skills. I kept the text tests for the names-only line and the new-enough case, which the golden does not cover.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed again in 7b6f5f1. The acceptance golden for skills list --output json already checks min_cli_version on future-skill and its absence on the other skills, so the unit test only repeated it.

simonfaltum and others added 2 commits November 27, 2026 19:21
…minver-skills-list-decide-how-skills-that-need
Move the min_cli_version comparison into one helper that both
skills list and skills read call, so the two commands cannot drift
apart. Drop the JSON unit test that repeated a fact the acceptance
golden already checks.

Co-authored-by: Isaac <no-reply@databricks.com>
Base automatically changed from skills/k1-skills-list-prints-the-catalog to main November 27, 2026 19:26
simonfaltum and others added 2 commits November 27, 2026 19:43
Keep the newer-CLI marking in skills list on top of the squash-merged list command. The text marks a skill that needs a newer CLI, and the JSON carries min_cli_version.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum
simonfaltum requested review from denik and rclarey November 28, 2026 09:02

@rugpanov rugpanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is small and correct for the case that it targets. I found no blocking problem. I do not approve yet, because two earlier review points are still open at this head (see the end of this review).

Risk: LOW. The change reaches only skills list and skills read. The skills group is hidden and runs only when DATABRICKS_SKILLS_PREVIEW is set. The change adds a text note and an omitempty JSON field, and the read.go refactor keeps the same check. All CI checks pass.

[nice to have] cmd/skills/search.go:13 and cmd/skills/search.go:20-22: this PR makes two comments in search.go wrong. They say that searchTemplate uses "the line format of skills list", and that searchJSON has "the per-skill fields of skills list". After this PR, skills list marks future-skill with (needs CLI 99.0.0 or newer) and gives min_cli_version. skills search future shows the same skill with no mark, and searchJSONSkill (search.go:29) has no min_cli_version. Add the note and the field to search with newerCLINote and needsNewerCLI. If search is out of scope, update the two comments.

Earlier points that are still open:

  • #8138 (comment): the reply says that TestRunListJSONCarriesMinCLIVersion was dropped. Commit 22df1f3 adds it again (list_test.go:241), and acceptance/cmd/skills/list/output.txt:42,83 already checks the same field. Remove the test again, or reply in the thread with the reason to keep it.
  • #8138 (review): the question about a computed field in the JSON output (for example needs_newer_cli) has no answer yet.

Comment thread cmd/skills/list.go Outdated
// min_cli_version. `skills list` marks such a skill and `skills read` warns
// about it, so both commands use this one check.
func needsNewerCLI(s libskills.Skill) bool {
return s.MinCLIVer != "" && semver.Compare("v"+build.GetInfo().Version, "v"+s.MinCLIVer) < 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Question] Should needsNewerCLI skip the check on development builds, as the installer does? libs/aitools/installer/installer.go:507 uses !isDev, but this check does not. On a dev build (1.29.0-dev), skills list marks a skill with min_cli_version: 1.29.0, and aitools install installs it with no warning. The answer tells if one shared helper in libs/skills can serve list, read and the installer.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change. I kept the check the same as skills read rather than skipping development builds. The list marker is informational and the skill stays listed, and the acceptance output for the 99.0.0 skill relies on a development build (the test binary is one) showing the marker. Skipping dev builds would also change what read warns about, which is outside this ticket. The comment on the helper now says a development build compares below the release it builds toward. Moving the check into libs/skills for the installer to share is better as a separate change that decides the dev-build policy for all three callers.

Comment thread cmd/skills/list.go Outdated
note := newerCLINote(s)
if cut == "" {
b.WriteString(s.Name + "\n")
b.WriteString(s.Name + note + "\n")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Question] Do agents read a names-only line as the skill name? Before this PR, the line was only the name. Now it is future (needs CLI 99.0.0 or newer), and the hint says databricks skills read <name>. An agent that copies the full line gets unknown skill. A separator such as future: (needs CLI 99.0.0 or newer) makes the name easier to parse.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 562018f. A names-only line is now name: (needs CLI 99.0.0 or newer), so the name is the text before the colon, as it is on lines with a description. The unit test for that line is updated.

Comment thread cmd/skills/list.go Outdated
if width > 0 {
cut = cutWords(desc, width)
}
note := newerCLINote(s)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] layoutText calls newerCLINote for each skill at each width that the loop in renderText tries (up to 4000 widths). The note does not depend on the width. Compute the notes one time in renderText and pass them to layoutText.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 562018f. renderText computes the notes once and passes them to layoutText, so the width loop no longer recomputes them.

Comment thread cmd/skills/list.go Outdated
return b.String()
}

// needsNewerCLI reports whether the running CLI is older than the skill's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The second sentence of this comment names the callers and the reason for the shared helper. It becomes wrong when a caller changes. Keep only the first sentence, or say that a development build compares below the release that it builds toward. Also think about a move of the helper to skills.go, because read.go calls it too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 562018f. needsNewerCLI moved to cmd/skills/skills.go, and the comment now only says that a development build compares below the release it builds toward.

simonfaltum and others added 2 commits November 29, 2026 13:07
… once

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@simonfaltum

Copy link
Copy Markdown
Member Author

Replies to the open points at 7b6f5f1.

  • Test: TestRunListJSONCarriesMinCLIVersion is removed again (see the thread). The acceptance golden covers the field.
  • Computed JSON field (needs_newer_cli or the running version): no change. The raw min_cli_version is what the ticket asks for, and keeping the list otherwise unchanged lets skills list and skills search share one envelope. An agent that needs the verdict gets it from the text line or from the warning in skills read. A computed field can follow in the shared JSON type if agents turn out to need it.
  • search.go comments: updated so they no longer claim the same line format or per-skill fields as skills list. Marking skills in skills search is not part of this ticket.

@denik denik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review of 7b6f5f1 by Opus and Astra (two independent Astra passes; Fable was unavailable); each finding verified against the code.

No blocking issues. The mark and the JSON field work as described, and go test ./cmd/skills/... plus TestAccept/cmd/skills pass on this head merged into current main.

Review points:

  • The Tests section of the description still lists TestRunListJSONCarriesMinCLIVersion, which 7b6f5f15d removed; the JSON field is now covered only by the acceptance/cmd/skills/list golden.

Findings not posted inline:

  1. Should fix cmd/skills/list.go:108: the newer-CLI notes count toward textBudget and stay in the names-only fallback, so a catalog where many skills need a newer CLI can go over the budget even when the names alone fit. A scratch test with 110 skills skill-000…skill-109, each with a short description and min_cli_version: 99.0.0, renders 4442 bytes (budget 4000, every line skill-NNN: (needs CLI 99.0.0 or newer)); the same catalog without the field renders 3792 bytes. Today's catalogs are far from that size, so this is about the contract rather than a current failure. A shorter note in the names-only layout (e.g. a trailing * plus one legend line per required version) would keep the budget, and no test yet combines notes with the budget path (the names-only note test uses empty descriptions).

Comment thread cmd/skills/search.go Outdated
)

// searchTemplate prints the matches in the line format of skills list, then the
// searchTemplate prints the matches as name and description lines like skills list, without its newer-CLI note, then the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] The two comments updated in 7b6f5f1 weren't rewrapped: line 13 is 121 characters, while the rest of the file wraps near 80. The new searchJSON comment also says search shares only "the name and description fields of skills list", but searchJSONSkill also shares version, files and commands. Only min_cli_version differs. A maintainer reading it could conclude those fields are free to drift. Suggest rewrapping both comments and saying something like: "It has the envelope and the per-skill fields of skills list except min_cli_version, so one parser reads both."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest push. Both comments are rewrapped near 80 columns, and the searchJSON comment now says it has the envelope and the per-skill fields of skills list except min_cli_version.

Comment thread cmd/skills/list_test.go
"testing"
"time"

"github.com/databricks/cli/internal/build"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] "github.com/databricks/cli/internal/build" sits in its own group, separated by a blank line from the other github.com/databricks/cli/... imports. goimports accepts it, so lint passes, but it splits the first-party group. Drop the blank line so it joins the libs/... imports.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in the latest push. The internal/build import now sits in the same group as the other first-party imports.

simonfaltum and others added 2 commits November 30, 2026 11:01
Co-authored-by: Isaac <no-reply@databricks.com>
…hat-need

Co-authored-by: Isaac <no-reply@databricks.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants