introspect
Skill22 starsChanged 5 months agoMITView on GitHub
Tier-1 live read-only introspection. Connects to the running database through a DB MCP server's read-class tools (preferred) or a least-privilege read-only connection string, reads catalogs only (no table data, no writes), and upgrades affected findings to confidence established. Enforces the read-only contract; when no live access is available it marks the dependent checks needs_api — never a silent pass. Invoked by db-orchestrator and the auditors when a check needs runtime truth.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- mhxie/Ateliertheir own version, first seen Oct 12, 2026
- jhlee0409/omni-harness-kittheir own version, first seen Jul 14, 2026
- lukehalley/introspecttheir own version, first seen Jul 5, 2026
- genomewalker/chittatheir own version, first seen Jan 12, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- mhxie/Atelier★ 5same name
- genomewalker/chitta★ 4same name
- jhlee0409/omni-harness-kit★ 2same name
- lukehalley/introspect★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- auditSkill
- checklistSkill
- db-antipatternsSkill
- db-concurrencySkill
- db-connection-poolingSkill
- db-constraintsSkill
- db-defaults-generatedSkill
- db-engine-selectionSkill
- db-index-hygieneSkill
- db-indexingSkill
- db-keysSkill
- db-migration-safetySkill
- db-multitenancySkill
- db-namingSkill
- db-normalizationSkill
- db-orchestratorSkill
- db-partitioning-shardingSkill
- db-platform-fitSkill
- db-query-patternsSkill
- db-referential-integritySkill
- db-replicas-viewsSkill
- db-security-accessSkill
- db-specialized-fitSkill
- db-storage-bloatSkill
- db-temporal-historySkill
- db-types-precisionSkill
- designSkill
- explainSkill
- fixSkill
- migrateSkill
- nextSkill
- scoreSkill
- seedSkill
- stack-detectSkill
- startSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Else a least-privilege read-only connection string: read from $DATABASE_URL in the environment — never echoed, never written into a finding.
- Very specific: line 20
only SELECT / EXPLAIN (no ANALYZE write side effects beyond plan) / catalog reads.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Copyright (c) 2026 Enrique Rocha (@soyenriquerocha) · tododeia.com · id er-f37b7121 -->introspect (Tier-1 — live read-only)
Tier 0 reads files. Many checks need runtime truth a file cannot give: real index usage, FK-without-index joins, table/row sizes, RLS state, extensions, engine version, autovacuum/wraparound state. introspect is the only path to that, and it is read-only by contract. See references/data-tiers.md.
Connection path (prefer MCP)
- DB MCP server (preferred) — cleaner permission boundary. Use only read-class tools whose names match
*query*/*read*/*list*/*describe*/*schema*. A generic write-capablequerytool is routed through the same read-only validator below; a PreToolUse hook onmcp__.*backs this up. List available tools first; never call a tool that mutates. - Else a least-privilege read-only connection string read from
$DATABASE_URLin the environment — never echoed, never written into a finding.redactSecrets()scrubs any credential that reaches a finding, report, or log. - Neither available → emit
status: needs_apion every dependent check with the reason and the minimal grant needed. Never silently pass and never fabricate row counts, sizes, or plans.
Read-only contract (enforced before any query)
SET default_transaction_read_only = on;- a bounded
statement_timeout(e.g.SET statement_timeout = '15s';). - only
SELECT/EXPLAIN(noANALYZEwrite side effects beyond plan) / catalog reads. Reject anything else.
Catalogs read (no row data)
- Postgres:
version(),information_schema,pg_catalog,pg_class,pg_index,pg_indexes,pg_constraint,pg_policies,pg_extension. Tier-2 addspg_stat_user_indexes/pg_stat_user_tables,pg_stat_statements,age(datfrozenxid). - MySQL/MariaDB:
information_schema(TABLES, STATISTICS, KEY_COLUMN_USAGE),SHOW ENGINE INNODB STATUS(read). - Mongo:
db.stats(),$indexStats,$collStats(Tier-2). - Cassandra:
system_schema,nodetool tablehistograms(Tier-2).
Effect on findings
A check answered with live evidence is upgraded to confidence: established and may therefore cap a score (e.g. confirmed int4/serial PK near exhaustion, TXID wraparound imminent, RLS off on a relied-on table). Without live access those same checks stay directional or become needs_api — they never cap on static signal alone. Every finding still conforms to schema/finding.schema.json; verification.reproduce references $DATABASE_URL, never a literal credential.
Output
Return the catalog facts the calling auditor needs (index inventory, RLS state, version, sizes) plus a clear note of which checks remain needs_api and why. Respond in the user's language (EN/ES).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

