360 Secure SkillHub
360 安全技能中心

Printf Tool

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

dinghaibin
dinghaibin
热度 29.54
最近更新 2026-05-11 17:46:54
分类:效率依赖:代码执行应用场景:数据处理 / 模板

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add 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