소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill alpaca-cli-regenerate명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | alpaca-cli-regenerate |
| description | >- Use when this capability is needed. |
Run each phase in order. Stop and fix before moving to the next.
make spec-update requires network access (it curls docs.alpaca.markets).
Request full_network permissions if running in a sandbox.
make spec-update
Downloads trading-api.json and market-data-api.json from
docs.alpaca.markets/openapi/ into api/specs/.
After pulling, check what changed:
git diff --stat api/specs/
If nothing changed, specs are already current - skip to Phase 4 to verify generated code is still fresh.
make generate
This runs go run ./cmd/generate which reads the specs and writes:
| Generated file | Contents |
|---|---|
internal/api/trading_types.gen.go | Structs and enums from trading spec |
internal/api/trading_client.gen.go | Trading API client methods |
internal/api/marketdata_types.gen.go | Structs and enums from market data spec |
internal/api/marketdata_client.gen.go | Market data API client methods |
internal/api/descriptions.gen.go |
| Op metadata, flags, response schemas |
internal/cmd/commands.gen.go | Cobra command tree |
Never edit *.gen.go files directly. Change the specs or generator,
then re-run make generate.
The generator enforces exhaustiveness. Common failures and fixes:
unregistered operation "FooBar" — add to cmdRegistry or cmdSkip
Every operationId in the specs must appear in either cmdRegistry or
cmdSkip in cmd/generate/commands.go.
To register a new command, add an entry to cmdRegistry:
"FooBar": {
parent: "<parent-group>", // key in cmdParents
use: "<subcommand-name>",
examples: " alpaca <parent> <subcommand> --flag value",
},
Rules for registry entries:
parent must be a key in cmdParents (or create a new parent group)examples is required - the generator fails without ituse namesdefaults for sensible default flag valuesbodyAliases if a body field name collides with a query/path parambodyHook / bodySkipFields for complex body constructionconfigureFunc for hand-written configure hooks (e.g. order submit's bracket legs)normalize for path params that need URL normalization (e.g. symbols with /)If the command IS its parent (e.g. alpaca clock runs directly, not
alpaca clock get), use self: true and omit use:
"LegacyClock": {
parent: "clock",
self: true,
examples: " alpaca clock",
},
To skip an operation (intentionally exclude from the CLI):
var cmdSkip = map[string]string{
"FooBar": "reason for skipping",
}
body field "name" collides with a query/path param — add bodyAliases
Fix by adding a bodyAliases entry that renames the body flag:
"UpdateFoo": {
parent: "foo",
use: "update",
bodyAliases: map[string]string{"name": "new-name"},
examples: " alpaca foo update --name old --new-name new",
},
Add to cmdParents in cmd/generate/commands.go:
"myGroup": {
use: "my-group",
short: "Short description",
long: "Longer description for --help.",
},
For nested groups, set parent:
"mySubGroup": {
use: "sub",
short: "Sub-group description",
parent: "myGroup",
},
Top-level parent groups also need root wiring. If the new group is
not nested under an existing parent, add it to addGroup() in
internal/cmd/root.go. Pick the right group (tradingGroup,
accountGroup, or utilGroup):
addGroup(rootCmd, tradingGroup.ID, orderCmd, ..., myGroupCmd)
Without this, the command won't appear in --help or --help-all.
After fixing, re-run make generate until it succeeds.
If the command tree or op metadata changed, golden files will be stale:
go test ./internal/cmd -run TestCommandTreeGolden -update
go test ./internal/cmd -run TestOpsGolden -update
make check
This runs golangci-lint, go test -race ./..., and go build. Fix any
failures before proceeding.
If tests fail due to golden drift you missed, re-run Phase 4.
Review what changed end-to-end:
git diff --stat
Verify:
api/specs/ - spec files updatedinternal/api/*.gen.go - types and clients regeneratedinternal/cmd/commands.gen.go - command tree regeneratedinternal/cmd/testdata/*.golden - golden files updated if neededcmd/generate/commands.go - new operations registered if neededinternal/cmd/root.go - new top-level parent groups wired via addGrouptest/integration/ - integration tests added for new commandsIf commands were added, add integration tests in test/integration/.
Follow the rules in the "Integration tests" section of AGENTS.md -
one file per feature area, t.Parallel() for read-only tests, cleanup
for writes. If the endpoint is unavailable on paper (see the
paper-unavailable list in AGENTS.md), write a test that accepts either
a valid response or a structured JSON error.
If commands or flags were added, removed, or renamed, follow the
"Keep docs in sync" section in AGENTS.md.
| Task | Command |
|---|---|
| Pull specs | make spec-update |
| Generate code | make generate |
| Update golden files | go test ./internal/cmd -run TestCommandTreeGolden -update && go test ./internal/cmd -run TestOpsGolden -update |
| Lint + test + build | make check |
| See what changed | git diff --stat |
| Integration tests | make test-integration (needs API keys) |
| File | Role | Editable? |
|---|---|---|
api/specs/*.json | OAS specs (read-only inputs) | No - pull from upstream |
cmd/generate/main.go | Generator logic | Yes |
cmd/generate/commands.go | Command registry and parent groups | Yes |
internal/api/*.gen.go | Generated types and clients | No - regenerate |
internal/cmd/commands.gen.go | Generated Cobra commands | No - regenerate |
internal/cmd/root.go | Root command wiring (addGroup for top-level parents) | Yes |
internal/cmd/testdata/*.golden | Golden test snapshots | Update via -update flag |
*.gen.go files directly - they are overwritten by make generate. Change the specs or the generator instead.api/specs/ - fix bugs upstream and re-import with make spec-update.make check after generating - generated code can introduce lint failures or test regressions.cmdRegistry entry without examples - the generator enforces this and will fail.cmdSkip without a reason - the reason documents why the endpoint is excluded from the CLI.Source: alpacahq/cli — distributed by TomeVault.