← ClaudeAtlas

pythia-writelisted

Use when writing or modifying PL/SQL source - a procedure, function, package, trigger, or view - after impact is known and the spec is settled (open decisions go through pythia-spec first). The codebase's conventions already exist; copy them instead of inventing style, and anchor every type to the database's reality.
thaildhe172591/pythia · ★ 4 · AI & Automation · score 77
Install: claude install-skill thaildhe172591/pythia
# Writing PL/SQL **Announce at start:** "Using pythia-write — mining the codebase's conventions first." **Phase:** Learn → Do — mine the neighbours first, then draft; landing it is pythia-apply's job **Before anything:** if the project has `.pythia/conventions.md`, read it — house rules there outrank every generic pattern below, and `pythia conventions` shows the naming patterns the apply preview will check. If the project has none and the developer describes a house style, offer `pythia conventions --init` — captured once, it applies to every future session instead of being re-explained. A codebase with thousands of procedures has already decided how procedures look. Your job is to write one that a maintainer cannot tell from the existing ones — not to introduce a better style. ## The Workflow 1. **Find the models.** `pythia similar <NEW_NAME>` ranks existing programs sharing name tokens; the `MATCHED_TOKENS` column says why. Open the top two or three with `pythia src` and imitate: naming, parameter prefixes, cursor style, error handling, comment style. 2. **Anchor the signatures.** For every program you call: `pythia args NAME` — real parameter names, order, types, defaults. Never guess a signature from memory of similar code. 3. **Anchor the types.** For every table you touch: `pythia cols TABLE` — then declare variables with `%TYPE` / `%ROWTYPE` against those columns instead of copying the current type by hand. The declaration then survives c