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 skills/macromania/agentop/database-drizzlenpx skills add macromania/agentop --skill database-drizzlegit clone --depth 1 https://github.com/macromania/agentopWhat 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.00078 | $0.03898 |
| Opus 5 | $0.00039 | $0.01949 |
| Sonnet 5 | $0.00016 | $0.00780 |
| Haiku 4.5 | $0.00008 | $0.00390 |
Grade A, and why
database-drizzle 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 2d 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 — 543 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SQLite + Drizzle ORM Database Layer
Type-safe database operations with better-sqlite3 and Drizzle ORM, optimized for Electron desktop applications.
When to Use This Skill
- Designing SQLite database schemas
- Implementing type-safe database queries
- Setting up database connections with WAL mode
- Creating and running migrations
- Implementing closure tables for hierarchical data
- Managing database lifecycle in Electron
Database Setup
Connection Manager
// packages/shared/src/database/connection.ts
import Database from 'better-sqlite3';
import { drizzle } from 'drizzle-orm/better-sqlite3';
import * as schema from './schema';
import path from 'path';
import { app } from 'electron';
let db: ReturnType<typeof drizzle> | null = null;
let sqlite: Database.Database | null = null;
export function initDatabase() {
const dbPath = path.join(app.getPath('userData'), 'agentop.db');
sqlite = new Database(dbPath);
// Enable WAL mode for better concurrency
sqlite.pragma('journal_mode = WAL');
sqlite.pragma('synchronous = NORMAL');
sqlite.pragma('foreign_keys = ON');
sqlite.pragma('busy_timeout = 5000');
db = drizzle(sqlite, { schema });
return db;
}
export function getDatabase() {
if (!db) {
throw new Error('Database not initialized. Call initDatabase() first.');
}
return db;
}
export function closeDatabase() {
if (sqlite) {
sqlite.close();
sqlite = null;
db = null;
}
}
Schema Definition
Tables with Drizzle
// packages/shared/src/database/schema.ts
import { sqliteTable, text, integer, real } from 'drizzle-orm/sqlite-core';
import { relations } from 'drizzle-orm';
// Tasks table
export const tasks = sqliteTable('tasks', {
id: text('id').primaryKey(),
title: text('title').notNull(),
description: text('description'),
status: text('status', {
enum: ['pending', 'active', 'completed', 'failed']
}).default('pending'),
parentId: text('parent_id').references(() => tasks.id),
attentionType: text('attention_type', {
enum: ['supervised', 'delegated', 'sensitive']
}).default('supervised'),
orderIndex: real('order_index').notNull().default(0.5),
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull(),
});
// Closure table for efficient hierarchy queries
export const taskClosure = sqliteTable('task_closure', {
ancestorId: text('ancestor_id').notNull().references(() => tasks.id),
descendantId: text('descendant_id').notNull().references(() => tasks.id),
depth: integer('depth').notNull(),
}, (table) => ({
pk: primaryKey({ columns: [table.ancestorId, table.descendantId] }),
}));
// Outcomes table
export const outcomes = sqliteTable('outcomes', {
id: text('id').primaryKey(),
taskId: text('task_id').notNull().references(() => tasks.id),
title: text('title').notNull(),
summary: text('summary'),
status: text('status', {
enum: ['pending', 'running', 'completed', 'failed']
}).default('pending'),
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),
updatedAt: integer('updated_at', { mode: 'timestamp' }).notNull(),
});
// Agent sessions table
export const agentSessions = sqliteTable('agent_sessions', {
id: text('id').primaryKey(),
outcomeId: text('outcome_id').notNull().references(() => outcomes.id),
provider: text('provider', {
enum: ['copilot', 'anthropic', 'openai']
}).notNull(),
status: text('status', {
enum: ['idle', 'running', 'paused', 'completed', 'error']
}).default('idle'),
startedAt: integer('started_at', { mode: 'timestamp' }),
completedAt: integer('completed_at', { mode: 'timestamp' }),
});
// Agent steps (mind map nodes)
export const agentSteps = sqliteTable('agent_steps', {
id: text('id').primaryKey(),
sessionId: text('session_id').notNull().references(() => agentSessions.id),
parentStepId: text('parent_step_id').references(() => agentSteps.id),
type: text('type', {
enum: ['thinking', 'tool_call', 'tool_result', 'decision_point', 'output']
}).notNull(),
content: text('content', { mode: 'json' }).notNull(),
status: text('status', {
enum: ['pending', 'running', 'completed', 'error']
}).default('pending'),
positionX: real('position_x'),
positionY: real('position_y'),
createdAt: integer('created_at', { mode: 'timestamp' }).notNull(),
});
// Decision points
export const decisionPoints = sqliteTable('decision_points', {
id: text('id').primaryKey(),
stepId: text('step_id').notNull().references(() => agentSteps.id).unique(),
confidence: text('confidence', {
enum: ['high', 'medium', 'low']
}).notNull(),
options: text('options', { mode: 'json' }).notNull(),
tradeOffs: text('trade_offs', { mode: 'json' }),
suggestedQuestions: text('suggested_questions', { mode: 'json' }),
resolution: text('resolution', {
enum: ['approved', 'rejected', 'cancelled']
}),
resolvedOption: text('resolved_option'),
resolvedAt: integer('resolved_at', { mode: 'timestamp' }),
});
// Event log for replay
export const eventLog = sqliteTable('event_log', {
id: integer('id').primaryKey({ autoIncrement: true }),
sessionId: text('session_id').references(() => agentSessions.id),
eventType: text('event_type').notNull(),
payload: text('payload', { mode: 'json' }).notNull(),
timestamp: integer('timestamp', { mode: 'timestamp' }).notNull(),
});
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.
- 2d ago First seen · 543 lines · 78 tokens per session scan A 9561b2b056df
database-drizzle is a skill published in the GitHub repository macromania/agentop (10 stars, last pushed 5mo ago), licensed MIT. It adds 78 tokens to every session and 3,898 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-31.
Other skills, from other repositories
aatmf-t10-confidentiality-breach
AATMF T10 — Integrity & Confidentiality Breach. System prompt extraction, training-data extraction, model-weight leakage, private-key recovery.
publish-registry
Publish @agentos-software/ registry packages from AgentOS. Use whenever the user asks to publish or release registry software/agent packages.
mochi-remind
Handle due reminders — notify the user with natural language and mark them done.
memory
Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.
lazarus-group
Adversary-emulation profile for Lazarus Group (G0032, aka Hidden Cobra / Diamond Sleet / Labyrinth Chollima), a North Korean RGB-linked actor conducting espionage, destructive, and financially motivated operations.
sidewinder-rattlesnake
Adversary-emulation profile for SideWinder (G0121 / Rattlesnake / T-APT-04 / Razor Tiger), India's suspected state-sponsored cyber-espionage actor.