numeric-data-processing-standards
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "numeric-data-processing-standards" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-5f0a9fab50d47ffa2d99405f6bf14c6690c3036a897a4172e68b307d0d16641c. Verify the upstream source and version against https://github.com/kitchen-engineer42/pdf2skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Provide comprehensive guidance for handling numeric data in code, including data type selection, avoiding magic numbers, type conversions, and boundary checks. Used when writing or reviewing code involving numeric variables, constants, calculations, or comparisons to prevent type errors, overflow, and runtime exceptions.
Introduction source: third_party · kitchen-engineer42 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Provides comprehensive guidelines for handling numeric data in code, including data type selection, magic number avoidance, type conversions, and boundary checks. Use this skill when writing or reviewing code that involves numeric variables, constants, calculations, or comparisons to prevent type errors, overflow, and runtime exceptions.
- Audience
- Apply this skill when: Defining numeric variables or constants Performing numeric calculations or operations Comparing numeric values Converting between data types Reviewing code for potential numeric-related defects
- Testing
- Not tested
Browse files
Frontmatter
name: numeric-data-processing-standards
description: Provides comprehensive guidelines for handling numeric data in code, including data type selection, magic number avoidance, type conversions, and boundary checks. Use this skill when writing or reviewing code that involves numeric variables, constants, calculations, or comparisons to prevent type errors, overflow, and runtime exceptions.Numeric Data Processing Standards
When to Use
Apply this skill when:
- Defining numeric variables or constants
- Performing numeric calculations or operations
- Comparing numeric values
- Converting between data types
- Reviewing code for potential numeric-related defects
Core Procedures
1. Data Type Selection and Declaration
- Choose appropriate data type based on requirements (BCD, floating-point, integer)
- Review compiler warnings related to data types
- Add explanatory comments when declaring variables
- Define portable data types for cross-platform compatibility
2. Literals and Magic Number Handling
- Replace literal numbers with named constants
- Avoid hardcoded 0 and 1 except when semantically appropriate
- Eliminate "magic numbers" by using descriptive constant names
3. Numeric Operations and Conversions
- Handle numeric type conversions explicitly
- Avoid comparisons between mixed types
- Prevent operations on numbers with vastly different magnitudes
- Consider computational cost of common operations
4. Error Prevention and Boundary Checks
- Implement integer overflow protection
- Validate integer ranges before operations
- Prevent division by zero errors
- Apply boundary analysis to avoid off-by-one errors
Key Considerations
- Type Safety: Always verify type compatibility before operations
- Precision: Be aware of floating-point precision limitations
- Portability: Use type definitions that work across platforms
- Performance: Balance safety with computational efficiency
- Readability: Named constants improve code maintainability
Common Pitfalls to Avoid
- Implicit type conversions that lose precision
- Comparing floating-point numbers for exact equality
- Assuming integer overflow behavior across compilers
- Using magic numbers without documentation
- Ignoring compiler warnings about type mismatches
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 为开发者提供数值数据处理的系统性指导
- 涵盖数据类型选择、魔法数字处理、类型转换和边界检查等关键方面
Highlights
- 触发描述完整且位置正确
- When to Use 章节进一步细化了适用场景
Highlights
- Core Procedures 步骤划分清晰,逻辑性强
- 文档结构完整,包含注意事项和常见陷阱
Highlights
- 建议基于通用编程最佳实践,可操作性强
- 覆盖了数值处理的主要风险点和异常情况
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.