anthropics / anthropics/skills

Structural lint findings: name collisions in claude-api skill

Đang mở
#920 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
176k
Fork
20.9k
Merge trung bình
7 giờ 21 phút
Pull request đã merge (30 ngày)
5

Mô tả

## Summary

I ran [`claude-skill-lint`](https://www.npmjs.com/package/claude-skill-lint) (v0.5.1) against this repo. The headline finding is **5 name collisions** in the `claude-api` skill — files that silently overwrite each other when installed to a flat namespace. There's also a YAML parse error in the skill's frontmatter.

Claude Code tolerates all of these, but "tolerates" isn't "works correctly" — one file quietly wins and the rest are lost.

```
$ npx claude-skill-lint graph .
✖ 14 errors and 24 warnings in 37 files (72 files checked)
```

## Name collisions in `claude-api` (5 distinct collisions)

Multiple files share the same filename, meaning one silently overwrites the others when installed to a flat namespace. The linter reports each participating file, so 5 collisions produce 13 total error lines.

| Colliding filename | Languages involved | Files |
|---|---|---|
| `claude-api.md` | PHP, Ruby, Java, Go, C# | 5 |
| `tool-use.md` | TypeScript, Python | 2 |
| `streaming.md` | TypeScript, Python | 2 |
| `files-api.md` | TypeScript, Python | 2 |
| `batches.md` | TypeScript, Python | 2 |

**Suggested fix:** Prefix filenames with the language — e.g., `ruby-claude-api.md`, `typescript-tool-use.md` — or add a `name` field in frontmatter that disambiguates (e.g., `name: claude-api-ruby`).

## YAML parse error in `claude-api/SKILL.md`

The `description` field contains unquoted special characters (`/` in `anthropic/@anthropic-ai/sdk`, parentheses) that break YAML parsing. Wrapping the value in quotes fixes it.

## Potential false positives

The remaining 1 error and 24 warnings are likely false positives driven by linter limitations rather than real issues in this repo:

- **1 broken reference** — `./README.md` link in `typescript/claude-api/tool-use.md`; file exists but is excluded from the linter's reference index by default ignore rules
- **10 orphaned theme files** — `theme-factory/themes/` files are loaded dynamically by user selection, not via static references
- **14 orphaned shared files** — `claude-api/shared/` files are referenced via inline markdown links, which the linter doesn't track (it only tracks frontmatter `context:` references)

## Reproduction

```bash
npx claude-skill-lint@0.5.1 graph /path/to/skills/
npx claude-skill-lint@0.5.1 lint /path/to/skills/
```

---

*Generated with [`claude-skill-lint`](https://www.npmjs.com/package/claude-skill-lint) — structural validation and dependency graph analysis for Claude Code skills.*

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.