Skip to content

Improve skill: Avoid auth on every request, and improve knowledge about auto project detection #598

@fabb

Description

@fabb

The skill does not use the cli optimally.

  1. The skill currently says:

Run sentry auth login before any other command.

This is not really necessary, since the sentry login token lives 30 days. It would be more token-efficient to just execute the relevant commands, and only if they fail because of missing login session, it should try to log in.

  1. Another issue is that while the cli supports to look up the project transparently from the sentry config, claude does not do this reliably when using the skill. Sometimes it tries to look up the org and projects first, and outputs thinking responses like this:

Now let me list the issues. I need to find the org/project. Let me check the Sentry project list first.

  1. Another issue is that the skill does not allow claude to use sentry issue list reliably, and when asking a simple show me the sentry issues prompt, it leads multiple sentry issue list calls, in one case it was 4:
  • sentry issue list --json --fields shortId,title,count,userCount,lastSeen,priority --limit 25 2>&1
  • sentry issue list --json --fields shortId,title,count,userCount,lastSeen,priority --limit 25 2>&1 | jq -r '.data[] | "\(.shortId) | \(.priority) | events:\(.count) users:\(.userCount) | \(.lastSeen) | \(.title[0:80])"'
  • sentry issue list --help 2>&1 | grep -A5 "fields"
  • sentry issue list --json --limit 3 2>&1 | jq '.'

This is very inefficient, and works much worse than the Sentry MCP.

I used the official plugin-dev plugin to analyze the skill, and it suggested this to improve this inefficiency:

The skill reviewer identified the root causes clearly. The 4 calls happened because of two specific skill gaps:

  1. Broken field examples — SKILL.md line 35 shows --fields shortId,title,count,userCount,lastSeen as a "Context Window Tip", but
    count/userCount/lastSeen return null in practice. The agent trusted the example, got nulls, then spent 2 extra calls diagnosing.

  2. Over-broad auth safety rule — The skill says "use sentry auth status before commands" under Safety Rules without scoping it to mutations.
    Agents apply safety rules conservatively → unnecessary call 1.

Recommended fixes:

  1. Verify actual non-null fields via sentry issue list --json --limit 3 and update the example
  2. Scope the auth status check to mutations only, not reads
  3. Add a verified --json --fields invocation to the "Investigate an Issue" workflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions