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.
curl -O https://raw.githubusercontent.com/actionhero/keryx/main/.claude/skills/architecture.skill.mdgit clone --depth 1 https://github.com/actionhero/keryxWrote 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.
[](https://agentmods.dev/skills/actionhero/keryx/architecture)<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>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.
| Model | Per session | Once 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 |
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.
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 schemaweb—{ route, method }for HTTPtask—{ queue, frequency }for background jobsmiddleware— Array ofActionMiddlewarerun(params, connection, abortSignal?)— handler, must throwTypedErrorfor errorstimeout— per-action ms (default 300s,0to 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)
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.
- yesterday First seen · 80 lines · 24 tokens per session scan A cc1fddc96292
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.
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…
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.
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.
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…
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…
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…