business-layer-extensions
Skill by ardanlabs
Guides an AI assistant through adding cross-cutting concerns like OTEL tracing, logging, metrics, caching and auth to a Go business domain. It covers the extension seam, extension packages and wiring.
Install business-layer-extensions
Built from the published package, never by AI.
git clone --depth 1 https://github.com/ardanlabs/service /tmp/service && mkdir -p ~/.claude/skills && cp -r /tmp/service/.agents/skills/business-layer-extensions ~/.claude/skills/business-layer-extensionsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install business-layer-extensions in Claude Code
git clone --depth 1 https://github.com/ardanlabs/service /tmp/service && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/service/.agents/skills/business-layer-extensions ~/.gemini/antigravity-cli/skills/business-layer-extensionsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install business-layer-extensions in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This agent skill teaches how to layer cross-cutting concerns onto a business domain in a Go codebase. It uses the decorator pattern: each extension wraps an ExtBusiness and delegates to it, so the core Business is never modified. The skill describes three pieces: the seam on the bus package, the extension package under extensions/, and the wiring in api/services/*/main.go.
The skill gives a checklist, code templates for a tracing extension and a Prometheus metrics variant, and common mistakes. It stresses that every ExtBusiness method must be implemented, using pass-through methods where a concern does not apply. It also explains that the first extension passed to NewBusiness is the outermost wrapper. It is aimed at developers working on business domain code in this layout.
Written from the project's SKILL.md and checked against it.
What it can do
- Add extension seamAdds ExtBusiness, Extension and the reverse-apply loop in NewBusiness to a bus package.
- Create extension packageCreates extensions/<x><concern>/<x><concern>.go with a wrapping struct and NewExtension closure.
- Wrap business methodsAdds a concern such as OTEL tracing around selected methods and delegates to the wrapped bus.
- Pass through other methodsImplements every remaining ExtBusiness method as a plain delegation so the interface is satisfied.
- Build Prometheus metrics extensionUses a package-level singleton built with promauto, _total counter names and a status label.
- Wire extensions in main.goPasses extensions as trailing variadic args to NewBusiness in outermost-first order.
What you need
- A Go codebase with business/domain/*/extensions and api/services/*/main.go layout
Try asking
- Add an OTEL tracing extension to the widget business domain
- Create a logging extension for widgetbus and wire it into main.go
- Build a Prometheus metrics extension for the widget create operation
Good to know
- Every ExtBusiness method must be implemented, even when the concern does not apply.
- Extensions wrap the core Business and must not modify it.
- The order of extensions passed to NewBusiness matters.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/business-layer-extensions/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB
Alternatives to business-layer-extensions
All alternatives →Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.
Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.
Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.
Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.
Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.
Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
business-layer-extensions: common questions
What is the decorator pattern used for in this skill?
Each extension wraps an ExtBusiness and delegates to it, which adds cross-cutting concerns without changing core domain logic.
Which extension runs first?
The first extension passed to NewBusiness is the outermost layer. The skill says the repo convention puts OTEL first, with logging and metrics inside it.
Does this skill handle caching or auth?
The skill lists caching and auth as example concerns in its description, but the detailed templates shown cover OTEL tracing and Prometheus metrics.
How do I install business-layer-extensions?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is business-layer-extensions free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is business-layer-extensions safe to use?
It scores 83 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to business-layer-extensions?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
