Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计异常

jarchi-scripting贾奇脚本

Agent Skill

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

总安装

13,137

周安装

587

GitHub Stars

公开资料未说明

下载量

8,200
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:jarchi-scripting(贾奇脚本)
来源仓库:https://github.com/thomasrohde/marketplace
仓库路径:skills/jarchi-scripting
安装命令:
npx skills add https://github.com/thomasrohde/marketplace --skill 'JArchi Scripting'
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/thomasrohde/marketplace --skill 'JArchi Scripting'

简介

jarchi-scripting 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 可结合来源仓库和原始 README 继续核验具体用法。
  • 安装命令:npx skills add https://github.com/thomasrohde/marketplace --skill 'JArchi Scripting
  • 注意:安装前建议确认权限范围、维护状态及是否触发联网或文件操作。

SKILL.md

JArchi Scripting

Create JavaScript scripts (.ajs files) for Archi, the open-source ArchiMate modeling tool. JArchi enables programmatic access to ArchiMate models for automation, reporting, and batch operations.

Core Concepts

Script Basics

JArchi scripts use JavaScript with a jQuery-like API. Scripts have .ajs extension and access the model through global variables:

// Global variables available in all scripts
model        // The current model (must be selected or loaded)
selection    // Currently selected objects in UI
$(selector)  // jQuery-like selector function (alias for jArchi())

Selectors

Query model objects using CSS-like selectors:

// By type (kebab-case ArchiMate types)
$("business-actor")           // All business actors
$("application-component")    // All application components
$("serving-relationship")     // All serving relationships

// By name
$(".Customer Portal")         // Objects named "Customer Portal"

// By ID
$("#abc-123")                 // Object with specific ID

// Special selectors
$("element")                  // All ArchiMate elements
$("relationship")             // All relationships
$("view")                     // All views (ArchiMate, Canvas, Sketch)
$("folder")                   // All folders
$("concept")                  // All elements and relationships
$("*")                        // Everything

Collection Methods

Collections support chaining and iteration:

// Traversal
collection.children()         // Direct children
collection.parent()           // Parent folder/container
collection.find(selector)     // Descendants matching selector

// Navigation (relationships)
collection.rels()             // All connected relationships
collection.inRels()           // Incoming relationships
collection.outRels()          // Outgoing relationships
collection.sourceEnds()       // Source concepts of relationships
collection.targetEnds()       // Target concepts of relationships

// Filtering
collection.filter(selector)   // Keep matching objects
collection.not(selector)      // Exclude matching objects
collection.first()            // First object only

// Iteration
collection.each(function(obj) { /* process obj */ });
collection.size()             // Count of objects

// Attributes
collection.attr("name")                  // Get attribute
collection.attr("name", "New Name")      // Set attribute
collection.prop("key")                   // Get property
collection.prop("key", "value")          // Set property

Creating Model Content

// Elements
var actor = model.createElement("business-actor", "Customer");
var component = model.createElement("application-component", "API Gateway");

// Relationships
var rel = model.createRelationship("serving-relationship", "", component, actor);

// Views
var view = model.createArchimateView("Overview");

// Add elements to view
var obj1 = view.add(actor, 100, 100, 120, 60);
var obj2 = view.add(component, 300, 100, 120, 60);

// Add relationship to view
view.add(rel, obj1, obj2);

// Folders
var folder = $("folder.Business").first();
var subfolder = folder.createFolder("Processes");

Visual Styling

Set appearance of diagram objects:

// Colors (hex format)
diagramObject.fillColor = "#dae8fc";
diagramObject.lineColor = "#6c8ebf";
diagramObject.fontColor = "#333333";

// Font
diagramObject.fontSize = 12;
diagramObject.fontStyle = "bold";  // normal, bold, italic, bolditalic

// Position and size
diagramObject.bounds = {x: 100, y: 100, width: 120, height: 60};

// Other
diagramObject.opacity = 200;       // 0-255
diagramObject.labelExpression = "${name}\n${type}";

Console and Dialogs

// Console output
console.log("Message");
console.error("Error message");
console.clear();
console.show();

// User dialogs
window.alert("Information");
var confirmed = window.confirm("Proceed?");
var input = window.prompt("Enter name:", "Default");
var selection = window.promptSelection("Choose:", ["Option 1", "Option 2"]);

// File dialogs
var filePath = window.promptOpenFile({title: "Open", filterExtensions: ["*.csv"]});
var savePath = window.promptSaveFile({title: "Save", filterExtensions: ["*.csv"]});
var dirPath = window.promptOpenDirectory({title: "Select Folder"});

File Operations

// Write file
$.fs.writeFile("path/to/file.csv", content, "UTF8");
$.fs.writeFile("path/to/file.bin", base64Data, "BASE64");

// Include other scripts
load(__DIR__ + "lib/helpers.js");

// Special variables
__DIR__          // Directory containing current script
__FILE__         // Path to current script
__SCRIPTS_DIR__  // User's scripts directory

Exporting Views

// Render to file
$.model.renderViewToFile(view, "diagram.png", "PNG");
$.model.renderViewToFile(view, "diagram.png", "PNG", {scale: 2, margin: 20});
$.model.renderViewToPDF(view, "diagram.pdf");
$.model.renderViewToSVG(view, "diagram.svg", true);

// Render to string/bytes
var svgString = $.model.renderViewAsSVGString(view, true);
var base64 = $.model.renderViewAsBase64(view, "PNG");

CLI Execution

Run scripts headlessly using Archi Command Line Interface.

Basic Syntax

Windows (PowerShell):

& "C:\Program Files\Archi\Archi.exe" -application com.archimatetool.commandline.app `
    -consoleLog -nosplash `
    --loadModel "model.archimate" `
    --script.runScript "script.ajs"

Windows (CMD):

"C:\Program Files\Archi\Archi.exe" -application com.archimatetool.commandline.app ^
    -consoleLog -nosplash ^
    --loadModel "model.archimate" ^
    --script.runScript "script.ajs"

Linux/macOS:

Archi -application com.archimatetool.commandline.app \
    -consoleLog -nosplash \
    --loadModel "model.archimate" \
    --script.runScript "script.ajs"

Common CLI Options

--loadModel "path/model.archimate"     Load existing model
--createEmptyModel                      Create blank model
--script.runScript "script.ajs"         Run jArchi script
--saveModel "path/output.archimate"     Save model after script
--csv.export "path/output"              Export to CSV
--html.createReport "path/output"       Generate HTML report
--xmlexchange.export "path/output.xml"  Export to Open Exchange XML

Script Arguments

Pass custom arguments to scripts:

& Archi.exe -application com.archimatetool.commandline.app -consoleLog -nosplash `
    --loadModel "model.archimate" `
    --script.runScript "script.ajs" `
    --myArg "value" --anotherArg "value2"

Access in script:

var args = $.process.argv;
args.forEach(function(arg) {
    console.log(arg);
});

Linux Headless Mode

For servers without display:

xvfb-run Archi -application com.archimatetool.commandline.app \
    -consoleLog -nosplash --loadModel "model.archimate" \
    --script.runScript "script.ajs"

ArchiMate Types Reference

Element Types

LayerTypes
Strategyresource, capability, course-of-action, value-stream
Businessbusiness-actor, business-role, business-process, business-function, business-service, business-object, contract, product
Applicationapplication-component, application-function, application-service, application-interface, data-object
Technologynode, device, system-software, technology-service, artifact, communication-network, path
Physicalequipment, facility, distribution-network, material
Motivationstakeholder, driver, goal, requirement, constraint, principle, outcome
Implementationwork-package, deliverable, plateau, gap
Otherlocation, grouping, junction

Relationship Types

composition-relationship, aggregation-relationship, assignment-relationship, realization-relationship, serving-relationship, access-relationship, influence-relationship, triggering-relationship, flow-relationship, specialization-relationship, association-relationship

Best Practices

  1. Check model is set before operations: if (!model.isSet()) {console.error("No model selected"); exit();}
  2. Use meaningful names when creating elements
  3. Batch operations - collect changes, apply at end
  4. Handle errors gracefully with try/catch
  5. Log progress for long-running scripts
  6. Use folders to organize created elements

Additional Resources

Reference Files

For detailed API documentation, consult:

  • references/api-elements.md - Element types, creation, properties
  • references/api-collections.md - Selectors, traversal, filtering
  • references/api-views.md - Views, visual objects, styling
  • references/api-model.md - Model operations, loading, saving
  • references/api-utilities.md - Console, dialogs, file I/O
  • references/cli-reference.md - Complete CLI options and automation

Example Scripts

Working examples in examples/:

  • query-elements.ajs - Query and report on model elements
  • create-view.ajs - Create view with elements and relationships
  • export-report.ajs - Export model data to CSV
  • batch-update.ajs - Batch update element properties
  • cli-automation.ps1 - PowerShell automation script
  • cli-automation.sh - Bash automation script

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.91%
按下载量换算3,027

Claude

27.91%
按下载量换算2,289

Cursor

16.44%
按下载量换算1,348

Gemini CLI

9.62%
按下载量换算789

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

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

来源信息

继续浏览同类 Skills