Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

4d-check-syntax4d 检查语法

Agent Skill

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

总安装

225

周安装

9

GitHub Stars

1

下载量

73
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/e-marchand/skills --skill 4d-check-syntax

简介

4d-check-syntax 用于编译和检查 4D 项目中的语法错误与类型不匹配问题。

  • 适用于使用 4D 开发环境的 Codex、Claude、Cursor、Gemini CLI 等宿主平台。
  • 依赖 4d-run 技能及 tool4d 工具,需配置环境变量或安装 VS Code 插件支持。
  • 安装命令:npx skills add https://github.com/e-marchand/skills --skill 4d-check-syntax。
  • 需确保 _compile 方法存在,并验证 TOOL4D 路径或扩展已正确设置。

SKILL.md

4D Syntax Checker

Compile a 4D project to check for syntax errors and type mismatches.

Prerequisites

Uses the 4d-run skill to execute the compilation method. Ensure tool4d is available:

  • Install 4D-Analyzer extension in VS Code/Antigravity, OR
  • Set TOOL4D environment variable to point to tool4d executable

The _compile Method

Compilation requires a _compile method in the project. If not present, copy assets/_compile.4dm to Project/Sources/Methods/_compile.4dm.

Compilation Output

Success

{"success":true,"errors":[]}

Errors

{
  "success": false,
  "errors": [
    {
      "message": "Syntax error",
      "isError": true,
      "code": {
        "type": "classFunction",
        "className": "MyClass",
        "functionName": "myMethod",
        "path": "[class]/MyClass/myMethod",
        "file": "[object File]"
      },
      "line": 10,
      "lineInFile": 42
    }
  ]
}

Error Properties

  • message: Error description
  • isError: true for errors, false for warnings
  • code.type: "projectMethod", "classFunction", etc.
  • code.className: Class name (for class methods)
  • code.functionName: Function name
  • line: Line within the function
  • lineInFile: Absolute line in the file

Workflow

  1. Check for _compile method: Look in Project/Sources/Methods/_compile.4dm
  2. Create if missing: Write the _compile method using the template above
  3. Find tool4d: Use 4d-run skill to locate tool4d
  4. Run compilation: Execute _compile method with --dataless
  5. Parse results: Extract JSON from ALERT output

Running Compilation

"<tool4d_path>" --project="<project_path>" --startup-method=_compile --dataless 2>&1

Output format:

{"success":true,"errors":[]}

The JSON is output directly to system standard output via LOG EVENT.

Common Compilation Errors

ErrorCauseFix
"Syntax error"Invalid 4D syntaxCheck line for typos
"Object syntax is not valid"Invalid object property accessUse [index] for 4D.Blob properties
"Cannot make an assignment with those types"Type mismatchCheck variable types
"Undeclared property 'X' used"Missing property declarationAdd property X: Type to class
"The variable $X has not been explicitly declared"Missing var declarationAdd var $X: Type
"signed integer overflow handling differs"PCH cache issueNot a code error, can ignore

Integration Example

# Find tool4d
TOOL4D=$(python3 ".claude/skills/4d-run/scripts/find_tool4d.py")

# Run compilation and parse JSON result
OUTPUT=$("$TOOL4D" --project="/path/to/Project/MyProject.4DProject" --startup-method=_compile --dataless 2>&1)

# The JSON is output directly via LOG EVENT
echo "$OUTPUT" | jq .

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.42%
按下载量换算25

Claude

32.73%
按下载量换算24

Cursor

17.6%
按下载量换算13

Gemini CLI

10.31%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills