roo-logger: Instructions file for Claude Code

CLAUDE.md

roo-logger CLAUDE.md is an instructions file for Claude Code from annenpolka/roo-logger. It costs 1,111 tokens per session, scanned A, original, MIT.

Project instructions for Roo Activity Logger, a TypeScript MCP server that records coding activity in JSON files. It can record actions such as commands, code generation, file changes, errors, decisions, and conversations.

In plain words
What is it for?
Use them when developing or operating Roo Activity Logger. They cover its three tools for recording activity, listing log files, and searching saved logs.
Why use it?
They explain how to install, build, run, and test the project, as well as how its logs are organized. Searchable activity records can help reconstruct what happened during development.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code; built for cline.

This is annenpolka/roo-logger's own configuration. It tells Claude Code how to work on roo-logger 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 roo-logger configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/annenpolka/junks/mcp-servers/roo-logger/logs.

Reuse

Borrowing it

Nothing to install: this file belongs to annenpolka/roo-logger. 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/annenpolka/roo-logger/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/annenpolka/roo-logger

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 roo-logger CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/annenpolka/roo-logger/claude-md.svg)](https://agentmods.dev/instructions/annenpolka/roo-logger/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/annenpolka/roo-logger/claude-md"><img src="https://agentmods.dev/badge/instructions/annenpolka/roo-logger/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,111 This file is loaded in full into every session.
When invoked 1,111 The same file — it is already loaded in full.
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.01111 $0.01111
Opus 5 $0.00556 $0.00556
Sonnet 5 $0.00222 $0.00222
Haiku 4.5 $0.00111 $0.00111

Measured 7d ago against content hash b79ff4de4c06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

roo-logger CLAUDE.md 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 7d ago.

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.md · 104 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

プロジェクト概要

このプロジェクトはRoo Activity Loggerという MCP (Model Context Protocol) サーバーです。Roo の開発活動(コマンド実行、コード生成、ファイル操作など)を自動的に記録し、JSON 形式で保存します。記録されたログは後から検索・分析・文脈の復元が可能です。

開発コマンド

# 依存関係のインストール
npm install

# TypeScript ビルド(実行権限設定含む)
npm run build

# 開発モード(ts-node-esm使用)
npm run dev

# 本番実行
npm start

# テスト実行
npm test

# ウォッチモードでテスト
npm test:watch

# カバレッジ付きテスト
npm test:coverage

アーキテクチャ

ファイル構成

  • src/index.ts: メインのMCPサーバー実装
  • src/types.ts: TypeScript型定義(ActivityLog, 各種Args型など)
  • src/utils/search.ts: ログ検索機能の実装
  • tests/: Vitestを使用したテストファイル

主要コンポーネント

RooActivityLogger クラス
  • MCPサーバーのメイン実装
  • 3つのツールを提供:
    • log_activity: アクティビティをJSONファイルに記録
    • get_log_files: 保存されたログファイルの一覧取得
    • search_logs: 多様な条件でログを検索
ActivityLog型

6種類のアクティビティタイプをサポート:

  • command_execution: コマンド実行
  • code_generation: コード生成
  • file_operation: ファイル操作
  • error_encountered: エラー発生
  • decision_made: 判断記録
  • conversation: 会話記録
ログ構造

各ログエントリには以下が含まれる:

  • 基本情報: ID, timestamp, type, level, summary
  • 文脈情報: intention, context, details
  • 関係性情報: parentId, sequence, relatedIds

設計原則

  • 絶対パス必須: logsDir パラメータは常に絶対パスで指定
  • 日付ベースファイル: ログは roo-activity-YYYY-MM-DD.json 形式で保存
  • 再帰的検索: ディレクトリを再帰的に探索(maxDepth制御)
  • 型安全性: TypeScript の readonly 型と as const を活用
  • エラーハンドリング: Result型によるエラー処理

テスト

  • フレームワーク: Vitest
  • 設定: vitest.config.tsでNode.js環境を指定
  • カバレッジ: v8プロバイダーを使用
  • テストファイル: tests/unit/search/ 配下に検索機能のテスト

使用技術

  • TypeScript: ES2020, NodeNext モジュール解決
  • MCP SDK: @modelcontextprotocol/sdk
  • ライブラリ: winston (ログ), date-fns (日付), minimatch (パターンマッチ), uuid (ID生成)
  • 開発ツール: ts-node-esm, vitest

MCPサーバーとしての特徴

  • stdio トランスポートによる通信
  • Cline/Roo-Code での利用を想定
  • npx による直接実行をサポート
  • 設定可能なログディレクトリ

開発ルール

重要: すべての操作(ファイル操作、コマンド実行、コード生成、判断、エラー処理など)の後に、必ず mcp__roo-activity-logger__log_activity ツールを使用してアクティビティを記録してください。これにより作業履歴が適切にトラッキングされ、後から振り返りが可能になります。

Read the full file on GitHub · 104 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. 7d ago First seen · 104 lines · 1,111 tokens per session scan A b79ff4de4c06

Subscribe to this mod's changes

roo-logger CLAUDE.md is an instructions file published in the GitHub repository annenpolka/roo-logger (25 stars, last pushed 1y ago), licensed MIT. It adds 1,111 tokens to every session, about $0.0056 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-08-30.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens