Token导航 LogoToken导航

Agent Skill · 前端设计

dart-cli-creator(dart CLI creator 命令行)

dart-cli-creator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

dart-cli-creator 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 3,370。

总安装 1,364周安装 58GitHub Stars 1下载 478核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mono0926/skills --skill dart-cli-creator

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

dart-cli-creator 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合围绕仓库状态、代码变更或协作事项进行整理。可结合来源仓库和原始 README 核验具体用法。安装前建议确认权限范围、维护状态及是否触发联网或文件读写。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/dart-cli-creator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/mono0926/skills --skill dart-cli-creator;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

dart-cli-creator 怎么安装?

在终端执行 npx skills add https://github.com/mono0926/skills --skill dart-cli-creator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

dart-cli-creator 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

dart-cli-creator 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/mono0926/skills --skill dart-cli-creator 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

dart-cli-creator 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

dart-cli-creator 用的人多吗?

公开数据是累计安装 1,364 次,近一周安装 58 次,下载 478 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

dart-cli-creator 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
dart-cli-creator

dart CLI creator 命令行 · 本页

1,3641执行命令未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Dart CLI Creator Skill

This skill provides guidelines and procedures for creating and improving top-quality Command-Line Interface (CLI) tools using Dart. As an agent, you must consistently follow these best practices when requested by the user to create or modify a Dart CLI.

🎯 Core Best Practices

1. Project Structure and Design

  • bin/ directory: Place the entry point executable files for the CLI (e.g., bin/my_cli.dart). Keep this as a thin wrapper that only calls top-level functions or classes from lib/ or src/, avoiding complex logic here.
  • lib/ directory: Place business logic, command implementations, and reusable utilities here (e.g., lib/src/commands/, lib/src/utils/).
  • Separation of Concerns: Always separate the CLI input/output handling (argument parsing, UI rendering) from the core business logic to maximize testability.

2. Command-Line Arguments and Routing

  • Leverage the args package: Use CommandRunner and Command classes from the standard args package to build a Git-like CLI with subcommands.
  • Self-documenting: Carefully write description and help for each command, flag, and option, ensuring that --help provides sufficient usage information.

3. Rich UX (User Experience) and Logging

  • Actively use mason_logger: Avoid standard print statements; use the mason_logger package instead.

- Output color-coded messages with logger.info(), logger.success(), logger.err(), and logger.warn(). - Display a spinner for time-consuming tasks using logger.progress('Doing something...'). - Utilize logger.confirm() or logger.prompt() for user confirmations (y/n) or text input. If more advanced menu selections or spinners are needed, combine it with the interact package. - Tip: For a practical setup, define final logger = Logger(); at the top level in lib/logger.dart and import it across the project. This reduces boilerplate and is highly convenient (ideal for small to medium-sized CLI tools where DI is not mandatory).

  • cli_completion: Consider using the cli_completion package to provide shell completion features by extending CompletionCommandRunner.

4. Proper Error Handling and Exit Strategies

  • Exit Code: Always treat the result of the process as an appropriate exit code (0 for success, 1 or sysexits-compliant error codes for errors).
  • Avoid direct exit() calls: Calling exit() directly causes the Dart VM to terminate immediately, potentially bypassing resource cleanup (like finally blocks). Instead, return an int from CommandRunner.run(), propagate it to the main function, set it to the exitCode property, and allow the process to exit naturally (e.g., after waiting for Process.stdout.close()).
  • Custom Exception Classes and Handling: Define custom domain-specific exception classes (e.g., AppException) and throw them from deep within the call stack.
  • Global Exception Catching: Wrap the entire execution of CommandRunner in a try-catch block to handle AppException, UsageException, and any uncaught exceptions. Rather than showing stack traces directly to the user, output errors gracefully using logger.err(e.message) and return an appropriate exit code.

5. Static Analysis and Code Formatting

  • Apply pedantic_mono: Configure pedantic_mono in analysis_options.yaml and adhere to strict static analysis rules.
  • [ZERO TOLERANCE]: Always resolve ALL errors, warnings, and info level lints immediately after making code changes. A "clean" analysis is mandatory for a project to be considered in a healthy state.

6. Distribution and Execution Configuration

  • Shebang: Always include #!/usr/bin/env dart as the very first line of executable files directly under bin/.
  • Pubspec Configuration: Define the CLI command name in the executables: section of pubspec.yaml to enable easy installation via dart pub global activate.

7. Auto-Update Check Feature

  • Leverage pub_updater: Use pub_updater to check pub.dev or other registries for new version releases, either on every command execution or periodically.
  • If a new version is available, provide an interactive UI prompting the user to update using logger.warn('Update available!') or an interact-based prompt.

8. Version Management and Release Process

  • Robust Version Manipulation: When manipulating SemVer versions, avoid parsing versions manually whenever possible. Always rely on the pub_semver package (e.g., Version.parse, nextMajor, nextMinor) to prevent parsing failures related to edge cases like pre-release tags or build metadata.
  • Automated Releases: To handle version bumping, CHANGELOG generation, git committing, and publishing to GitHub or pub.dev, utilize the release-pub skill. If creating an advanced Dart CLI, recommend using this agentic skill to coordinate complex CI/CD and release pipelines safely rather than instructing users to perform these steps manually.

🛠️ Project Skeleton (Basic Implementation Example)

When creating a CLI, use a structure and implementation similar to the following as a foundation.

Excerpt from pubspec.yaml

environment:
  sdk: ^3.11.0 # Always specify the latest stable version

dependencies:
  args: ^2.5.0
  cli_completion: ^0.4.0
  mason_logger: ^0.2.16
  pub_updater: ^0.4.0

dev_dependencies:
  pedantic_mono: any
  test: ^1.24.0

executables:
  my_cli:

bin/my_cli.dart

#!/usr/bin/env dart
import 'dart:io';

import 'package:my_cli/command_runner.dart';

Future<void> main(List<String> arguments) async {
  final exitCode = await MyCliCommandRunner().run(arguments);
  await flushThenExit(exitCode ?? 0);
}

/// Helper method to set the [status] to exitCode, and wait for the standard output/error to flush before exiting
Future<void> flushThenExit(int status) async {
  exitCode = status;
  await Future.wait<void>([
    stdout.close(),
    stderr.close(),
  ]);
}

lib/logger.dart

import 'package:mason_logger/mason_logger.dart';

/// The [Logger] shared across the application.
final logger = Logger();

lib/command_runner.dart

import 'package:args/args.dart';
import 'package:cli_completion/cli_completion.dart';
import 'package:mason_logger/mason_logger.dart';
import 'package:my_cli/logger.dart';
import 'package:pub_updater/pub_updater.dart';

class MyCliCommandRunner extends CompletionCommandRunner<int> {
  MyCliCommandRunner({PubUpdater? pubUpdater})
      : _pubUpdater = pubUpdater ?? PubUpdater(),
        super('my_cli', 'A highly robust Dart CLI tool.') {
    argParser
      ..addFlag(
        'version',
        abbr: 'v',
        negatable: false,
        help: 'Print the current version.',
      )
      ..addFlag(
        'verbose',
        help: 'Enable verbose logging.',
      );
    // TODO: addCommand(MyCustomCommand());
  }

  final PubUpdater _pubUpdater;

  Future<void> _checkForUpdates() async {
    try {
      final isUpToDate = await _pubUpdater.isUpToDate(
        packageName: 'my_cli',
        currentVersion: '1.0.0', // Optionally link to a packageVersion constant
      );
      if (!isUpToDate) {
        final latestVersion = await _pubUpdater.getLatestVersion('my_cli');
        logger.info('\nUpdate available: $latestVersion');
      }
    } catch (_) {}
  }

  @override
  Future<int> run(Iterable<String> args) async {
    try {
      final argResults = parse(args);
      if (argResults['verbose'] == true) {
        logger.level = Level.verbose;
      }

      // Check for version updates (consider asynchronous background execution)
      await _checkForUpdates();

      return await runCommand(argResults) ?? 0;
    } on FormatException catch (e) {
      logger
        ..err(e.message)
        ..info('')
        ..info(usage);
      return 64; // usage error
    } on UsageException catch (e) {
      logger
        ..err(e.message)
        ..info('')
        ..info(usage);
      return 64;
    } on AppException catch (e) {
      // Gracefully output custom domain exceptions
      logger.err(e.message);
      return 1;
    } catch (e, stackTrace) {
      logger
        ..err('An unexpected error occurred: $e')
        ..err('$stackTrace');
      return 1;
    }
  }

  @override
  Future<int?> runCommand(ArgResults topLevelResults) async {
    if (topLevelResults['version'] == true) {
      logger.info('my_cli version: 1.0.0');
      return 0;
    }
    return super.runCommand(topLevelResults);
  }
}

/// A custom exception specific to the domain.
class AppException implements Exception {
  const AppException(this.message);
  final String message;

  @override
  String toString() => message;
}

lib/src/commands/my_custom_command.dart

import 'package:args/command_runner.dart';
import 'package:my_cli/logger.dart';

class MyCustomCommand extends Command<int> {
  MyCustomCommand() {
    argParser.addOption(
      'name',
      abbr: 'n',
      help: 'Your name.',
      mandatory: true,
    );
  }

  @override
  String get description => 'A custom command example.';

  @override
  String get name => 'hello';

  @override
  Future<int> run() async {
    final name = argResults?['name'] as String?;
    final progress = logger.progress('Saying hello to $name...');

    // Simulate a time-consuming task
    await Future<void>.delayed(const Duration(seconds: 1));

    progress.complete('Hello, $name!');
    return 0; // Success
  }
}

🤖 Instructions for the Agent

When requested by the user to "create a CLI tool for doing X", etc.:

  1. Follow the contents of this skill to structure a project centered around args and mason_logger. Always specify the latest stable Dart SDK version (where the patch version is 0, e.g., ^3.11.0) in pubspec.yaml.
  2. Determine the directory structure and orchestrate/propose a set of commands based on the requirements.
  3. Introduce pedantic_mono and generate high-quality code that adheres to strict static analysis.
  4. (If necessary) After development is complete, document the usage instructions in README.md and present the user with installation steps, such as using dart pub global activate --source path..

平台分布

Codex

38.72%
按下载量换算185

Claude

27.47%
按下载量换算131

Cursor

17.54%
按下载量换算84

Gemini CLI

8.6%
按下载量换算41

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/mono0926/skills --skill dart-cli-creator 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

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

继续浏览同类 Skills