본문으로 건너뛰기
cccskills
무료GitHub에 공개

sql-to-business-logic

Translate SQL queries into plain language business logic. Use when documenting queries, explaining analysis to non-technical stakeholders, code reviewing for correctness, or building a query catalog.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md2.5 KB
  • assets/query_documentation_template.md1.9 KB
  • references/sql_pattern_library.md3.5 KB
  • scripts/sql_explainer.py6.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

SQL to Business Logic Translator

When to use

  • A stakeholder asks "what exactly does this query calculate?"
  • Documenting a query library or a dbt model for non-technical readers
  • Reviewing a query for correctness by comparing its logic to the business requirement
  • Onboarding new analysts to existing SQL patterns
  • Translating legacy undocumented queries before refactoring

Process

  1. Receive the query and context — obtain the SQL and the business question it answers. Also collect any schema notes (what the key tables and columns represent in business terms).
  2. Translate the FROM/JOIN structure — describe in plain language which data sources are combined and what type of join is used (inner keeps only matches; left keeps all rows from the left side). Note if the join type seems inconsistent with the stated purpose.
  3. Translate WHERE filters — list each filter condition as a business rule in plain language (e.g., status = 'completed' → "only includes orders that have been paid and fulfilled").
  4. Explain GROUP BY and aggregations — describe what each aggregation computes and at what grain. Use scripts/sql_explainer.py to automate a first-pass structural parse.
  5. Summarise output columns — for each output column, state its business meaning and any edge cases (nulls, rounding, currency units).
  6. Flag issues and write validation questions — identify potential problems (implicit null propagation, unexpected fan-out, hardcoded dates). Generate 3–5 questions the query author should confirm. Use assets/query_documentation_template.md to record the full translation.

Inputs the skill needs

  • The complete SQL query (SELECT through ORDER BY)
  • The business question the query is intended to answer
  • Table and column descriptions (or a data catalog entry)
  • Any business rules for key status values, date handling, or currency
  • The intended output: who reads the result and for what decision

Output

  • scripts/sql_explainer.py — parses a SQL query and generates a structured plain-language explanation
  • assets/query_documentation_template.md — completed translation covering purpose, step-by-step logic, output columns, business rules, and validation questions
  • Optionally: a flowchart representation of the query logic

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Rigorous A/B test statistical analysis. Use when analyzing experiment results, calculating statistical significance, checking for sample ratio mismatch, or validating test design before launch.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

Track and document analytical assumptions and decisions. Use when making analytical choices, documenting trade-offs, ensuring transparency, or creating audit trails for analytical work.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

Structured, reproducible analysis documentation. Use when documenting analysis findings, creating analysis notebooks, ensuring reproducibility, or building analysis archives for future reference.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

Structure analysis approach before starting work. Use when receiving new analysis requests, breaking down complex questions into steps, or planning iterative analysis workflows.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

Pre-delivery quality assurance for analysis work. Use when reviewing analysis before sharing with stakeholders, checking for completeness, validating assumptions, or ensuring clarity of recommendations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

Post-analysis learning and process improvement. Use when completing major analysis projects, documenting lessons learned, or improving team analytical practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nimrodfisher/data-analytics-skills4822026년 9월 25일 업데이트

nimrodfisher의 스킬 모두 보기

이 스킬의 문제 신고