Skip to content

[6853] fix(frontend): Invoke registry skills by their name, not their slug - #6910

Merged
ashrafchowdury merged 2 commits into
release/v0.118.5from
fix/skill-command-names
Sep 17, 2026
Merged

ashrafchowdury merged 2 commits into
release/v0.118.5from
fix/skill-command-names

Conversation

@ardaerzin

Copy link
Copy Markdown
Contributor

Context

Typing / in the agent chat composer lists the agent's skills, but a registry skill showed up as /skill-name-23ad instead of /skill-name. The menu used the skill's registry slug, which carries a random suffix to keep workflows unique. The runner installs the skill under its own SKILL.md name, so the suffixed command never matched what the agent knows.

Changes

A new helper, skillCommandName, picks the command for each skill row. The embed entry already stores the skill's name next to the reference, so the helper uses that.

{"name": "legacy-inline-skill",
 "@ag.embed": {"@ag.references": {"workflow": {"slug": "legacy-inline-skill-18a1"}}, ...}}

Before: /legacy-inline-skill-18a1. After: /legacy-inline-skill.

If an entry has no valid name, the helper falls back to the slug, but only when the slug is itself shaped like a skill name. Built-in slugs (__ag__…, the older _agenta.…) never are. The only built-in entries saved without a name point at the retired getting-started stub in old revisions, so those rows are now hidden instead of showing a slug nobody should type.

No backend change. Registry slugs stay as they are.

Tests / notes

  • 6 new unit tests in itemDescriptors.test.ts cover followed and pinned registry skills, the slug fallback, nameless and named built-ins, and inline skills.
  • Checked live on /m against the EE dev stack: an agent with legacy-inline-skill (slug legacy-inline-skill-18a1) showed and inserted the suffixed slug before the change and /legacy-inline-skill after. Its other four skills were unchanged.
  • The inserted text is still a hint for the agent, not a dispatch. That behavior is unchanged.

What to QA

  • Add a registry skill to an agent, open a session, type /. The Skills section shows /<skill name> with no suffix, and Enter inserts that same text.
  • Pin a skill to a version and repeat. Same result.
  • Regression: an agent with an inline skill still lists it by its name.

The / palette inserted a registry skill's workflow slug, which carries a
random suffix (skill-name-23ad). The runner installs the skill under its
SKILL.md name, which the embed entry already stores as a sibling name.

skillCommandName now prefers that name and falls back to the slug only
when the slug is itself a valid skill name, so nameless built-in entries
(the retired getting-started stub in old revisions) get no row.

Closes #6853
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 6d4bec1e-552a-4758-8878-1ec03564a8c5

📥 Commits

Reviewing files that changed from the base of the PR and between 28f3ca7 and 6385e00.

📒 Files selected for processing (5)
  • web/packages/agenta-chat/src/hooks/useChatSlashCommands.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/index.ts
  • web/packages/agenta-entity-ui/src/DrillInView/index.ts
  • web/packages/agenta-entity-ui/tests/unit/itemDescriptors.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/index.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Skill commands in the / palette now insert the correct invocation name, including names defined in skill metadata.
    • Improved handling for registry, built-in, pinned, and inline skills.
    • Invalid or missing skill names now fall back appropriately or remain unavailable instead of producing unusable commands.
  • Tests

    • Added coverage for skill-name resolution across supported skill types and fallback scenarios.

Walkthrough

The change adds and exports skillCommandName, validates skill invocation names, tests resolution cases, and uses the helper for skill tokens in the chat slash-command palette.

Changes

Skill command name resolution

Layer / File(s) Summary
Define and export skill command names
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.tsx, web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/index.ts, web/packages/agenta-entity-ui/src/DrillInView/index.ts, web/packages/agenta-entity-ui/tests/unit/itemDescriptors.test.ts
skillCommandName selects a valid skill name and falls back to a valid embed slug. Exports and unit tests cover registry, pinned, built-in, and inline skills.
Use command names in the chat palette
web/packages/agenta-chat/src/hooks/useChatSlashCommands.tsx
Skill rows now use skillCommandName(skill) instead of the removed skillToken helper. The comment describes inserted names rather than slugs.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6385e

Skills without a valid command name are hidden from the slash-command palette, so no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the frontend change, the skill name resolution, fallback behavior, tests, and QA steps.
Title check ✅ Passed The title clearly identifies the main change: registry skills are invoked by name instead of their suffixed slug.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Status Destroyed (PR closed)

Updated at 2026-09-17T13:37:03.852Z

@ardaerzin
ardaerzin changed the base branch from release/v0.118.3 to release/v0.118.5 September 17, 2026 13:16
@ashrafchowdury
ashrafchowdury merged commit f9ec6f7 into release/v0.118.5 Sep 17, 2026
74 of 93 checks passed
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.

2 participants