setup

A skill for setting up memex, a searchable knowledge system backed by PostgreSQL, a database that can store structured data and vector search data. It provisions the database, adds agent instructions, imports content, and checks that search works.

In plain words
What is it for?
Use it to provision or connect the database, inject the brain-first lookup instructions, configure live indexing, import initial content, and run health checks.
Why use it?
It turns an existing PostgreSQL connection into a working, searchable knowledge base and verifies the setup instead of leaving configuration untested.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/timurgaleev/memex/setup
Any agent
npx skills add timurgaleev/memex --skill setup
Clone the repo
git clone --depth 1 https://github.com/timurgaleev/memex

Made for: Claude Code, Codex.

Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,232 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00025 $0.05232
Opus 5 $0.00013 $0.02616
Sonnet 5 $0.00005 $0.01046
Haiku 4.5 $0.00003 $0.00523

Measured 2d ago against content hash c0624a3c1fc9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup 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.

deploy/skills/setup/SKILL.md · 513 lines

How it starts

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

Setup memex

Set up memex from scratch. Target: working brain in under 5 minutes on an existing Postgres; under 30 including infrastructure provisioning.

Contract

  • Setup completes with a working brain verified by memex doctor --json (all checks OK).
  • The brain-first lookup protocol is injected into the project's AGENTS.md or equivalent.
  • Live indexing is configured and verified (a test change indexed and found via search).
  • Setup choices are tracked on the tasks/setup-state brain page so future upgrades know what the user adopted or declined.
  • No provider API keys are requested; memex uses AWS Bedrock exclusively (Titan for embeddings, Claude Haiku for utility calls, Claude Sonnet for synthesis-tier work), authenticated via IAM.

Install (if not already installed)

Clone the repo on the host, then:

bun install
scripts/init.sh          # interactive: secrets prefix, region, connection string

How memex connects

memex connects directly to Postgres over the wire protocol. You need the database connection string (a postgresql:// URI), not a dashboard URL or REST key. The password is embedded in the connection string.

The connection string lives in AWS Secrets Manager under <secrets_prefix>/memex-postgres-url (default prefix: memex). Two gotchas:

  • The secret is a parsed URL: a password containing ?#&:=+% must be URL-encoded before upload, or the parse silently mangles it.
  • Confirm the region: the instance and the RDS endpoint must agree, and Bedrock must be invocable in that region. A mismatched default region is the most common "everything times out" cause.

Do NOT ask for any model-provider API key. memex uses Bedrock via the host's IAM role; there is nothing to paste.

Why managed Postgres

RDS gives you managed Postgres + pgvector (vector search built in):

  • No server to manage, automatic backups, snapshots for debugging
  • pgvector pre-installed on current engine versions, just works
  • Alternative: any Postgres with the pgvector extension (self-hosted, Neon, Railway, etc.) — memex only needs the connection string

Read the full file on GitHub · 513 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. 2d ago First seen · 513 lines · 25 tokens per session scan A c0624a3c1fc9

Subscribe to this mod's changes

setup is a skill published in the GitHub repository timurgaleev/memex (8 stars, last pushed 7d ago), licensed MIT. It adds 25 tokens to every session and 5,232 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

wegent-knowledge

Knowledge base management and search tools for Wegent. Provides capabilities to list, create, update, and search knowledge bases and documents using RAG retrieval. Use this skill when the user wants to manage knowledge bases, documents, or search for information programmatically.

wecode-ai/Wegent · 51 tokens

design-mcp-server

Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.

cyanheads/obsidian-mcp-server · 62 tokens

api-linter

MCP definition linter rules reference. Use when bun run lint:mcp or bun run devcheck reports a lint error or warning (format-parity, schema-is-object, name-format, server-json-, etc.) and you need to understand the rule, its severity, and how to fix it. Every rule ID the linter emits has an entry in this doc.

cyanheads/obsidian-mcp-server · 86 tokens

api-canvas

DataCanvas primitive reference — a Tier 3 SQL/analytical workspace for tabular MCP servers, backed by DuckDB. Use when registering tables from upstream APIs, running ad-hoc SQL across them, and exporting results. Covers the acquire → register → query → export flow, per-table TTL, the token-sharing pattern for…

cyanheads/obsidian-mcp-server · 85 tokens

api-errors

McpError constructor, JsonRpcErrorCode reference, and error handling patterns for @cyanheads/mcp-ts-core. Use when looking up error codes, understanding where errors should be thrown vs. caught, or using ErrorHandler.tryCatch in services.

cyanheads/obsidian-mcp-server · 54 tokens

field-test

Exercise tools, resources, and prompts against a live HTTP server via MCP JSON-RPC over curl. Starts the server, surfaces the catalog, runs real and adversarial inputs, and produces a tight report with concrete findings and numbered follow-up options. Use after adding or modifying definitions, or when the user asks to…

cyanheads/obsidian-mcp-server · 76 tokens