learn-rat-stack
Trace a capability through Effect, XState, five projections, the CLI, and Alchemy.
Skill by joelhooks
Chalk Labs
Need help deploying learn-rat-stack?
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.
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/joelhooks-learn-rat-stack-cae32b
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.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
learn-rat-stack- Description
- Trace a capability through Effect, XState, five projections, the CLI, and Alchemy. Try hosted search and read.
- License
- MIT
- Instructions
- 182 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Learn the stack
Start with `inspectFile`, a [capability](/systems/capabilities): one named action with a contract and a server-side handler. The [contract](/systems/capabilities) defines its name, input, output, failure, and metadata. The handler implements the action.
A service is a named interface for one job. A machine defines states and the events that permit movement between them. A [projection](/lore/one-capability-every-surface) builds a callable interface from capabilities.
Follow these parts, then try the hosted content tools.
Read [Effect basics](/lore/effect-basics) before this trace if the computation model is new. For implementation tasks, use [services](/lore/services-capture-dependencies), [Layer composition](/lore/layers-make-dependencies-explicit), and [testing](/lore/tests-that-earn-their-place).
## The pieces
- Effect describes work with typed failures and required dependencies.
- Schema defines accepted values and their runtime checks.
- A Layer builds services and supplies their construction dependencies.
- XState owns finite lifecycles. The Effect bridge runs their declared actors.
- TypeScript 7 and Effect diagnostics check types and Effect usage.
- Oxlint, Oxfmt, Vitest, and lefthook enforce [the fence](/lore/the-fence): checks and hooks that reject prohibited code and shortcuts.
- pnpm and Turborepo connect packages and cache checks.
- Alchemy declares the cloud. Follow [learn Alchemy](/skills/learn-alchemy) for the deployment graph.
## One action, five interfaces
```text
┌─ CLI
├─ HTTP
One Capability ──────┼─ MCP
├─ code mode
└─ RPC
```
A [projection](/lore/one-capability-every-surface) exposes the same action through another interface. RPC serves browser clients. [Code mode](/lore/one-program-can-replace-several-tool-calls) lets agents compose calls in one program.
All five interfaces use one handler.
## Trace one action
The CLI uses `inspectFile`. The hosted site uses a separate content registry.
### 1. Define the contract
The [contract](/systems/capabilities) names the action and its input, output, and failure schemas.
```ts repo=rat-stack path=packages/core/src/contracts.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=255-263 {255,258-263}
```
`FileStatsError` belongs to the interface. The annotations mark a repeatable, read-only action.
### 2. Bind one handler
`implement` binds the contract to `runInspectMachine`. The registry includes the resulting [capability](/systems/capabilities).
```ts repo=rat-stack path=packages/core/src/inspect-file.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=10-22 {10-12,14-15}
```
The handler starts a machine to read the file.
### 3. Put file work in a service
`FileInspector.make` captures the file system. Its `inspect` method reads bytes and maps file errors to `FileStatsError`.
```ts repo=rat-stack path=packages/core/src/file-inspector.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=14-29 {15,20-24,28}
```
The service exposes its [Layer](/lore/layer-constructor-pattern) beside the implementation. This follows [hexagonal architecture](/lore/hexagonal-architecture): composition supplies the file-system dependency.
```ts repo=rat-stack path=packages/core/src/file-inspector.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=31-35 {34}
```
Callers ask the service to inspect a path. Composition chooses the file-system implementation.
### 4. Give the lifecycle named states
A declared `createEffectLogic` actor calls `FileInspector`.
```ts repo=rat-stack path=packages/core/src/inspect-machine.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=26-30 {26,28}
```
The machine starts in `reading`. It finishes in `inspected` or `unreadable`.
```ts repo=rat-stack path=packages/core/src/inspect-machine.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=40-64 {40,43,51,57,59,62}
```
### 5. Project the registered actions
The command-line interface (CLI) projects capability lists for each server interface. HTTP uses stateless learning capabilities. MCP and code mode use their local learning counterparts. All three include `inspectFile`.
```ts repo=rat-stack path=apps/cli/src/surfaces.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=25-33,40-51 {25-28,30-33,40,42,44,48}
```
The RPC [projection](/lore/one-capability-every-surface) derives contracts from its supplied capabilities.
```ts repo=rat-stack path=packages/capability/src/to-rpc.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=24-27 {24,27}
```
A projection takes a registry and reuses its domain handlers.
### 6. Connect the CLI
`toCommand` derives each command. `inspectFile` also gets the `stats` alias.
```ts repo=rat-stack path=apps/cli/src/command.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=22-35 {25-28}
```
The entry point supplies the service [Layer](/lore/layer-constructor-pattern) and Node services. It denies [approval](/systems/capabilities) by default.
```ts repo=rat-stack path=apps/cli/src/cli.ts at=b4d6b8f499e57bc76914ad70df3a0c99751ae28c lines=22-32 {24,30}
```From joelhooks/potion-calendar, MIT.
More from joelhooks/potion-calendar
Signals
- Stars
- 27
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 20, 2026 (16 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/joelhooks/potion-calendar
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.676score
learn-rat-stack
joelhooks
Trace a capability through Effect, XState, five projections, the CLI, and Alchemy.
SkillAFreshness: A★ 129Claude Code +9 - 0.335score
learn-rat-stack
ChindanaiNaKub
Trace a capability through Effect, XState, five projections, the CLI, and Alchemy.
SkillAFreshness: AClaude Code +9 - 0.323score
learn-rat-stack
joelhooks
Trace a capability through Effect, XState, five projections, the CLI, and Alchemy.
SkillAFreshness: A★ 6Claude Code +9
More from joelhooks
- 0.684score
rat-stack-mode
joelhooks
Route non-trivial rat-stack code, data, design, investigation, and documentation tasks to every matching playbook and principle.
SkillAFreshness: A★ 129Claude Code +9 - 0.682score
uncomplect
joelhooks
Find responsibilities that a rat-stack design combines, separate them into capabilities, cartridges, machines, features, and clients, and enforce that…
SkillAFreshness: A★ 129Claude Code +9 - 0.682score
investigate-a-failure
joelhooks
Find the cause of a crash, wrong output, flaky test, or slow run with evidence, fix it at its source, and leave a notebook a person can learn from.
SkillAFreshness: A★ 129Claude Code +9 - 0.682score
profile-a-worker
joelhooks
Capture a CPU or heap profile of a deployed Cloudflare Worker or Durable Object and read it with pprof.
SkillAFreshness: A★ 129Claude Code +9 - 0.682score
query-design
joelhooks
Design or review SQL reads, writes, scans, backfills, and slow database paths.
SkillAFreshness: A★ 129Claude Code +9 - 0.681score
ship
joelhooks
Learn how to ship a change through merge, CI, release, stage deployment, rollout, verification, rollback and flags.
SkillAFreshness: A★ 129Claude Code +9
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 learn-rat-stack 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.
Cite this page
learn-rat-stack skill. Agent Mart. https://agentmart.dev/skills/joelhooks-learn-rat-stack-cae32b (last updated 2026-10-24)