- Home
- Skills
- Lookatitude
- Beluga Ai
- Implement Feature
implement_feature_skill
- Go
5
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill lookatitude/beluga-ai --skill implement_feature- SKILL.md5.3 KB
Overview
This skill guides developers through end-to-end feature implementation in Go following Beluga AI patterns and conventions. It enforces package layout, interface design, configuration validation, OTEL observability, structured error handling, and testing standards. Use it to produce consistent, maintainable features that integrate cleanly with the codebase.
How this skill works
The skill inspects the planned change, recommends package structure and interfaces, and provides templates for config, metrics, and errors. It outlines core implementation steps including tracer-instrumented public methods, OTEL metric creation, and functional options for configuration. It also prescribes test patterns and a checklist for quality gates and documentation updates.
When to use it
- Adding a new feature that will become a reusable package
- Refactoring or introducing new public interfaces
- Implementing observability and metrics for core operations
- Enforcing consistent error classification and propagation
- Preparing code for unit and concurrency testing before merging
Best practices
- Design small, focused interfaces following ISP and prefer -er suffix for single-method interfaces
- Use functional options and validate configuration with struct tags and a validator
- Instrument all public methods with tracing and record OTEL metrics for success/error and duration
- Classify errors with Op/Err/Code pattern and implement Unwrap for compatibility
- Write table-driven, concurrency, and error-path tests; include OTEL validation in tests
- Run formatting, linting, unit tests, and security checks before submitting PR
Example use cases
- Create a new pkg/<name> with iface, internal, providers, and standard files for API, config, metrics, and errors
- Implement a Processor interface and a concrete Component with functional options and timeouts
- Add OTEL counters, histograms, and a tracer to an existing component for latency and error monitoring
- Define error codes and wrap underlying errors with operation context for clearer logs and retries
- Add comprehensive unit tests including concurrency scenarios and OTEL instrumentation assertions
FAQ
Create a new package when the feature is reusable, has distinct responsibilities, or will be consumed independently. Extend existing packages only for closely related, small enhancements.
What minimum OTEL metrics should I add?
At minimum add an operations counter, an operation duration histogram, and an errors counter, plus a tracer for spans on public methods.