application-layer

application-layer is a cursor rule for Cursor from hiromaily/go-crypto-wallet. It costs 0 tokens per session (866 once invoked), scanned A, original, MIT.

A set of project rules for the application layer, the part of a program that coordinates user actions and business operations. It defines shared data formats and interfaces that other parts of the system implement.

In plain words
What is it for?
It guides work on use cases, data-transfer objects, and interfaces for wallets, files, repositories, and external cryptocurrency APIs.
Why use it?
It keeps business workflows separate from databases, APIs, and other technical details. This reduces accidental coupling when the system changes.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/hiromaily/go-crypto-wallet/application-layer
Clone the repo
git clone --depth 1 https://github.com/hiromaily/go-crypto-wallet

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for application-layer

README.md
[![agentmods](https://agentmods.dev/badge/rules/hiromaily/go-crypto-wallet/application-layer.svg)](https://agentmods.dev/rules/hiromaily/go-crypto-wallet/application-layer)
Your own site
<a href="https://agentmods.dev/rules/hiromaily/go-crypto-wallet/application-layer"><img src="https://agentmods.dev/badge/rules/hiromaily/go-crypto-wallet/application-layer.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 866 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00866
Opus 5 $0.00000 $0.00433
Sonnet 5 $0.00000 $0.00173
Haiku 4.5 $0.00000 $0.00087

Measured yesterday against content hash 7c503eb3681b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

application-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/internal/application-layer.mdc · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Application Layer Rules

Overview

Rules for working with the Application layer (internal/application/). This layer orchestrates use cases and defines port interfaces.

Structure

internal/application/
├── dto/           # Data Transfer Objects
│   ├── btc/       # Bitcoin DTOs
│   └── ripple/    # XRP DTOs
├── ports/         # Interface definitions (abstractions)
│   ├── api/       # External API interfaces (btc, eth, xrp)
│   ├── file/      # File storage interfaces
│   ├── repository/# Repository interfaces (cold, watch)
│   └── wallet/    # Wallet key generator interfaces
└── usecase/       # Use case implementations
    ├── keygen/    # Key generation (btc, bch, eth, xrp, shared)
    ├── sign/      # Signing (btc, bch, eth, xrp, shared)
    ├── watch/     # Watch wallet (btc, bch, eth, xrp, shared)
    └── shared/    # Shared helpers

Port Interfaces (application/ports/)

CRITICAL: Interfaces are defined where they are USED, not where they are implemented.

Rules

  • Define interfaces in application/ports/ for infrastructure abstractions
  • Use application-layer DTOs in method signatures (NOT infrastructure types)
  • Infrastructure packages implement these interfaces

Example

// application/ports/api/btc/interface.go
package btc

import btcdto "internal/application/dto/btc"

type Bitcoiner interface {
    GetBalance() (btcutil.Amount, error)
    GetAddressInfo(addr string) (*btcdto.AddressInfo, error)  // Uses DTO
}

DTOs (application/dto/)

Rules

  • DTOs define data structures for port interface method signatures
  • Keep DTOs simple - no business logic
  • Map infrastructure types to DTOs in infrastructure layer

Example

// application/dto/btc/dto.go
package btc

type AddressInfo struct {
    Address      string
    ScriptPubKey string
    IsWitness    bool
    Labels       []string
}

Use Cases (application/usecase/)

Rules

  • Each use case represents a single business operation
  • Depend on port interfaces, not concrete implementations
  • Delegate business logic to domain layer
  • Wrap errors with context
  • Should be kept as simple as possible, and specific functionality should be delegated to shared package layers such as the domain layer or /pkg.

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 126 lines · 0 tokens per session scan A 7c503eb3681b

Subscribe to this mod's changes

application-layer is a cursor rule published in the GitHub repository hiromaily/go-crypto-wallet (127 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 866 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.