Skip to content
Agentmart
Submit a tool

fossyl-service

Use when implementing service layer in a fossyl project — business logic, multi-repo composition, sub-services, error handling, external SDK adapters

Skill by YoyoSaur

IndexedGPL-3.0
Write a review

Chalk Labs

Need help deploying fossyl-service?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/yoyosaur-fossyl-service

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when implementing service layer in a fossyl project — business logic, multi-repo composition, sub-services, error handling, external SDK adapters

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/fossyl-service

What's inside

Skill name
fossyl-service
Description
Use when implementing service layer in a fossyl project — business logic, multi-repo composition, sub-services, error handling, external SDK adapters
License
GPL-3.0
Compatibility
opencode
Metadata
audience: fossyl-user
Instructions
107 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# fossyl-service

## Overview

Services contain business logic between routes and repos. A service can import multiple repos and other services freely. Services never import `db` directly — data access goes through repos.

## Single-Repo Service

```typescript
import type { Auth } from "@fossyl/core";
import * as myRepo from "../repo/my.repo";
import { fossylNotFound } from "../errors";

export async function list(auth: Auth, page = 1, pageSize = 20) {
  const offset = (page - 1) * pageSize;
  const [items, total] = await Promise.all([
    myRepo.findAll(offset, pageSize),
    myRepo.countAll(),
  ]);
  return { items, total, page, pageSize, hasMore: offset + pageSize < total };
}

export async function getById(auth: Auth, id: string) {
  const item = await myRepo.findById(id);
  if (!item) throw fossylNotFound("Item not found");
  return item;
}
```

## Multi-Repo Composition

Services freely compose multiple repos to build complex responses:

```typescript
import * as userRepo from "../repo/user.repo";
import * as timesheetRepo from "../repo/timesheet.repo";
import * as payrollRepo from "../repo/payroll.repo";

export async function getEmployeeDashboard(auth: Auth, employeeId: string) {
  const [user, timesheets, payroll] = await Promise.all([
    userRepo.findById(employeeId),
    timesheetRepo.findByEmployee(employeeId),
    payrollRepo.findByEmployee(employeeId),
  ]);
  if (!user) throw fossylNotFound("Employee not found");
  return { user, timesheets, payroll };
}
```

## Service Composition (Services Calling Services)

Services can import and call other services — no special constraints:

```typescript
import * as userService from "../services/user.service";
import * as auditService from "../services/audit.service";

export async function promoteUser(auth: Auth, userId: string, role: string) {
  const user = await userService.getById(auth, userId);
  await auditService.log(auth, "promotion", { userId, role });
  return userRepo.updateRole(userId, role);
}
```

## External SDK Repos

When a repo wraps an external API (e.g. timesheets via Check SDK, payroll via Gusto), the service layer treats it identically. The repo transforms the external model into the domain model:

```typescript
// src/features/timesheets/repo/timesheet.repo.ts
import { CheckClient } from "@checkhq/sdk";

export async function findByEmployee(employeeId: string): Promise<Timesheet[]> {
  const raw = await checkClient.timesheets.list({ employeeId });
  return raw.map(mapCheckTimesheetToDomain);
}
```

The service doesn't know or care whether data comes from Kysely or an SDK call.

## Error Handling

Wrap 3rd-party errors (DB, network, SDK) into fossyl-branded errors. Never throw bare `Error`.

```typescript
import { fossylInternal, fossylNotFound } from "../errors";

export async function getById(id: string) {
  try {
    const item = await myRepo.findById(id);
    if (!item) throw fossylNotFound("Item not found");
    return item;
  } catch (e) {
    if (isFossylError(e)) throw e;
    throw fossylInternal("Database error");
  }
}
```

## Dependencies

- Import `../repo/<name>.repo` — never import `db` directly
- Import `../services/<name>.service` — compose other services freely
- Import `../errors` for error creators
- Import `@fossyl/core` for types only (`Auth`, `Response`, etc.)

From YoyoSaur/fossyl, GPL-3.0.

More from YoyoSaur/fossyl

Signals

Stars
0
Forks
1
Open issues
18
Last commit (this folder)
Jun 9, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from YoyoSaur

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get fossyl-service running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying fossyl-service?

CallGet help
Cite this page

fossyl-service skill. Agent Mart. https://agentmart.dev/skills/yoyosaur-fossyl-service (last updated 2026-10-24)