platform-constrained-handler
БесплатноБез исполняемых скриптовНе проверенAdd a new CE-owned HTTP handler with ARM/RISC-V64 build constraints (platform-excluded features)
от clidey★ 5 073 звезды на GitHubОб этом скилле
Add a Platform-Constrained HTTP Handler
Use this only when adding a CE-owned HTTP handler that depends on CGO libraries or platform-specific bindings unavailable on ARM/RISC-V64.
Do not use this workflow for edition or add-on HTTP routes. Add-on routes should be registered by the add-on package with graph.RegisterHTTPRoutes, so CE does not carry add-on route names or unsupported stubs.
Steps
1. Create Main Handler
core/graph/http_<name>_handler.go:
//go:build !arm && !riscv64
package graph
import "net/http"
func Setup<Name>Handler(mux *http.ServeMux) {
mux.HandleFunc("/api/<name>", handle<Name>)
}
func handle<Name>(w http.ResponseWriter, r *http.Request) {
// Implementation
}
2. Create Unsupported Stub
core/graph/http_<name>_unsupported.go:
//go:build arm || riscv64
package graph
import "net/http"
func Setup<Name>Handler(mux *http.ServeMux) {
mux.HandleFunc("/api/<name>", func(w http.ResponseWriter, r *http.Request) {
http.Error(w, "not supported on this platform", http.StatusNotImplemented)
})
}
3. Register in SetupHTTPServer
The handler registration call must be in unconditionally-compiled CE code (no build tags):
Setup<Name>Handler(mux)
For add-on routes, register from the add-on package instead:
func init() {
graph.RegisterHTTPRoutes(func(router chi.Router) {
router.Post("/api/<name>", handle<Name>)
})
}
4. Verify
cd core && go build ./cmd/whodb
PR CI does not cross-compile. Check by hand that the stub defines every symbol the tagged file defines. A real arm/riscv64 build needs CGO cross compilers (riscv64-linux-gnu-gcc, arm-linux-gnueabihf-gcc) and the BAML build-tag step from .github/workflows/_build-linux-terminal.yml; with those in place, make server-riscv64 in desktop-ce/ mirrors the release build.
Key Rule
Every file with //go:build !arm && !riscv64 MUST have a matching //go:build arm || riscv64 stub that defines the same symbols. A missing stub first fails in the release job "Build Linux Server Binaries (CE)".
Existing Examples
http_ai_stream_handler.go→http_ai_stream_unsupported.go
Установить platform-constrained-handler в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл platform-constrained-handler?
Add a new CE-owned HTTP handler with ARM/RISC-V64 build constraints (platform-excluded features)
Как установить скилл platform-constrained-handler?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл platform-constrained-handler запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic