Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

packletspacklets 命令行

Agent Skill

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

总安装

306

周安装

13

GitHub Stars

2

下载量

107
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/dtinth/agent-skills --skill packlets

简介

packlets 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态和协作事项进行整理。
  • 支持模块化组件与样式管理。
  • 安装前建议确认权限范围和维护状态。
  • 可结合原始仓库文档进一步验证功能细节。

SKILL.md

Packlets are a nice way to keep your JavaScript codebase somewhat loosely-coupled, without having to separate things into different npm packages.

You follow these 5 rules:

  1. Packlets live in ./src/packlets/<name>/ and the entry point is index.ts.
  2. Files outside a packlet can only import from packlet’s entry point, index.ts.
  3. Files inside a packlet may not import its own entry point, index.ts.
  4. Packlets can import other packlets but cannot create circular dependencies.
  5. Packlets can only import other packlets and npm packages.

There is an ESLint plugin to enforce these rules.

About packlets

Source: https://github.com/microsoft/rushstack/edit/main/eslint/eslint-plugin-packlets/README.md

Motivation

When building a large application, it's a good idea to organize source files into modules, so that their dependencies can be managed. For example, suppose an application's source files can be grouped as follows:

  • src/logging/*.ts - the logging system
  • src/data-model/*.ts - the data model
  • src/reports/*.ts - the report engine
  • src/*.ts - other arbitrary files such as startup code and the main application

Using file folders is helpful, but it's not very strict. Files under src/logging can easily import files from /src/reports, creating a confusing circular import. They can also import arbitrary application files. Also, there is no clear distinction between which files are the "public API" for src/logging versus its private implementation details.

All these problems can be solved by reorganizing the project into NPM packages (or Rush projects). Something like this:

  • @my-app/logging - the logging system
  • @my-app/data-model - the data model
  • @my-app/reports - the report engine
  • @my-app/application - other arbitrary files such as startup code and the main application

However, separating code in this way has some downsides. The projects need to build separately, which has some tooling costs (for example, "watch mode" now needs to consider multiple projects). In a large monorepo, the library may attract other consumers, before the API has been fully worked out.

Packlets provide a lightweight alternative that offers many of the same benefits of packages, but without the package.json file. It's a great way to prototype your project organization before later graduating your packlets into proper NPM packages.

5 rules for packlets

With packlets, our folders would be reorganized as follows:

  • src/packlets/logging/*.ts - the logging system
  • src/packlets/data-model/*.ts - the data model
  • src/packlets/reports/*.ts - the report engine
  • src/*.ts - other arbitrary files such as startup code and the main application

The packlets-tutorial sample project illustrates this layout in full detail.

The basic design can be summarized in 5 rules:

  1. A "packlet" is defined to be a folder path ./src/packlets/<packlet-name>/index.ts. The index.ts file will have the exported APIs. The <packlet-name> name must consist of lower case words separated by hyphens, similar to an NPM package name. Example file paths: src/packlets/controls src/packlets/logger src/packlets/my-long-name NOTE: The packlets cannot be nested deeper in the tree. Like with NPM packages, src/packlets is a flat namespace.
  2. Files outside the packlet folder can only import the packlet root index.ts: src/app/App.ts // Okay import {MainReport} from '../packlets/reports'; // Error: The import statement does not use the packlet's entry point (@rushstack/packlets/mechanics) import {MainReport} from '../packlets/reports/index'; // Error: The import statement does not use the packlet's entry point (@rushstack/packlets/mechanics) import {MainReport} from '../packlets/reports/MainReport';
  3. Files inside a packlet folder should import their siblings directly, not via their own index.ts (which might create a circular reference): src/packlets/logging/Logger.ts // Okay import {MessageType} from "./MessageType"; // Error: Files under a packlet folder must not import from their own index.ts file (@rushstack/packlets/mechanics) import {MessageType} from "."; // Error: Files under a packlet folder must not import from their own index.ts file (@rushstack/packlets/mechanics) import {MessageType} from "./index";
  4. Packlets may reference other packlets, but not in a way that would introduce a circular dependency: src/packlets/data-model/DataModel.ts // Okay import {Logger} from '../../packlets/logging'; src/packlets/logging/Logger.ts // Error: Packlet imports create a circular reference: (@rushstack/packlets/circular-deps) // "logging" is referenced by src/packlets/data-model/DataModel.ts // "data-model" is referenced by src/packlets/logging/Logger.ts import {DataModel} from '../../packlets/data-model';
  5. Other source files are allowed outside the src/packlets folder. They may import a packlet, but packlets must only import from other packlets or NPM packages. src/app/App.ts // Okay import {MainReport} from '../packlets/reports'; src/packlets/data-model/ExampleModel.ts // Error: A local project file cannot be imported. A packlet's dependencies must be // NPM packages and/or other packlets. (@rushstack/packlets/mechanics) import {App} from '../../app/App';

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.3%
按下载量换算38

Claude

28.47%
按下载量换算30

Cursor

20.04%
按下载量换算21

Gemini CLI

9.25%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills