Repository navigation
fix(skills): replace nonexistent auth can-i with --check-scopes - #885
Merged
discostu105 merged 1 commit intoDec 4, 2026
Merged
Conversation
discostu105
reviewed
Dec 4, 2026
discostu105
left a comment
Member
There was a problem hiding this comment.
LGTM. Pointing at --check-scopes is the better choice than adding an auth can-i: it checks the exact invocation, including scopes that depend on flags. I checked the claims against main: the ok / insufficient_scope (exit 5) / unknown statuses come from cmd/check_scopes.go, and --validate-only exists on create settings.
Nits, none blocking:
- The SKILL.md bullet is now one ~120-word sentence chain in a file every agent loads. Consider splitting it into 2–3 sub-bullets: scopes, preview, safety level. Agents skim bullets better than run-ons.
- Yes to the follow-up that runs
check_prose.pyonskills/inmake docs-check. That gap is howauth can-igot into the skill.
discostu105
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
the skill tells agents to run
dtctl auth can-i <verb> <resource>before mutating anything, but that command doesn't exist.dtctl authonly has login/logout/refresh/status/whoami, soauth can-i ...prints the auth help and exits 0, and in agent mode it returns{"ok":true,"result":null}. an agent following the skill gets no answer and can read it as a passskills/dtctl/SKILL.md(Permissions & safety) to point at--check-scopeson the exact command. it prints required vs granted scopes and exits without running it:ok,insufficient_scope(exit 5), orunknownwhen dtctl can't verify (token scopes not readable, no context,applysince its scopes depend on the file,exec apiwhen the API spec has no scope for the path)--dry-runwhere the command's--helplists it (it's per-command since fix!: make --dry-run opt-in per command #561) anddtctl create settings ... --validate-onlyas the preview options, plus a note that none of these applies the safety levelskills/dtctl/references/troubleshooting.md(401/403 section), which the issue didn't mentiondocs/dev/API_DESIGN.md, theauth can-iline came from there butcheck_prose.pyskipsdocs/dev/since it describes proposed commandsi went with pointing at the existing flags instead of adding
auth can-i, since--check-scopesalready checks the exact invocation including flag-dependent scopes. can switch if you'd rather have the command)check_prose.pyalready catches this when pointed atskills/, butmake docs-checkonly runs it ondocs/. can open a follow-up for that if usefulRelated Issues
Closes #879
Testing
python3 scripts/gen-docs/check_prose.py ./bin/dtctl skills: on main it reports the twoauth can-ilines (dtctl authhas no subcommand 'can-i'), with this change it's clean. same script ondocs: cleango test ./cmd -run 'Skill|CheckScopes|DryRun'andgo test ./pkg/skills/...: passmake markdownlint: clean--check-scopesoncreate settingsandapply,create settings --dry-run, and--dry-runonget slos(exits 2, no dry run there)make test)make lint)