CachiBot: Skill for Claude Code

.claude/skills/cachibot-full-stack-entity/SKILL.md

cachibot-full-stack-entity is a skill for Claude Code from jhd3197/CachiBot. It costs 84 tokens per session (2,859 once invoked), scanned A, original, MIT.

A workflow for adding one persistent data entity across a full application stack. A full-stack entity includes its database table, backend CRUD code, API routes, frontend types, API client, and Zustand state store.

In plain words
What is it for?
Use it when adding resources such as bookmarks or reminders to CachiBot and connecting storage, backend endpoints, and frontend state.
Why use it?
It prevents one layer from being added while the other layers are forgotten or wired inconsistently.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { YourEntity, YourEntityCreate, YourEntityUpdate } from '../types'.

Reuse

Borrowing it

Nothing to install: this file belongs to jhd3197/CachiBot. 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/jhd3197/CachiBot/main/.claude/skills/cachibot-full-stack-entity/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/jhd3197/CachiBot

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 cachibot-full-stack-entity

README.md
[![agentmods](https://agentmods.dev/badge/skills/jhd3197/cachibot/cachibot-full-stack-entity.svg)](https://agentmods.dev/skills/jhd3197/cachibot/cachibot-full-stack-entity)
Your own site
<a href="https://agentmods.dev/skills/jhd3197/cachibot/cachibot-full-stack-entity"><img src="https://agentmods.dev/badge/skills/jhd3197/cachibot/cachibot-full-stack-entity.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,859 The whole file, excluding the scripts and references it only reads on demand.
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.00084 $0.02859
Opus 5 $0.00042 $0.01430
Sonnet 5 $0.00017 $0.00572
Haiku 4.5 $0.00008 $0.00286

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

Security

Grade A, and why

cachibot-full-stack-entity 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/skills/cachibot-full-stack-entity/SKILL.md · 400 lines

How it starts

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

CachiBot Full-Stack Entity

Add a new persistent data entity across all layers: database, repository, models, API, frontend types, API client, and Zustand store.

Layer Overview

Database (SQLite)
  └── Repository (async CRUD)
      └── Pydantic Models (request/response schemas)
          └── API Routes (FastAPI endpoints)
              └── Frontend Types (TypeScript interfaces)
                  └── API Client (fetch functions)
                      └── Zustand Store (state management)

Step 1: Database Table

Edit cachibot/storage/database.py — add to the init_db() CREATE TABLE block:

-- Your entities
CREATE TABLE IF NOT EXISTS your_entities (
    id TEXT PRIMARY KEY,
    bot_id TEXT NOT NULL,
    title TEXT NOT NULL,
    description TEXT,
    status TEXT DEFAULT 'active',
    metadata TEXT DEFAULT '{}',
    created_at TEXT NOT NULL,
    updated_at TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_your_entities_bot ON your_entities(bot_id);
CREATE INDEX IF NOT EXISTS idx_your_entities_status ON your_entities(status);

Conventions:

  • Table name: snake_case, plural
  • Always include id TEXT PRIMARY KEY
  • Bot-scoped entities always have bot_id TEXT NOT NULL with an index
  • Timestamps as ISO 8601 TEXT: created_at, updated_at
  • JSON fields stored as TEXT with DEFAULT '{}' or DEFAULT '[]'
  • Foreign keys with ON DELETE CASCADE or ON DELETE SET NULL

If adding columns to an existing table, add a migration at the end of init_db():

migrations = [
    # ... existing migrations ...
    "ALTER TABLE your_entities ADD COLUMN new_column TEXT",
]

Step 2: Repository

Add to cachibot/storage/repository.py (or create a new repo file):

class YourEntityRepository:
    """CRUD operations for your_entities table."""

    async def get_by_bot(self, bot_id: str) -> list[dict]:
        db = await get_db()
        async with db.execute(
            "SELECT * FROM your_entities WHERE bot_id = ? ORDER BY created_at DESC",
            (bot_id,),
        ) as cursor:
            rows = await cursor.fetchall()
        return [dict(row) for row in rows]

    async def get_by_id(self, entity_id: str) -> dict | None:
        db = await get_db()
        async with db.execute(
            "SELECT * FROM your_entities WHERE id = ?",
            (entity_id,),
        ) as cursor:
            row = await cursor.fetchone()
        return dict(row) if row else None

    async def save(self, entity: dict) -> None:
        db = await get_db()
        await db.execute(
            """INSERT OR REPLACE INTO your_entities
               (id, bot_id, title, description, status, metadata, created_at, updated_at)
               VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
            (
                entity["id"],
                entity["bot_id"],
                entity["title"],
                entity.get("description", ""),
                entity.get("status", "active"),
                entity.get("metadata", "{}"),
                entity["created_at"],
                entity["updated_at"],
            ),
        )
        await db.commit()

    async def update(self, entity_id: str, updates: dict) -> None:
        db = await get_db()
        set_clauses = ", ".join(f"{k} = ?" for k in updates)
        values = list(updates.values()) + [entity_id]
        await db.execute(
            f"UPDATE your_entities SET {set_clauses} WHERE id = ?",
            values,
        )
        await db.commit()

    async def delete(self, entity_id: str) -> None:
        db = await get_db()
        await db.execute("DELETE FROM your_entities WHERE id = ?", (entity_id,))
        await db.commit()

Read the full file on GitHub · 400 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 · 400 lines · 84 tokens per session scan A 6e0dc44e0027

Subscribe to this mod's changes

cachibot-full-stack-entity is a skill published in the GitHub repository jhd3197/CachiBot (19 stars, last pushed 6mo ago), licensed MIT. It adds 84 tokens to every session and 2,859 once invoked, about $0.0004 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 skills, from other repositories

ai-persistence/build-drizzle-adapter

Use when an app already runs Drizzle ORM and needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its existing db handle, schema file, and drizzle-kit journal. Covers the four tables (SQLite/Postgres/MySQL), the onConflict idempotency rules, JSON columns, and per-request bindings like…

TanStack/ai · 79 tokens

ai-persistence/build-prisma-adapter

Use when an app already runs Prisma and needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its existing PrismaClient and schema.prisma. Covers the four models, BigInt timestamps, JSON-as-string columns, upsert-with-empty-update idempotency, and model renaming.

TanStack/ai · 71 tokens

ai-persistence/stores

Implement the MessageStore, RunStore, InterruptStore, MetadataStore contracts for @tanstack/ai-persistence against any database. defineAIPersistence, composePersistence overrides, critical invariants (full-replace saveThread, insert-if-absent createOrResume and interrupt create), authorize thread access…

TanStack/ai · 93 tokens

supabase-sdk-patterns

Apply production-ready Supabase SDK patterns for TypeScript and Python projects.

CoWork-OS/CoWork-OS · 20 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens

convex-explain-app

Explain an existing Convex app — data model + relationships, public vs internal functions, auth/ownership model, components, a request→data flow — read from the schema and function surface. Read-only.

openclaw/clawhub · 47 tokens