add-fetcher
Add a new stock market fetcher to the kabuka project
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Menü
Add a new stock market fetcher to the kabuka project
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Basierend auf der SOC-Berufsklassifikation
| 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/...