add-fetcher
Add a new stock market fetcher to the kabuka project
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a new stock market fetcher to the kabuka project
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | add-fetcher |
| description | Add a new stock market fetcher to the kabuka project |
| disable-model-invocation | true |
Add a new market fetcher for: $ARGUMENTS
Steps:
Identify the exact market name string Yahoo Finance uses in the DOM — inspect the element targeted by selectorMarketNameSingle in fetcher/fetcher.go on a real Yahoo Finance page for that market.
Create internal/app/kabuka/fetcher/<market>/ with a <market>_fetcher.go file. Use fetcher/jp/jp_fetcher.go as the reference implementation.
Implement the Fetcher interface:
IsMarket(doc *goquery.Document) bool — use fetcher.GetMarketName(doc) and match against the market name(s) identified in step 1Fetch(doc *goquery.Document, symbol string) (*model.Stock, error) — extract price using doc.Find(selectorCurrentPrice).Text() then wrap with fetcher.FormatPrice()Register via init():
func init() {
fetcher.RegisterFetcher(&<market>Fetcher{})
}
Add a blank import in internal/app/kabuka/kabuka.go:
_ "github.com/shionit/kabuka/internal/app/kabuka/fetcher/<market>"
Add integration test cases to kabuka_integration_test.go covering at least one symbol from the new market.
Verify:
go build ./...
go test -tags integration -run TestKabuka_fetch ./internal/app/kabuka/...