keryx: Skill for Claude Code

.claude/skills/architecture.skill.md

architecture is a skill for Claude Code from actionhero/keryx. It costs 24 tokens per session (1,009 once invoked), scanned A, original, MIT.

A reference for the internal structure of a web application framework, including its shared API object, automatically loaded modules, web actions, background tasks, and configuration. It explains how applications expose handlers over HTTP, queues, or agent-tool interfaces.

In plain words
What is it for?
Use it to configure an application, add actions with validated inputs, define HTTP or background-task handlers, attach middleware, and understand startup and shutdown.
Why use it?
It gives developers a map of the framework's loading and startup rules, reducing mistakes when adding modules or connecting application actions to different transports.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter.

This is actionhero/keryx's own configuration. It tells Claude Code how to work on keryx itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything keryx configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is declare module "../classes/API" {.

Reuse

Borrowing it

Nothing to install: this file belongs to actionhero/keryx. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/actionhero/keryx/main/.claude/skills/architecture.skill.md
Clone the repo
git clone --depth 1 https://github.com/actionhero/keryx

Made for: Claude Code.

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 architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/actionhero/keryx/architecture.svg)](https://agentmods.dev/skills/actionhero/keryx/architecture)
Your own site
<a href="https://agentmods.dev/skills/actionhero/keryx/architecture"><img src="https://agentmods.dev/badge/skills/actionhero/keryx/architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00024 $0.01009
Opus 5 $0.00012 $0.00504
Sonnet 5 $0.00005 $0.00202
Haiku 4.5 $0.00002 $0.00101

Measured yesterday against content hash cc1fddc96292, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

architecture 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.

.claude/skills/architecture.skill.md · 80 lines

How it starts

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

Architecture Quick-Reference

For full details, read the corresponding doc files listed below.

Dual-Directory Loading

The framework loads from both packageDir (auto-resolved from import.meta.path) and rootDir (set by the user app). Actions, initializers, and servers are auto-discovered via globLoader (packages/keryx/util/glob.ts) from both directories. Files prefixed with . are skipped.

import { api } from "keryx";
api.rootDir = import.meta.dir; // User sets this before api.initialize()

Global Singleton: api

packages/keryx/api.ts — stored on globalThis. Lifecycle: initialize -> start -> stop. All initializers attach namespaces (e.g., api.db, api.actions, api.redis).

Actions (docs/guide/actions.md)

Transport-agnostic controllers. Key properties:

  • inputs — Zod schema
  • web{ route, method } for HTTP
  • task{ queue, frequency } for background jobs
  • middleware — Array of ActionMiddleware
  • run(params, connection, abortSignal?) — handler, must throw TypedError for errors
  • timeout — per-action ms (default 300s, 0 to disable)
  • mcp{ tool, isLoginAction, isSignupAction, resource?, prompt? }

Type helpers: ActionParams<A>, ActionResponse<A>.

App actions must be re-exported from example/backend/actions/.index.ts for frontend type sharing.

Initializers (docs/guide/initializers.md)

Priority-based lifecycle components. Each uses module augmentation to extend API:

Framework (relative):

declare module "../classes/API" {
  export interface API { [namespace]: Awaited<ReturnType<MyInit["initialize"]>>; }
}

App (package):

declare module "keryx" {
  export interface API { [namespace]: Awaited<ReturnType<MyInit["initialize"]>>; }
}

Key priorities: observability (50), actions (100), db (100), pubsub (150), swagger (150), oauth (175), redis (200), mcp (200/560/90), resque (250), application (1000).

MCP & OAuth (docs/guide/mcp.md)

Read the full file on GitHub · 80 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 · 80 lines · 24 tokens per session scan A cc1fddc96292

Subscribe to this mod's changes

architecture is a skill published in the GitHub repository actionhero/keryx (33 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,009 once invoked, about $0.0001 per session on Opus 5. 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-05.

Related

Other skills, from other repositories

fastapi-guard

Production-ready security middleware for FastAPI. Use when adding IP filtering, rate limiting, per-route security decorators, route-resolution strict mode, global behavior rules, passive/log-only mode, or Guard Agent SaaS telemetry to a FastAPI app. Covers SecurityMiddleware setup, SecurityConfig tuning, and the…

rennf93/fastapi-guard · 72 tokens

mcp-patterns

MCP server building, advanced patterns, and security hardening. Use when building MCP servers, implementing tool handlers, choosing a transport, adding OAuth authentication, wiring MCP Apps UI with @mcp-ui, hardening MCP security, or debugging MCP integrations.

yonatangross/orchestkit · 56 tokens

testing-integration

Integration and contract testing patterns — API endpoint tests, component integration, database testing, Pact contract verification, property-based testing, and Zod schema validation. Use when testing API boundaries, verifying contracts, or validating cross-service integration.

yonatangross/orchestkit · 49 tokens

frontmcp-config

Use when configuring a FrontMCP server through frontmcp.config or the @FrontMcp options. Covers auth modes (public, transparent, local, remote), OAuth plus credential vault and secureStore, CORS, HTTP port / entry-path prefix / unix socket, security headers (CSP, HSTS, X-Frame-Options, X-Content-Type-Options), rate…

agentfront/frontmcp · 187 tokens

frontmcp-auth-ui

Use when customizing, branding, or replacing the built-in FrontMCP OAuth pages (the login, consent, federated-select, incremental-authorization, and error pages) with your own React components. Covers the auth.ui slot-to-file map and auth.extras name-to-handler map on the auth config (no decorator, no class); the…

agentfront/frontmcp · 184 tokens

api-connector-builder

Use when writing a client for someone else's REST or GraphQL API: auth flow choice and token refresh, pagination to exhaustion, retry-with-jitter on transient failures only, rate-limit-aware throttling. NOT inbound callbacks (that is webhooks), NOT chaining services (that is automation-flows), NOT designing your own…

ericrisco/rsc-harness · 80 tokens