Token导航 LogoToken导航TokenDH.com
运维和基础设施执行命令github未标认证来源可访问clear审计提醒

workflow-automation工作流程自动化

Agent Skill

workflow-automation 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

302,342

周安装

12,616

GitHub Stars

88

下载量

100,705
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/supercent-io/skills-template --skill workflow-automation

简介

使用 npm 脚本、Makefile、Git 挂钩和 shell 脚本自动执行开发任务。

  • 涵盖 npm 脚本、Makefile、Husky Git 挂钩以及用于设置、部署和 CI/CD 工作流程的自定义 shell 脚本
  • 包括集成到开发管道中的预提交自动化、linting、测试和类型检查
  • 提供 GitHub Actions 工作流程模板,用于跨推送和拉取请求事件的持续集成
  • 强调幂等性、错误处理和安全约束,例如避免硬编码秘密和未经确认的破坏性命令

SKILL.md

Workflow Automation

When to use this skill

  • Repetitive tasks: running the same commands every time
  • Complex builds: multi-step build processes
  • Team onboarding: a consistent development environment

Instructions

Step 1: npm scripts

package.json:

{
  "scripts": {
    "dev": "nodemon src/index.ts",
    "build": "tsc && vite build",
    "test": "jest --coverage",
    "test:watch": "jest --watch",
    "lint": "eslint src --ext .ts,.tsx",
    "lint:fix": "eslint src --ext .ts,.tsx --fix",
    "format": "prettier --write \"src/**/*.{ts,tsx,json}\"",
    "type-check": "tsc --noEmit",
    "pre-commit": "lint-staged",
    "prepare": "husky install",
    "clean": "rm -rf dist node_modules",
    "reset": "npm run clean && npm install",
    "docker:build": "docker build -t myapp .",
    "docker:run": "docker run -p 3000:3000 myapp"
  }
}

Step 2: Makefile

Makefile:

.PHONY: help install dev build test clean docker

.DEFAULT_GOAL := help

help: ## Show this help
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

install: ## Install dependencies
	npm install

dev: ## Start development server
	npm run dev

build: ## Build for production
	npm run build

test: ## Run all tests
	npm test

lint: ## Run linter
	npm run lint

lint-fix: ## Fix linting issues
	npm run lint:fix

clean: ## Clean build artifacts
	rm -rf dist coverage

docker-build: ## Build Docker image
	docker build -t myapp:latest .

docker-run: ## Run Docker container
	docker run -d -p 3000:3000 --name myapp myapp:latest

deploy: build ## Deploy to production
	@echo "Deploying to production..."
	./scripts/deploy.sh production

ci: lint test build ## Run CI pipeline locally
	@echo "✅ CI pipeline passed!"

Usage:

make help        # Show all commands
make dev         # Start development
make ci          # Run full CI locally

Step 3: Husky + lint-staged (Git Hooks)

package.json:

{
  "lint-staged": {
    "*.{ts,tsx}": [
      "eslint --fix",
      "prettier --write"
    ],
    "*.{json,md}": [
      "prettier --write"
    ]
  }
}

.husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo "Running pre-commit checks..."

# Lint staged files
npx lint-staged

# Type check
npm run type-check

# Run tests related to changed files
npm test -- --onlyChanged

echo "✅ Pre-commit checks passed!"

Step 4: Task Runner scripts

scripts/dev-setup.sh:

#!/bin/bash
set -e

echo "🚀 Setting up development environment..."

# Check prerequisites
if ! command -v node &> /dev/null; then
    echo "❌ Node.js is not installed"
    exit 1
fi

if ! command -v docker &> /dev/null; then
    echo "❌ Docker is not installed"
    exit 1
fi

# Install dependencies
echo "📦 Installing dependencies..."
npm install

# Copy environment file
if [ ! -f .env ]; then
    echo "📄 Creating .env file..."
    cp .env.example .env
    echo "⚠️ Please update .env with your configuration"
fi

# Start Docker services
echo "🐳 Starting Docker services..."
docker-compose up -d

# Wait for database
echo "⏳ Waiting for database..."
./scripts/wait-for-it.sh localhost:5432 --timeout=30

# Run migrations
echo "🗄️ Running database migrations..."
npm run migrate

# Seed data (optional)
read -p "Seed database with sample data? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
    npm run seed
fi

echo "✅ Development environment ready!"
echo "Run 'make dev' to start the development server"

scripts/deploy.sh:

#!/bin/bash
set -e

ENV=$1

if [ -z "$ENV" ]; then
    echo "Usage: ./deploy.sh [staging|production]"
    exit 1
fi

echo "🚀 Deploying to $ENV..."

# Build
echo "📦 Building application..."
npm run build

# Run tests
echo "🧪 Running tests..."
npm test

# Deploy based on environment
if [ "$ENV" == "production" ]; then
    echo "🌍 Deploying to production..."
    # Production deployment logic
    ssh production "cd /app && git pull && npm install && npm run build && pm2 restart all"
elif [ "$ENV" == "staging" ]; then
    echo "🧪 Deploying to staging..."
    # Staging deployment logic
    ssh staging "cd /app && git pull && npm install && npm run build && pm2 restart all"
fi

echo "✅ Deployment to $ENV completed!"

Step 5: GitHub Actions workflow automation

.github/workflows/ci.yml:

name: CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run linter
        run: npm run lint

      - name: Type check
        run: npm run type-check

      - name: Run tests
        run: npm test -- --coverage

      - name: Upload coverage
        uses: codecov/codecov-action@v3

Output format

project/
├── scripts/
│   ├── dev-setup.sh
│   ├── deploy.sh
│   ├── test.sh
│   └── cleanup.sh
├── Makefile
├── package.json
└── .husky/
    ├── pre-commit
    └── pre-push

Constraints

Required rules (MUST)

  1. Idempotency: safe to run scripts multiple times
  2. Error handling: clear messages on failure
  3. Documentation: comments on how to use the scripts

Prohibited items (MUST NOT)

  1. Hardcoded secrets: do not include passwords or API keys in scripts
  2. Destructive commands: do not run rm -rf without confirmation

Best practices

  1. Use Make: platform-agnostic interface
  2. Git Hooks: automated quality checks
  3. CI/CD: automated with GitHub Actions

References

Metadata

Version

-- Current version: 1.0.0 -- Last updated: 2025-01-01 -- Compatible platforms: Claude, ChatGPT, Gemini

Tags

#automation #scripts #workflow #npm-scripts #Makefile #utilities

Examples

Example 1: Basic usage

Example 2: Advanced usage

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

24.99%
按下载量换算25,166

OpenCode

24.29%
按下载量换算24,461

Codex

18.35%
按下载量换算18,479

Gemini CLI

13.23%
按下载量换算13,323

Antigravity

6.75%
按下载量换算6,798

Cursor

3%
按下载量换算3,021

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills