agent-harness-design
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
Decide whether the system will hold, and where the data lives: requirements and load first, then back-of-the-envelope numbers, building blocks (cache, queue, load balancer, CDN), and the data layer in depth — storage engines, indexes, replication, partitioning, transactions and
$ npx -y skills add AnastasiyaW/codex-claude-code-config --skill system-and-data-design --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/system-and-data-designContext preview
The summary Claude sees to decide when to auto-load this skill.
Decide whether the system will hold, and where the data lives: requirements and load first, then back-of-the-envelope numbers, building blocks (cache, queue, load balancer, CDN), and the data layer in depth — storage engines, indexes, replication, partitioning, transactions and
name: system-and-data-design description: > Decide whether the system will hold, and where the data lives: requirements and load first, then back-of-the-envelope numbers, building blocks (cache, queue, load balancer, CDN), and the data layer in depth — storage engines, indexes, replication, partitioning, transactions and consistency, batch vs stream. Use when sizing or scaling anything; choosing a database, cache, queue or index; when asked "will this hold", "how many machines", "which database", "do we need a queue", "read replica", "sharding", "eventual consistency", "why is this query slow at scale"; when designing an ingestion or processing pipeline; or when a service is slow under load rather than wrong. Do NOT use for module layout, dependency direction or domain boundaries (use architecture-first), for function- and naming-level quality (use code-complexity), for restructuring code that is already too large (use refactoring-safely), or for a low-traffic internal tool where the honest answer is one process and one database.
Two questions that are usually asked together and answered separately, badly. Capacity without storage internals gives a diagram that cannot be built; storage internals without capacity gives a database choice with no reason behind it.
The most common failure here is answering at the wrong scale.
| Situation | Honest answer | |---|---| | Internal tool, tens of users | One process, one database, no cache. Stop. | | Product with real traffic, single region | Estimate first; add a cache and a queue only where the numbers say | | Multi-region, or data outgrowing one machine | Full pass: estimation → building blocks → replication/partitioning → consistency |
Adding a cache before measuring is the canonical way to convert one problem into two.
read:write ratio, acceptable latency, acceptable staleness, retention.
"Acceptable staleness" is the single most useful number and the one nobody asks for. It decides caching, replication and consistency all at once.
Estimate storage/day, bandwidth at peak, QPS, and working-set size. The point is not precision; it is discovering that the answer is "one machine" or "this cannot work as described" before drawing anything.
Anchors worth remembering: memory reads are ~100ns, SSD ~100µs, a same-region round trip ~0.5ms, cross-continent ~150ms. Anything crossing a network is ~1000× a memory access — which is why one N+1 query pattern outweighs most micro-optimisation.
| Block | Add it when | Cost you accept | |---|---|---| | Cache | Read-heavy, tolerable staleness, measured hot set | Invalidation becomes your problem | | Queue | Work can be async; spikes must be absorbed | Ordering, retries, duplicate delivery | | Read replica | Reads dominate; stale reads acceptable | Replication lag becomes visible to users | | Partitioning | One machine cannot hold data or throughput | Cross-partition queries and transactions get hard | | CDN | Static or cacheable content, geographically spread | Purge and versioning discipline |
Each row is a trade, not an upgrade. A block added without its reason written down is a future mystery.
predictable reads and in-place updates. Choose by the workload's read:write shape, not by brand.
uses is pure cost.
and leaderless buy availability and pay in conflict resolution you must then design.
and unbounded partitions are the two failures; both are visible in a histogram before they are visible in production.
prevent lost updates; "we use transactions" is not a consistency argument.
Streams that cannot be replayed lose the ability to fix a bug retroactively.
`building-blocks.md`, `database-scaling.md`, `common-designs.md`, `reliability-operations.md`
`partitioning.md`, `transactions.md`, `batch-stream.md`, `fault-tolerance.md`
never. Estimate first; the estimate frequently says "one machine".
query, then decide about the cache.
makes some reads stale. Decide which reads may be stale, and say so.
A practical configuration kit for Claude Code, Codex, and other coding agents. It contains architectural principles, enforcement hooks, skills, drop-in rules, starter templates, and dynamic-workflow commands.
Designing agent harnesses and tool systems — risk taxonomy for tools, permission decisions, draft/commit pattern, structured tool…
Use when designing, auditing, refactoring, or explaining an agentic harness for any domain, especially when work must continue…
Практическая инженерия диффузионных моделей: архитектуры, обучение, инференс, оптимизация памяти. Использовать при любых задачах…
Expert prompt engineering for FLUX.2 [klein] image generation and editing model. Use this skill whenever the user wants to create…
Plan or review LoRA and edit-training work specifically for FLUX.2 Klein or Qwen-Image-Edit, including paired datasets,…
Forensic image-to-prompt compiler for image generation models. Use this skill whenever the user wants to: convert/describe an…