agentleFS
d-kimusond-kimuson/claude-code-viewer/AGENTS.md

claude-code-viewer

AGENTS.md1.3k starsChanged 7 months agoMITView on GitHub

Conventional Commits format: type: description Release Note Awareness: Type Selection: | Type | Release Note | Purpose | |------|--------------|---------| | feat | Features | User-facing new feature | | fix | Bug Fixes | User-impacting bug fix | | chore, ci, build, refactor | Excluded | Internal changes | Critical: Use fix only for user-facing bugs. Internal fixes (linter errors, type errors, build scripts) must use chore. Message Quality Examples: Claude Code Viewer reads Claude Code session logs directly from…

Trending

Quiet since September.thin dataabout the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the d-kimuson/claude-code-viewer repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about d-kimuson/claude-code-viewer

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

See all 9

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

On GitHub · 7

2 more on GitHub

On Hacker News · 1

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    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. Very specific:

    Use as type casting in ANY context including test code (explain the problem to the user instead)

    line 11
  2. Very specific:

    Use raw fetch or bypass TanStack Query for API calls

    line 12
  3. Very specific:

    Run pnpm dev or pnpm start (dev servers)

    line 13
  4. Very specific:

    Use node:fs, node:path, etc.

    line 14
  5. Distinctive:

    Use Effect-TS for all backend side effects

    line 18
  6. Distinctive:

    Use Hono RPC + TanStack Query for all API calls

    line 19
  7. Distinctive:

    Follow TDD: write tests first, then implement

    line 20
  8. Very specific:

    Run pnpm typecheck and pnpm fix before committing

    line 21
  9. Distinctive:

    Commit messages are included in release notes.

    line 29
  10. Very specific:

    Critical: Use fix only for user-facing bugs.

    line 38
  11. Distinctive:

    After changing source code, always run before committing:

    line 75
  12. Distinctive:

    Only use Effect-TS when side effects or state management is required

    line 98
  13. Distinctive:

    Avoid class-based implementations or mutable variables for state

    line 103
  14. Distinctive:

    Use Effect-TS's functional patterns for state management

    line 104
  15. Very specific:

    Use FileSystem.FileSystem instead of node:fs

    line 123
  16. Very specific:

    If types seem unsolvable without as, explain the problem to the user and ask for guidance

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

AGENTS.md

Critical Rules (Read First)

Language:

  • Code, comments, and commit messages should be in English

NEVER:

  • Use as type casting in ANY context including test code (explain the problem to the user instead)
  • Use raw fetch or bypass TanStack Query for API calls
  • Run pnpm dev or pnpm start (dev servers)
  • Use node:fs, node:path, etc. directly (use Effect-TS equivalents)

ALWAYS:

  • Use Effect-TS for all backend side effects
  • Use Hono RPC + TanStack Query for all API calls
  • Follow TDD: write tests first, then implement
  • Run pnpm typecheck and pnpm fix before committing

Commit Message Rules

Conventional Commits format: type: description

Release Note Awareness:

  • Commit messages are included in release notes; write for users.

Type Selection:

TypeRelease NotePurpose
featFeaturesUser-facing new feature
fixBug FixesUser-impacting bug fix
chore, ci, build, refactorExcludedInternal changes

Critical: Use fix only for user-facing bugs. Internal fixes (linter errors, type errors, build scripts) must use chore.

Message Quality Examples:

  • Bad: fix: fix lingui error (internal issue)
  • Bad: feat: add button (too vague)
  • Good: feat: add dark mode toggle to settings
  • Good: fix: session list not updating after deletion
  • Good: chore: update lingui compiled messages

Project Overview

Claude Code Viewer reads Claude Code session logs directly from JSONL files (~/.claude/projects/) with zero data loss. It's a web-based client built as a CLI tool serving a Vite application.

Core Architecture:

  • Frontend: Vite + TanStack Router + React 19 + TanStack Query
  • Backend: Hono (standalone server) + Effect-TS (all business logic)
  • Data: Direct JSONL reads with strict Zod validation
  • Real-time: Server-Sent Events (SSE) for live updates

Recommended Coding Process

This project is designed with the philosophy of achieving both rapid feedback and code quality maintenance (passing checks = nearly guaranteed runtime correctness) by leveraging:

  • Strict typing with Effect-TS and ADT
  • Constraints for maintaining code quality configured in Lint as much as possible
  • Dependency injection and effective testing with Effect-TS

For development, we recommend implementing with t-wada's TDD development style.

For checks, you can run pnpm gatecheck check to execute all the above checks against the diff at once, so proceed with implementation in a loop of problem detection and fixing with gatecheck.

By utilizing this, you can quickly inspect code with static checks and unit tests.

Quality Gate (MUST follow)

After changing source code, always run before committing:

pnpm gatecheck check
./scripts/lingui-check.sh

Key Directory Patterns

  • src/server/hono/route.ts - Hono API routes definition (all routes defined here)
  • src/server/core/ - Effect-TS business logic (domain modules: session, project, git, etc.)
  • src/lib/conversation-schema/ - Zod schemas for JSONL validation
  • src/testing/layers/ - Reusable Effect test layers (testPlatformLayer is the foundation)
  • src/routes/ - TanStack Router routes

Coding Standards

Backend: Effect-TS

Prioritize Pure Functions:

  • Extract logic into pure, testable functions whenever possible
  • Pure functions are easier to test, reason about, and maintain
  • Only use Effect-TS when side effects or state management is required

Use Effect-TS for Side Effects and State:

  • Mandatory for I/O operations, async code, and stateful logic
  • Avoid class-based implementations or mutable variables for state
  • Use Effect-TS's functional patterns for state management
  • Reference: https://effect.website/llms.txt

Testing with Layers:

import { expect, test } from "vitest";
import { Effect } from "effect";
import { testPlatformLayer } from "@/testing/layers";
import { yourEffect } from "./your-module";

test("example", async () => {
  const result = await Effect.runPromise(yourEffect.pipe(Effect.provide(testPlatformLayer)));
  expect(result).toBe(expectedValue);
});

Avoid Node.js Built-ins:

  • Use FileSystem.FileSystem instead of node:fs
  • Use Path.Path instead of node:path
  • Use Command.string instead of child_process

This enables dependency injection and proper testing.

Type Safety - NO as Casting:

  • as casting is strictly prohibited
  • If types seem unsolvable without as, explain the problem to the user and ask for guidance
  • Valid alternatives: type guards, assertion functions, Zod schema validation

Frontend: API Access

Hono RPC + TanStack Query Only:

import { api } from "@/lib/api";
import { useQuery } from "@tanstack/react-query";

const { data } = useQuery({
  queryKey: ["example"],
  queryFn: () => api.endpoint.$get().then((res) => res.json()),
});

Raw fetch and direct requests are prohibited.

Tech Standards

  • Linter/Formatter: oxlint + oxfmt (not ESLint/Prettier/Biome)
  • Type Config: @tsconfig/strictest
  • Path Alias: @/* maps to ./src/*

Architecture Details

SSE (Server-Sent Events)

When to Use SSE:

  • Delivering session log updates to frontend
  • Notifying clients of background process state changes
  • Never for request-response patterns (use Hono RPC instead)

Implementation:

  • Server: /api/sse endpoint with type-safe events (TypeSafeSSE)
  • Client: useServerEventListener hook for subscriptions

Data Layer

  • Single Source of Truth: ~/.claude/projects/*.jsonl
  • Cache: ~/.claude-code-viewer/ (invalidated via SSE when source changes)
  • Validation: Strict Zod schemas ensure every field is captured

Session Process Management

Claude Code processes remain alive in the background (unless aborted), allowing session continuation without changing session-id.

Development Tips

  1. Session Logs: Examine ~/.claude/projects/ JSONL files to understand data structures
  2. Mock Data: mock-global-claude-dir/ contains E2E test mocks (useful reference for schema examples)
  3. Effect-TS Help: https://effect.website/llms.txt

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.