Index of every page on this site: llms.txt
All skills
steelan9199 avatar

/json-to-markdown-files

@9e01957
Run it yourself

读取 JSON 文件,将每个属性的值单独保存为 Markdown 文件,文件名为属性名。何时使用:当用户说"把这个JSON转成md文件"、"提取JSON属性为md文件"、"json转markdown文件"或需要从JSON文件提取属性保存为单独md文件时。

Use this Skill: https://skilld.dev/gh/steelan9199/wechat-publisher/json-to-markdown-files

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈75 tokens for metadata: the name and description. ≈556 when used: this file.

Description uses 1.9% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈152 characters, or 1.9%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

🎯 触发映射

用户输入触发词 AI 执行动作
"把这个JSON转成md文件" / "提取JSON属性为md文件" / "json转markdown文件" 按【提取模式】执行

提取模式

执行步骤

注意: 禁止读取文件的具体内容, 因为文件通常很大, 你只需要传递文件路径即可。

步骤 执行动作 具体命令/操作
1 读取并运行提取脚本 运行 RunCommand 执行 node scripts/extract-data.js "<json-file-path>" <br>⚠️ 重要: 必须用双引号包裹文件路径,因为路径中可能包含空格

输出结果

成功时输出示例:

✅ JSON 属性提取成功

📋 生成的文件:
- systemPrompt.md
- userPrompt.md

📝 文件已保存到输入 JSON 文件同级目录, 该目录的绝对路径是: <目录路径>

失败时输出示例:

❌ 提取失败

错误原因:{具体错误信息}
解决建议:请检查 JSON 文件路径和格式是否正确

错误处理

错误场景 错误表现 处理方式
JSON 文件不存在 ENOENT: no such file or directory 使用 LS 检查文件路径,确认文件存在
JSON 格式错误 SyntaxError: Unexpected token 使用 Read 读取文件内容,检查 JSON 格式
路径引号使用不当 MODULE_NOT_FOUND / 找不到模块 确保用双引号包裹完整文件路径,避免嵌套引号

Resources

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning4mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub4mo

    This skill automates the conversion of JSON data into individual Markdown files. However, it contains several security vulnerabilities, including potential shell command injection and path traversal flaws that could allow an attacker to execute unauthorized commands or write files to sensitive locations. It also lacks input sanitization for external data, creating a risk of indirect prompt injection.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at 9e01957. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 7 months ago

README badge

README badge for steelan9199/wechat-publisher/json-to-markdown-files