Currency Timezone
Skill Profile
(Select at least one profile to enable specific modules)
Overview
This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.
When to use / When NOT to use
- ✅ Use when: Implementing this capability in your project
- ✅ Use when: Need to follow established patterns and conventions
- ❌ Avoid when: The requirements don't match this skill's scope
- ❌ Avoid when: Simpler alternatives would suffice
Why This Matters
Currency and timezone handling is essential for global applications. Effective currency and timezone management ensures users see prices and times in their local format, supports multi-currency payments, and complies with local regulations.
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:
- User timezone preferences
- User currency preferences
- Locale preferences
- Base currency prices
- Exchange rates
- Datetime values
Outputs:
- Formatted currency values
- Localized datetime values
- Converted prices
- Timezone-aware displays
Contracts:
- All currency values stored with currency code
- All datetime values stored in UTC
- User preferences respected for display
- Exchange rates cached and updated
- Precision maintained throughout calculations
Skill Composition
- Depends on: None
- Compatible with: None
- Conflicts with: None
- Related Skills: None
Currency and Timezone
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: amnadtaowsoam-cerebraskills-currency-timezone3description: Currency Timezone4---56# Currency Timezone78## 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## Overview17This skill provides comprehensive guidance and best practices for implementation. It enables teams to achieve reliable, maintainable, and scalable solutions.1819### When to use / When NOT to use20* ✅ **Use when**: Implementing this capability in your project21* ✅ **Use when**: Need to follow established patterns and conventions22* ❌ **Avoid when**: The requirements don't match this skill's scope23* ❌ **Avoid when**: Simpler alternatives would suffice242526## Why This Matters27Currency and timezone handling is essential for global applications. Effective currency and timezone management ensures users see prices and times in their local format, supports multi-currency payments, and complies with local regulations.2829## Core Concepts & Rules3031### 1. Core Principles32- Follow established patterns and conventions33- Maintain consistency across codebase34- Document decisions and trade-offs3536### 2. Implementation Guidelines37- Start with the simplest viable solution38- Iterate based on feedback and requirements39- Test thoroughly before deployment404142## Inputs / Outputs / Contracts43**Inputs:**44- User timezone preferences45- User currency preferences46- Locale preferences47- Base currency prices48- Exchange rates49- Datetime values5051**Outputs:**52- Formatted currency values53- Localized datetime values54- Converted prices55- Timezone-aware displays5657**Contracts:**58- All currency values stored with currency code59- All datetime values stored in UTC60- User preferences respected for display61- Exchange rates cached and updated62- Precision maintained throughout calculations6364## Skill Composition65* **Depends on**: None66* **Compatible with**: None67* **Conflicts with**: None68* **Related Skills**: None6970# Currency and Timezone7172## Quick Start / Implementation Example73741. Review requirements and constraints752. Set up development environment763. Implement core functionality following patterns774. Write tests for critical paths785. Run tests and fix issues796. Document any deviations or decisions8081```python82# Example implementation following best practices83def example_function():84 # Your implementation here85 pass86```878889## Assumptions / Constraints / Non-goals9091* **Assumptions**:92 - Development environment is properly configured93 - Required dependencies are available94 - Team has basic understanding of domain95* **Constraints**:96 - Must follow existing codebase conventions97 - Time and resource limitations98 - Compatibility requirements99* **Non-goals**:100 - This skill does not cover edge cases outside scope101 - Not a replacement for formal training102103104## Compatibility & Prerequisites105106* **Supported Versions**:107 - Python 3.8+108 - Node.js 16+109 - Modern browsers (Chrome, Firefox, Safari, Edge)110* **Required AI Tools**:111 - Code editor (VS Code recommended)112 - Testing framework appropriate for language113 - Version control (Git)114* **Dependencies**:115 - Language-specific package manager116 - Build tools117 - Testing libraries118* **Environment Setup**:119 - `.env.example` keys: `API_KEY`, `DATABASE_URL` (no values)120121122## Test Scenario Matrix (QA Strategy)123124| Type | Focus Area | Required Scenarios / Mocks |125| :--- | :--- | :--- |126| **Unit** | Core Logic | Must cover primary logic and at least 3 edge/error cases. Target minimum 80% coverage |127| **Integration** | DB / API | All external API calls or database connections must be mocked during unit tests |128| **E2E** | User Journey | Critical user flows to test |129| **Performance** | Latency / Load | Benchmark requirements |130| **Security** | Vuln / Auth | SAST/DAST or dependency audit |131| **Frontend** | UX / A11y | Accessibility checklist (WCAG), Performance Budget (Lighthouse score) |132133134## Technical Guardrails & Security Threat Model135136### 1. Security & Privacy (Threat Model)137* **Top Threats**: Injection attacks, authentication bypass, data exposure138- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII139- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager140- [ ] **Authorization**: Validate user permissions before state changes141142### 2. Performance & Resources143- [ ] **Execution Efficiency**: Consider time complexity for algorithms144- [ ] **Memory Management**: Use streams/pagination for large data145- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks146147### 3. Architecture & Scalability148- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection149- [ ] **Modularity**: Decouple logic from UI/Frameworks150151### 4. Observability & Reliability152- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`153- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`154- [ ] **Error Handling**: Standardized error codes, no bare except155- [ ] **Observability Artifacts**:156 - **Log Fields**: timestamp, level, message, request_id157 - **Metrics**: request_count, error_count, response_time158 - **Dashboards/Alerts**: High Error Rate > 5%159160161## Agent Directives & Error Recovery162*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*163164- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.165- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.166- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.167- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.168169170## Definition of Done (DoD) Checklist171172- [ ] Tests passed + coverage met173- [ ] Lint/Typecheck passed174- [ ] Logging/Metrics/Trace implemented175- [ ] Security checks passed176- [ ] Documentation/Changelog updated177- [ ] Accessibility/Performance requirements met (if frontend)178179180## Anti-patterns / Pitfalls181182* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries183* ⚠️ **Watch out for**: Common symptoms and quick fixes184* 💡 **Instead**: Use proper error handling, pagination, and logging185186187## Reference Links & Examples188189* Internal documentation and examples190* Official documentation and best practices191* Community resources and discussions192193194## Versioning & Changelog195196* **Version**: 1.0.0197* **Changelog**:198 - 2026-02-22: Initial version with complete template structure199200---201> Converted and distributed by [TomeVault](https://tomevault.io/claim/amnadtaowsoam) — claim your Tome and manage your conversions.202<!-- tomevault:4.0:skill_md:2026-04-13 -->