agentleFS
slopusslopus/happy/.agents/skills/dev/SKILL.md

dev

Skill24k starsChanged 8 months agoMITView on GitHub

Local development guide for the Happy monorepo. How to build, install, test, and run the CLI, server, mobile app, and desktop (Tauri) locally. Use when the user types /dev, asks how to "build", "start dev", "install locally", or "run the ___ package".

  • Deletes or force-pushes
  • Installs packages

24 other projects use a version of this, 1 of them edited.

How people change it

All 1 edited versions we compared keep every one of its 11 rules.

Of the 1 edited version we compared: 1 keep every rule.

We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 4 mentionsFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 3 mentionsMay 2026: 23 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 7 mentionsSep 2026: 4 mentionsOct 2026: 6 mentionsNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the slopus/happy repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about slopus/happy

The biggest 5 of 58 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 58

Talked about on GitHub, Bluesky and Hacker News (58 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 7

2 more on Bluesky

On Hacker News · 1

Used with

Projects with it also use test, memory and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Microsoft AzureSkill

    test

    Also in 4 projects that use this

  • GoogleSkill

    memory

    Expertise in maintaining persistent bot memory, synchronizing with previous sessions via the Task Ledger, and preserving decision logs.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 5 projects that use this

  • VercelSkill

    setup

    Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 2 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run a single test file quickly:

    line 53
  2. Distinctive:

    When the user asks to "rebuild the desktop app", "kill the running one and reinstall", or anything in that shape — do all four steps in …

    line 108
  3. Very specific:

    If the variant is ambiguous, check what's running with ps aux | grep "/Applications/.*Happy" | grep -v grep and match.

    line 120
  4. Very specific:

    Run the build in the background (run_in_background: true on Bash) and poll the output file.

    line 140
  5. Very specific:

    Do NOT skip the rm -rf before cp — cp -R over an existing .app merges directories and leaves stale files.

    line 142
  6. Very specific:

    If macOS Gatekeeper complains on relaunch, xattr -dr com.apple.quarantine "/Applications/$NAME.app" clears it.

    line 143
  7. Very specific:

    Do not publish by hand. Use /release — it handles npm publish, git tags, GitHub releases, and the smoke check.

    line 169
  8. Very specific:

    Never use npm install or yarn install — only pnpm.

    line 181
  9. Very specific:

    Never add a dev / cli tsx-based script back to happy-cli.

    line 182
  10. Very specific:

    Never bring back release-it.

    line 183
  11. Very specific:

    Never introduce ~/.happy-dev as a default.

    line 184

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/dev - Local Development

Happy is a pnpm monorepo. Everything uses pnpm workspaces — do not use npm or yarn directly.

First-time setup

pnpm install                       # installs deps for every package
pnpm --filter happy cli:install    # builds happy-cli + links it as the global `happy` binary

cli:install replaces whatever happy is on your PATH (npm-installed or not) with a symlink to packages/happy-cli/. Daemon is restarted as part of the script. Uses ~/.happy/ — same as production.

To undo: npm unlink -g happy && npm i -g happy@latest.

Packages

packages/happy-cli     # the `happy` CLI and daemon, published to npm
packages/happy-server  # Node + Prisma server, deployed via TeamCity
packages/happy-app     # Expo app: iOS, Android, web, Tauri desktop
packages/happy-agent   # agent runtime
packages/happy-wire    # shared Zod schemas + wire types

happy-cli

packages/happy-cli
scripts in package.json:
  typecheck      # tsc --noEmit
  build          # rm -rf dist && tsc --noEmit && pkgroll
  test           # build + vitest run
  cli:install    # build + stop daemon + npm link + start daemon
  prepublishOnly # pnpm test (runs build inside test)
  postinstall    # unpacks difft + rg binaries into tools/unpacked/

Work loop:

pnpm --filter happy cli:install   # rebuild + relink + restart daemon
happy daemon status               # confirm your build is running
happy doctor                      # list all happy processes
tail -f ~/.happy/logs/$(ls -t ~/.happy/logs/ | head -1)

Run a single test file quickly:

pnpm --filter happy exec vitest run src/path/to/file.test.ts

Unit-only (fast, ~1 min):

pnpm --filter happy exec vitest run --project unit

Integration tests hit real APIs and are flaky — run on demand, never in the release gate.

Dev data sandbox (optional)

happy reads HAPPY_HOME_DIR to override ~/.happy/. To run two versions side-by-side without touching your prod auth:

HAPPY_HOME_DIR=~/.happy-dev happy daemon start
HAPPY_HOME_DIR=~/.happy-dev happy auth

Point at a local server the same way:

HAPPY_SERVER_URL=http://localhost:3005 happy daemon start

happy-server

pnpm --filter happy-server standalone:dev   # localhost:3005, embedded PGlite, no Docker

App auto-reloads on source changes. Point the CLI or the Expo app at it with HAPPY_SERVER_URL=http://localhost:3005 / EXPO_PUBLIC_HAPPY_SERVER_URL=....

happy-app (Expo)

pnpm --filter happy-app start           # expo start (Metro bundler)
pnpm --filter happy-app ios:dev         # iOS simulator, development variant
pnpm --filter happy-app android:dev
pnpm --filter happy-app web             # web build, served locally
pnpm --filter happy-app tauri:dev       # macOS desktop app

Variants:

development    com.slopus.happy.dev       # hot reload, internal
preview        com.slopus.happy.preview   # OTA / beta testing
production     com.ex3ndr.happy           # App Store

Rebuild and reinstall the desktop .app

When the user asks to "rebuild the desktop app", "kill the running one and reinstall", or anything in that shape — do all four steps in order, do not stop after building.

Variants → product name → build script:

production    Happy.app           pnpm --filter happy-app tauri:build:production
preview       Happy (preview).app pnpm --filter happy-app tauri:build:preview
dev           Happy (dev).app     pnpm --filter happy-app tauri:build:dev

Build output for all variants:

packages/happy-app/src-tauri/target/release/bundle/macos/<ProductName>.app

If the variant is ambiguous, check what's running with ps aux | grep "/Applications/.*Happy" | grep -v grep and match. Production is the default.

Steps (substitute $NAME with the product name, e.g. Happy or Happy (dev)):

# 1. build (slow: ~3–10 min, expo web export then cargo release build)
pnpm --filter happy-app tauri:build:production

# 2. quit the running app gracefully (no-op if not running)
osascript -e 'tell application "$NAME" to quit' || true

# 3. replace the installed bundle
rm -rf "/Applications/$NAME.app"
cp -R "packages/happy-app/src-tauri/target/release/bundle/macos/$NAME.app" /Applications/

# 4. relaunch
open -a "$NAME"

Notes:

  • Run the build in the background (run_in_background: true on Bash) and poll the output file. It prints Finished \release` profile` near the end.
  • osascript ... to quit is graceful — it gives the app a chance to flush state. Only fall back to pkill -f "/Applications/$NAME.app/Contents/MacOS/app" if the quit hangs.
  • Do NOT skip the rm -rf before cp — cp -R over an existing .app merges directories and leaves stale files.
  • If macOS Gatekeeper complains on relaunch, xattr -dr com.apple.quarantine "/Applications/$NAME.app" clears it. Local builds are unsigned.

happy-app-logs (remote log receiver)

pnpm --filter happy-app-logs dev       # starts on http://0.0.0.0:8787

Receives POST requests to /logs from the mobile app's patched console (see consoleLogging.ts). Logs to stdout and ~/.happy/app-logs/<timestamp>.log.

To connect: set the log server URL in the app's dev settings to http://<LAN_IP>:8787. The app's consoleLogging.ts sends all console.log/warn/error to this endpoint when configured.

Console output must be enabled in the app (dev/preview variants default on, production defaults off, togglable from the dev settings screen).

Cross-cutting

  • Hoisted deps: pnpm hoists node_modules to the repo root. packages/*/node_modules/ is mostly empty. Node's resolution walks up, so imports work transparently.
  • Workspace deps: "@slopus/happy-wire": "workspace:*" resolves to packages/happy-wire/ — edits are picked up live.
  • $npm_execpath: legacy; happy-cli uses pnpm literally. Windows cmd.exe doesn't expand $VAR.
  • Build before tests: tests spawn the built CLI binary (for daemon integration), so pnpm test runs build first. Do not remove.

Releasing

Do not publish by hand. Use /release — it handles npm publish, git tags, GitHub releases, and the smoke check.

Troubleshooting

happy: command not found     → pnpm --filter happy cli:install
daemon won't start           → happy daemon stop; rm ~/.happy/daemon.state.json.lock; happy daemon start
wrong `happy` version        → which happy && ls -la $(which happy) — confirms where it resolves to
tools/unpacked missing       → pnpm install (postinstall re-extracts)
stale deps after branch swap → pnpm install (pnpm is picky about lockfile drift)

Rules

  • Never use npm install or yarn install — only pnpm.
  • Never add a dev / cli tsx-based script back to happy-cli. The build step is not optional — daemon spawns the built binary and would desync.
  • Never bring back release-it. Releases go through /release.
  • Never introduce ~/.happy-dev as a default. It exists as an opt-in via HAPPY_HOME_DIR, nothing more.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.