Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Turf Skills

v1.0.2

**ALWAYS use this skill immediately** when the user mentions any spatial analysis, geospatial operations, coordinate calculations, or GeoJSON processing task...

0· 130·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for zhyt1985/turf-skills.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Turf Skills" (zhyt1985/turf-skills) from ClawHub.
Skill page: https://clawhub.ai/zhyt1985/turf-skills
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install turf-skills

ClawHub CLI

Package manager switcher

npx clawhub@latest install turf-skills
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (Turf spatial operations) matches the bundled code and package-lock which depend on @turf/* modules. Required capabilities (file input, many turf actions) are appropriate for the stated purpose. Minor doc wording is aggressive ('ALWAYS use this skill immediately') but that is a policy recommendation in SKILL.md rather than a mismatch with required permissions.
Instruction Scope
SKILL.md instructs use for GeoJSON/coordinate tasks and shows CLI invocation patterns. The runtime code only reads inputs provided via --input/--file/--input2/--file2 and writes output to --output or stdout. There are no instructions to read other system state, environment variables, or transmit data to third-party endpoints.
Install Mechanism
Registry shows no install spec (instruction-only), but the package includes Node.js CLI code and a standard package-lock.json referencing npm registry tarballs for Turf packages — no custom downloads, obscure URLs, or archive extracts. The skill requires Node.js runtime (compatibility Node >=16) which is expected.
Credentials
The skill declares no required environment variables, credentials, or config paths. The codebase likewise does not access process.env for secrets. No disproportionate credential access is requested.
Persistence & Privilege
The skill is not marked always:true. Autonomous invocation is allowed by default (disable-model-invocation:false), which is normal for skills. SKILL.md's 'always use' language could lead an agent to prefer this skill for geography tasks; combine that with autonomous invocation if you want to control automatic use.
Assessment
This skill appears to be a straightforward Turf.js CLI wrapper and is internally coherent. Before installing: (1) verify the package source (homepage is missing in metadata and owner is unknown) or prefer the official npm/turf ecosystem; (2) audit package.json/package-lock and run npm audit locally; (3) be careful when passing --file or --file2: the tool will read any filesystem path you provide, so do not point it at sensitive files (credentials, private configs); (4) if you don't want the agent to call it automatically whenever geography terms appear, consider disabling autonomous invocation or restricting skill usage policies; (5) note small metadata mismatches (package-lock shows 1.0.1 while SKILL.md/version is 1.0.2) — you may want to confirm the intended release/version from the author.
test/test.js:13
Shell command execution detected (child_process).
Patterns worth reviewing
These patterns may indicate risky behavior. Check the VirusTotal and OpenClaw results above for context-aware analysis before installing.

Like a lobster shell, security has layers — review code before you run it.

latestvk97f69r1dxgfnsacqq6jehw04183m7rj
130downloads
0stars
2versions
Updated 1mo ago
v1.0.2
MIT-0

turf-skills

Turf.js spatial analysis skill for Claude Code.

Usage

turf-skills --action <name> [options]

Actions

Measurement 测量

ActionDescriptionRequiredOptional
distanceDistance between two points 两点距离input, input2units
areaArea of polygon 多边形面积(m²)input
lengthLength of line 线长度inputunits
bearingBearing between points 方位角input, input2
destinationPoint at distance+bearing 目标点inputdistance, direction, units
midpointMidpoint of two points 中点input, input2
centerCenter of features 中心点input
centroidCentroid 质心input
centerOfMassCenter of mass 重心input
alongPoint along line 沿线取点inputdistance, units
bboxBounding box 边界框input
bboxPolygonBbox as polygon 边界框多边形input or bbox
envelopeEnvelope 包络矩形input

Query 空间查询

ActionDescriptionRequiredOptional
booleanPointInPolygonPoint in polygon 点在多边形内input(point), input2(polygon)
booleanContainsFeature contains another 包含input, input2
booleanCrossesFeatures cross 交叉input, input2
booleanDisjointFeatures disjoint 不相交input, input2
booleanEqualFeatures equal 相等input, input2
booleanIntersectsFeatures intersect 相交input, input2
booleanOverlapFeatures overlap 重叠input, input2
booleanWithinFeature within another 在内部input, input2
booleanParallelLines parallel 平行input, input2
booleanPointOnLinePoint on line 点在线上input(point), input2(line)
nearestPointNearest point in collection 最近点input(point), input2(FC)

Transformation 变换

ActionDescriptionRequiredOptional
bufferBuffer zone 缓冲区inputradius, units
unionUnion polygons 合并input, input2
intersectIntersect polygons 求交input, input2
differenceDifference polygons 求差input, input2
simplifySimplify geometry 简化inputtolerance
convexConvex hull 凸包input
concaveConcave hull 凹包inputmaxEdge, units
dissolveDissolve polygons 融合input(FC)propertyName
voronoiVoronoi diagram 泰森多边形input(points)bbox
tinTIN 不规则三角网input(points)propertyName
bezierSplineBezier spline 贝塞尔曲线input(line)resolution, sharpness
transformRotateRotate 旋转inputangle
transformScaleScale 缩放inputfactor
transformTranslateTranslate 平移inputdistance, direction, units

Helpers 创建

ActionDescriptionRequiredOptional
pointCreate point 创建点coordinatesproperties
lineStringCreate line 创建线coordinatesproperties
polygonCreate polygon 创建面coordinatesproperties
multiPointCreate MultiPointcoordinatesproperties
multiLineStringCreate MultiLineStringcoordinatesproperties
multiPolygonCreate MultiPolygoncoordinatesproperties
randomPointRandom points 随机点count, bbox
randomLineStringRandom lines 随机线count, bbox
randomPolygonRandom polygons 随机面count, bbox

Interpolation 插值/网格

ActionDescriptionRequiredOptional
interpolateIDW interpolation 反距离加权插值input(points)cellSide, gridType, propertyName, units
isobandsIsobands 等值面input(points)breaks, propertyName
isolinesIsolines 等值线input(points)breaks, propertyName
hexGridHex grid 六边形网格bbox, cellSideunits
pointGridPoint grid 点网格bbox, cellSideunits
squareGridSquare grid 方形网格bbox, cellSideunits
triangleGridTriangle grid 三角网格bbox, cellSideunits

Clustering 聚类

ActionDescriptionRequiredOptional
clustersKmeansK-means clustering K均值聚类input(points FC)numberOfClusters
clustersDbscanDBSCAN clustering 密度聚类input(points FC)maxDistance, units, minPoints

Examples

Calculate distance 计算距离

turf-skills --action distance \
  --input '{"type":"Point","coordinates":[120,30]}' \
  --input2 '{"type":"Point","coordinates":[121,31]}' \
  --units kilometers

Point in polygon 点在多边形内

turf-skills --action booleanPointInPolygon \
  --input '{"type":"Point","coordinates":[120.5,30.5]}' \
  --input2 '{"type":"Polygon","coordinates":[[[120,30],[121,30],[121,31],[120,31],[120,30]]]}'

Buffer 缓冲区

turf-skills --action buffer \
  --input '{"type":"Point","coordinates":[120,30]}' \
  --radius 5 --units kilometers

Read from file 从文件读取

turf-skills --action area --file polygon.geojson
turf-skills --action booleanContains --file polygon.geojson --file2 point.geojson

Output to file 输出到文件

turf-skills --action buffer --file point.geojson --radius 10 --output result.geojson

Create geometry 创建几何

turf-skills --action point --coordinates '[120,30]' --properties '{"name":"test"}'
turf-skills --action randomPoint --count 100 --bbox '[120,30,121,31]'

Grid generation 网格生成

turf-skills --action hexGrid --bbox '[120,30,121,31]' --cellSide 5 --units kilometers

Clustering 聚类分析

turf-skills --action clustersKmeans --file points.geojson --numberOfClusters 5
turf-skills --action clustersDbscan --file points.geojson --maxDistance 1 --minPoints 3

Natural Language Patterns

Common Queries 常见查询

Query PatternActionExample
"distance between [coordinates]"distance"Calculate distance between [120,30] and [121,31]"
"area of [polygon]"area"Find area of this polygon"
"length of [line]"length"Calculate length of this line in km"
"is [point] inside [polygon]"booleanPointInPolygon"Is this point inside the polygon?"
"buffer [radius] km/mi around [point]"buffer"Create a 5km buffer around this point"
"convex hull of [points]"convex"Compute convex hull of these points"
"cluster points into [n] groups"clustersKmeans"Cluster these points into 5 groups"
"nearest point to [location]"nearestPoint"Find nearest point to [120,30]"
"simplify geometry"simplify"Simplify this geometry"
"union/intersect/difference"union/intersect/difference"Union these two polygons"
"generate hex/square/triangle grid"hexGrid/squareGrid/triangleGrid"Generate hex grid for this area"
"rotate/scale/translate"transformRotate/transformScale/transformTranslate"Rotate this polygon by 45 degrees"

Chinese Query Patterns 中文查询模式

查询模式操作示例
"计算...的距离"distance"计算北京和上海的距离"
"计算...的面积"area"计算这个多边形的面积"
"点是否在多边形内"booleanPointInPolygon"天安门是否在五环内?"
"创建...缓冲区"buffer"创建5公里缓冲区"
"计算凸包"convex"计算这些点的凸包"
"聚类分析"clustersKmeans/clustersDbscan"对这些点进行聚类"
"查找最近点"nearestPoint"查找距离[120,30]最近的点"
"生成网格"hexGrid/squareGrid"生成六边形网格"
"旋转/缩放/平移"transformRotate/transformScale/transformTranslate"旋转多边形45度"

Real-World Scenarios 实际场景

# Beijing to Shanghai distance
turf-skills --action distance \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --input2 '{"type":"Point","coordinates":[121.473701,31.230416]}' \
  --units kilometers

# 5km buffer around a location
turf-skills --action buffer \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --radius 5 --units kilometers

# Point in polygon check
turf-skills --action booleanPointInPolygon \
  --input '{"type":"Point","coordinates":[116.397428,39.90923]}' \
  --input2 '{"type":"Polygon","coordinates":[[[116.1,39.7],[116.8,39.7],[116.8,40.1],[116.1,40.1],[116.1,39.7]]]}'

# Generate hex grid for a region
turf-skills --action hexGrid --bbox '[116,39,117,40]' --cellSide 10 --units kilometers

# K-means clustering
turf-skills --action clustersKmeans --file points.geojson --numberOfClusters 3

When to Use This Skill 何时使用此技能

ALWAYS Use For 务必使用:

  • Complex operations: buffer, grid generation, clustering, interpolation
  • GeoJSON output required: when the result needs to be valid GeoJSON
  • Multiple operations: chaining spatial analyses
  • File I/O: reading/writing GeoJSON files

Consider Direct Turf.js For 考虑直接使用:

  • Simple one-off calculations: distance, area, bearing (if already in a Node.js script)
  • Performance-critical loops: when calling the same operation thousands of times

Performance Notes 性能说明:

  • Skill CLI has startup overhead (~1-2 seconds)
  • For complex operations, skill is faster and more efficient
  • Skill ensures consistent Turf.js implementation

Best Practices 最佳实践

1. Input Validation 输入验证

Always validate coordinates before processing:

  • Longitude: -180 to 180
  • Latitude: -90 to 90
  • Ensure polygons are closed (first == last coordinate)

2. Units 单位

  • Default unit: kilometers (千米)
  • Options: kilometers, miles, meters, degrees, radians
  • Always specify units explicitly for clarity

3. File Handling 文件处理

  • Use --file for reading GeoJSON files
  • Use --output to save results
  • Supports both .geojson and .json extensions

4. Error Handling 错误处理

  • Check that required parameters are provided
  • Validate GeoJSON format before passing to actions
  • Handle empty results gracefully

Real-World Use Cases 实际应用场景

1. Delivery Zone Planning 配送范围规划

# Create 5km delivery zones around stores
turf-skills --action buffer \
  --file stores.geojson \
  --radius 5 \
  --units kilometers \
  --output delivery-zones.geojson

2. Geographic Fence Check 地理围栏检测

# Check if customer address is within service area
turf-skills --action booleanPointInPolygon \
  --input '{"type":"Point","coordinates":[lng,lat]}' \
  --file service-area.geojson

3. Store Location Clustering 门店位置聚类

# Cluster customer locations for optimal store placement
turf-skills --action clustersKmeans \
  --file customers.geojson \
  --numberOfClusters 5 \
  --output clusters.geojson

4. Heat Map Grid 热力图网格

# Generate hex grid for population density visualization
turf-skills --action hexGrid \
  --bbox '[116,39,117,40]' \
  --cellSide 1 \
  --units kilometers \
  --output grid.geojson

5. Route Simplification 路线简化

# Simplify GPS track for storage efficiency
turf-skills --action simplify \
  --file gps-track.geojson \
  --tolerance 0.0001 \
  --output simplified-track.geojson

Input/Output Formats 输入输出格式

GeoJSON Feature Structure

{
  "type": "Feature",
  "properties": {
    "name": "Beijing",
    "population": 21540000
  },
  "geometry": {
    "type": "Point",
    "coordinates": [116.397428, 39.90923]
  }
}

Supported Geometry Types

  • Point - 点
  • LineString - 线
  • Polygon - 面
  • MultiPoint - 多点
  • MultiLineString - 多线
  • MultiPolygon - 多面
  • FeatureCollection - 要素集合

Troubleshooting 故障排除

Common Issues 常见问题

Issue: "Error: Unknown action"

  • Solution: Use --list to see available actions

Issue: "Error: Cannot read property"

  • Solution: Check GeoJSON format, ensure proper nesting

Issue: Empty result for intersection/union

  • Solution: Geometries may not overlap; check coordinates

Issue: Distance calculation seems wrong

  • Solution: Verify units parameter (default is kilometers)

Additional Resources 更多资源

Comments

Loading comments...