Model Registry
Skill Profile
(Select at least one profile to enable specific modules)
Overview
An AI Model Registry is a central repository used by data scientists and ML engineers to store, manage, and version machine learning models. It acts as the "source of truth" for models, tracking everything from hyperparameters to production status.
Core Principle: "Models are software artifacts. They must be versioned, audited, and controlled with the same rigor as source code."
Why This Matters
Core Concepts & Rules
1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
Inputs / Outputs / Contracts
- Inputs:
- <e.g., env vars, request payload, file paths, schema>
- Entry Conditions:
- <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>
- Outputs:
- <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>
- Artifacts Required (Deliverables):
- <e.g., Code Diff, Unit Tests, Migration Script, API Docs>
- Acceptance Evidence:
- <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>
- Success Criteria:
- <e.g., p95 < 300ms, coverage ≥ 80%>
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Quick Start / Implementation Example
- Review requirements and constraints
- Set up development environment
- Implement core functionality following patterns
- Write tests for critical paths
- Run tests and fix issues
- Document any deviations or decisions
# Example implementation following best practices
def example_function():
# Your implementation here
pass
Assumptions / Constraints / Non-goals
- Assumptions:
- Development environment is properly configured
- Required dependencies are available
- Team has basic understanding of domain
- Constraints:
- Must follow existing codebase conventions
- Time and resource limitations
- Compatibility requirements
- Non-goals:
- This skill does not cover edge cases outside scope
- Not a replacement for formal training
Compatibility & Prerequisites
- Supported Versions:
- Python 3.8+
- Node.js 16+
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Required AI Tools:
- Code editor (VS Code recommended)
- Testing framework appropriate for language
- Version control (Git)
- Dependencies:
- Language-specific package manager
- Build tools
- Testing libraries
- Environment Setup:
.env.example keys: API_KEY, DATABASE_URL (no values)
Test Scenario Matrix (QA Strategy)
| Type |
Focus Area |
Required Scenarios / Mocks |
| Unit |
Core Logic |
Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |
| Integration |
DB / API |
All external API calls or database connections must be mocked during unit tests |
| E2E |
User Journey |
Critical user flows to test |
| Performance |
Latency / Load |
Benchmark requirements |
| Security |
Vuln / Auth |
SAST/DAST or dependency audit |
| Frontend |
UX / A11y |
Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |
Technical Guardrails & Security Threat Model
1. Security & Privacy (Threat Model)
- Top Threats: Injection attacks, authentication bypass, data exposure
2. Performance & Resources
3. Architecture & Scalability
4. Observability & Reliability
Agent Directives & Error Recovery
(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)
- Thinking Process: Analyze root cause before fixing. Do not brute-force.
- Fallback Strategy: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- Self-Review: Check against Guardrails & Anti-patterns before finalizing.
- Output Constraints: Output ONLY the modified code block. Do not explain unless asked.
Definition of Done (DoD) Checklist
Anti-patterns / Pitfalls
- ⛔ Don't: Log PII, catch-all exception, N+1 queries
- ⚠️ Watch out for: Common symptoms and quick fixes
- 💡 Instead: Use proper error handling, pagination, and logging
Reference Links & Examples
- Internal documentation and examples
- Official documentation and best practices
- Community resources and discussions
Versioning & Changelog
- Version: 1.0.0
- Changelog:
- 2026-02-22: Initial version with complete template structure
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: model-registry3description: Use when working with an AI Model Registry is a central repository used by data scientists4---56# Model Registry78## Skill Profile9*(Select at least one profile to enable specific modules)*10- [ ] **DevOps**11- [x] **Backend**12- [ ] **Frontend**13- [ ] **AI-RAG**14- [ ] **Security Critical**1516## Overview17An AI Model Registry is a central repository used by data scientists and ML engineers to store, manage, and version machine learning models. It acts as the "source of truth" for models, tracking everything from hyperparameters to production status.1819**Core Principle**: "Models are software artifacts. They must be versioned, audited, and controlled with the same rigor as source code."2021---2223## Why This Matters24- **<Benefit>**: <short explanation>25- **<Benefit>**: <short explanation>26- **<Benefit>**: <short explanation>2728## Core Concepts & Rules2930### 1. Core Principles31- Follow established patterns and conventions32- Maintain consistency across codebase33- Document decisions and trade-offs3435### 2. Implementation Guidelines36- Start with the simplest viable solution37- Iterate based on feedback and requirements38- Test thoroughly before deployment394041## Inputs / Outputs / Contracts42* **Inputs**:43 - <e.g., env vars, request payload, file paths, schema>44* **Entry Conditions**:45 - <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>46* **Outputs**:47 - <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>48* **Artifacts Required (Deliverables)**:49 - <e.g., Code Diff, Unit Tests, Migration Script, API Docs>50* **Acceptance Evidence**:51 - <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>52* **Success Criteria**:53 - <e.g., p95 < 300ms, coverage ≥ 80%>5455## Skill Composition56* **Depends on**: None57* **Compatible with**: None58* **Conflicts with**: None59* **Related Skills**: None6061## Quick Start / Implementation Example62631. Review requirements and constraints642. Set up development environment653. Implement core functionality following patterns664. Write tests for critical paths675. Run tests and fix issues686. Document any deviations or decisions6970```python71# Example implementation following best practices72def example_function():73 # Your implementation here74 pass75```767778## Assumptions / Constraints / Non-goals7980* **Assumptions**:81 - Development environment is properly configured82 - Required dependencies are available83 - Team has basic understanding of domain84* **Constraints**:85 - Must follow existing codebase conventions86 - Time and resource limitations87 - Compatibility requirements88* **Non-goals**:89 - This skill does not cover edge cases outside scope90 - Not a replacement for formal training919293## Compatibility & Prerequisites9495* **Supported Versions**:96 - Python 3.8+97 - Node.js 16+98 - Modern browsers (Chrome, Firefox, Safari, Edge)99* **Required AI Tools**:100 - Code editor (VS Code recommended)101 - Testing framework appropriate for language102 - Version control (Git)103* **Dependencies**:104 - Language-specific package manager105 - Build tools106 - Testing libraries107* **Environment Setup**:108 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)109110111## Test Scenario Matrix (QA Strategy)112113| Type | Focus Area | Required Scenarios / Mocks |114| :--- | :--- | :--- |115| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |116| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |117| **E2E** | User Journey | Critical user flows to test |118| **Performance** | Latency / Load | Benchmark requirements |119| **Security** | Vuln / Auth | SAST/DAST or dependency audit |120| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |121122123## Technical Guardrails & Security Threat Model124125### 1. Security & Privacy (Threat Model)126* **Top Threats**: Injection attacks, authentication bypass, data exposure127- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII128- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager129- [ ] **Authorization**: Validate user permissions before state changes130131### 2. Performance & Resources132- [ ] **Execution Efficiency**: Consider time complexity for algorithms133- [ ] **Memory Management**: Use streams/pagination for large data134- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks135136### 3. Architecture & Scalability137- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection138- [ ] **Modularity**: Decouple logic from UI/Frameworks139140### 4. Observability & Reliability141- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`142- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`143- [ ] **Error Handling**: Standardized error codes, no bare except144- [ ] **Observability Artifacts**:145 - **Log Fields**: timestamp, level, message, request_id146 - **Metrics**: request_count, error_count, response_time147 - **Dashboards/Alerts**: High Error Rate > 5%148149150## Agent Directives & Error Recovery151*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*152153- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.154- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.155- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.156- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.157158159## Definition of Done (DoD) Checklist160161- [ ] Tests passed + coverage met162- [ ] Lint/Typecheck passed163- [ ] Logging/Metrics/Trace implemented164- [ ] Security checks passed165- [ ] Documentation/Changelog updated166- [ ] Accessibility/Performance requirements met (if frontend)167168169## Anti-patterns / Pitfalls170171* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries172* ⚠️ **Watch out for**: Common symptoms and quick fixes173* 💡 **Instead**: Use proper error handling, pagination, and logging174175176## Reference Links & Examples177178* Internal documentation and examples179* Official documentation and best practices180* Community resources and discussions181182183## Versioning & Changelog184185* **Version**: 1.0.0186* **Changelog**:187 - 2026-02-22: Initial version with complete template structure188189---190> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.191<!-- tomevault:4.0:skill_md:2026-04-13 -->