Skip to content

Add org skills commands to cloud CLI - #1793

Open
bearsyankees wants to merge 1 commit into
mainfrom
feat/str-2776-cli-org-skills
Open

bearsyankees wants to merge 1 commit into
mainfrom
feat/str-2776-cli-org-skills

Conversation

@bearsyankees

@bearsyankees bearsyankees commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds strix cloud knowledge skills commands for the organization skills API (/knowledge/skills and /knowledge/skills/{skillName}). Agents load these skills as org/<name>.

strix cloud knowledge skills list
strix cloud knowledge skills create --data @skill.json        # name, description, content, optional scope
strix cloud knowledge skills get SKILL_NAME
strix cloud knowledge skills update SKILL_NAME --data @changes.json   # description, content, scope
strix cloud knowledge skills delete SKILL_NAME
  • The bodies match the API schema. create requires name, description, and content. update cannot change the name. scope is a JSON array of {"type":"repo","id":...} entries. An omitted scope or [] means organization-wide.
  • The help states the schema limits (name pattern, 300-character description, 30000-character content, 32 scope entries) and the access rules. Reads need knowledge:read. Writes need knowledge:write and an organization admin for personal tokens.
  • Long Markdown content goes in through the existing --data @file JSON body. The server still validates the limits.
  • Tests cover help, the create and update bodies (flags and JSON file), encoded skill-name paths, list, get, delete, and completions. docs/cloud/cli.mdx, AGENTS.md, and the managed-pentesting skill describe the commands.

Closes STR-2776


Technical Writer opened this PR for Alex
Implemented in session Update strix CLI scan_tier help after tier removal
Review with Devin · Open in Devin Desktop


@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR adds organization-skill management to the cloud CLI.

The PR appears safe to merge, with a non-blocking terminal display issue.

Findings

  1. P2 Skill output hides records ▶
Fix with agent prompt
### Issue 1
strix/interface/cloud/spec.py:792-797
**Skill output hides records.** The new commands do not register their response shapes with the terminal renderer. A `{"skills":[...],"total":n}` response becomes a nested preview that shows only five names and cuts each at 60 characters. A `{"skill":{...}}` response also becomes a preview, cutting Markdown content at 60 characters instead of using the longer detail view.

Add list and detail mappings for these responses and cover terminal output in the tests. The current read tests always use `--json`, which skips this path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds organization skill commands to the cloud CLI, with request fields, help text, completion coverage, and usage docs.

  • Cloud users can manage organization skills from the CLI.

Reviews (1) · Last reviewed commit: "Add org skills commands to cloud CLI" · Reviewed by Greptile

Comment on lines +792 to +797
"skills list": Cmd(
"GET",
"/knowledge/skills",
"List custom skills. Requires knowledge:read. "
"Asset-scoped tokens cannot access skills.",
),

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.

P2 Skill output hides records. The new commands do not register their response shapes with the terminal renderer. A {"skills":[...],"total":n} response becomes a nested preview that shows only five names and cuts each at 60 characters. A {"skill":{...}} response also becomes a preview, cutting Markdown content at 60 characters instead of using the longer detail view.

Add list and detail mappings for these responses and cover terminal output in the tests. The current read tests always use --json, which skips this path.

Knowledge Base Used: Cloud commands and sessions

Prompt To Fix With AI
This is a comment left during a code review.
Path: strix/interface/cloud/spec.py
Line: 792-797

Comment:
**Skill output hides records.** The new commands do not register their response shapes with the terminal renderer. A `{"skills":[...],"total":n}` response becomes a nested preview that shows only five names and cuts each at 60 characters. A `{"skill":{...}}` response also becomes a preview, cutting Markdown content at 60 characters instead of using the longer detail view.

Add list and detail mappings for these responses and cover terminal output in the tests. The current read tests always use `--json`, which skips this path.

**Knowledge Base Used:** [Cloud commands and sessions](https://app.greptile.com/-/switch-tenant?tenant=strix-org-3&next=%2Fcustom-context%2Fknowledge-base%2Fusestrix%2Fstrix%2F-%2Fdocs%2Fcloud-commands-and-sessions.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Doesn't block merge. In an interactive terminal, knowledge skills list falls back to a preview of five skill names, and knowledge skills get previews the skill object, shortening or omitting its Markdown content. The renderer tells users to use --json, and that mode prints the complete response from the same read commands, so they can retrieve every record and the full content. The command runner passes both responses to the renderer, whose view mappings contain neither skill response.

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.

Agreed—this is non-blocking. --json provides a way to retrieve the complete list and Markdown content; the interactive renderer’s truncated preview remains a usability issue, not a merge blocker.

@arcanist

arcanist Bot commented Nov 19, 2026

Copy link
Copy Markdown

Ready to merge Re-run Arcanist review

PR summary

Organization skills could not be managed through the cloud CLI. The CLI now lists, creates, reads, updates, and deletes them through the managed knowledge API, with schema and access guidance in its help and documentation.

🔴 High blast radius. If this breaks (1):
  1. A bad knowledge skills create, update, or delete leaves an organization with the wrong stored playbooks for its future scans.
Flow diagram
%%{init: {"theme": "neutral"}}%%
flowchart TD
  n0["Cloud CLI"]
  n1["Create targets skills API"]
  n0 --> n1
  n2{"Required detail missing?"}
  n1 --> n2
  n3["Submit the skill request"]
  n2 -->|"Details are complete"| n3
  n4["Send request to the API"]
  n3 --> n4
  n5["API response received"]
  n4 --> n5
  n6["Response returns to CLI"]
  n5 --> n6
  n7["Done"]
  n2 -->|"Yes"| n7
Loading
✅ Ruled out (5)
  • Could the write help overstate what a service token can do?
    The help requires the knowledge write scope for every token and applies the organization-admin requirement only to personal tokens, so it does not claim that a service token alone is sufficient.
  • Could repository-scoped skill creation reject valid scope entries?
    Both tests passed and each repository reference reached the request unchanged, so valid repository scopes are neither rejected nor reduced to strings.
  • Could a partial skill update overwrite omitted fields?
    Omitted fields stay out of an update while an explicitly empty scope remains an empty array, so a partial update does not overwrite fields the caller left out.
  • Could required fields block skill creation from a JSON file?
    The JSON body is merged before required fields are validated, so a file can supply the name, description, and content without duplicate command-line flags.
  • Could separators in a skill name change the requested resource?
    Path parameters are percent-encoded with no safe separators, so slashes, spaces, and plus signs stay inside one skill-name segment.

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.

1 participant