Skip to content

Repository files navigation

create-skill-pkg

English | 简体中文

A CLI tool to quickly scaffold AI Agent "Skill" projects in Python, JavaScript, or TypeScript.

Usage

Run the CLI using npx, pnpm create, or yarn create:

npx create-skill-pkg my-skill
# or
pnpm create skill-pkg my-skill
# or
yarn create skill-pkg my-skill

Features

  • Interactive Prompts: Prompts for project name, description, and language.
  • Multi-Language Support: Choose between Python, JavaScript (Node.js), or TypeScript (Rollup).
  • 5 Premium Agent Templates: Includes Basic, Simple Choice, Workflow, Router, and the ultra-advanced Dynamic Request (Self-growing API asset library) template.
  • Automated Engineering Setup:
    • Automatically initializes a Git repository (git init).
    • Supports one-click injection of Husky + Commitlint to enforce Conventional Commits.
    • Dynamically configures package.json or requirements.txt based on the selected language and template.
  • Agent Skill Standard: Automatically generates the required SKILL.md instruction file (for the Agent) and dual-language README.md files (for humans). Scaffolds standard directories like examples/, references/, and resources/.
  • Advanced TypeScript Support: For TypeScript projects, it automatically nests a fully configured Rollup-powered project inside a src-ts/ directory with its own independent Git repository. It allows you to select UI frameworks (like Vue, React, Solid) and perfectly maps the compiled build output back to the outer scripts/ directory for the Agent to execute.

Examples / Demo

When running npx create-skill-pkg my-awesome-skill, you'll experience a fully immersive scaffolding flow:

✔ Project name: … my-awesome-skill
✔ Skill description: … A powerful AI skill.
✔ Select the primary language for your skill: › TypeScript (Rollup)
✔ Select a SKILL.md template: › Dynamic Request (Self-growing API asset library)
✔ Initialize a git repository? … yes
✔ Add commit convention (Husky + Commitlint)? … yes

Executing npx create-ts-rollup-pkg to scaffold TS project in src-ts...
✔ Select a JS framework: › None (Vanilla TS)

Scaffolding project in /.../my-awesome-skill/src-ts...
Successfully created project src-ts.

Injecting standard Skill files into /.../my-awesome-skill...
✔ Initialized empty Git repository.

Successfully created skill project my-awesome-skill.

Next steps:
  cd my-awesome-skill
  cd src-ts
  npm install  # or pnpm install
  npm run build
  cd ..
  npm install  # to install commitlint & husky if not in workspace
  node scripts/index.js

Commit Convention Interception Example

If you opt-in to Commitlint, writing an arbitrary commit message (like git commit -m "update code") will be ruthlessly rejected by Husky:

⧗   input: update code
✖   subject may not be empty [subject-empty]
✖   type may not be empty [type-empty]

✖   found 2 problems, 0 warnings
ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

husky - commit-msg hook exited with code 1 (error)

You must use standard formats like feat: add awesome feature to successfully commit.

Commit Convention

This project uses commitlint to enforce the Conventional Commits specification. When committing code, your Commit Message must start with a specific prefix, followed by a colon and a space. Common prefixes include:

  • feat: add a new feature (New Feature)
  • fix: resolve a bug (Bug Fix)
  • chore: update configurations (Changes to the build process or auxiliary tools)
  • docs: update documentation (Documentation changes)

If you do not follow this format, the Git Hook will intercept and reject your commit.

Local Development

  1. Clone the repository.
  2. Install dependencies via pnpm install.
  3. Modify the core logic in bin/index.js.
  4. We use Husky and Commitlint to enforce Conventional Commits for the CLI's source code.
  5. When ready to publish a new version of this CLI to NPM, you must log in to the official registry (if using a mirror like CNPM) and run pnpm release:
    npm login --registry=https://registry.npmjs.org/
    pnpm release
    (release-it will automatically bump the version, generate a git tag, and publish).

98b3b7b (feat: rebuild create init)

About

A powerful CLI scaffolding tool to rapidly generate AI Agent Skill projects in Python, Node.js, and TypeScript, featuring premium templates and automated engineering setup.一款强大的 CLI 脚手架工具,用于快速生成基于 Python、Node.js 或 TypeScript 的 AI Agent Skill (技能) 项目,内置顶尖模板与自动化工程配置。

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages