DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to index PostgreSQL or MySQL table structures next to the code with Aoci Code

Add a table-level database index so the agent sees both code and schema before it changes either.

Credentials. The database connection string must be provided through an environment variable in the host, and the database user should have only the read access needed for catalog metadata.

Who it is forA developer whose application logic depends heavily on database tables and who wants the agent to understand the schema before writing queries or migrations.

The problemAn agent that reads only code can miss table relationships and constraints, which leads to queries or changes that break the data model.

The outcomeA separate table-level index (aoci.database.txt) built from catalog metadata, delivered together with the code index.

What you need first

  • A verified AOCI-CODE release package for your operating system and CPU, or a checkout of the canonical source repository (source builds also need the Go toolchain declared by go.mod and make)
  • A supported MCP host such as Codex, Claude Code, Cursor, or OpenCode
  • Normal read and write access to the target repository
  • For database indexing: a PostgreSQL or MySQL 5.7.6+ database (or openGauss 6.0.5 with constraints) and a connection-string environment variable set in the host environment

Steps

  1. Finish the code index first, since the README recommends building it before the database index.
  2. Declare the database source as described under Database Cognition in the AOCI-CODE README.
  3. Set the connection-string environment variable in the host environment. AOCI stores no credentials and references them only by variable name.
  4. Send the instruction: "Build the AOCI database index for this project."

Prompt for your agent

In the repo <project-path>, using the declared PostgreSQL or MySQL source and its connection-string environment variable, build the AOCI database index. Confirm that aoci.database.txt was written and that no credential value appears in any AOCI file.

Caveat. MariaDB is not supported, and MySQL must be 5.7.6 or later.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page