Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问clear审计通过

gcode-to-textg 代码到文本

Agent Skill

gcode-to-text 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

915

周安装

37

GitHub Stars

93

下载量

287
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gcode-to-text(g 代码到文本)
来源仓库:https://github.com/letta-ai/skills
仓库路径:skills/gcode-to-text
安装命令:
npx skills add https://github.com/letta-ai/skills --skill gcode-to-text
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/letta-ai/skills --skill gcode-to-text

简介

gcode-to-text 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 GitHub 安装,需确认权限范围和维护状态。
  • 建议结合原始 README 核验具体用法,避免触发不必要的联网操作。
  • 适用于研究检索和信息筛选任务。

SKILL.md

GCODE Text Extraction

This skill provides strategies for extracting text content that is geometrically encoded within GCODE files. GCODE files contain movement coordinates that define toolpaths for 3D printers and CNC machines. When text is embossed, engraved, or printed, the letter shapes are encoded in the X/Y coordinate movements, not in human-readable metadata.

Core Principle

Text in GCODE is encoded geometrically, not as metadata. The shapes of letters exist in the coordinate data of G0/G1 movement commands. Searching for comments, M117 display messages, or filename hints will rarely reveal the actual text content.

Recommended Approach

Phase 1: Quick Metadata Check (Do Not Linger)

Perform a brief check for explicit text indicators, but do not spend excessive time here:

  • Check for M117 (LCD message) commands: grep "M117" file.gcode
  • Check file header comments for explicit text labels
  • Look for slicer metadata that might name objects

If metadata search yields no results within 2-3 attempts, immediately proceed to Phase 2. Do not repeat similar metadata searches.

Phase 2: Geometric Analysis (Primary Approach)

Extract and analyze the coordinate data to reconstruct the text visually:

  1. Identify relevant sections: Look for object markers (M486 commands in PrusaSlicer/SuperSlicer), layer changes, or comments marking "text" or "embossed" features.
  2. Extract X/Y coordinates: Parse G1 movement commands to collect coordinate pairs: grep -E "^G1.*X.*Y" file.gcode | sed 's/.*X\([0-9.-]*\).*Y\([0-9.-]*\).*/\1 \2/'
  3. Visualize the toolpath: Create a plot of the extracted coordinates:

- Use Python with matplotlib to scatter plot X/Y points - Use ASCII art plotting for quick visualization - Analyze coordinate clustering to identify letter boundaries

  1. Analyze movement patterns:

- Travel moves (G0) often indicate transitions between letters - Extrusion moves (G1 with E parameter) trace the actual shapes - Z-lifts or retractions may mark character boundaries

Phase 3: Pattern Recognition

When analyzing plotted coordinates:

  • Look for distinct clusters that correspond to individual characters
  • Identify the baseline and character height from Y-coordinate ranges
  • Count distinct separated regions to estimate character count
  • Compare shapes to known letter forms

Visualization Script Template

To plot GCODE coordinates for text extraction:

import re
import matplotlib.pyplot as plt

def extract_coordinates(gcode_file, section_filter=None):
    coords = []
    in_section = section_filter is None

    with open(gcode_file, 'r') as f:
        for line in f:
            if section_filter and section_filter in line:
                in_section = True
            if in_section:
                match = re.search(r'G1.*X([\d.-]+).*Y([\d.-]+)', line)
                if match:
                    coords.append((float(match.group(1)), float(match.group(2))))
    return coords

coords = extract_coordinates('file.gcode')
if coords:
    x, y = zip(*coords)
    plt.figure(figsize=(15, 5))
    plt.plot(x, y, 'b-', linewidth=0.5)
    plt.scatter(x, y, s=1, c='red')
    plt.axis('equal')
    plt.title('GCODE Toolpath')
    plt.savefig('toolpath.png', dpi=150)
    plt.show()

Verification Strategies

  1. Character count validation: If the expected output format is known (e.g., CTF flag format like flag{...}), verify the number of distinct character shapes matches.
  2. Coordinate range analysis: Text typically has consistent character heights and spacing. Verify Y-ranges are consistent across detected characters.
  3. Visual confirmation: The plotted toolpath should visually resemble readable text when viewed as a 2D projection.

Common Pitfalls

Pitfall 1: Over-reliance on Metadata

Spending too much time searching for comments, M117 messages, or filename hints instead of analyzing actual coordinate data. If 2-3 metadata searches fail, move to geometric analysis.

Pitfall 2: Giving Up on Geometric Analysis

Concluding that text "cannot be determined" without attempting to visualize or plot the coordinates. GCODE always contains complete geometric information.

Pitfall 3: Missing the Task Context

For CTF-style challenges, the text is intentionally hidden in the geometry. Recognize when a task expects decoding/reverse-engineering rather than simple metadata lookup.

Pitfall 4: Not Using Available Tools

Even without specialized GCODE viewers, basic Python plotting or coordinate analysis can reveal text patterns. Create simple visualization scripts rather than declaring the task impossible.

Pitfall 5: Ignoring Object Boundaries

M486 commands (object labeling) or travel moves often separate individual characters. Use these boundaries to segment the coordinate data into individual letters.

Key Indicators for This Skill

  • Tasks mentioning "embossed text", "engraved text", or "printed text" in GCODE
  • CTF challenges involving GCODE files
  • Questions asking "what text will be printed/shown"
  • GCODE files with object sections named generically (not revealing the actual text)

Expected Output Considerations

When the task asks for text content from GCODE, provide the actual decoded text string, not an explanation of why it cannot be determined. If visualization reveals legible characters, transcribe them. For CTF-style tasks, look for flag format patterns like flag{...} or CTF{...}.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.08%
按下载量换算78

Gemini CLI

22.91%
按下载量换算66

Antigravity

15.95%
按下载量换算46

windsurf

11.7%
按下载量换算34

OpenCode

7.95%
按下载量换算23

Codex

2.93%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills