Repository inventory

mmorit00/fund-portfolio-bot

Skills indexed from this repository, with install-style signals scoped to the repo.
5 skills0 GitHub stars0 weekly installsPythonGitHubOwner profile

Overview

This skill enforces the project's 3-layer architecture and layering rules (v0.3.1) for a Discord bot. It codifies allowed dependency directions: cli → flows → core ← data, with core owning DI registration. Use it to validate design choices, imports, and dependency injection usage when adding or refactoring code.

How this skill works

The skill inspects file paths, import statements, and function signatures to determine layer membership and dependency direction. It checks that core modules do not import outer layers, flows use @dependency for data access, and container.py is the only place that instantiates data-layer classes. It also validates naming conventions and type-annotation patterns to avoid circular imports.

When to use it

  • Designing a new module or feature for the bot
  • Changing or adding import statements
  • During code review to verify layer boundaries
  • When resolving or preventing circular import issues
  • When adding or updating dependency registrations in the container

Best practices

  • Identify the layer (cli / flows / core / data) before coding and keep responsibilities narrow
  • Let container.py create concrete data instances; flows receive them via @dependency
  • Core modules must only import other core modules; container.py may import data
  • Use concrete Repo/Service classes for types; use TYPE_CHECKING and string annotations to avoid cycles
  • Name flow functions in snake_case and repo/service classes in PascalCase

Example use cases

  • A developer asks where to place a new trade-confirmation function—place orchestration in flows/trade.py and rules/models in core
  • Refactoring: replace direct data imports in flows with @dependency-injected parameters and register factories in core/container.py
  • Code review: flag a PR where core/ imports src.data.db.TradeRepo (allowed only in container.py)
  • Testing: override dependencies by passing mock repos into a flow function call
  • Adding a new database client: register it in core/container.py and avoid importing it from core models

FAQ

No—core must not import data. For annotations use TYPE_CHECKING or forward string annotations like "TradeRepo".

Where should I instantiate a Repo used by flows?

Create a factory in core/container.py registered with @register, then let flows receive it via @dependency by matching the parameter name.

5 skills

More from this maintainer
Other repositories and skills published under the same GitHub owner.
Skills library
Jump back to the full directory or explore grouped topics.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational