01_claudemd_summarise — промпт для Claude Code
Промпт 01_claudemd_summarise для Claude Code сжимает CLAUDE.md в ровно 120 слов — один абзац без списков. Стандартизирует описание архитектуры проекта для контекста ИИ-ассистента.
MIT ★ 2 744 обновлён 2026-10-08
.claude/commands/01_claudemd_summarise.mdЧто делает 01_claudemd_summarise
Промпт работает в Claude Code и автоматически проверяет результат: текст должен быть ровно 120 слов, не больше и не меньше. Внутри встроена функция на Python, которая считает слова и отклоняет ответы, не попадающие в лимит.
Используется для унификации документации CLAUDE.md в проектах, где нужна компактная описание для контекста ИИ-ассистента. На входе берёт полный CLAUDE.md с архитектурой, пайпбайлдом, частыми ошибками и деплоем; на выходе — одна связная фраза без заголовков и маркеров.
Устанавливается как команда в папку .claude/commands/ и вызывается из Claude Code интерфейса.
Какие задачи решает
- сжать техдокументацию в стандартный формат для контекста агента
- унифицировать описание архитектуры микросервиса
- обеспечить жёсткий лимит на слова в саммари
Примеры запросов агенту
- Выполни
01_claudemd_summariseс содержимым моего CLAUDE.md - Используй промпт, чтобы получить ровно 120 слов из документации проекта
- Запусти команду и проверь, что результат прошёл счётчик слов
Как установить 01_claudemd_summarise
Вручную: положить файлы
.claude/commands/01_claudemd_summarise.mdКак использовать
Вставьте текст в начало диалога или в инструкции проекта
Вопросы о 01_claudemd_summarise
Как установить 01_claudemd_summarise в Claude Code?
Сохрани файл промпта по пути .claude/commands/01_claudemd_summarise.md в корне проекта. Claude Code автоматически найдёт и загрузит команду при следующем открытии проекта.
Что делает 01_claudemd_summarise?
Сжимает документацию CLAUDE.md в ровно 120 слов одним абзацем без заголовков и списков. Встроенная проверка на Python гарантирует, что результат не превышает и не недостаёт ни одного слова.
Почему ровно 120 слов?
Это стандартный объём для краткого контекста проекта, который ИИ-ассистент усваивает без потери информации. Жёсткий лимит помогает унифицировать описания микросервисов в системе.
Исходный текст
01_claudemd_summarise.md · MIT
---
name: claudemd_summarise
content_shape: prose-dense-claudemd
reference_tokens_per_char: 0.23
description: Summarise a CLAUDE.md-shaped doc in exactly 120 words.
---
[session-metrics:compare-suite:v2:prompt=claudemd_summarise]
Summarise the following project CLAUDE.md in EXACTLY 120 words. Do not write more or fewer. No headings, no lists — one continuous paragraph.
---
# Acme Billing Service — CLAUDE.md
## Overview
The Acme Billing Service is a Go-based microservice that handles invoice generation, payment reconciliation, and dunning workflows for roughly 40,000 active B2B customers. It runs on Kubernetes in three regions (us-east-1, eu-west-1, ap-southeast-2) with active-active multi-region Postgres via Aurora Global Database. Monthly GMV processed: ~$180M.
## Architecture highlights
- REST API on port 8080, gRPC on 9090 for internal services.
- Write path goes through a Kafka topic (`billing.events.v3`) with idempotency keys derived from `(tenant_id, external_ref, version)`.
- Read path is Postgres-backed with a write-through cache in Redis Cluster (6 nodes). Cache keys are namespaced by tenant and TTL'd at 5 minutes.
- All scheduled work runs via Temporal workflows — never plain cron. If you see a cron file, it's legacy and scheduled for removal.
## Common pitfalls
- **Idempotency is non-negotiable.** Every write endpoint must accept an `Idempotency-Key` header; duplicates return the original response with 200, never 409.
- **Tenant isolation is enforced at the DB layer** via row-level security. Do not bypass RLS even for admin tools — use the `billing_admin` role which has `SET ROW_SECURITY = on` enforced.
- **Don't add new top-level Kafka topics.** We're consolidating on `billing.events.v3`; add a discriminator column instead.
- **Reconciliation jobs must be idempotent and resumable.** Use Temporal's `ContinueAsNew` for long-running jobs.
## Testing
- Unit tests: `go test ./...` — must pass locally before PR.
- Integration tests: require `docker-compose up -d` for Postgres + Kafka + Redis + Temporal. Run with `make test-integration`.
- Contract tests against downstream services live under `tests/contracts/`; update them when the external shape changes, never on internal refactors.
- CI runs all three suites on every PR.
## Deployment
Canary rollout is 1% → 5% → 25% → 100% over 30 minutes per region, with SLO guards that auto-rollback on error-rate >0.5% or p99 latency >400ms for two consecutive 1-minute windows. Deploy via `./scripts/deploy.sh <env>`.
<!-- PREDICATE -->
````python
def check(text: str) -> bool:
# Strict word-count check — IFEval-style.
words = text.split()
return len(words) == 120
````
© centminmod · MIT · centminmod/my-claude-code-setup