# agent_ui: Fix crash when opening built-in skill mention in remote projects \(\#57432\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/0307c7fb355c32e00b0ce913e277ea6b0fddd7c5)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 0307c7fb355c32e00b0ce913e277ea6b0fddd7c5

Requested commit: 0307c7fb355c32e00b0ce913e277ea6b0fddd7c5

Commit: 0307c7fb355c32e00b0ce913e277ea6b0fddd7c5

Tree: 8a0abd3e8d7ad42cd49517981de67ba6972c6262

Author: MartinYe1234

Committer: GitHub

## Message

````
agent_ui: Fix crash when opening built-in skill mention in remote projects (#57432)

Clicking a built-in skill mention while connected to a remote project
(SSH or collab) caused Zed to abort with `called create_local_buffer on
a remote project`.

## Root cause

`agent_ui::ui::mention_crease::open_skill_file` was calling
`Project::create_local_buffer` to display the embedded read-only content
of a built-in skill:

```rust
let buffer = project.update(cx, |project, cx| {
    project.create_local_buffer(content, None, false, cx)
});
```

`Project::create_local_buffer` has an explicit panic guard for remote
projects, so any user who clicked a built-in skill mention while in an
SSH or collab project would crash Zed.

## Fix

The buffer is purely a display surface for binary-embedded skill content
— it has no on-disk backing, isn't searchable, and never needs to be
tracked by the project's buffer store. Build it directly with
`language::Buffer::local(content, cx)` instead, matching the pattern
used elsewhere in `agent_ui` (`thread_view.rs`, `message_editor.rs`,
`inline_assistant.rs`, etc.). This works for both local and remote
projects.

## Repro (before fix)

1. Connect Zed to a remote (SSH) project.
2. In the agent panel, click on a built-in skill mention (e.g. one
referencing `create-skill`).
3. Zed aborts with SIGABRT.

After the fix, the mention opens a read-only editor with the embedded
markdown content, identical behavior to local projects.

Release Notes:

- Fixed a crash when clicking a built-in skill mention in the agent
panel while connected to a remote project
````

## Parents

- [33eb2d83ed1a9f9ac7ca533178fa866cd4416edc](https://git.cafe/gitcafe/zed/commit/33eb2d83ed1a9f9ac7ca533178fa866cd4416edc?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/0307c7fb355c32e00b0ce913e277ea6b0fddd7c5?format=markdown)
