Skip to content

feat(sandbox): List repository skills with AGENTS.md instructions - #1999

Merged
HazAT merged 3 commits into
mainfrom
feat/repository-skills
Oct 2, 2026
Merged

HazAT merged 3 commits into
mainfrom
feat/repository-skills

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Junior loads a repository's root AGENTS.md but ignores its skills. Many getsentry repositories keep task workflows in .agents/skills/ or .claude/skills/: sentry has 30, sentry-javascript has 21, sentry-docs has 4. When a local agent works in one of these repositories, it picks those workflows up. Junior did not.

With this change, the repository-instructions capture also reads each SKILL.md frontmatter under those two directories at the Git root. It adds a "Repository skills" list after the AGENTS.md text, with each skill's name, description, and sandbox path. The model reads a matching SKILL.md with readFile and follows it. This reuses the existing AGENTS.md delivery, so the list appears when a repository is cloned or a Workspace is selected, and later samples get updates.

Design choices:

  • Repository skills are not added to <available-skills> or loadSkill. Those come from the host. Repository skills live in the sandbox and can change during a turn.
  • AGENTS.md comes first in the shared 32 KB budget. Skills use the remaining budget, one whole entry at a time. For sentry-javascript, the list holds 18 skills (about 7 KB).
  • .agents/skills wins over .claude/skills when both have the same name. Many repositories link one directory to the other, so this also prevents duplicate reads. Skills with disable-model-invocation: true or invalid frontmatter are left out.
  • No org gate. Repository skills have the same trust level as AGENTS.md, which already loads from any checkout and can point to these same files. An org check in core would also break the provider-boundary policy. If we want a trust gate, add it to both AGENTS.md and skills, through a plugin contract.

Context: the Slack discussion about repository-owned workflows (e.g. "Junior working on Seer loads the Seer skills") and #1998.

via daniel.

--

View Junior Session [Sentry]

When Junior works in a repository checkout, list the skills in .agents/skills and .claude/skills at the Git root next to the AGENTS.md instructions. The model reads a matching SKILL.md with readFile. AGENTS.md keeps priority in the shared byte budget.

Co-Authored-By: Daniel Griesser <[email protected]>
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 1, 2026 7:43pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

2 screenshot changes — 2 changed · 0 added · 0 removed

Review screenshots in Frameshift

Conversation Event Details · Desktop
Conversation Event Details · Desktop
Changed
Conversation Event Log · Desktop
Conversation Event Log · Desktop
Changed

@HazAT
HazAT marked this pull request as ready for review October 1, 2026 19:25
@github-actions github-actions Bot added the risk: high PR risk score: high label Oct 1, 2026
Comment on lines +153 to +158
function isAbsentPathError(error: unknown): boolean {
return (
isMissingPathError(error) ||
(error as { code?: unknown } | null)?.code === "ENOTDIR"
);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is this for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It handled plain files in a skill root, such as .agents/skills/README.md. Reading README.md/SKILL.md fails with ENOTDIR on a real filesystem, not ENOENT. That was unclear, and the sandbox filesystem does not promise that error code. d7b0d9e removes the helper and checks that each entry is a directory before reading SKILL.md.

… check

Replace the ENOTDIR error match with an explicit directory check. The sandbox filesystem does not promise ENOTDIR for a path below a file.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d7b0d9e. Configure here.

Read AGENTS.md for every selected repository before any skill list uses the shared budget, so skills from an earlier repository cannot truncate a later AGENTS.md.
@HazAT
HazAT merged commit e359316 into main Oct 2, 2026
45 checks passed
@HazAT
HazAT deleted the feat/repository-skills branch October 2, 2026 08:01

This branch was successfully deployed

1 active deployment
Preview – junior-docs — b6f0aeb7 Deployed Oct 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant