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.
npx agentmods add agents/paulbreuler/limps/000-entity-schema-storagegit clone --depth 1 https://github.com/paulbreuler/limpsWrote 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.
[](https://agentmods.dev/agents/paulbreuler/limps/000-entity-schema-storage)<a href="https://agentmods.dev/agents/paulbreuler/limps/000-entity-schema-storage"><img src="https://agentmods.dev/badge/agents/paulbreuler/limps/000-entity-schema-storage.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01794 |
| Opus 5 | $0.00000 | $0.00897 |
| Sonnet 5 | $0.00000 | $0.00359 |
| Haiku 4.5 | $0.00000 | $0.00179 |
Grade A, and why
000-entity-schema-storage 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent 000: Entity Schema & Storage
Objective
Define entity and relationship types in TypeScript. Implement SQLite storage layer with efficient indexing.
Context
This is the foundation for the entire knowledge graph. All other agents depend on this schema being stable and well-designed.
Key principle: Schema should support deterministic queries (exact lookups) as well as graph traversal. No LLM reasoning happens at this layer.
Tasks
1. Define TypeScript Types (src/graph/types.ts)
export type EntityType = 'plan' | 'agent' | 'feature' | 'file' | 'tag' | 'concept';
export interface Entity {
id: number;
type: EntityType;
canonicalId: string; // e.g., "plan:0042", "agent:0042#003", "file:src/auth.ts"
name: string;
sourcePath?: string; // Original markdown file
contentHash?: string; // For change detection
metadata: Record<string, unknown>;
createdAt: string;
updatedAt: string;
}
export type RelationType =
| 'CONTAINS' // plan → agent, plan → feature
| 'DEPENDS_ON' // agent → agent
| 'MODIFIES' // agent → file
| 'IMPLEMENTS' // agent → feature
| 'SIMILAR_TO' // feature → feature (with confidence)
| 'BLOCKS' // derived: inverse of DEPENDS_ON
| 'TAGGED_WITH'; // entity → tag
export interface Relationship {
id: number;
sourceId: number;
targetId: number;
relationType: RelationType;
confidence: number; // 0-1, used for SIMILAR_TO
metadata: Record<string, unknown>;
createdAt: string;
}
export interface GraphStats {
entityCounts: Record<EntityType, number>;
relationCounts: Record<RelationType, number>;
totalEntities: number;
totalRelations: number;
lastIndexed: string;
}
2. SQLite Schema (src/graph/schema.ts)
export const SCHEMA_SQL = `
-- Entities table
CREATE TABLE IF NOT EXISTS entities (
id INTEGER PRIMARY KEY AUTOINCREMENT,
type TEXT NOT NULL CHECK(type IN ('plan', 'agent', 'feature', 'file', 'tag', 'concept')),
canonical_id TEXT NOT NULL,
name TEXT NOT NULL,
source_path TEXT,
content_hash TEXT,
metadata JSON DEFAULT '{}',
created_at TEXT DEFAULT (datetime('now')),
updated_at TEXT DEFAULT (datetime('now')),
UNIQUE(type, canonical_id)
);
-- Relationships table
CREATE TABLE IF NOT EXISTS relationships (
id INTEGER PRIMARY KEY AUTOINCREMENT,
source_id INTEGER NOT NULL REFERENCES entities(id) ON DELETE CASCADE,
target_id INTEGER NOT NULL REFERENCES entities(id) ON DELETE CASCADE,
relation_type TEXT NOT NULL,
confidence REAL DEFAULT 1.0,
metadata JSON DEFAULT '{}',
created_at TEXT DEFAULT (datetime('now')),
UNIQUE(source_id, target_id, relation_type)
);
-- Indexes for fast lookups
CREATE INDEX IF NOT EXISTS idx_entities_type ON entities(type);
CREATE INDEX IF NOT EXISTS idx_entities_canonical ON entities(canonical_id);
CREATE INDEX IF NOT EXISTS idx_entities_source ON entities(source_path);
CREATE INDEX IF NOT EXISTS idx_entities_hash ON entities(content_hash);
CREATE INDEX IF NOT EXISTS idx_rel_source ON relationships(source_id);
CREATE INDEX IF NOT EXISTS idx_rel_target ON relationships(target_id);
CREATE INDEX IF NOT EXISTS idx_rel_type ON relationships(relation_type);
-- Full-text search on entity names (for lexical retrieval)
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
canonical_id,
name,
content='entities',
content_rowid='id'
);
-- Triggers to keep FTS in sync
CREATE TRIGGER IF NOT EXISTS entities_ai AFTER INSERT ON entities BEGIN
INSERT INTO entities_fts(rowid, canonical_id, name) VALUES (new.id, new.canonical_id, new.name);
END;
CREATE TRIGGER IF NOT EXISTS entities_ad AFTER DELETE ON entities BEGIN
INSERT INTO entities_fts(entities_fts, rowid, canonical_id, name) VALUES('delete', old.id, old.canonical_id, old.name);
END;
CREATE TRIGGER IF NOT EXISTS entities_au AFTER UPDATE ON entities BEGIN
INSERT INTO entities_fts(entities_fts, rowid, canonical_id, name) VALUES('delete', old.id, old.canonical_id, old.name);
INSERT INTO entities_fts(rowid, canonical_id, name) VALUES (new.id, new.canonical_id, new.name);
END;
-- Graph metadata table
CREATE TABLE IF NOT EXISTS graph_meta (
key TEXT PRIMARY KEY,
value TEXT,
updated_at TEXT DEFAULT (datetime('now'))
);
`;
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.
- 4d ago First seen · 248 lines · 0 tokens per session scan A 3500f0b0d536
000-entity-schema-storage is an agent published in the GitHub repository paulbreuler/limps (10 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,794 tokens. 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-31.
Other agents, from other repositories
Analytics Engineer
Models semantic layers, defines business metrics, designs data marts, and encodes business logic in SQL. Invoke with $ae.
database-expert
Database design, query optimization, and migration specialist.
database
Schema design, migrations, indexing, and query performance across SQL and document stores.
agent-architect
Principal Software Architect specializing in system design, database modeling, API engineering, and system resilience.
crdb-metric-reviewer
Reviews CockroachDB code changes for metric hygiene: static label opportunities, naming conventions, and correct use of the labeling API. Use when a diff adds or modifies metric.Metadata definitions.
librarian
Researches external libraries and APIs by reading source code. Returns definitive, source-verified answers.