production-python-ai skill
✓ 공식Production-grade Python and AI engineering standards. Use for ANY Python work — FastAPI services, LangChain/LangGraph agents, RAG pipelines, LLM API integrations, document processing, or data scripts — whether writing new code, reviewing, refactoring, or debugging. Enforces typed Pydantic boundaries, structured errors and logging, LLM call timeouts/retries/output validation, secret management, async correctness, and tested code.
- GitHub 스타
- 144
- 파일
- 1
- 마지막 커밋
- 2026년 11월 10일
- 라이선스
- MIT
- 허용된 도구
- —
production-python-ai skill은 무엇을 하나요?
production-python-ai은(는) agent skill입니다. Production-grade Python and AI engineering standards. Use for ANY Python work — FastAPI services, LangChain/LangGraph agents, RAG pipelines, LLM API integrations, document processing, or data scripts — whether writing new code, reviewing, refactoring, or debugging. Enforces typed Pydantic boundaries, structured errors and logging, LLM call timeouts/retries/output validation, secret management, async correctness, and tested code.
production-python-ai skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 production-python-ai skill 설치
/plugin marketplace add skillmds/SkillMD /plugin install code-security-review-pipeline@skillmd
Claude Code에 production-python-ai skill 설치
~/.claude/skills/production-python-ai/SKILL.md
$ npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards ~/.claude/skills/production-python-aiClaude Code (project)에 production-python-ai skill 설치
.claude/skills/production-python-ai/SKILL.md
$ npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards .claude/skills/production-python-aiCodex에 production-python-ai skill 설치
~/.agents/skills/production-python-ai/SKILL.md
$ npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards ~/.agents/skills/production-python-aiGemini CLI에 production-python-ai skill 설치
~/.gemini/skills/production-python-ai/SKILL.md
$ npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards ~/.gemini/skills/production-python-aiClaude.ai에 production-python-ai skill 설치
npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards production-python-ai && zip -r production-python-ai.zip production-python-ai # claude.ai → Customize → Skills → + → Create skill → Upload a skill → production-python-ai.zip
SKILL.md
GitHub에서 보기Production Python & AI Engineering Standards
Code quality baseline
- Type hints on every function signature. Pydantic v2 models at all I/O boundaries (API requests/responses, LLM outputs, file parsing results).
- Code must pass ruff and mypy. No print() — use the logging module with structured context.
- Config via pydantic-settings and environment variables. Never hardcode API keys, model names, or URLs. Magic numbers (chunk sizes, top_k, thresholds) live in a config object, not inline.
FastAPI
- async def for I/O-bound routes; never call blocking/sync I/O inside them.
- Shared clients (DB, HTTP, LLM SDKs) created once at startup and injected via Depends — never instantiated per request.
- response_model on every route. Correct status codes. Routes stay thin: validation in, service call, response out — business logic lives in service functions.
- Raise HTTPException with clear detail; map internal exceptions to safe client messages (never leak stack traces or keys).
LLM calls (any provider)
- Every call gets: explicit timeout, retry with exponential backoff on transient errors, and a max-retry cap.
- NEVER trust raw model output. Parse into a Pydantic schema; on validation failure, retry with the error fed back or fall through to an explicit failure path — never .get() blindly on un-validated JSON.
- Pin model versions in config. Prompts are versioned constants/templates in the repo, not inline f-strings scattered through code.
- Log per call: model, latency, input/output tokens, and a request/trace ID. Propagate the trace ID through every pipeline stage.
LangChain / LangGraph / RAG
- Prefer explicit LangGraph state (TypedDict/Pydantic) over implicit chains; every node validates what it reads from state.
- Handle tool errors inside the graph — a failed tool returns a structured error message to the model, it does not crash the run.
- RAG: chunking params, embedding model, and top_k come from config; embedding model version is pinned (changing it invalidates the index — say so in code comments).
- Use asyncio.gather for independent parallel LLM/tool calls; cap concurrency with a semaphore.
Errors & logging
- Catch specific exceptions only — no bare except. Either handle meaningfully or let it propagate; never swallow silently.
- Fail loud and early in pipelines: validate inputs at the start, not three stages deep.
- Logs are structured (key=value or JSON): event, trace_id, duration_ms, and outcome.
Testing
- pytest. Unit tests NEVER hit live LLM APIs — mock the client and test the parsing/validation/retry logic hard, including malformed model output.
- Bug fix = first a failing test that reproduces it, then the fix.
- For prompts: keep golden input/output examples and assert the parser handles them.
Before declaring done
- Run the code or tests — never claim it works without verification.
- Check: secrets out of code, types clean, errors handled, LLM outputs validated, logs in place.s
이 스킬의 파일
1production-python-ai skill 질문
Claude Code에 production-python-ai skill을 어떻게 설치하나요?
npx degit skillmds/SkillMD/plugins/code-security-review-pipeline/skills/ai-engineering-standards ~/.claude/skills/production-python-ai를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
production-python-ai skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.