# agent_skills: Count description length in characters \(\#63766\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e578430582432228101b9986c37f9141b64c5386

Requested commit: e578430582432228101b9986c37f9141b64c5386

Commit: e578430582432228101b9986c37f9141b64c5386

Tree: 751e3b9e93fcc10a279ef218b8462882cff0acc1

Author: Chara

Committer: GitHub

## Message

```
agent_skills: Count description length in characters (#63766)

Closes #63620

Count Agent Skill descriptions by Unicode characters rather than UTF-8
bytes across validation, load-time warnings, the skill creator counter,
and imported-description truncation. This aligns Zed with the Agent
Skills specification and reference validator.

Testing:

- `cargo test -p agent_skills --lib`
- `cargo test -p settings_ui --lib`
- `cargo build -p zed`
- Manually verified that a 342-character CJK description containing
1,026 UTF-8 bytes can be saved successfully
- `./script/clippy -p agent_skills -p settings_ui --tests` is blocked by
an unrelated existing `clippy::drain_collect` diagnostic in
`crates/rpc/src/proto_client.rs`

<img width="667" height="210" alt="Successfully created Unicode test
skill"
src="https://github.com/user-attachments/assets/2427fce2-9f0f-462d-959f-e08ad160b3d1"
/>

Confirmed that the Codex agent panel discovers the skill and exposes it
in command completion without a length warning.

<img width="953" height="367" alt="image"
src="https://github.com/user-attachments/assets/8c100197-2e6e-4627-b3f8-862bdfaac918"
/>

Release Notes:

- Fixed valid multibyte Agent Skill descriptions being rejected for
exceeding a byte-based length limit.

---------

Co-authored-by: Chara <249489759+cmdr-chara@users.noreply.github.com>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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