360 Secure SkillHub
360 安全技能中心

Printf Tool

该 Skill 提供 printf-tool 命令,依据格式字符串与参数生成格式化文本,支持字符串、整数、浮点数和十六进制等格式,并可控制宽度与精度。文件包含 SKILL.md 和 scripts/printf.py,运行依赖 bash、python3 和 printf。

分类:效率
dinghaibin
dinghaibin
热度 20.82
最近更新 2026-05-11 17:46:54

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add dinghaibin/printf-tool
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
printf-tool
description
Format and print data with precise control over output format. Use for formatted output with padding, precision, and type specifications.

Printf - Formatted Output Utility

Format and display data using format specifiers similar to C printf. Supports string, integer, floating-point, and hexadecimal formatting with width and precision control.

Usage

printf-tool <format> [arguments...]

Common Format Specifiers

  • %s: String
  • %d: Integer
  • %f: Floating point
  • %x: Hexadecimal
  • %05d: Zero-padded integer (5 digits)

Examples

printf-tool "Name: %s, Age: %d" "Alice" 30
printf-tool "Price: $%.2f" 19.99
printf-tool "%010d" 42