thaildhe172591/pythia

pythia-write

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

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/thaildhe172591/pythia --skill pythia-write

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

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.

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

  1. 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 column changes.

  1. Write the file. Rules the write path enforces — follow them here:
  • One object per file. Package spec and body are two files.
  • End the file with the PL/SQL block's ; and a final line holding /.
  • Name the object unqualified, or qualified with the exact schema the

connection targets — a mismatch is refused at apply time.

  • Non-ASCII string literals (Vietnamese messages, any accented text):

never paste raw — run pythia unistr "<text>" and use the printed unistr('...'), so the text survives every client/DB charset exactly. (COMMENT ON ... IS is the exception: it takes a literal only.)

  1. Check yourself before handing off. pythia lint <file> first — the

built-in standards plus the LEAD's rules; errors are fixed before the preview. Then reread against reference/patterns.md — cursor and bulk patterns, exception discipline, bind variables, commit ownership. Every comment you wrote or touched goes through pythia-comment.

Scope is the developer's sentence, not yours

Change ONLY the objects the developer named. When impact shows dependents that will break, you REPORT them with the list and a proposal — fixing them is a separate request that needs its own explicit approval. "While I was there" is how an asked-for table edit becomes seven unasked procedure rewrites.

Conventions outrank preferences

If the codebase writes explicit cursors where you would write FOR r IN, write explicit cursors. If its parameter prefixes look dated, use them anyway. A mixed-style codebase is worse than a consistently dated one — propose style changes to the developer separately, never silently.

When NOT to use this skill

  • A new package, API or trigger design → pythia-package shapes it first.
  • Tables, columns, comments → pythia-table.
  • Understanding existing code → pythia-explore.
  • Measuring what a change breaks → pythia-impact (must already be done).
  • Landing the file on the database → pythia-apply, always — never

run-sql, never sqlplus.

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
thaildhe172591
커뮤니티

pythia-apply

Use when a PL/SQL change is ready to reach the database - applying a CREATE OR REPLACE, restoring from the journal, or any other write. Runs the six-step flow through pythia apply and enforces the gate - the developer sees the preview and approves in chat before anything is written, and a broken result is never reported as success.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-comment

Use when you are about to write or edit a comment in PL/SQL you are changing, or in a .sql deliverable headed for the database. One line, one fixed shape, and anything longer goes where it belongs instead. It fires on the act of commenting rather than on a request - catching yourself opening a second comment line above one statement is the trigger.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-deploy

Use when a change spans more than one statement or file - a release or migration script, "chay script DDL", "deploy ban release", "run these .sql files", a table with its comments and indexes, a package spec and body together, a directory of numbered scripts. Orders the statements, previews every one, gets one approval for the set, runs them through apply's six steps in order and stops at the first failure.

설치 수
2
GitHub Stars
4
업데이트
10월 16일
thaildhe172591
커뮤니티

pythia-impact

Use before proposing or writing any change to an Oracle object - a procedure, package, function, trigger, view, or table. Impact analysis comes first, because what depends on an object decides how careful the change must be, and Oracle invalidates dependents in cascade.

설치 수
2
GitHub Stars
4
업데이트
10월 16일