add-fetcher
Add a new stock market fetcher to the kabuka project
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Menu
Add a new stock market fetcher to the kabuka project
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Basé sur la classification professionnelle 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/...