sidekick CLAUDE.md

sidekick CLAUDE.md is an instructions file for coding agents from lee-lou2/sidekick. It costs 7,557 tokens per session, scanned A, original, MIT.

A quick project guide for sidekick, a Python personal AI assistant with Gemini, Slack, REST API, and MCP support.

In plain words
What is it for?
Use it when running sidekick, adding tools, changing its interfaces, or checking the project before committing changes.
Why use it?
It provides the main commands and architecture needed to run, test, lint, format, and extend the project.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/lee-lou2/sidekick/claude-md
Clone the repo
git clone --depth 1 https://github.com/lee-lou2/sidekick

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 sidekick CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lee-lou2/sidekick/claude-md.svg)](https://agentmods.dev/instructions/lee-lou2/sidekick/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/lee-lou2/sidekick/claude-md"><img src="https://agentmods.dev/badge/instructions/lee-lou2/sidekick/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,557 This file is loaded in full into every session.
When invoked 7,557 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
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 $0.07557 $0.07557
Opus 5 $0.03778 $0.03778
Sonnet 5 $0.01511 $0.01511
Haiku 4.5 $0.00756 $0.00756

Measured 5d ago against content hash 0a4d5e789586, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sidekick CLAUDE.md scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

data = client.fetch(location, units)
CLAUDE.md · 904 lines

How it starts

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

CLAUDE.md

Quick reference for Claude Code. See AGENTS.md for detailed tool creation guide.

Project Overview

Stack: Python 3.10+, Pydantic AI, Google Gemini, FastAPI, Slack, MCP

Purpose: Personal AI agent with custom tools, Slack integration, REST API, and MCP-powered extended capabilities.

Commands

# Make 명령어 (권장)
make              # 도움말
make run          # 실행 (설정 + 모드 선택)
make test         # 코어 테스트
make test-all     # 전체 테스트 (커스텀 도구 포함)
make lint         # 린트 + 자동 수정
make format       # 코드 포맷팅
make tool-install # 외부 도구 설치
make tool-upload  # 도구 공유용 업로드
make edit-env     # .env 편집

# 직접 실행 (Make 없이)
uv run pytest tests/ --ignore=tests/tools -v           # 코어 테스트
uv run pytest tests/ -v                              # 전체 테스트
uv run ruff check src/ tests/ --fix                  # 린트
uv run python src/interfaces/slack/bot.py            # Slack 봇
uv run uvicorn src.interfaces.api:app --port 8000    # API 서버

Architecture

src/
├── config.py              # pydantic-settings 기반 Settings 클래스
├── core/
│   ├── agent/
│   │   ├── core.py       # Backward-compat re-exports
│   │   ├── utils.py      # AgentRunResult, retry logic, image normalization
│   │   ├── factory.py    # AgentFactory (creates isolated agents)
│   │   └── runner.py     # AgentRunner (run/run_async with image extraction)
│   ├── context/          # Request context management (ContextVar)
│   │   └── image.py      # Attached images context + bounded caches (LRU)
│   ├── lifecycle.py      # LifecycleManager - singleton startup/shutdown
│   ├── commands/         # Custom command management
│   │   ├── executor.py   # CommandExecutor
│   │   ├── models.py     # Command data model
│   │   ├── parser.py     # Command parsing
│   │   ├── prompts.py    # Prompt building
│   │   ├── repository.py # SQLite CRUD
│   │   └── tools.py      # Command CRUD tools
│   ├── memory/
│   │   └── prompts.py    # MEMORY_SYSTEM_PROMPT, build_memory_prompt()
│   └── scheduler/
│       ├── __init__.py   # SchedulerManager, parse_korean_time exports
│       ├── models.py     # ScheduledTask dataclass
│       ├── time_parser.py # Korean/English time expression parser
│       ├── manager.py    # APScheduler wrapper (SQLite persistence)
│       ├── executor.py   # Scheduled task execution + Slack notification
│       └── tools.py      # schedule_task, list_scheduled_tasks, cancel_scheduled_task
├── interfaces/
│   ├── slack/            # Modularized Slack bot (127-line orchestrator)
│   │   ├── bot.py        # Event router (thin orchestrator)
│   │   ├── handlers.py   # Event handlers (mention, DM, reaction)
│   │   ├── context.py    # Thread/channel context building
│   │   ├── images.py     # Image extraction and upload
│   │   ├── progress.py   # Progress indicator formatting
│   │   └── slack_api.py  # Slack API utilities (retry, rate limits)
│   └── api/
│       ├── main.py       # FastAPI app
│       ├── security.py   # API key auth + rate limiting (slowapi)
│       ├── schemas.py    # Pydantic models
│       ├── tasks.py      # Background tasks + webhooks
│       └── task_repository.py # SQLite-based task persistence
├── middleware/
│   ├── guardrails/
│   │   ├── __init__.py   # Exports: GuardrailConfig, GuardrailViolation, GuardrailEnforcer
│   │   ├── core.py       # Generic guardrail framework (aggregates server rules)
│   │   └── enforcer.py   # Defense-in-depth for ALL tool types
│   ├── preprocessing/    # Request preprocessing
│   │   └── __init__.py   # preprocess_command(), re-exports from core
│   └── postprocessing/   # Response postprocessing (minimal)
├── tools/
│   ├── __init__.py       # get_custom_toolset() - custom tools only
│   ├── catalog.py        # ToolCatalog - unified tool source management
│   ├── registry.py       # @register_tool decorator, auto-registration
│   ├── mcp_registry.py   # MCPServerConfig, ServerGuardrailRules, register_mcp_server()
│   ├── mcp_client.py     # MCPManager class (with guardrails)
│   ├── mcp/              # MCP server definitions (register_mcp_server, gitignored)
│   └── custom/           # User-implemented tools (@register_tool, gitignored)
└── utils/
    ├── logging.py        # Structured JSON logging with request_id
    ├── observability.py  # Logfire integration (setup_logfire)
    ├── image_handler.py  # ImageData, extract_images_from_result()
    ├── slack_files.py    # Slack file download/upload utilities
    └── slack_formatter.py # Markdown → Slack mrkdwn conversion

Read the full file on GitHub · 904 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. 5d ago First seen · 904 lines · 7,557 tokens per session scan A 0a4d5e789586

Subscribe to this mod's changes

sidekick CLAUDE.md is an instructions file published in the GitHub repository lee-lou2/sidekick (2 stars, last pushed 7mo ago), licensed MIT. It adds 7,557 tokens to every session, about $0.0378 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.