agentleFS
leather-ioleather-io/mono/.claude/skills/monorepo-navigation/SKILL.md

monorepo-navigation

Skill28 starsChanged 35 days agoMITView on GitHub

Navigate and understand the Leather monorepo structure. Use when adding new code, finding existing implementations, or understanding package relationships. Helps locate the right package for new features and understand cross-package dependencies.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. mhosseinab/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository5 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All three can import types from each other

    line 35
  2. Very specific:

    Internal imports: Use @leather.io/{package} not relative paths across packages

    line 111
  3. Distinctive:

    Should only contain: API calls, DI, caching, multi-service coordination

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Leather Monorepo Navigation

This is a Turborepo monorepo with 3 apps and packages organized in a CLEAN architecture.

Architecture Layers

Presentation → apps/, @leather.io/ui, @leather.io/features, @leather.io/provider Application → @leather.io/queries, @leather.io/services, @leather.io/rpc, @leather.io/sdk, @leather.io/cms Domain → @leather.io/models, @leather.io/bitcoin, @leather.io/stacks State → @leather.io/state (Redux Toolkit) Foundation → @leather.io/utils, @leather.io/constants, @leather.io/tokens, @leather.io/crypto, @leather.io/analytics

Apps

AppPathPurpose
extensionapps/extension/Chrome/Firefox browser extension
mobileapps/mobile/React Native iOS/Android app (Expo)
webapps/web/React Router web app at app.leather.io

Domain Layer Packages

PackagePathScope
@leather.io/modelspackages/models/Domain types and interfaces
@leather.io/bitcoinpackages/bitcoin/Bitcoin protocol utilities, address handling, PSBTs
@leather.io/stackspackages/stacks/Stacks protocol utilities, transactions

Import rules for domain peers:

  • All three can import types from each other
  • bitcoin/stacks should NOT import logic from models (only types)

Application Layer Packages

PackagePathScope
@leather.io/servicespackages/services/Orchestration only — API calls, DI, caching, multi-service coordination
@leather.io/queriespackages/queries/React Query configurations
@leather.io/rpcpackages/rpc/RPC client abstraction
@leather.io/sdkpackages/sdk/SDK utilities
@leather.io/cmspackages/cms/CMS integration

Services should NOT contain:

  • Pure domain logic (move to models, bitcoin, or stacks)
  • Utility functions (move to utils)

State Management

PackagePathScope
@leather.io/statepackages/state/Shared Redux Toolkit slices (wallet, keychains)

App-specific state:

  • Extension: apps/extension/src/app/store/ — {feature}.slice.ts convention
  • Mobile: apps/mobile/src/store/ — {feature}.write.ts (slice + actions) and {feature}.read.ts (selectors + hooks)

Foundation Packages

PackagePathScope
@leather.io/utilspackages/utils/Generic utilities (money, formatting, guards)
@leather.io/constantspackages/constants/Shared constants, currency decimals
@leather.io/cryptopackages/crypto/Cryptographic primitives, key derivation
@leather.io/tokenspackages/tokens/Token metadata
@leather.io/analyticspackages/analytics/Mixpanel analytics

Presentation Layer Packages

PackagePathScope
@leather.io/uipackages/ui/Shared UI components (React)
@leather.io/featurespackages/features/View models, UI transforms
@leather.io/providerpackages/provider/App provider utilities

Decision Tree: Where Does New Code Go?

Is it PURE business logic (no I/O, no async, no side effects)?
├─ Yes → Is it chain-specific protocol code?
│   ├─ Bitcoin protocol → packages/bitcoin/src/
│   ├─ Stacks protocol → packages/stacks/src/
│   └─ No → packages/models/src/
│
Is it orchestration (API calls, DI, caching, coordination)?
├─ Yes → packages/services/src/{domain}/
│
Is it a domain type/interface?
├─ Yes → packages/models/src/
│
Is it a generic utility (not domain-specific)?
├─ Yes → packages/utils/src/
│
Is it a UI component?
├─ Yes → packages/ui/src/components/
│
Is it React Query configuration?
├─ Yes → packages/queries/src/
│
Is it app-specific?
└─ Yes → apps/{app}/src/

Key Conventions

  • Barrel exports: Each package has src/index.ts exporting public API
  • Internal imports: Use @leather.io/{package} not relative paths across packages
  • Co-located tests: {file}.spec.ts next to source file
  • Kebab-case filenames: bitcoin-address.ts not bitcoinAddress.ts
  • Platform suffixes: .web.tsx, .native.tsx, .shared.ts for cross-platform code

Common Tasks

Adding a Bitcoin protocol utility

packages/bitcoin/src/utils/{feature-name}.ts
packages/bitcoin/src/utils/{feature-name}.spec.ts

Export from packages/bitcoin/src/utils/index.ts

Adding a domain type

packages/models/src/{area}.model.ts

Adding orchestration logic

packages/services/src/{domain}/{domain}.service.ts

Should only contain: API calls, DI, caching, multi-service coordination

Adding a UI component

packages/ui/src/components/{component-name}/
├─ {component-name}.tsx
├─ {component-name}.web.tsx (if platform-specific)
└─ index.ts

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.