reliant-labs/forge/role-interface

Claude Code and agent skill by reliant-labs/forge

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Extend a service's Repository without breaking sibling fakes — the opt-in role-interface pattern for parallel-migration rounds, and when to promote it back onto Repository.

Install

npx vskill@latest install reliant-labs/forge/role-interface

SKILL.md

Extending Repository without breaking fakes (role-interface pattern)

Repository is the canonical name for a service's storage interface — one per service, extended as needed. But in a parallel-migration round, adding a single method to Repository atomically breaks every fake Repository in sibling files (test fakes, in-memory e2e/ fakes, the generated mocks/<svc>_mock_gen.go). The fix is the opt-in role interface: declare a narrow interface in the consuming file and type-assert s.deps.Repo to it at call time:

go
type ModelPerformanceLister interface {
GetModelPerformance(ctx context.Context, opts ModelPerformanceOpts) ([]*db.ModelPerformance, error)
}
func (s *Service) GetModelPerformance(ctx context.Context, req ...) (..., error) {
lister, ok := s.deps.Repo.(ModelPerformanceLister)
if !ok {
return nil, connect.NewError(connect.CodeUnimplemented, fmt.Errorf("Repo lacks ModelPerformanceLister"))
}
// ... use lister ...
}

Production *ormRepo implements both, so the assertion is a runtime no-op; sibling fakes that haven't grown the method still satisfy Repository and return CodeUnimplemented — same outcome as a CRUD shape-mismatch stub.

Use it when adding a method to a Repository with 2+ fakes in sibling lanes, or whose impl is in-flight in a parallel agent's package; don't in greenfield work where you own the Repository and every fake.

Once every consumer implements it (or the round ends), promote it back onto Repository — consuming code unchanged, assertion becomes always-true; forge lint --conventions flags one ready to consolidate.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
5
Repository forks
2
7-day trend score
5

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/reliant-labs/forge/role-interface/badge)](https://verified-skill.com/skills/reliant-labs/forge/role-interface)

Something wrong with this skill or its page? Tell us.