n8n-code-python
为 n8n 构建 Python Code 节点
n8n Python Code 节点对数据访问、返回格式和库使用有严格限制。此技能可指导 Claude、Codex 或 Claude Code 编写正确的数据转换逻辑。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "n8n-code-python" from https://skillstore.io/skills/sickn33-n8n-code-python.md and its manifest at https://skillstore.io/api/skills/sickn33-n8n-code-python/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“n8n-code-python”。 用户请求一个 Python Code 节点,用于从多个订单条目计算总计。
预期结果:
助手返回 Run Once for All Items 方法,解释必需的条目包装器,并说明空输入处理。
正在使用“n8n-code-python”。 用户的 webhook 字段在其他节点中可用,但在 Python 中失败。
预期结果:
助手识别 body 嵌套,建议使用安全的字典访问,并描述如何返回修正后的字段。
正在使用“n8n-code-python”。 用户想在 Python Code 节点中导入 requests。
预期结果:
助手解释包限制,并建议改用 HTTP Request 节点或 JavaScript helper。
安全审计
安全All 91 static findings are false positives caused by Markdown backticks, documentation links, and benign Python examples. The skill contains no command invocation, suspicious network behavior, obfuscated payload, reconnaissance, or prompt injection.
风险因素
⚙️ 外部命令 (50)
🌐 网络访问 (2)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/sickn33-n8n-code-python/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/sickn33-n8n-code-python?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/sickn33-n8n-code-python?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-n8n-code-python/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/sickn33-n8n-code-python.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
sickn33. (2026). n8n-code-python security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/sickn33-n8n-code-python/audits/5BibTeX 引用
@techreport{sickn33-sickn33-n8n-code-python-2026,
author = {sickn33},
title = {n8n-code-python security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/sickn33-n8n-code-python/audits/5},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "n8n-code-python security audit report (audit version 5)"
version: "unspecified"
type: report
authors:
- name: "sickn33"
date-released: "2026-08-04"
url: "https://skillstore.io/skills/sickn33-n8n-code-python/audits/5"
identifiers:
- type: other
value: "skillstore:sickn33-n8n-code-python:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
创建批量转换
构建 Python Code 节点逻辑,用于处理所有输入项并返回一致的 n8n 条目。
修复 webhook 解析
使用 body 嵌套指南读取 webhook 字段,并避免缺失键错误。
选择正确的节点类型
判断何时更适合使用 Python、JavaScript、Set、Filter、IF 或 HTTP Request 节点。
试试这些提示
使用此技能编写一个 Python Code 节点,读取所有条目,添加 processed 标志,并返回有效的 n8n 条目。
使用此技能为 webhook payload 编写 Python。从 body 对象读取字段,并使用安全默认值。
使用此技能设计一个 Python Code 节点,用于筛选无效记录、计算总计,并返回摘要和错误。
使用此技能审计我的 Python Code 节点,检查模式选择、返回格式、数据访问、不可用导入项以及更安全的替代方案。
最佳实践
- 仅当 Python 的标准库或语法最适合时才使用 Python。
- 在每条代码路径上都返回 n8n 条目结构。
- 对于可选字段,优先使用安全的字典访问和显式默认值。
避免
- 在 Python Code 节点中导入外部包,例如 requests、pandas 或 numpy。
- 当 webhook 字段位于 body 下时,直接从根对象读取这些字段。
- 对原生 n8n 节点即可处理的简单映射或筛选使用 Python Code 节点。